Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Dec 2010 13:44:54 GMT
From:      Alex Kozlov <spam@rm-rf.kiev.ua>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/153429: [patch] Fix explicite uses of unzip in ports
Message-ID:  <201012241344.oBODis9V070358@red.freebsd.org>
Resent-Message-ID: <201012241350.oBODo75D008242@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         153429
>Category:       ports
>Synopsis:       [patch] Fix explicite uses of unzip in ports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 24 13:50:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Alex Kozlov
>Release:        RELENG_8
>Organization:
private
>Environment:
>Description:
Fix explicite uses of unzip in ports. Also cleanup audio/linux-mbrola Makefile.

List of ports:
audio/linux-mbrola/Makefile
devel/ros-nxt/Makefile
editors/openoffice.org-2/Makefile
editors/openoffice.org-3-RC/Makefile
editors/openoffice.org-3-devel/Makefile
editors/openoffice.org-vcltesttool/Makefile
emulators/vmsbackup/Makefile
games/inform/Makefile
games/sdb/Makefile
games/uhexen/Makefile
java/sun-wtk/Makefile
mail/mailscanner/Makefile
misc/mc/Makefile
textproc/docbook-xml/Makefile
textproc/sdocbook-xml/Makefile
www/pebble/Makefile
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: audio/linux-mbrola/Makefile
@@ -21,7 +21,7 @@
 
 CONFLICTS=	mbrola-*
 NO_BUILD=	yes
-ONLY_FOR_ARCHS=	alpha amd64 i386
+IA32_BINARY_PORT=	yes
 USE_LINUX=	yes
 USE_ZIP=	yes
 RESTRICTED=	for non-commercial, non-military applications only
@@ -36,7 +36,7 @@
 
 do-extract:
 	@${MKDIR} ${WRKSRC}
-	@unzip -qo ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}.zip -d ${WRKSRC}
+	@${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}.zip -d ${WRKSRC}
 
 do-patch:
 	@${RM} -f ${WRKSRC}/mbrola-FreeBSD-i386-aout
@@ -44,11 +44,7 @@
 .include <bsd.port.pre.mk>
 
 do-install:
-.if (${ARCH} == "alpha")
-	@${INSTALL_PROGRAM} ${WRKSRC}/mbrola-linux-alpha ${PREFIX}/bin/mbrola
-.else
 	@${INSTALL_PROGRAM} ${WRKSRC}/mbrola-linux-i386 ${PREFIX}/bin/mbrola
-.endif
 	@${CHMOD} +x ${PREFIX}/bin/mbrola
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
Index: devel/ros-nxt/Makefile
@@ -63,7 +63,7 @@
 	${CP} ${_DISTDIR}/nxt-python-1.1.2.zip ${WRKSRC}/nxt_python/build
 	# already extract and mark as such because we have to patch it
 	(cd ${WRKSRC}/nxt_python/build ; \
-	 ${LOCALBASE}/bin/unzip -q nxt-python-1.1.2.zip ; \
+	 ${UNZIP_CMD} -q nxt-python-1.1.2.zip ; \
 	 ${TOUCH} nxt-python-1.1.2/unpacked)
 	# remove nxt_rviz_plugin, it is unbuildable right now
 	# and keeping it here breaks rospack
Index: editors/openoffice.org-3-RC/Makefile
@@ -193,7 +193,7 @@
 pre-configure:
 #Workaround for gperf. #i85469#
 	@${LN} -sf ${LOCALBASE}/bin/gperf ${WRKSRC}/solenv/bin/gperf
-	@${LN} -sf ${LOCALBASE}/bin/unzip ${WRKSRC}/solenv/bin/unzip
+	@${LN} -sf ${UNZIP_CMD} ${WRKSRC}/solenv/bin/unzip
 .if defined(WITH_KDE4)
 	@${LN} -sf ${LOCALBASE}/bin/moc-qt4 ${WRKSRC}/solenv/bin/moc
 .endif
Index: editors/openoffice.org-2/Makefile
@@ -181,7 +181,7 @@
 pre-configure:
 #Workaround for gperf. #i85469#
 	@${LN} -sf ${LOCALBASE}/bin/gperf ${WRKSRC}/solenv/bin/gperf
