aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/portage/portage.mk29
1 files changed, 20 insertions, 9 deletions
diff --git a/package/portage/portage.mk b/package/portage/portage.mk
index 1d9558995f..33026df934 100644
--- a/package/portage/portage.mk
+++ b/package/portage/portage.mk
@@ -3,14 +3,17 @@
# portage
#
#############################################################
-PORTAGE_DOWNLOAD_VERSION:=2.1.3
-PORTAGE_PATCH_VERSION:=.9
-PORTAGE_VERSION:=$(PORTAGE_DOWNLOAD_VERSION)$(PORTAGE_PATCH_VERSION)
+PORTAGE_BASE_VERSION:=2.1.3
+PORTAGE_DOWNLOAD_VERSION:=$(PORTAGE_BASE_VERSION).16
+PORTAGE_PATCH_VERSION:=.16
+PORTAGE_PATCH_APPLY:=n
+PORTAGE_VERSION:=$(PORTAGE_BASE_VERSION)$(PORTAGE_PATCH_VERSION)
PORTAGE_PATCH:=portage-$(PORTAGE_VERSION).patch.bz2
PORTAGE_SOURCE:=portage-$(PORTAGE_DOWNLOAD_VERSION).tar.bz2
PORTAGE_SITE:=http://gentoo.osuosl.org/distfiles
PORTAGE_CAT:=$(BZCAT)
+PORTAGE_DOWNLOAD_DIR:=$(BUILD_DIR)/portage-$(PORTAGE_DOWNLOAD_VERSION)
PORTAGE_DIR:=$(BUILD_DIR)/portage-$(PORTAGE_VERSION)
PORTAGE_TARGET_DIR:=$(TARGET_DIR)/usr/lib/portage
PORTAGE_TARGET_BINARY:=usr/bin/emerge
@@ -46,23 +49,31 @@ endif
$(DL_DIR)/$(PORTAGE_SOURCE):
$(WGET) -P $(DL_DIR) $(PORTAGE_SITE)/$(PORTAGE_SOURCE)
-$(DL_DIR)/$(PORTAGE_PATCH):
- $(WGET) -P $(DL_DIR) $(PORTAGE_SITE)/$(PORTAGE_PATCH)
+
$(DL_DIR)/$(SANDBOX_SOURCE):
$(WGET) -P $(DL_DIR) $(SANDBOX_SITE)/$(SANDBOX_SOURCE)
portage-source: $(DL_DIR)/$(PORTAGE_SOURCE)
sandbox-source: $(DL_DIR)/$(SANDBOX_SOURCE)
-$(PORTAGE_DIR)/.unpacked: $(DL_DIR)/$(PORTAGE_SOURCE)
+$(PORTAGE_DOWNLOAD_DIR)/.unpacked: $(DL_DIR)/$(PORTAGE_SOURCE)
$(PORTAGE_CAT) $(DL_DIR)/$(PORTAGE_SOURCE) | tar -C $(BUILD_DIR) -xf -
- mv -f $(BUILD_DIR)/portage-$(PORTAGE_DOWNLOAD_VERSION) $(PORTAGE_DIR)
- rm -f $(PORTAGE_DIR)/bin/tbz2tool
touch $@
-$(PORTAGE_DIR)/.patched: $(PORTAGE_DIR)/.unpacked $(DL_DIR)/$(PORTAGE_PATCH)
+ifeq ($(PORTAGE_PATCH_APPLY),y)
+$(DL_DIR)/$(PORTAGE_PATCH):
+ $(WGET) -P $(DL_DIR) $(PORTAGE_SITE)/$(PORTAGE_PATCH)
+
+$(PORTAGE_DIR)/.patched: $(PORTAGE_DOWNLOAD_DIR)/.unpacked $(DL_DIR)/$(PORTAGE_PATCH)
+ mv -f $(BUILD_DIR)/portage-$(PORTAGE_DOWNLOAD_VERSION) $(PORTAGE_DIR)
+ rm -f $(PORTAGE_DIR)/bin/tbz2tool
(cd $(PORTAGE_DIR); $(PORTAGE_CAT) $(DL_DIR)/$(PORTAGE_PATCH) | patch -p0)
touch $@
+else
+$(PORTAGE_DIR)/.patched: $(PORTAGE_DOWNLOAD_DIR)/.unpacked
+ rm -f $(PORTAGE_DIR)/bin/tbz2tool
+ touch $@
+endif
$(SANDBOX_DIR)/.unpacked: $(DL_DIR)/$(SANDBOX_SOURCE)
$(SANDBOX_CAT) $(DL_DIR)/$(SANDBOX_SOURCE) | tar -C $(BUILD_DIR) -xf -