The patch adds lzip support to the ports framework. I tested
"EXTRACT_SUFX = .tar.lz" with some ports and everything works without
problems.
I've added also lzip to PATCH_CASES because I think lzip can help to
reduce the bandwidth consumption for patches hosted by openbsd
developers.
I couldn't test lunzip on VAX because sihm fails during the OpenBSD
installation. Theorically lunzip should work on VAX. The problem of xz
(another user of the lzma algorithm) is the datasize of 40MB on VAX with
files compressed with a bigger dictionary size. The files compressed
with lzip -9 will never use more than 33MB of RAM during the
decompression.
I'll send another mail with the patch for the man page.
OK?
Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1246
diff -u -p -r1.1246 bsd.port.mk
--- bsd.port.mk 3 Nov 2013 15:45:00 -0000 1.1246
+++ bsd.port.mk 5 Nov 2013 01:31:06 -0000
@@ -1192,11 +1192,15 @@ _USE_ZIP ?= Yes
.if !empty(EXTRACT_ONLY:M*.tar.xz)
_USE_XZ ?= Yes
.endif
+.if !empty(EXTRACT_ONLY:M*.tar.lz)
+_USE_LZIP ?= Yes
+.endif
.if !empty(EXTRACT_ONLY:M*.tar.bz2) || !empty(EXTRACT_ONLY:M*.tbz2) ||
!empty(EXTRACT_ONLY:M*.tbz) || \
(defined(PATCHFILES) && !empty(_LIST_PATCHFILES:M*.bz2))
_USE_BZIP2 ?= Yes
.endif
_USE_XZ ?= No
+_USE_LZIP ?= No
_USE_ZIP ?= No
_USE_BZIP2 ?= No
@@ -1210,6 +1214,11 @@ BUILD_DEPENDS += archivers/xz
EXTRACT_CASES += *.tar.xz) \
xzcat ${FULLDISTDIR}/$$archive| ${TAR} xf -;;
.endif
+.if ${_USE_LZIP:L} != "no"
+BUILD_DEPENDS += archivers/lzip/lunzip
+EXTRACT_CASES += *.tar.lz) \
+ lunzip -c ${FULLDISTDIR}/$$archive| ${TAR} xf -;;
+.endif
.if ${_USE_ZIP:L} != "no"
BUILD_DEPENDS += archivers/unzip
EXTRACT_CASES += *.zip) \
@@ -1237,6 +1246,10 @@ PATCH_CASES ?=
.if ${_USE_BZIP2:L} != "no"
PATCH_CASES += *.bz2) \
${BZIP2} -dc $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
+.endif
+.if ${_USE_LZIP:L} != "no"
+PATCH_CASES += *.lz) \
+ lunzip -c $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
.endif
PATCH_CASES += *.Z|*.gz) \
${GZCAT} $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;