Bug 176187 - [bsd.port.mk] [patch] Add and use USE_LHA to handle lha compressed distfiles
[bsd.port.mk] [patch] Add and use USE_LHA to handle lha compressed distfiles
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Martin Wilke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-16 10:50 UTC by christoph.mallon
Modified: 2013-03-07 17:10 UTC (History)
0 users

See Also:


Attachments
0001-Mk-Add-USE_LHA-to-handle-lha-compressed-distfiles.patch (2.71 KB, patch)
2013-02-16 10:50 UTC, christoph.mallon
no flags Details | Diff
0002-all-Use-USE_LHA.patch (7.22 KB, patch)
2013-02-16 10:50 UTC, christoph.mallon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description christoph.mallon 2013-02-16 10:50:00 UTC
These two patches add support for lha compressed distfiles.
The first patch adds the knob USE_LHA, the second uses it in the ports, which use lha.
The maintainers of the ports are X-GANTS-Notified.

Fix: Please apply these patches.

	

dummy file, because GNATS damages every other patch
--- dummy1 ends here ---
Comment 1 Mark Linimon freebsd_committer 2013-02-16 13:24:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

assign
Comment 2 Martin Wilke freebsd_committer 2013-02-24 16:55:02 UTC
Responsible Changed
From-To: portmgr->miwi

take for next exprun
Comment 3 dfilter freebsd_committer 2013-03-07 17:08:22 UTC
Author: miwi
Date: Thu Mar  7 17:08:13 2013
New Revision: 313600
URL: http://svnweb.freebsd.org/changeset/ports/313600

Log:
  - Add new knob USE_LHA [1]
  - Convert few ports to USE_LHA [1]
  - Revert r303619 since CONFIGURE_ENV already sets CPPFLAGS and LDFLAGS by default. [2]
  
  PR:		176187 [1]
  		174790 [2]
  Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> [1]
  		Gerald Pfeifer <gerald@pfeifer.com> [2]

Modified:
  head/Mk/bsd.commands.mk
  head/Mk/bsd.port.mk
  head/astro/luna/Makefile
  head/benchmarks/himenobench/Makefile
  head/converters/uudx/Makefile
  head/games/xchadance/Makefile
  head/japanese/ajaxzip2-data/Makefile
  head/japanese/jstrings/Makefile
  head/japanese/today/Makefile
  head/japanese/zipcodes/Makefile
  head/math/eval/Makefile

Modified: head/Mk/bsd.commands.mk
==============================================================================
--- head/Mk/bsd.commands.mk	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/Mk/bsd.commands.mk	Thu Mar  7 17:08:13 2013	(r313600)
@@ -54,6 +54,7 @@ ID?=		/usr/bin/id
 IDENT?=		/usr/bin/ident
 JOT?=		/usr/bin/jot
 LDCONFIG?=	/sbin/ldconfig
+LHA_CMD?=	${LOCALBASE}/bin/lha
 LN?=		/bin/ln
 LS?=		/bin/ls
 MKDIR?=		/bin/mkdir -p

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/Mk/bsd.port.mk	Thu Mar  7 17:08:13 2013	(r313600)
@@ -91,9 +91,9 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 #				  Default: ${DISTNAME}${EXTRACT_SUFX}
 # EXTRACT_SUFX	- Suffix for archive names
 #				  You never have to set both DISTFILES and EXTRACT_SUFX.
-#				  Default: .tar.bz2 if USE_BZIP2 is set, .zip if USE_ZIP is
-#				  set, .tar.xz if USE_XZ is set, .run if USE_MAKESELF is set,
-#				  .tar.gz otherwise).
+#				  Default: .tar.bz2 if USE_BZIP2 is set, .lzh if USE_LHA is set,
+#				  .zip if USE_ZIP is set, .tar.xz if USE_XZ is set, .run if
+#				  USE_MAKESELF is set, .tar.gz otherwise).
 # MASTER_SITES	- Primary location(s) for distribution files if not found
 #				  locally.  See bsd.sites.mk for common choices for
 #				  MASTER_SITES.
