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

Rafaël Carré funman at videolan.org
Tue Mar 11 20:19:13 CET 2014


Hello,

Which GNU syntax do we absolutely need?

On 03/11/14 20:12, Sean McGovern wrote:
> ---
>  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 $@
>  
>  #
> 



More information about the vlc-devel mailing list