ports/172392: [patch] bsd.port.mk Use native unzip for zip archives extraction
Alex Kozlov
spam at rm-rf.kiev.ua
Sat Oct 6 11:30:08 UTC 2012
>Number: 172392
>Category: ports
>Synopsis: [patch] bsd.port.mk Use native unzip for zip archives extraction
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 06 11:30:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Alex Kozlov
>Release: RELENG_10
>Organization:
private
>Environment:
>Description:
After libarchive 3.04 import to CURRENT it's possible to use native unzip for extraction of almost all port's zip archives.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: ports/Mk/bsd.port.mk
@@ -1209,6 +1209,13 @@
.endif
.endif
+# XXX Define UNZIP_CMD here, because we need to check OSVERSION
+.if ${OSVERSION} < 1000017
+UNZIP_CMD?= ${LOCALBASE}/bin/unzip
+.else
+UNZIP_CMD?= /usr/bin/unzip
+.endif
+
MASTERDIR?= ${.CURDIR}
.if ${MASTERDIR} != ${.CURDIR}
@@ -1643,7 +1650,7 @@
.endif
.endif
-.if defined(USE_ZIP)
+.if defined(USE_ZIP) && ${OSVERSION} < 1000017
EXTRACT_DEPENDS+= ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
.endif
.if defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )
Index: ports/Mk/bsd.commands.mk
@@ -90,7 +90,9 @@
UMOUNT?= /sbin/umount
UNAME?= /usr/bin/uname
UNMAKESELF_CMD?= ${LOCALBASE}/bin/unmakeself
-UNZIP_CMD?= ${LOCALBASE}/bin/unzip
+# XXX Can't be defined here, because we need to check OSVERSION, which
+# uses ${AWK} in its definition
+#UNZIP_CMD?= ${LOCALBASE}/bin/unzip
WHICH?= /usr/bin/which
XARGS?= /usr/bin/xargs
XMKMF?= ${LOCALBASE}/bin/xmkmf -a
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list