-	@${LN} -sf ${LOCALBASE}/bin/unzip ${WRKSRC}/solenv/bin/unzip
+	@${LN} -sf ${UNZIP_CMD} ${WRKSRC}/solenv/bin/unzip
 
 do-build:
 	@cd ${WRKSRC} ; ./bootstrap
Index: editors/openoffice.org-3-devel/Makefile
@@ -200,7 +200,7 @@
 pre-configure:
 #Workaround for gperf. #i85469#
 	@${LN} -sf ${LOCALBASE}/bin/gperf ${WRKSRC}/solenv/bin/gperf
-	@${LN} -sf ${LOCALBASE}/bin/unzip ${WRKSRC}/solenv/bin/unzip
+	@${LN} -sf ${UNZIP_CMD} ${WRKSRC}/solenv/bin/unzip
 .if defined(WITH_KDE4)
 	@${LN} -sf ${LOCALBASE}/bin/moc-qt4 ${WRKSRC}/solenv/bin/moc
 .endif
Index: editors/openoffice.org-vcltesttool/Makefile
@@ -124,7 +124,7 @@
 pre-configure:
 #Workaround for gperf. #i85469#
 	@${LN} -sf ${LOCALBASE}/bin/gperf ${WRKSRC}/solenv/bin/gperf
-	@${LN} -sf ${LOCALBASE}/bin/unzip ${WRKSRC}/solenv/bin/unzip
+	@${LN} -sf ${UNZIP_CMD} ${WRKSRC}/solenv/bin/unzip
 
 do-build:
 	@cd ${WRKSRC} ; ./bootstrap
Index: emulators/vmsbackup/Makefile
@@ -26,7 +26,7 @@
 
 do-extract:
 	${MKDIR} ${WRKSRC}
-	unzip ${DISTDIR}/${DISTNAME} -d ${WRKSRC}
+	${UNZIP_CMD} ${DISTDIR}/${DISTNAME} -d ${WRKSRC}
 
 post-patch:
 	@${REINPLACE_CMD} -e 's#gets(ans);#fgets(ans, 80, stdin);#' ${WRKSRC}/vmsbackup.c
Index: games/uhexen/Makefile
@@ -43,7 +43,7 @@
 
 post-extract:
 .if !defined(WITHOUT_WAD)
-	@${LOCALBASE}/bin/unzip -qo ${DISTDIR}/hexen.zip \
+	@${UNZIP_CMD} -qo ${DISTDIR}/hexen.zip \
 		-d ${WRKSRC}
 .endif
 
Index: games/inform/Makefile
@@ -36,7 +36,8 @@
 post-install:
 	${MKDIR} ${PREFIX}/share/inform
 	(cd ${PREFIX}/share/inform && \
-		unzip -qq -o ${DISTDIR}/${DIST_SUBDIR}/inform_library611.zip)
+		${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} \
+		${DISTDIR}/${DIST_SUBDIR}/inform_library611.zip)
 .for file in English.h Grammar.h Parser.h VerbLib.h infix.h linklpa.h \
 		linklv.h parserm.h verblibm.h
 	${CHMOD} ${SHAREMODE} ${PREFIX}/share/inform/${file}
@@ -46,11 +47,11 @@
 	${RM} ${PREFIX}/share/inform/readme.txt
 .else
 	${MKDIR} ${PREFIX}/share/doc/inform
