Date: Thu, 6 May 2010 07:32:01 +0300 From: Alex Kozlov <spam@rm-rf.kiev.ua> To: Rob Farmer <rfarmer@predatorlabs.net>, freebsd-current@freebsd.org, spam@rm-rf.kiev.ua Subject: Re: unzip in basesystem Message-ID: <20100506043201.GA75732@ravenloft.kiev.ua>
next in thread | raw e-mail | index | archive | help
--d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 05, 2010 at 03:25:39AM -0700, Rob Farmer wrote: > Unfortunately there are some problems with the base system unzip that > make it preferable to use the port. From the commit log for > bsd.port.mk: > > 9-CURRENT introduced unzip command to the base system. Unfortunately it is > not fully compatible with the archivers/unzip implementation and non-trivial > amount of ports fail to build when using it. Thus we will keep using > archivers/unzip for unzipping source in Ports Collection until someone > volunteer to fix all individual ports. Two most common problems with base > unzip are: > * extracting files without +x flag (some ports rely to execute unzipped > configure scripts, for example) > * different semantics of CR/LF conversion Some time ago I made a patch that fixes this problem. Also about 100 ports have explicit dependency on archivers/unzip. > Error logs of failed port builds with in-base unzip can be made available on > request to portmgr@. Please send it to From address. -- Adios --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Index: games/darkplaces/Makefile @@ -18,6 +18,7 @@ USE_ZIP= yes USE_GMAKE= yes USE_XORG= xxf86dga xpm +USE_DOS2UNIX= darkplaces.txt MAKE_ENV= DP_FS_BASEDIR="${Q1DIR}" WRKSRC= ${WRKDIR}/${PORTNAME} @@ -68,8 +69,8 @@ .endif post-extract: - @${UNZIP_CMD} -aq \ - -o ${WRKDIR}/${PORTNAME}enginesource${PORTVERSION}.zip \ + @${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} \ + ${WRKDIR}/${PORTNAME}enginesource${PORTVERSION}.zip \ -d ${WRKDIR} do-install: @@ -80,7 +81,7 @@ @${TOUCH} ${DATADIR}/dummy .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKDIR}/darkplaces.txt ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/darkplaces.txt ${DOCSDIR} .endif .include <bsd.port.post.mk> Index: games/quake2-ctf/Makefile @@ -20,6 +20,7 @@ COMMENT= Quake II CTF (Capture The Flag) modification USE_ZIP= yes +USE_DOS2UNIX= ../../../ctf/readme.txt ../../../ctf/server.cfg WRKSRC= ${WRKDIR}/${CTF_SRC:S/.tar.gz//}/src/ctf LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME} @@ -36,7 +37,7 @@ @${MKDIR} ${WRKDIR} @${TAR} zxf ${DISTDIR}/${DIST_SUBDIR}/${CTF_SRC} -C ${WRKDIR} \ --include "${CTF_SRC:S/.tar.gz//}/src/ctf/*" - @${UNZIP_CMD} -aq -d ${WRKDIR}/ctf \ + @${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} -d ${WRKDIR}/ctf \ ${DISTDIR}/${DIST_SUBDIR}/${CTF_DATA} -x *.dll *.ico post-extract: Index: games/quake2-data/Makefile @@ -19,6 +19,7 @@ MAINTAINER= alepulver@FreeBSD.org COMMENT= Quake II data files +#XXX need info-unzip for q2-314-demo-x86.exe USE_ZIP= yes NO_WRKSUBDIR= yes Index: games/xevil/Makefile @@ -17,6 +17,7 @@ USE_ZIP= yes USE_XORG= xpm +USE_DOS2UNIX= makefile config.mk cmn/makefile cmn/*.cpp cmn/*.h x11/makefile x11/*.cpp MAKEFILE= makefile ALL_TARGET= freebsd MAKE_JOBS_UNSAFE= yes @@ -32,7 +33,7 @@ @${MKDIR} ${WRKDIR}/${DISTNAME} do-extract: - @unzip -aqo ${DISTDIR}/${DISTFILES} -d ${WRKSRC} + @${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${WRKSRC} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/x11/FREEBSD/xevil ${PREFIX}/bin/xevil Index: graphics/fli2gif/Makefile @@ -12,17 +12,16 @@ MASTER_SITES= http://jeff.bovine.net/download/fli2gif/ DISTNAME= ${PORTNAME}b -MAINTAINER= ports@FreeBSD.org +MAINTAINER= spam@rm-rf.kiev.ua COMMENT= Automatic Flic to animated GIF convertor NO_WRKSUBDIR= yes USE_ZIP= yes +USE_DOS2UNIX= fli2gif.cpp FLI2GIF.TXT post-extract: - @cd ${WRKSRC} && unzip -q -aa source.zip \ - && ${LN} -sf GIF.CPP gif.cpp \ - && ${LN} -sf FLIPLAY.CPP fliplay.cpp + @cd ${WRKSRC} && ${UNZIP_CMD} -qL source.zip do-build: @cd ${WRKSRC} && ${CXX} ${CXXFLAGS} -o ${PORTNAME} *.cpp @@ -31,7 +30,7 @@ ${INSTALL_PROGRAM} ${WRKSRC}/fli2gif ${PREFIX}/bin .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/*.TXT ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/FLI2GIF.TXT ${DOCSDIR} .endif .include <bsd.port.mk> Index: graphics/fli2gif/files/patch-ab @@ -1,40 +0,0 @@ ---- fli2gif.cpp.orig Fri Sep 6 00:10:14 1996 -+++ fli2gif.cpp Fri Nov 1 06:18:18 2002 -@@ -43,7 +43,9 @@ - // ****************** - #include <stdio.h> - #include <stdlib.h> --#include <malloc.h> -+#ifndef __STDC__ -+# include <malloc.h> -+#endif - #include <string.h> - #if defined(__TURBOC__) || defined(_MSC_VER) - #include <conio.h> -@@ -95,7 +97,7 @@ - //############################################################################ - //############################################################################ - //############################################################################ --void main(int argc, char *argv[]) -+int main(int argc, char *argv[]) - { - FILE *fp; - int i, j; -@@ -104,7 +106,7 @@ - // []----------------[] - // | Initialization | - // []----------------[] -- printf("FLI2GIF.EXE -- Automatic Flic to Animated GIF convertor, v1.1\n"); -+ printf("FLI2GIF -- Automatic Flic to Animated GIF convertor, v1.1\n"); - printf(" by JL Enterprises, 1996. (Compiled with " - #if defined(__TURBOC__) - "Borland" -@@ -117,6 +119,8 @@ - " for Windows" - #elif defined(__MSDOS__) || defined(_DOS) - " for MS-DOS" -+ #elif defined(__FreeBSD__) -+ " for FreeBSD" - #endif - ")\n\n"); - { Index: graphics/fli2gif/files/patch-fli2gif.c @@ -0,0 +1,57 @@ +Index: fli2gif.cpp +@@ -43,7 +43,9 @@ + // ****************** + #include <stdio.h> + #include <stdlib.h> +-#include <malloc.h> ++#ifndef __STDC__ ++# include <malloc.h> ++#endif + #include <string.h> + #if defined(__TURBOC__) || defined(_MSC_VER) + #include <conio.h> +@@ -81,7 +83,7 @@ + // *** Function prototypes *** + // ***************************** + void handle_error(int errorcode); +-char *add_extension(char *filename, char *extension, BOOL enforce); ++char *add_extension(char *filename, const char *extension, BOOL enforce); + + + // ************************** +@@ -95,7 +97,7 @@ + //############################################################################ + //############################################################################ + //############################################################################ +-void main(int argc, char *argv[]) ++int main(int argc, char *argv[]) + { + FILE *fp; + int i, j; +@@ -104,7 +106,7 @@ + // []----------------[] + // | Initialization | + // []----------------[] +- printf("FLI2GIF.EXE -- Automatic Flic to Animated GIF convertor, v1.1\n"); ++ printf("FLI2GIF -- Automatic Flic to Animated GIF convertor, v1.1\n"); + printf(" by JL Enterprises, 1996. (Compiled with " + #if defined(__TURBOC__) + "Borland" +@@ -117,6 +119,8 @@ + " for Windows" + #elif defined(__MSDOS__) || defined(_DOS) + " for MS-DOS" ++ #elif defined(__FreeBSD__) ++ " for FreeBSD" + #endif + ")\n\n"); + { +@@ -389,7 +393,7 @@ + // Takes a user-entered filename and adds the specified extension if an + // entension is not explicitly stated in the passed filename. A pointer + // to a static buffer is returned. +-char *add_extension(char *filename, char *extension, BOOL enforce) ++char *add_extension(char *filename, const char *extension, BOOL enforce) + { + static char Path[_MAX_PATH]; + Index: misc/astrolog/Makefile @@ -22,6 +22,7 @@ COMMENT= An astrology program for X11 and alpha-numeric terminals USE_ZIP= yes +USE_DOS2UNIX= ephem/EPHINDEX.TXT .if !defined(WITHOUT_X11) USE_XORG= x11 MAKE_ARGS= -DX11 @@ -35,7 +36,7 @@ post-extract: -@${MKDIR} ${WRKDIR}/ephem - ${UNZIP_CMD} -qao ${_DISTDIR}/${EPHEM} -d ${WRKDIR}/ephem + ${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${EPHEM} -d ${WRKDIR}/ephem post-patch: @${REINPLACE_CMD} -e "s@malloc.h@stdlib.h@g" \ Index: misc/projectionlib/Makefile @@ -16,11 +16,10 @@ LIB_DEPENDS= gctpc.1:${PORTSDIR}/misc/gctpc -EXTRACT_CMD= unzip -a - WRKSRC= ${WRKDIR}/dlgv32/ProjectionLib USE_ZIP= yes +USE_DOS2UNIX= *.cpp *.h USE_LDCONFIG= yes MAKEFILE= ${FILESDIR}/Makefile Index: print/acrobatviewer/Makefile @@ -16,6 +16,7 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Viewer for the PDF files written in Java(TM) +#XXX need info-unzip for archive.zip USE_ZIP= yes USE_JAVA= yes JAVA_VERSION= 1.3+ Index: sysutils/megarc/Makefile @@ -15,6 +15,7 @@ COMMENT= LSI Logic's MegaRAID controlling software USE_ZIP= yes +USE_DOS2UNIX= Release\ History.txt NO_BUILD= yes NO_WRKSUBDIR= yes @@ -25,7 +26,7 @@ PORTDOCS= * post-extract: - @cd ${WRKSRC} && ${UNZIP_CMD} -aqo 'MegaRC 1.04.zip' + @cd ${WRKSRC} && ${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} 'MegaRC 1.04.zip' do-install: ${INSTALL_PROGRAM} ${WRKSRC}/megarc ${PREFIX}/sbin Index: textproc/docbook-420/Makefile @@ -20,7 +20,6 @@ RUN_DEPENDS= ${ISOCAT}:${PORTSDIR}/textproc/iso8879 \ ${XMLCATMGR}:${PORTSDIR}/textproc/xmlcatmgr -BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip USE_ZIP= yes NO_MTREE= yes NO_BUILD= yes @@ -41,7 +40,7 @@ @[ -d ${INSTDIR}/${PORTVERSION} ] || ${MKDIR} ${INSTDIR}/${PORTVERSION} do-install: - @unzip -a -q -o ${DISTDIR}/${DISTFILES} -d ${INSTDIR}/${PORTVERSION} + @${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${INSTDIR}/${PORTVERSION} @${INSTALL_DATA} ${FILESDIR}/catalog ${INSTDIR}/${PORTVERSION}/catalog @${ECHO_CMD} "CATALOG \"${ISOCAT}\"" >> ${INSTDIR}/${PORTVERSION}/catalog @${CHMOD} ${SHAREMODE} ${INSTDIR}/${PORTVERSION}/* Index: textproc/iso8879/Makefile @@ -12,15 +12,14 @@ MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= kuriyama DISTNAME= isoENTS -EXTRACT_SUFX= .zip MAINTAINER= kuriyama@FreeBSD.org COMMENT= Character entity sets from ISO 8879:1986 (SGML) -BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip RUN_DEPENDS= ${XMLCATMGR}:${PORTSDIR}/textproc/xmlcatmgr EXTRACT_ONLY= # empty +USE_ZIP= yes NO_BUILD= yes NO_WRKSUBDIR= yes PLIST_SUB= DTD_NAME=${PORTNAME} XMLCATMGR=${XMLCATMGR} @@ -34,7 +33,7 @@ @[ -d ${INSTDIR} ] || ${MKDIR} ${INSTDIR} do-install: - @unzip -a -q -o ${DISTDIR}/${DISTFILES} -d ${INSTDIR} + @${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${INSTDIR} @${INSTALL_DATA} ${FILESDIR}/catalog ${INSTDIR}/catalog @${CHMOD} ${SHAREMODE} ${INSTDIR}/* @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR} --d6Gm4EdcadzBjdND--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100506043201.GA75732>