From de4335b4433e604ccbd266982ad1b429cc6fea4b Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 23 May 2014 12:06:08 +0200 Subject: [PATCH] base-fiasco: migrate to new ports mechanism Issue #1082 --- repos/base-fiasco/Makefile | 58 +------------------------ repos/base-fiasco/mk/spec-fiasco.mk | 4 +- repos/base-fiasco/ports/fiasco.hash | 1 + repos/base-fiasco/ports/fiasco.port | 13 ++++++ repos/base-fiasco/src/kernel/target.inc | 2 +- 5 files changed, 18 insertions(+), 60 deletions(-) create mode 100644 repos/base-fiasco/ports/fiasco.hash create mode 100644 repos/base-fiasco/ports/fiasco.port diff --git a/repos/base-fiasco/Makefile b/repos/base-fiasco/Makefile index 7534f4860f..ba10c4fabf 100644 --- a/repos/base-fiasco/Makefile +++ b/repos/base-fiasco/Makefile @@ -1,57 +1 @@ -# -# \brief Download, and unpack Fiasco and addtional needed tools (sigma0, bootstrap) -# \author Stefan Kalkowski -# \date 2011-07-18 -# - -VERBOSE ?= @ -ECHO = @echo -DOWNLOAD_DIR = download -CONTRIB_DIR = contrib -FIASCO_ARCHIVE = 3rd_fiasco.tar.bz2 -FIASCO_URI = http://downloads.sourceforge.net/project/genode/3rd/$(FIASCO_ARCHIVE) -PATCHES = $(shell find patches -name *.patch) - -# -# Utility to check if a tool is installed -# -check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.)) - -$(call check_tool,wget) -$(call check_tool,patch) -$(call check_tool,tar) -$(call check_tool,byacc) - -# -# Print help information by default -# -help: - $(ECHO) - $(ECHO) "Prepare the Fiasco base repository" - $(ECHO) - $(ECHO) "--- available commands ---" - $(ECHO) "prepare - download and extract the Fiasco source code" - $(ECHO) "clean - clean everything except downloaded archives" - $(ECHO) "cleanall - clean everything including downloaded archives" - $(ECHO) - -$(DOWNLOAD_DIR)/$(FIASCO_ARCHIVE): - $(ECHO) "downloading source code to '$(DOWNLOAD_DIR)/'" - $(VERBOSE)mkdir -p $(DOWNLOAD_DIR) - $(VERBOSE)wget -c $(FIASCO_URI) -O $@ - -$(CONTRIB_DIR): $(DOWNLOAD_DIR)/$(FIASCO_ARCHIVE) - $(ECHO) "unpacking source code to '$(CONTRIB_DIR)/'" - $(VERBOSE)tar xjf $< - $(VERBOSE)mv 3rd $@ - $(ECHO) "applying patches to '$@/'" - $(VERBOSE)for i in $(PATCHES); do patch -d $@ -p0 < $$i; done - $(VERBOSE)touch $@ - -prepare: $(CONTRIB_DIR) - -clean: - $(VERBOSE)rm -rf $(CONTRIB_DIR) - -cleanall: clean - $(VERBOSE)rm -rf $(DOWNLOAD_DIR) +include ../../tool/prepare.mk diff --git a/repos/base-fiasco/mk/spec-fiasco.mk b/repos/base-fiasco/mk/spec-fiasco.mk index 6d76b306bd..d90220c793 100644 --- a/repos/base-fiasco/mk/spec-fiasco.mk +++ b/repos/base-fiasco/mk/spec-fiasco.mk @@ -10,8 +10,8 @@ -include $(call select_from_repositories,etc/fiasco.conf) -include $(BUILD_BASE_DIR)/etc/fiasco.conf -L4_BUILD_DIR ?= $(BUILD_BASE_DIR)/l4 -L4_SRC_DIR ?= $(REP_DIR)/contrib/fiasco/snapshot +L4_BUILD_DIR := $(BUILD_BASE_DIR)/l4 +L4_SRC_DIR := $(call select_from_ports,fiasco)/src/kernel/fiasco/fiasco/snapshot # # L4/sys headers diff --git a/repos/base-fiasco/ports/fiasco.hash b/repos/base-fiasco/ports/fiasco.hash new file mode 100644 index 0000000000..2995a4d0e7 --- /dev/null +++ b/repos/base-fiasco/ports/fiasco.hash @@ -0,0 +1 @@ +dummy \ No newline at end of file diff --git a/repos/base-fiasco/ports/fiasco.port b/repos/base-fiasco/ports/fiasco.port new file mode 100644 index 0000000000..3c0544b201 --- /dev/null +++ b/repos/base-fiasco/ports/fiasco.port @@ -0,0 +1,13 @@ +LICENSE := GPLv2 +VERSION := 1.0 +DOWNLOADS := fiasco.archive +URL(fiasco) := http://downloads.sourceforge.net/project/genode/3rd/3rd_fiasco.tar.bz2 +SHA(fiasco) := 0e7e24ab8ff2780b1854e3a6372b9a9c09c5b47d +DIR(fiasco) := src/kernel/fiasco +PATCHES := $(shell find $(REP_DIR)/patches -name *.patch) +PATCH_OPT := -p0 -d src/kernel/fiasco + +$(call check_tool,wget) +$(call check_tool,patch) +$(call check_tool,tar) +$(call check_tool,byacc) diff --git a/repos/base-fiasco/src/kernel/target.inc b/repos/base-fiasco/src/kernel/target.inc index b736792ff6..281ab4e4d9 100644 --- a/repos/base-fiasco/src/kernel/target.inc +++ b/repos/base-fiasco/src/kernel/target.inc @@ -2,7 +2,7 @@ TARGET = fiasco REQUIRES += fiasco FIASCO_BUILD_DIR = $(BUILD_BASE_DIR)/kernel/$(TARGET) FIASCO = $(FIASCO_BUILD_DIR)/fiasco -FIASCO_SRC = $(REP_DIR)/contrib/fiasco/snapshot/kernel/fiasco +FIASCO_SRC = $(L4_SRC_DIR)/kernel/fiasco STARTUP_LIB = $(TARGET): $(FIASCO)