-	(umask 222 && unzip -qq -o -d ${PREFIX}/share/doc/inform \
+	(umask 222 && ${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} \
+		-d ${PREFIX}/share/doc/inform \
 		${DISTDIR}/${DIST_SUBDIR}/designers_manual_4.zip)
 	${MV} ${PREFIX}/share/inform/readme.txt ${PREFIX}/share/doc/inform
 	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/doc/inform
 .endif
 
-
 .include <bsd.port.mk>
Index: games/sdb/Makefile
@@ -43,7 +43,7 @@
 	${RM} ${WRKSRC}/models/*
 	@cd ${WRKSRC}/models && \
 		${RM} -f * && \
-		unzip -qj ${DISTDIR}/shotgun-debugger-1.0.mac-ppc.zip \
+		${UNZIP_CMD} -qj ${DISTDIR}/shotgun-debugger-1.0.mac-ppc.zip \
 			'sdb-1.0-macosx/models/*.md2b'
 .endif
 
Index: www/pebble/Makefile
@@ -42,7 +42,7 @@
 PEBBLE_CONTEXT=	WEB-INF/applicationContext-pebble.xml
 
 do-patch:
-	cd ${WRKSRC} && ${LOCALBASE}/bin/unzip -o pebble.war "${PEBBLE_CONTEXT}"
+	cd ${WRKSRC} && ${UNZIP_CMD} -o pebble.war "${PEBBLE_CONTEXT}"
 	${SED} -i.bak 's,/WEB-INF/pebble\.properties,file:${PEBBLE_PROPERTIES},' "${WRKSRC}/${PEBBLE_CONTEXT}"
 	cd ${WRKSRC} && ${LOCALBASE}/bin/zip -u pebble.war ${PEBBLE_CONTEXT}
 
Index: mail/mailscanner/Makefile
@@ -217,7 +217,7 @@
 		's,/usr/bin/wget,${LOCALBASE}/bin/wget,g;' \
 		${WRKSRC}/lib/sophos-autoupdate
 	${PERL} -pi -e \
-		's,/usr/bin/unzip,${LOCALBASE}/bin/unzip,g;' \
+		's,/usr/bin/unzip,${UNZIP_CMD},g;' \
 		${WRKSRC}/lib/sophos-autoupdate
 .for FILE in ${USRLOCAL_FILES_LIB}
 	${PERL} -pi -e \
Index: misc/mc/Makefile
@@ -29,7 +29,7 @@
 USE_PERL5=	yes
 USE_XZ=		yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	ZIP=${LOCALBASE}/bin/zip UNZIP=${LOCALBASE}/bin/unzip
+CONFIGURE_ENV=	ZIP=${LOCALBASE}/bin/zip UNZIP=${UNZIP_CMD}
 
 OPTIONS=	SLANG		"Build with SLang library" on \
 		ICONV		"Build with iconv recoding" on \
Index: textproc/docbook-xml/Makefile
@@ -36,7 +36,7 @@
 	@[ -d ${DOCBOOKDIR}/ent ] || ${MKDIR} ${DOCBOOKDIR}/ent
 
 do-install:
-	for file in `unzip -l ${DISTDIR}/${DISTFILES}|${AWK} '/:[0-9].*[^\/]$$/{print $$4}'`; do \
+	for file in `${UNZIP_CMD} -l ${DISTDIR}/${DISTFILES}|${AWK} '/:[0-9].*[^\/]$$/{print $$4}'`; do \
 		${INSTALL_DATA} ${WRKSRC}/$$file ${DOCBOOKDIR}/$$file; \
 	done
 
Index: textproc/sdocbook-xml/Makefile
@@ -37,7 +37,7 @@
 
 do-extract:
 	${MKDIR} ${WRKDIR}; \
-	(cd ${WRKDIR} && unzip -oq ${DISTDIR}/${DISTFILES})
+	(cd ${WRKDIR} && ${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES})
 
 post-patch:
 	${SED} -e 's#@@DTDDIR@@#${SDOCBOOKDIR}#' < ${FILESDIR}/catalog.xml > ${WRKSRC}/catalog.xml
Index: java/sun-wtk/Makefile
@@ -41,7 +41,7 @@
 	@cd ${WRKDIR} \
 	&& dd bs=1024 if=${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \
 		of=${WRKDIR}/j2mewtk-solaris.zip skip=20 2>/dev/null
-	@${LOCALBASE}/bin/unzip -qo ${WRKDIR}/j2mewtk-solaris.zip -d ${WRKSRC}
+	@${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${WRKDIR}/j2mewtk-solaris.zip -d ${WRKSRC}
 	@${FIND} ${WRKSRC} -type f -exec ${CHMOD} 0644 {} \+
 	@${FIND} ${WRKSRC} -type d -exec ${CHMOD} 0755 {} \+
 	@${FIND} ${WRKSRC}/bin ! -name '*.jar' -exec ${CHMOD} 0755 {} \;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012241344.oBODis9V070358>