[vlc-devel] [PATCH 2/3] contrib: use GNU patch
Sean McGovern
gseanmcg at gmail.com
Thu Mar 13 18:50:26 CET 2014
---
contrib/src/main.mak | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index b6b70c1..5b6ace3 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -240,6 +240,14 @@ else
SHA512SUM = $(error SHA-512 checksumming not found!)
endif
+ifeq ($(shell patch --version >/dev/null 2>&1 || echo FAIL),)
+GNU_PATCH = patch
+else ifeq ($(shell gpatch --version >/dev/null 2>&1 || echo FAIL),)
+GNU_PATCH = gpatch
+else
+GNU_PATCH = $(error Can't find GNU patch!)
+endif
+
#
# Common helpers
#
@@ -292,7 +300,7 @@ UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.tar.xz,$^), && tar xvJf $(f)) \
$(foreach f,$(filter %.zip,$^), && unzip $(f))
UNPACK_DIR = $(basename $(basename $(notdir $<)))
-APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
+APPLY = (cd $(UNPACK_DIR) && $(GNU_PATCH) -fp1) <
pkg_static = (cd $(UNPACK_DIR) && ../../../contrib/src/pkg-static.sh $(1))
MOVE = mv $(UNPACK_DIR) $@ && touch $@
--
1.7.9.2
More information about the vlc-devel
mailing list