[vlc-devel] [PATCH 3/3] tools: use GNU patch

Sean McGovern gseanmcg at gmail.com
Tue Mar 11 20:12:37 CET 2014


---
 extras/tools/tools.mak |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 3c20446..36b2e0f 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -34,7 +34,16 @@ UNPACK = $(RM) -R $@ \
     $(foreach f,$(filter %.zip,$^), && unzip $(f))
 
 UNPACK_DIR = $(basename $(basename $(notdir $<)))
-APPLY = (cd $(UNPACK_DIR) && patch -p1) <
+
+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
+APPLY = (cd $(UNPACK_DIR) && $(GNU_PATCH) -p1) <
+
 MOVE = mv $(UNPACK_DIR) $@ && touch $@
 
 #
-- 
1.7.9.2




More information about the vlc-devel mailing list