diff options
author | mat <mat@FreeBSD.org> | 2018-01-25 17:12:21 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2018-01-25 17:12:21 +0800 |
commit | 7fdfe1db314260ec51df0d2f305ab5d85ac31b0f (patch) | |
tree | d6aa7d6ca6325a6a215b8dbfa4ed3c66257ce0d2 /Mk/Scripts | |
parent | 38daea5ade24e85f8fa7dd27fda92a61a1b73f13 (diff) | |
download | freebsd-ports-gnome-7fdfe1db314260ec51df0d2f305ab5d85ac31b0f.tar.gz freebsd-ports-gnome-7fdfe1db314260ec51df0d2f305ab5d85ac31b0f.tar.zst freebsd-ports-gnome-7fdfe1db314260ec51df0d2f305ab5d85ac31b0f.zip |
Add support to passing directories to EXTRA_PATCHES.
Instead of:
EXTRA_PATCHES= ${PATCHDIR}/feat-foo-patch-file.c \
${PATCHDIR}/feat-foo-patch-file.h \
${PATCHDIR}/feat-foo-patch-file2.c
Move those files to ${PATCHDIR}/feat-foo/, name them patch-*, and set:
EXTRA_PATCHES= ${PATCHDIR}/feat-foo
Approved by: bdrewery
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D10855
Diffstat (limited to 'Mk/Scripts')
-rw-r--r-- | Mk/Scripts/do-patch.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Mk/Scripts/do-patch.sh b/Mk/Scripts/do-patch.sh index a44208545c3a..10095f56847d 100644 --- a/Mk/Scripts/do-patch.sh +++ b/Mk/Scripts/do-patch.sh @@ -107,9 +107,14 @@ fi if [ -n "${dp_EXTRA_PATCHES}" ]; then for i in ${dp_EXTRA_PATCHES}; do - apply_one_patch "${i}" \ - "Applying extra patch" \ - ${dp_PATCH_ARGS} + if [ -d "${i}" ]; then + patch_from_directory "${i}" \ + "extra patch" + else + apply_one_patch "${i}" \ + "Applying extra patch" \ + ${dp_PATCH_ARGS} + fi done fi |