cvs commit: src/usr.bin/unzip Makefile unzip.1 unzip.c
David O'Brien
obrien at FreeBSD.org
Mon Jan 14 10:11:55 PST 2008
On Mon, Jan 14, 2008 at 02:35:07AM +0100, Kris Kennaway wrote:
> Tim Kientzle wrote:
>>>> Of course, giving those four ports a build-time dependency
>>>> on the Info-Zip version is arguably the right approach
>>>> in any case.
>>>
>>> That would probably be undesirable because it would mean having to
>>> special case things in the ports tree and/or duplicate code.
>> I'm confused. How is it different from having
>> a build-time dependency on GNU tar? I thought
>> I remembered a few cases where ports installed
>> GNU tar (as a build dependency) and then extracted
>> with GNU tar.
>> This case would seem no different. But I'm far
>> less familiar with the details than you are, so
>> I'll happily bow to your expertise in the matter.
>> Tim Kientzle
>
> These ports currently obtain the unzip port dependency by setting USE_ZIP,
> and then everything just works, i.e. there is logic in bsd.port.mk to
> handle things like distfile extraction.
>
> If we have to special case ports to deal with variant zipfiles that cannot
> be processed by /usr/bin/unzip then it gets messier because we have to
> account for some ports being satisfied with USE_ZIP=yes meaning
> /usr/bin/unzip and some still requiring /usr/ports/archivers/unzip. I'd
> prefer not to have to add those workarounds.
This seems quite easy...
For those four-ish ports 's/USE_ZIP/USE_INFOZIP/'
Index: bsd.commands.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.commands.mk,v
retrieving revision 1.1
diff -u -p -r1.1 bsd.commands.mk
--- bsd.commands.mk 4 Aug 2007 11:37:23 -0000 1.1
+++ bsd.commands.mk 14 Jan 2008 18:08:05 -0000
@@ -83,7 +83,11 @@ TR?= LANG=C /usr/bin/tr
TRUE?= true # Shell builtin
UMOUNT?= /sbin/umount
UNAME?= /usr/bin/uname
+.if defined(USE_INFOZIP)
UNZIP_CMD?= ${LOCALBASE}/bin/unzip
+.else
+UNZIP_CMD?= /usr/bin/unzip
+.endif
WHICH?= /usr/bin/which
XARGS?= /usr/bin/xargs
YACC?= /usr/bin/yacc
Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.589
diff -u -p -r1.589 bsd.port.mk
--- bsd.port.mk 17 Oct 2007 10:12:24 -0000 1.589
+++ bsd.port.mk 14 Jan 2008 18:08:55 -0000
@@ -1339,6 +1345,10 @@ X_WINDOW_SYSTEM ?= xfree86-4
. endif
.endif
+.if defined(USE_INFOZIP)
+USE_ZIP= yes
+.endif
+
.if defined(USE_BZIP2)
EXTRACT_SUFX?= .tar.bz2
.elif defined(USE_ZIP)
@@ -1657,7 +1669,7 @@ LIB32DIR= lib
.endif
PLIST_SUB+= LIB32DIR=${LIB32DIR}
-.if defined(USE_ZIP)
+.if defined(USE_INFOZIP)
EXTRACT_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip
.endif
.if defined(USE_MAKESELF)
More information about the cvs-src
mailing list