@@ -303,6 +303,7 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 #
 # USE_BZIP2		- If set, this port tarballs use bzip2, not gzip, for
 #				  compression.
+# USE_LHA		- If set, this port distfile uses lha for compression
 # USE_XZ		- If set, this port tarballs use xz (or lzma)
 #				  for compression
 # USE_ZIP		- If set, this port distfile uses zip, not tar w/[bg]zip
@@ -1369,6 +1370,8 @@ ETCDIR?=		${PREFIX}/etc/${PORTNAME}
 
 .if defined(USE_BZIP2)
 EXTRACT_SUFX?=			.tar.bz2
+.elif defined(USE_LHA)
+EXTRACT_SUFX?=			.lzh
 .elif defined(USE_ZIP)
 EXTRACT_SUFX?=			.zip
 .elif defined(USE_XZ)
@@ -1675,6 +1678,9 @@ PKG_DEPENDS+=		${LOCALBASE}/sbin/pkg:${P
 .endif
 .endif
 
+.if defined(USE_LHA)
+EXTRACT_DEPENDS+=	lha:${PORTSDIR}/archivers/lha
+.endif
 .if defined(USE_ZIP)
 EXTRACT_DEPENDS+=	${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
 .endif
@@ -1730,7 +1736,6 @@ MAKE_ENV+=	${b}="${${b}}"
 LIB_DEPENDS+=	readline.6:${PORTSDIR}/devel/readline
 CPPFLAGS+=		-I${LOCALBASE}/include
 LDFLAGS+=		-L${LOCALBASE}/lib -lreadline
-CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 .endif
 .endif
 
@@ -2326,7 +2331,11 @@ PATCH_DIST_ARGS+=	--suffix .orig
 TAR?=	/usr/bin/tar
 
 # EXTRACT_SUFX is defined in .pre.mk section
-.if defined(USE_ZIP)
+.if defined(USE_LHA)
+EXTRACT_CMD?=		${LHA_CMD}
+EXTRACT_BEFORE_ARGS?=	xfqw=${WRKDIR}
+EXTRACT_AFTER_ARGS?=
+.elif defined(USE_ZIP)
 EXTRACT_CMD?=		${UNZIP_CMD}
 EXTRACT_BEFORE_ARGS?=	-qo
 EXTRACT_AFTER_ARGS?=	-d ${WRKDIR}

Modified: head/astro/luna/Makefile
==============================================================================
--- head/astro/luna/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/astro/luna/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -10,17 +10,11 @@ PORTVERSION=	1.9
 CATEGORIES=	astro games
 MASTER_SITES=	http://ftp.vector.co.jp/pack/dos/edu/science/space/
 DISTNAME=	luna19s
-EXTRACT_SUFX=	.lzh
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Display the moon's phase
 
-EXTRACT_DEPENDS=	lha:${PORTSDIR}/archivers/lha
-
-EXTRACT_CMD=	lha
-EXTRACT_BEFORE_ARGS=	xtfqw=${WRKDIR}
-EXTRACT_AFTER_ARGS=	# empty
-
+USE_LHA=	yes
 NO_WRKSUBDIR=	yes
 PLIST_FILES=	bin/luna
 MAKEFILE=	makefile

Modified: head/benchmarks/himenobench/Makefile
==============================================================================
--- head/benchmarks/himenobench/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/benchmarks/himenobench/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -18,10 +18,12 @@ DIST_SUBDIR=	himeno
 MAINTAINER=	maho@FreeBSD.org
 COMMENT=	Himeno bench benchmark, solves Poisson eq. with Jacobi's method
 
+NO_WRKSRCDIR=	yes
+USE_LHA=	yes
+
 .if defined(WITH_ICC)
 BUILD_DEPENDS=	${LOCALBASE}/intel_cc_80/bin/icc:${PORTSDIR}/lang/icc
 .endif
-EXTRACT_DEPENDS=	lha:${PORTSDIR}/archivers/lha
 
 USE_FORTRAN=	yes
 .if defined(WITH_IFC)
@@ -56,11 +58,6 @@ PLIST_SUB+=	WITH_GFORTRAN="@comment "
 PLIST_SUB+=	WITH_GFORTRAN=""
 .endif
 
-do-extract:
-	@${MKDIR} ${WRKSRC}
-	@for i in ${DISTFILES}; do \
-	cd ${WRKSRC} ; lha xf ${DISTDIR}/${DIST_SUBDIR}/$$i; \
-	done
 do-build:
 .if ${USE_FORTRAN} == yes
 	cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp    himenobmtxp.f90

Modified: head/converters/uudx/Makefile
==============================================================================
--- head/converters/uudx/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/converters/uudx/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -10,18 +10,13 @@ PORTVERSION=	2.99
 CATEGORIES=	converters
 MASTER_SITES=	http://ftp.vector.co.jp/pack/dos/util/bin/conv/
 DISTNAME=	${PORTNAME}_${PORTVERSION:S/.//}
-EXTRACT_SUFX=	.lzh
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Extractor from uuencoded files
 
-EXTRACT_DEPENDS=lha:${PORTSDIR}/archivers/lha
 BUILD_DEPENDS=	nkf:${PORTSDIR}/japanese/nkf
 
-EXTRACT_CMD=	lha
-EXTRACT_BEFORE_ARGS=	xfqw=${WRKDIR}
-EXTRACT_AFTER_ARGS=	# empty
-
+USE_LHA=	yes
 NO_WRKSUBDIR=	yes
 MANLANG=	ja
 MAN1=		uudx.1

Modified: head/games/xchadance/Makefile
==============================================================================
--- head/games/xchadance/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/games/xchadance/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -15,16 +15,11 @@ DISTFILES=	xchada01.lzh
 MAINTAINER=	motoyuki@FreeBSD.org
 COMMENT=	Display a dancing girl "ChaCha."
 
-EXTRACT_DEPENDS=lha:${PORTSDIR}/archivers/lha
-
+USE_LHA=	yes
 USE_XORG=	x11
 MAKEFILE=	makefile
 NO_WRKSUBDIR=	yes
 
-EXTRACT_CMD=	lha
-EXTRACT_BEFORE_ARGS=	e
-EXTRACT_AFTER_ARGS=
-
 RESTRICTED=	'contains commercial character data'
 
 post-patch:

Modified: head/japanese/ajaxzip2-data/Makefile
==============================================================================
--- head/japanese/ajaxzip2-data/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/japanese/ajaxzip2-data/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -11,14 +11,11 @@ DISTFILES=	ken_all-${PORTVERSION_K}.lzh 
 MAINTAINER=	kuriyama@FreeBSD.org
 COMMENT=	ajaxzip2 (Japanese ZIP code utility) ZIP data
 
-EXTRACT_DEPENDS=lha:${PORTSDIR}/archivers/lha
 BUILD_DEPENDS=	ja-ajaxzip2-core>0:${PORTSDIR}/japanese/ajaxzip2-core \
 		p5-JSON>0:${PORTSDIR}/converters/p5-JSON
 
-EXTRACT_CMD=	lha
-EXTRACT_BEFORE_ARGS=	x
-EXTRACT_AFTER_ARGS=
 NO_WRKSUBDIR=	yes
+USE_LHA=	yes
 USE_PERL5_BUILD=yes
 PORTVERSION_K?=	${PORTVERSION}
 PORTVERSION_J?=	${PORTVERSION}

Modified: head/japanese/jstrings/Makefile
==============================================================================
--- head/japanese/jstrings/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/japanese/jstrings/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -11,23 +11,18 @@ CATEGORIES=	japanese
 MASTER_SITES=	http://openmya.hacker.jp/hasegawa/jstrings/ \
 		http://devel.aquahill.net/ports/jstrings/ \
 		http://www.kokone.to/~ryo/lib/ports/jstrings/
-EXTRACT_SUFX=	.lzh
 
 MAINTAINER=	ryo@aquahill.net
 COMMENT=	Japanese enhancement of strings(1) command
 
-EXTRACT_DEPENDS=lha:${PORTSDIR}/archivers/lha \
-		nkf:${PORTSDIR}/japanese/nkf
+EXTRACT_DEPENDS=nkf:${PORTSDIR}/japanese/nkf
 
 MAN1=		jstrings.1
 MANLANG=	ja
 PLIST_FILES=	bin/jstrings
 
-EXTRACT_CMD=	lha
-EXTRACT_BEFORE_ARGS=	xfqw=${WRKDIR}
-EXTRACT_AFTER_ARGS=#	empty
-
 USE_GMAKE=	yes
+USE_LHA=	yes
 MAKEFILE=	makefile.gcc
 MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS}" BINDIR="${PREFIX}/bin"
 ALL_TARGET=	jstrings

Modified: head/japanese/today/Makefile
==============================================================================
--- head/japanese/today/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/japanese/today/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -16,14 +16,10 @@ DISTFILES=	td${PORTVERSION:S/.//}s.lzh \
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Tells you what day today is
 
-EXTRACT_DEPENDS=lha:${PORTSDIR}/archivers/lha \
-		nkf:${PORTSDIR}/japanese/nkf
-
-EXTRACT_CMD=	lha
-EXTRACT_BEFORE_ARGS=	xfqw=${WRKDIR}
-EXTRACT_AFTER_ARGS=	# empty
+EXTRACT_DEPENDS=nkf:${PORTSDIR}/japanese/nkf
 
 NO_WRKSUBDIR=	yes
+USE_LHA=	yes
 
 MAKEFILE=	${FILESDIR}/Makefile
 

Modified: head/japanese/zipcodes/Makefile
==============================================================================
--- head/japanese/zipcodes/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/japanese/zipcodes/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -10,13 +10,10 @@ DISTFILES=	ken_all-${PORTVERSION_K}.lzh 
 MAINTAINER=	kuriyama@FreeBSD.org
 COMMENT=	Japanese zipcode tables. includes both 3/5 and 7 digits form
 
-EXTRACT_DEPENDS=lha:${PORTSDIR}/archivers/lha
 BUILD_DEPENDS=	nkf:${PORTSDIR}/japanese/nkf
 
-EXTRACT_CMD=	lha
-EXTRACT_BEFORE_ARGS=	x
-EXTRACT_AFTER_ARGS=
 NO_WRKSUBDIR=	yes
+USE_LHA=	yes
 
 USE_PERL5_BUILD=yes
 MAKE_ENV=	INSTALL_DATA="${INSTALL_DATA}" SCRIPTDIR=${SCRIPTDIR} PERL=${PERL}

Modified: head/math/eval/Makefile
==============================================================================
--- head/math/eval/Makefile	Thu Mar  7 16:53:45 2013	(r313599)
+++ head/math/eval/Makefile	Thu Mar  7 17:08:13 2013	(r313600)
@@ -17,11 +17,8 @@ EXTRACT_SUFX=	.lha
 MAINTAINER=	slaven@rezic.de
 COMMENT=	A full featured floating point expression evaluator
 
-EXTRACT_DEPENDS=lha:${PORTSDIR}/archivers/lha
+USE_LHA=	yes
 
-EXTRACT_CMD=		${CAT}
-EXTRACT_BEFORE_ARGS=	# empty
-EXTRACT_AFTER_ARGS=	| lha x -
 PLIST_FILES=		bin/Eval
 
 WRKSRC=		${WRKDIR}/Eval/source
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Martin Wilke freebsd_committer 2013-03-07 17:09:54 UTC
State Changed
From-To: open->closed

Committed. Thanks!