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

Sean McGovern gseanmcg at gmail.com
Mon Mar 24 18:53:01 CET 2014


Considering that anything prefixed with -- is a "long option", yes.

Also, ping this as on Solaris the contrib patches require either this, or the same modification I did for the ragel patch in extras/tools/.

-- Sean McG.
-----Original Message-----
From: Rémi Denis-Courmont <remi at remlab.net>
Sender: "vlc-devel" <vlc-devel-bounces at videolan.org>Date: Thu, 13 Mar 2014 20:16:39 
To: <vlc-devel at videolan.org>
Reply-To: Mailing list for VLC media player developers <vlc-devel at videolan.org>
Subject: Re: [vlc-devel] [PATCH 2/3] contrib: use GNU patch

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/

_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list