Since the sources of libtheora version 1.2.0alpha1 come also in a
tar.xz file (see http://www.theora.org/downloads/ ) and we already
have archivers/xz, I made small change in
/usr/ports/infrastructure/mk/bsd.port.mk to support that
format in distfiles and patches (following the changes for bzip2).
Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1071
diff -u -r1.1071 bsd.port.mk
--- bsd.port.mk 16 Jan 2011 20:36:49 -0000 1.1071
+++ bsd.port.mk 17 Feb 2011 12:13:45 -0000
@@ -745,6 +745,7 @@
TAR ?= /bin/tar
UNZIP ?= unzip
BZIP2 ?= bzip2
+XZ ?= xz
# copy selected info from bsd.own.mk
@@ -1206,8 +1207,13 @@
(defined(PATCHFILES) && !empty(_PATCHFILES:M*.bz2))
_USE_BZIP2 ?= Yes
.endif
+.if !empty(EXTRACT_ONLY:M*.tar.xz) || !empty(EXTRACT_ONLY:M*.txz) || \
+ (defined(PATCHFILES) && !empty(_PATCHFILES:M*.xz))
+_USE_XZ ?= Yes
+.endif
_USE_ZIP ?= No
_USE_BZIP2 ?= No
+_USE_XZ ?= No
EXTRACT_CASES ?=
@@ -1224,6 +1230,11 @@
EXTRACT_CASES += *.tar.bz2|*.tbz2) \
${BZIP2} -dc ${FULLDISTDIR}/$$archive | ${TAR} xf -;;
.endif
+.if ${_USE_XZ:L} != "no"
+BUILD_DEPENDS += archivers/xz
+EXTRACT_CASES += *.tar.xz|*.txz) \
+ ${XZ} -dc ${FULLDISTDIR}/$$archive | ${TAR} xf -;;
+.endif
EXTRACT_CASES += *.tar) \
${TAR} xf ${FULLDISTDIR}/$$archive;;
EXTRACT_CASES += *.shar.gz|*.shar.Z|*.sh.gz|*.sh.Z) \
@@ -1241,6 +1252,10 @@
.if ${_USE_BZIP2:L} != "no"
PATCH_CASES += *.bz2) \
${BZIP2} -dc $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
+.endif
+.if ${_USE_XZ:L} != "no"
+PATCH_CASES += *.xz) \
+ ${XZ} -dc $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
.endif
PATCH_CASES += *.Z|*.gz) \
${GZCAT} $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
--
Dios, gracias por tu amor infinito.
--
Vladimir Támara Patiño.
http://vtamara.pasosdeJesus.org/