From 49152b839db86e1db89fa9adba1da62d548e5a35 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Mon, 16 Jan 2017 16:47:05 +0000 Subject: [PATCH] Implement EXTRA_PATCH_TREE. PR: 215726 Reported by: julian --- CHANGES | 12 ++++++++++++ Mk/Scripts/do-patch.sh | 4 ++++ Mk/bsd.port.mk | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/CHANGES b/CHANGES index a8b1f76cdeba..365d06ae940a 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,18 @@ in the release notes and/or placed into UPDATING. All ports committers are allowed to commit to this file. +20160116: +AUTHOR: mat@FreeBSD.org + + A new EXTRA_PATCH_TREE has been added. Points to a directory hierarchy with + the same layout as the ports tree, where local patches can be found. This + allows a third party to keep their patches in some other source control + system if needed. + + For example, if you have EXTRA_PATCH_TREE=/patches, when building + lang/perl5.24, any file named patch-* in /patches/lang/perl5.24/ will be used + to patch the Perl distribution. + 20160116: AUTHOR: mat@FreeBSD.org diff --git a/Mk/Scripts/do-patch.sh b/Mk/Scripts/do-patch.sh index 25f7dfcbdadb..a44208545c3a 100644 --- a/Mk/Scripts/do-patch.sh +++ b/Mk/Scripts/do-patch.sh @@ -115,3 +115,7 @@ fi patch_from_directory "${dp_PATCHDIR}" "${dp_OPSYS}" +if [ -n "${dp_EXTRA_PATCH_TREE}" ]; then + patch_from_directory "${dp_EXTRA_PATCH_TREE}/${dp_PKGORIGIN}" "local" +fi + diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 8fc714d83aa1..de136bc261a0 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -749,6 +749,11 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # The patches specified by this variable will be # applied after the normal distribution patches but # before those in ${PATCHDIR}. +# EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches +# Points to a directory hierarchy with the same layout +# as the ports tree, where local patches can be found. +# This allows a third party to keep their patches in +# some other source control system if needed. # PATCH_WRKSRC - Directory to apply patches in. # Default: ${WRKSRC} #