[meta-intel] [PATCH] Fix the swig build error, based on the below OE-core commit: e2f0d002cbc81a4dd26daee5e115ab9ea1ab6dd7

Yong Li sdliyong at gmail.com
Wed Mar 18 18:22:07 PDT 2015


Signed-off-by: Yong Li <sdliyong at gmail.com>
---
 ...nfigure-use-pkg-config-for-pcre-detection.patch | 64
++++++++++++++++++++++
 recipes-devtools/swig/swig_3.0.5.bb                | 13 ++++-
 2 files changed, 75 insertions(+), 2 deletions(-)
 create mode 100644
recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch

diff --git
a/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
b/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
new file mode 100644
index 0000000..1b1128a
--- /dev/null
+++
b/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
@@ -0,0 +1,64 @@
+From 5c4d6d8538994d5fe9b3b46bfafaf0a605e3bda6 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen.kooi at linaro.org>
+Date: Tue, 17 Jun 2014 08:18:17 +0200
+Subject: [PATCH] configure: use pkg-config for pcre detection
+
+Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
+Upstream-Status: pending
+---
+ configure.ac | 38 +++++++-------------------------------
+ 1 file changed, 7 insertions(+), 31 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0c984b7..6edcec1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,38 +70,14 @@ AC_MSG_RESULT([$with_pcre])
+
+ dnl To make configuring easier, check for a locally built PCRE using the
Tools/pcre-build.sh script
+ if test x"${with_pcre}" = xyes ; then
+-  AC_MSG_CHECKING([whether to use local PCRE])
+-  local_pcre_config=no
+-  if test -z $PCRE_CONFIG; then
+-    if test -f `pwd`/pcre/pcre-swig-install/bin/pcre-config; then
+-      PCRE_CONFIG=`pwd`/pcre/pcre-swig-install/bin/pcre-config
+-      local_pcre_config=$PCRE_CONFIG
+-    fi
+-  fi
+-  AC_MSG_RESULT([$local_pcre_config])
+-fi
+-AS_IF([test "x$with_pcre" != xno],
+-  [AX_PATH_GENERIC([pcre],
+-    [], dnl Minimal version of PCRE we need -- accept any
+-    [], dnl custom sed script for version parsing is not needed
+-    [AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library])
+-     LIBS="$LIBS $PCRE_LIBS"
+-     CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS"
+-    ],
+-    [AC_MSG_FAILURE([
+-        Cannot find pcre-config script from PCRE (Perl Compatible Regular
Expressions)
+-        library package. This dependency is needed for configure to
complete,
+-        Either:
+-        - Install the PCRE developer package on your system (preferred
approach).
+-        - Download the PCRE source tarball, build and install on your
system
+-          as you would for any package built from source distribution.
+-        - Use the Tools/pcre-build.sh script to build PCRE just for SWIG
to statically
+-          link against. Run 'Tools/pcre-build.sh --help' for instructions.
+-          (quite easy and does not require privileges to install PCRE on
your system)
+-        - Use configure --without-pcre to disable regular expressions
support in SWIG
+-          (not recommended).])
+-    ])
++  PKG_CHECK_MODULES([PCRE], [libpcre], [
++    AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library])
++    LIBS="$LIBS $PCRE_LIBS"
++    CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS"
++  ], [
++    AC_MSG_WARN([$PCRE_PKG_ERRORS])
+   ])
++fi
+
+
+ dnl CCache
+--
+1.9.3
+
diff --git a/recipes-devtools/swig/swig_3.0.5.bb b/recipes-devtools/swig/
swig_3.0.5.bb
index 39ddaeb..a1d409e 100644
--- a/recipes-devtools/swig/swig_3.0.5.bb
+++ b/recipes-devtools/swig/swig_3.0.5.bb
@@ -13,7 +13,8 @@ inherit autotools pythonnative

 BBCLASSEXTEND = "native"

-SRC_URI = "http://prdownloads.sourceforge.net/swig/swig-${PV}.tar.gz"
+SRC_URI = "http://prdownloads.sourceforge.net/swig/swig-${PV}.tar.gz \
+          file://0001-configure-use-pkg-config-for-pcre-detection.patch"
 SRC_URI[md5sum] = "dcb9638324461b9baba8e044fe59031d"
 SRC_URI[sha256sum] =
"9f4cb9e8f213f041853646f58fe5e8428d63250d05f5c943b6fa759c77322a3c"

@@ -44,8 +45,16 @@ EXTRA_OECONF = " \
     --disable-ccache \
 "

+do_configure_prepend() {
+    export NOCONFIGURE="no"
+    ( cd ${S}
+     ./autogen.sh
+ cd ${B}
+ )
+}
+
 do_configure() {
-   export NOCONFIGURE="no"; ./autogen.sh
+#   export NOCONFIGURE="no"; cd ${S}; ${S}/autogen.sh
    oe_runconf
 }

-- 
1.9.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-intel/attachments/20150319/48a2d6f3/attachment.html>


More information about the meta-intel mailing list