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

Rémi Denis-Courmont remi at remlab.net
Thu Mar 13 19:16:39 CET 2014


Le jeudi 13 mars 2014, 13:50:26 Sean McGovern a écrit :
> ---
>  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

Is the assumption is that only GNU patch accepts --version?

> +
>  #
>  # 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 $@

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list