From 681d12f8bf04a403d6e692cbe0ceebad932b0731 Mon Sep 17 00:00:00 2001 From: Dan McGregor Date: Thu, 10 Aug 2017 14:15:11 -0600 Subject: zsh: update to 5.4.1 Also fix up autoconf to use pkg-config, and properly detect pcre. Signed-off-by: Dan McGregor --- .../zsh/files/pcre-pkgconfig.patch | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch (limited to 'meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch') diff --git a/meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch b/meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch new file mode 100644 index 0000000000..ebbd03f071 --- /dev/null +++ b/meta-oe/recipes-extended/zsh/files/pcre-pkgconfig.patch @@ -0,0 +1,49 @@ +diff --git a/Src/Modules/pcre.mdd b/Src/Modules/pcre.mdd +index 6eb3c691b..12c10704e 100644 +--- a/Src/Modules/pcre.mdd ++++ b/Src/Modules/pcre.mdd +@@ -1,5 +1,5 @@ + name=zsh/pcre +-link=`if test x$enable_pcre = xyes && (pcre-config --version >/dev/null 2>/dev/null); then echo dynamic; else echo no; fi` ++link=`if test x$enable_pcre = xyes ; then echo dynamic; else echo no; fi` + load=no + + autofeatures="b:pcre_compile b:pcre_study b:pcre_match" +diff --git a/configure.ac b/configure.ac +index 920c2fc17..d1512291c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -671,17 +671,15 @@ AC_HEADER_TIME + AC_HEADER_STAT + AC_HEADER_SYS_WAIT + +-oldcflags="$CFLAGS" + if test x$enable_pcre = xyes; then +-AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config) +-dnl Typically (meaning on this single RedHat 9 box in front of me) +-dnl pcre-config --cflags produces a -I output which needs to go into +-dnl CPPFLAGS else configure's preprocessor tests don't pick it up, +-dnl producing a warning. +-if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then +- CPPFLAGS="$CPPFLAGS `pcre-config --cflags`" +-fi ++PKG_CHECK_MODULES(PCREPKG, [libpcre], [ ++ PCRE_LIB="${PCREPKG_LIBS}" ++ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}" ++ ], [ ++ AC_MSG_ERROR([pcre not found, install the pcre-devel package or build with --disable-pcre]) ++ ]) + fi ++oldcflags="$CFLAGS" + + AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \ + termios.h sys/param.h sys/filio.h string.h memory.h \ +@@ -935,7 +933,7 @@ fi + if test x$enable_pcre = xyes; then + dnl pcre-config should probably be employed here + dnl AC_SEARCH_LIBS(pcre_compile, pcre) +- LIBS="`$ac_cv_prog_PCRECONF --libs` $LIBS" ++ LIBS="$PCRE_LIB $LIBS" + fi + + dnl --------------------- -- cgit 1.2.3-korg