[csw-devel] SF.net SVN: gar:[9360] csw/mgar/gar/v2

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Mar 25 11:57:22 CET 2010


Revision: 9360
          http://gar.svn.sourceforge.net/gar/?rev=9360&view=rev
Author:   dmichelsen
Date:     2010-03-25 10:57:21 +0000 (Thu, 25 Mar 2010)

Log Message:
-----------
mGAR v2: Add .xz support

Modified Paths:
--------------
    csw/mgar/gar/v2/gar.conf.mk
    csw/mgar/gar/v2/gar.lib.mk

Modified: csw/mgar/gar/v2/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2/gar.conf.mk	2010-03-24 23:18:37 UTC (rev 9359)
+++ csw/mgar/gar/v2/gar.conf.mk	2010-03-25 10:57:21 UTC (rev 9360)
@@ -169,6 +169,7 @@
 
 # These are the core packages which must be installed for GAR to function correctly
 
+DEF_BASE_PKGS += CSWxz
 DEF_BASE_PKGS += CSWbzip2
 DEF_BASE_PKGS += CSWdiffutils
 DEF_BASE_PKGS += CSWfindutils

Modified: csw/mgar/gar/v2/gar.lib.mk
===================================================================
--- csw/mgar/gar/v2/gar.lib.mk	2010-03-24 23:18:37 UTC (rev 9359)
+++ csw/mgar/gar/v2/gar.lib.mk	2010-03-25 10:57:21 UTC (rev 9360)
@@ -306,11 +306,17 @@
 	@bzip2 -dc $(DOWNLOADDIR)/$* | gtar $(TAR_ARGS) -xf - -C $(EXTRACTDIR)
 	@$(MAKECOOKIE)
 
+# rule to extract files with tar and xz
+tar-xz-extract-%:
+	@echo " ==> Extracting $(DOWNLOADDIR)/$*"
+	@xz -dc $(DOWNLOADDIR)/$* | gtar $(TAR_ARGS) -xf - -C $(EXTRACTDIR)
+	@$(MAKECOOKIE)
+
 # extract compressed single files
-bz-extract-%:
+gz-extract-%:
 	@echo " ==> Decompressing $(DOWNLOADDIR)/$*"
 	@cp $(DOWNLOADDIR)/$* $(WORKDIR)/
-	@bzip2 -d $(WORKDIR)/$*
+	@gzip -d $(WORKDIR)/$*
 	@$(MAKECOOKIE)
 
 gz-extract-%:
@@ -319,6 +325,12 @@
 	@gzip -d $(WORKDIR)/$*
 	@$(MAKECOOKIE)
 
+xz-extract-%:
+	@echo " ==> Decompressing $(DOWNLOADDIR)/$*"
+	@cp $(DOWNLOADDIR)/$* $(WORKDIR)/
+	@xz -d $(WORKDIR)/$*
+	@$(MAKECOOKIE)
+
 # extra dependency rule for git repos, that will allow the user
 # to supply an alternate target at their discretion
 git-extract-%:
@@ -379,6 +391,9 @@
 extract-archive-%.tbz: tar-bz-extract-%.tbz
 	@$(MAKECOOKIE)
 
+extract-archive-%.tar.xz: tar-xz-extract-%.tar.xz
+	@$(MAKECOOKIE)
+
 extract-archive-%.zip: zip-extract-%.zip
 	@$(MAKECOOKIE)
 
@@ -388,10 +403,13 @@
 extract-archive-%.deb: deb-bin-extract-%.deb
 	@$(MAKECOOKIE)
 
+extract-archive-%.gz: gz-extract-%.gz
+	@$(MAKECOOKIE)
+
 extract-archive-%.bz2: bz-extract-%.bz2
 	@$(MAKECOOKIE)
 
-extract-archive-%.gz: gz-extract-%.gz
+extract-archive-%.xz: xz-extract-%.xz
 	@$(MAKECOOKIE)
 
 extract-archive-%.git: git-extract-%.git
@@ -413,6 +431,12 @@
 GARPATCH = gpatch -d$(PATCHDIR) -p$(PATCHDIRLEVEL) -F$(PATCHDIRFUZZ)
 BASEWORKSRC = $(shell basename $(WORKSRC))
 
+# apply xzipped patches
+xz-patch-%:
+	@echo " ==> Applying patch $(DOWNLOADDIR)/$*"
+	@xz -dc $(DOWNLOADDIR)/$* | $(GARPATCH)
+	@$(MAKECOOKIE)
+
 # apply bzipped patches
 bz-patch-%:
 	@echo " ==> Applying patch $(DOWNLOADDIR)/$*"
@@ -448,6 +472,9 @@
 # file extension.  Often support for a given patch format can be handled by
 # simply adding a rule here.
 
+patch-extract-%.xz: xz-patch-%.xz
+	@$(MAKECOOKIE)
+
 patch-extract-%.bz: bz-patch-%.bz
 	@$(MAKECOOKIE)
 
@@ -513,7 +540,7 @@
 # build from a standard gnu-style makefile's default rule.
 build-%/Makefile:
 	@echo " ==> Running make in $*"
-	@$(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_VARS),$(TTT)="$(BUILD_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $* $(BUILD_ARGS)
+	$(BUILD_ENV) $(MAKE) $(PARALLELMFLAGS) $(foreach TTT,$(BUILD_OVERRIDE_VARS),$(TTT)="$(BUILD_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(BUILD_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $* $(BUILD_ARGS)
 	@$(MAKECOOKIE)
 
 build-%/makefile:
@@ -568,7 +595,7 @@
 # Run tests on pre-built sources
 test-%/Makefile:
 	@echo " ==> Running make $(TEST_TARGET) in $*"
-	@$(TEST_ENV) $(MAKE) $(foreach TTT,$(TEST_OVERRIDE_VARS),$(TTT)="$(TEST_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(TEST_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $* $(TEST_ARGS) $(TEST_TARGET)
+	$(TEST_ENV) $(MAKE) $(foreach TTT,$(TEST_OVERRIDE_VARS),$(TTT)="$(TEST_OVERRIDE_VAR_$(TTT))") $(foreach TTT,$(TEST_OVERRIDE_DIRS),$(TTT)="$($(TTT))") -C $* $(TEST_ARGS) $(TEST_TARGET)
 	@$(MAKECOOKIE)
 
 test-%/makefile:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list