diff options
author | fredb <fredb@pkgsrc.org> | 2000-05-17 03:32:43 +0000 |
---|---|---|
committer | fredb <fredb@pkgsrc.org> | 2000-05-17 03:32:43 +0000 |
commit | ce696958fbe1de799cedb2e23092ab1a98fefc71 (patch) | |
tree | 68634b6a21141b643c75d3ef3d1ace92eb15caa0 | |
parent | a2fac70d8b8b1b90baa27738d9ff650236c02be0 (diff) | |
download | pkgsrc-ce696958fbe1de799cedb2e23092ab1a98fefc71.tar.gz |
Support bzip2 compressed patch files.
-rw-r--r-- | mk/bsd.pkg.mk | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 8a5db14644d..5e38511f81a 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.435 2000/05/11 11:23:22 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.436 2000/05/17 03:32:43 fredb Exp $ # # This file is in the public domain. # @@ -305,6 +305,19 @@ DECOMPRESS_CMD?= ${CAT} DECOMPRESS_CMD?= ${GZCAT} .endif +# Also need bzip2 for PATCHFILES with .bz2 suffix. + +.if defined(PATCHFILES) +.if ${PATCHFILES:E} == "bz2" && ${EXTRACT_SUFX} != ".tar.bz2" +.if exists(/usr/bin/bzcat) +BZCAT= /usr/bin/bzcat +.else +BZCAT= ${LOCALBASE}/bin/bzcat +BUILD_DEPENDS+= ${BZCAT}:${PKGSRCDIR}/archivers/bzip2 +.endif # !exists bzcat +.endif +.endif # defined(PATCHFILES) + # If this is empty, then everything gets extracted. EXTRACT_ELEMENTS?= @@ -1207,6 +1220,10 @@ do-patch: ${GZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS} \ || ( ${ECHO} Patch $$i failed ; exit 1 ) ; \ ;; \ + *.bz2) \ + ${BZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS} \ + || ( ${ECHO} Patch $$i failed ; exit 1 ) ; \ + ;; \ *) \ ${PATCH} ${PATCH_DIST_ARGS} < $$i \ || ( ${ECHO} Patch $$i failed ; exit 1 ) ; \ |