diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-25 02:07:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-25 02:07:20 +0000 |
commit | 3c39216b84d169ef3232ad6269b73ca26f9194a6 (patch) | |
tree | e9761c824f6e2151aaae784e726ec91439e4abb5 /Build | |
parent | 9819b68cadbfd13c775a0bd7856bf258e716cc4e (diff) |
test for grep -E vs. egrep, since neither is universally supported any more
git-svn-id: svn://tug.org/texlive/trunk@66142 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/libs/freetype2/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/libs/freetype2/TLpatches/patch-02-grep | 36 | ||||
-rwxr-xr-x | Build/source/libs/freetype2/freetype-src/configure | 13 |
3 files changed, 52 insertions, 2 deletions
diff --git a/Build/source/libs/freetype2/ChangeLog b/Build/source/libs/freetype2/ChangeLog index 2549d41d529..9cddc8443f1 100644 --- a/Build/source/libs/freetype2/ChangeLog +++ b/Build/source/libs/freetype2/ChangeLog @@ -1,3 +1,8 @@ +2023-02-24 Karl Berry <karl@freefriends.org> + + * freetype-src/configure: test for grep -E, don't assume it. + Not present on Solaris 5.10, for which we still build TL. + 2023-02-11 Akira Kakuto <kakuto@jcom.zaq.ne.jp> Import freetype-2.13.0. diff --git a/Build/source/libs/freetype2/TLpatches/patch-02-grep b/Build/source/libs/freetype2/TLpatches/patch-02-grep new file mode 100644 index 00000000000..4a545b28af6 --- /dev/null +++ b/Build/source/libs/freetype2/TLpatches/patch-02-grep @@ -0,0 +1,36 @@ +grep -E is not supported by system grep on Solaris 5.10. +But egrep is no longer universally supported either; GNU grep 3.8 +intentionally broke it. So test. + +--- configure (revision 66134) ++++ configure (working copy) +@@ -15,10 +15,19 @@ + + rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk + ++if test -z "$EGREP"; then ++ if echo a | grep -E '(a|b)' >/dev/null 2>&1; then ++ EGREP="grep -E" ++ else ++ # if grep -E doesn't work, assume egrep does. ++ EGREP=egrep ++ fi ++fi ++ + # respect GNUMAKE environment variable for backward compatibility + if test "x$GNUMAKE" = x; then + if test "x$MAKE" = x; then +- if test "x`make -v 2>/dev/null | grep -E 'GNU|makepp'`" = x; then ++ if test "x`make -v 2>/dev/null | $EGREP 'GNU|makepp'`" = x; then + MAKE=gmake + else + MAKE=make +@@ -28,7 +37,7 @@ + MAKE=$GNUMAKE + fi + +-if test "x`$MAKE -v 2>/dev/null | grep -E 'GNU|makepp'`" = x; then ++if test "x`$MAKE -v 2>/dev/null | $EGREP 'GNU|makepp'`" = x; then + echo "GNU make (>= 3.81) or makepp (>= 2.0) is required to build FreeType2." >&2 + echo "Please try" >&2 + echo >&2 diff --git a/Build/source/libs/freetype2/freetype-src/configure b/Build/source/libs/freetype2/freetype-src/configure index 75f8b7bb040..ebb351dc7f3 100755 --- a/Build/source/libs/freetype2/freetype-src/configure +++ b/Build/source/libs/freetype2/freetype-src/configure @@ -15,10 +15,19 @@ rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk +if test -z "$EGREP"; then + if echo a | grep -E '(a|b)' >/dev/null 2>&1; then + EGREP="grep -E" + else + # if grep -E doesn't work, assume egrep does. + EGREP=egrep + fi +fi + # respect GNUMAKE environment variable for backward compatibility if test "x$GNUMAKE" = x; then if test "x$MAKE" = x; then - if test "x`make -v 2>/dev/null | grep -E 'GNU|makepp'`" = x; then + if test "x`make -v 2>/dev/null | $EGREP 'GNU|makepp'`" = x; then MAKE=gmake else MAKE=make @@ -28,7 +37,7 @@ else MAKE=$GNUMAKE fi -if test "x`$MAKE -v 2>/dev/null | grep -E 'GNU|makepp'`" = x; then +if test "x`$MAKE -v 2>/dev/null | $EGREP 'GNU|makepp'`" = x; then echo "GNU make (>= 3.81) or makepp (>= 2.0) is required to build FreeType2." >&2 echo "Please try" >&2 echo >&2 |