Re: [FFmpeg-devel] [PATCH] configure: use -r, not -E, for sed

2018-11-16 Thread Lauri Kasanen
On Fri, 16 Nov 2018 22:36:16 +0100
Carl Eugen Hoyos  wrote:

> 2018-11-15 15:00 GMT+01:00, Lauri Kasanen :
> > Old versions of sed do not support the -E option.
> 
> > -VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n
> > /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed
> > -E "s/(.+[^*])/\1*/"'
> > +VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n
> > /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -r "s/(.+)/_\1/g" | sed
> > -r "s/(.+[^*])/\1*/"'
> 
> Could you try to replace the current command with one that
> neither needs "-E" nor "-r"?
> Your suggestions fixes antique Linux systems but not current
> non-Linux Posix systems (and contradicts the documentation).

Regexes tend to be write-only. Not sure I can parse what that tries to
do, to rewrite it in basic RE that posix sed supports.

What do you mean by contradicts docs?

- Lauri
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: use -r, not -E, for sed

2018-11-16 Thread Carl Eugen Hoyos
2018-11-15 15:00 GMT+01:00, Lauri Kasanen :
> Old versions of sed do not support the -E option.

> -VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n
> /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed
> -E "s/(.+[^*])/\1*/"'
> +VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n
> /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -r "s/(.+)/_\1/g" | sed
> -r "s/(.+[^*])/\1*/"'

Could you try to replace the current command with one that
neither needs "-E" nor "-r"?
Your suggestions fixes antique Linux systems but not current
non-Linux Posix systems (and contradicts the documentation).

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] configure: use -r, not -E, for sed

2018-11-15 Thread Lauri Kasanen
Old versions of sed do not support the -E option.

Signed-off-by: Lauri Kasanen 
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index b02b4cc..51f1227 100755
--- a/configure
+++ b/configure
@@ -3722,7 +3722,7 @@ find_things_extern(){
 find_filters_extern(){
 file=$source_path/$1
 #sed -n "s/^extern AVFilter 
ff_\([avfsinkrc]\{2,5\}\)_\(\w\+\);/\2_filter/p" $file
-sed -E -n "s/^extern AVFilter 
ff_([avfsinkrc]{2,5})_([a-zA-Z0-9_]+);/\2_filter/p" $file
+sed -r -n "s/^extern AVFilter 
ff_([avfsinkrc]{2,5})_([a-zA-Z0-9_]+);/\2_filter/p" $file
 }
 
 FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c)
@@ -5188,7 +5188,7 @@ case $target_os in
 is_in -isysroot $ld $LDFLAGS  || check_ldflags  -isysroot 
$sysroot
 fi
 version_script='-exported_symbols_list'
-VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n 
/global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed -E 
"s/(.+[^*])/\1*/"'
+VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n 
/global:/,/local:/p | grep ";" | tr ";" "\n" | sed -r "s/(.+)/_\1/g" | sed -r 
"s/(.+[^*])/\1*/"'
 ;;
 msys*)
 die "Native MSYS builds are discouraged, please use the MINGW 
environment."
-- 
2.6.2

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel