aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2001-11-18 05:23:09 +0800
committerknu <knu@FreeBSD.org>2001-11-18 05:23:09 +0800
commit4bc36c5c1c99c8f55cb34a3af2d612438d4fa9e3 (patch)
treead9ad1b0639bd5cb897f3d0ecbecd03f7119181f
parent00347cb8f08b11b9a994d97e94db0234110a8c04 (diff)
downloadfreebsd-ports-gnome-4bc36c5c1c99c8f55cb34a3af2d612438d4fa9e3.tar.gz
freebsd-ports-gnome-4bc36c5c1c99c8f55cb34a3af2d612438d4fa9e3.tar.zst
freebsd-ports-gnome-4bc36c5c1c99c8f55cb34a3af2d612438d4fa9e3.zip
Add bzip2 support for distribution patches. The bzip2 dependency is
automatically added if there is a .bz2 patch in PATCHFILES. PR: ports/16252 and ports/30862 Seven months have passed since the PR was assigned to: portmgr
-rw-r--r--Mk/bsd.port.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index fe9d9b9adf21..6c85c38e234b 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -68,7 +68,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# patches (default: none). make will look for them at
# PATCH_SITES (see below). They will automatically be
# uncompressed before patching if the names end with
-# ".gz" or ".Z".
+# ".gz", ".bz2" or ".Z".
# PATCH_SITES - Primary location(s) for distribution patch files
# if not found locally.
# DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES}
@@ -809,7 +809,13 @@ MANCOMPRESSED?= yes
MANCOMPRESSED?= no
.endif
-.if defined(USE_BZIP2) && !exists(/usr/bin/bzip2)
+.if defined(PATCHFILES)
+.if ${PATCHFILES:M*.bz2}x != x
+HAVE_BZIP2_PATCHES= yes
+.endif
+.endif
+
+.if (defined(USE_BZIP2) || defined(HAVE_BZIP2_PATCHES)) && !exists(/usr/bin/bzip2)
BUILD_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2
.endif
.if defined(USE_ZIP)
@@ -1790,6 +1796,9 @@ do-patch:
*.Z|*.gz) \
${GZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \
;; \
+ *.bz2) \
+ ${BZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \
+ ;; \
*) \
${PATCH} ${PATCH_DIST_ARGS} < $$i; \
;; \