/usr/bin/unzip not being installed on 8.3-STABLE
Dag-Erling Smørgrav
des at des.no
Tue May 29 08:42:45 UTC 2012
Doug Barton <dougb at FreeBSD.org> writes:
> I saw your followup, and I think you're probably right ... the problem
> is that there are some things in the ports tree that are conditional on
> OSVERSION, so the fact that it works on HEAD and 9 doesn't necessarily
> mean that it will work in 8.
Well, actually, ports will *never* use the base system unzip:
.if defined(USE_ZIP)
EXTRACT_DEPENDS+= ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
.endif
[...]
UNZIP_CMD?= ${LOCALBASE}/bin/unzip
I thought they did, but I guess I must have forgotten to submit the
patch I have in my tree:
--- bsd.commands.mk 23 May 2012 08:17:48 -0000 1.11
+++ bsd.commands.mk 25 May 2012 08:32:36 -0000
@@ -89,7 +89,11 @@
UMOUNT?= /sbin/umount
UNAME?= /usr/bin/uname
UNMAKESELF_CMD?= ${LOCALBASE}/bin/unmakeself
+.if exists(/usr/bin/unzip)
+UNZIP_CMD?= /usr/bin/unzip
+.else
UNZIP_CMD?= ${LOCALBASE}/bin/unzip
+.endif
WHICH?= /usr/bin/which
XARGS?= /usr/bin/xargs
XMKMF?= ${LOCALBASE}/bin/xmkmf -a
which causes the ports tree to *use* the base unzip but does not remove
the dependency on the port; for that, you need something like this:
--- bsd.port.mk 24 May 2012 07:11:40 -0000 1.711
+++ bsd.port.mk 29 May 2012 08:38:43 -0000
@@ -1639,7 +1639,7 @@
.if defined(PATCHFILES)
.if ${PATCHFILES:M*.zip}x != x
-PATCH_DEPENDS+= ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
+PATCH_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip
.endif
.endif
@@ -1678,7 +1678,7 @@
.endif
.if defined(USE_ZIP)
-EXTRACT_DEPENDS+= ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
+EXTRACT_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip
.endif
.if defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )
EXTRACT_DEPENDS+= ${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz
It is probably safe to *always* use the base system unzip (i.e. not set
{EXTRACT,PATCH}_DEPENDS at all) on 9.0 and newer, but that would
definitely require an exp run.
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-stable
mailing list