Browse Source

add crda (wifi regulatory database) and its [build] dependencies

laforge/owhw2
Harald Welte 6 years ago
parent
commit
d5c8bcd3b7
  1. 21
      recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch
  2. 50
      recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch
  3. 41
      recipes-connectivity/crda/crda_3.18.bb
  4. 162
      recipes-devtools/python-m2crypto/python-m2crypto/0001-M2Crypto-Error-fix.patch
  5. 39
      recipes-devtools/python-m2crypto/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
  6. 45
      recipes-devtools/python-m2crypto/python-m2crypto_0.21.1.bb
  7. 63
      recipes-devtools/swig/swig.inc
  8. 69
      recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch
  9. 64
      recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
  10. 8
      recipes-devtools/swig/swig_3.0.6.bb

21
recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch

@ -0,0 +1,21 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 23 Aug 2014 12:27:34 -0700
Subject: crda: Do not run ldconfig if DESTDIR is set
Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126028.html]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
--- a/Makefile
+++ b/Makefile
@@ -132,7 +132,9 @@ install-libreg:
$(NQ) ' INSTALL libreg'
$(Q)mkdir -p $(DESTDIR)/$(LIBDIR)
$(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/
+ifndef DESTDIR
$(Q)ldconfig
+endif
%.o: %.c regdb.h $(LIBREG)
$(NQ) ' CC ' $@

50
recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch

@ -0,0 +1,50 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 23 Aug 2014 12:26:37 -0700
Subject: Fix linking of libraries used by libreg
The math and crypto libraries are called by and need to be linked to
libreg.so, not to the executables.
Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126027.html]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -peda
CFLAGS += -Wall -g
LDLIBREG += -lreg
LDLIBS += $(LDLIBREG)
-LDLIBS += -lm
+LIBREGLDLIBS += -lm
LIBREG += libreg.so
LDFLAGS += -L ./
@@ -40,7 +40,7 @@ all_noverify: $(LIBREG) crda intersect r
ifeq ($(USE_OPENSSL),1)
CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
-LDLIBS += `pkg-config --libs openssl`
+LIBREGLDLIBS += `pkg-config --libs openssl`
ifeq ($(RUNTIME_PUBKEY_ONLY),1)
CFLAGS += -DRUNTIME_PUBKEY_ONLY
@@ -51,7 +51,7 @@ endif
else
CFLAGS += -DUSE_GCRYPT
-LDLIBS += -lgcrypt
+LIBREGLDLIBS += -lgcrypt
$(LIBREG): keys-gcrypt.c
@@ -121,7 +121,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(
$(LIBREG): regdb.h reglib.h reglib.c
$(NQ) ' CC ' $@
- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^
+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS)
install-libreg-headers:
$(NQ) ' INSTALL libreg-headers'

41
recipes-connectivity/crda/crda_3.18.bb

@ -0,0 +1,41 @@
SUMMARY = "Wireless Central Regulatory Domain Agent"
HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA"
SECTION = "net"
LICENSE = "copyleft-next-0.3.0 & ISC"
LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe \
file://${WORKDIR}/wireless-regdb-2014.11.18/LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
DEPENDS = "python-m2crypto-native python-native libgcrypt libnl"
SRC_URI = "https://www.kernel.org/pub/software/network/crda/${BP}.tar.xz;name=crda \
https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2014.11.18.tar.xz;name=bin \
file://do-not-run-ldconfig-if-destdir-is-set.patch \
file://fix-linking-of-libraries-used-by-reglib.patch \
"
SRC_URI[crda.md5sum] = "0431fef3067bf503dfb464069f06163a"
SRC_URI[crda.sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf"
SRC_URI[bin.md5sum] = "d750c402c5510add7380edcb1d9b75b2"
SRC_URI[bin.sha256sum] = "eab6b50f30748a8b0065ba38cf3df05aac161a5861ae0a6c3cfd01d38a71c9dd"
inherit python-dir pythonnative
# Recursive make problem
EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg'"
do_compile() {
oe_runmake all_noverify
}
do_install() {
oe_runmake SBINDIR=${sbindir}/ install
install -d ${D}${libdir}/crda/
install -m 0644 ${WORKDIR}/wireless-regdb-2014.11.18/regulatory.bin ${D}${libdir}/crda/regulatory.bin
}
RDEPENDS_${PN} = "udev"
FILES_${PN} += "${libdir}crda/regulatory.bin \
${base_libdir}/udev/rules.d/85-regulatory.rules \
"

162
recipes-devtools/python-m2crypto/python-m2crypto/0001-M2Crypto-Error-fix.patch

@ -0,0 +1,162 @@
From 02a24ac541df68033d4efd7e2f8a1b92dc49328d Mon Sep 17 00:00:00 2001
From: Li xin <lixin.fnst@cn.fujitsu.com>
Date: Mon, 27 Jul 2015 05:06:20 +0900
Subject: [PATCH] M2Crypto: Error fix.
After swig upgrade from 3.0.2 to 3.0.6,build the recipes which
depends on python-m2crypto will occur errors like this:
SALT_LEN = m2.PKCS5_SALT_LEN
AttributeError: 'module' object has no attribute 'PKCS5_SALT_LEN'
since python-m2crypto depends on swig-native
Ref:
https://github.com/martinpaljak/M2Crypto/issues/60#issuecomment-75735489
This patch is from:
http://pkgs.fedoraproject.org/cgit/m2crypto.git/tree/m2crypto-0.21.1-swig-3.0.5.patch
Upstream-Status: pending
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
---
M2Crypto/__init__.py | 4 ++--
M2Crypto/m2.py | 2 +-
SWIG/_lib.i | 4 ++++
SWIG/_pkcs7.i | 1 +
setup.py | 26 +++++++++++++++++++++++++-
5 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/M2Crypto/__init__.py b/M2Crypto/__init__.py
index e7acfe7..02f4d28 100644
--- a/M2Crypto/__init__.py
+++ b/M2Crypto/__init__.py
@@ -19,7 +19,7 @@ Copyright 2008-2011 Heikki Toivonen. All rights reserved.
version_info = (0, 21, 1)
version = '.'.join([str(_v) for _v in version_info])
-import __m2crypto
+import _m2crypto
import m2
import ASN1
import AuthCookie
@@ -57,4 +57,4 @@ import util
encrypt=1
decrypt=0
-__m2crypto.lib_init()
+_m2crypto.lib_init()
diff --git a/M2Crypto/m2.py b/M2Crypto/m2.py
index e4bb695..822143f 100644
--- a/M2Crypto/m2.py
+++ b/M2Crypto/m2.py
@@ -25,7 +25,7 @@ Portions created by Open Source Applications Foundation (OSAF) are
Copyright (C) 2004 OSAF. All Rights Reserved.
"""
-from __m2crypto import *
+from _m2crypto import *
lib_init()
diff --git a/SWIG/_lib.i b/SWIG/_lib.i
index 42dc180..47a53b8 100644
--- a/SWIG/_lib.i
+++ b/SWIG/_lib.i
@@ -100,6 +100,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) {
int cret;
int new_style_callback = 0, warning_raised_exception=0;
PyGILState_STATE gilstate;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
ssl = (SSL *)X509_STORE_CTX_get_app_data(ctx);
@@ -185,6 +186,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) {
void ssl_info_callback(const SSL *s, int where, int ret) {
PyObject *argv, *retval, *_SSL;
PyGILState_STATE gilstate;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
gilstate = PyGILState_Ensure();
@@ -204,6 +206,7 @@ DH *ssl_set_tmp_dh_callback(SSL *ssl, int is_export, int keylength) {
PyObject *argv, *ret, *_ssl;
DH *dh;
PyGILState_STATE gilstate;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
gilstate = PyGILState_Ensure();
@@ -227,6 +230,7 @@ RSA *ssl_set_tmp_rsa_callback(SSL *ssl, int is_export, int keylength) {
PyObject *argv, *ret, *_ssl;
RSA *rsa;
PyGILState_STATE gilstate;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
gilstate = PyGILState_Ensure();
diff --git a/SWIG/_pkcs7.i b/SWIG/_pkcs7.i
index 174f40a..7bffbfc 100644
--- a/SWIG/_pkcs7.i
+++ b/SWIG/_pkcs7.i
@@ -157,6 +157,7 @@ PyObject *smime_read_pkcs7(BIO *bio) {
BIO *bcont = NULL;
PKCS7 *p7;
PyObject *tuple, *_p7, *_BIO;
+ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */
if (BIO_method_type(bio) == BIO_TYPE_MEM) {
/* OpenSSL FAQ explains that this is needed for mem BIO to return EOF,
diff --git a/setup.py b/setup.py
index e7c49eb..b98abe0 100644
--- a/setup.py
+++ b/setup.py
@@ -20,6 +20,7 @@ except ImportError:
from distutils.command import build_ext
from distutils.core import Extension
+from distutils.file_util import copy_file
class _M2CryptoBuildExt(build_ext.build_ext):
@@ -57,7 +58,17 @@ class _M2CryptoBuildExt(build_ext.build_ext):
self.swig_opts.append('-includeall')
#self.swig_opts.append('-D__i386__') # Uncomment for early OpenSSL 0.9.7 versions, or on Fedora Core if build fails
#self.swig_opts.append('-DOPENSSL_NO_EC') # Try uncommenting if you can't build with EC disabled
-
+ self.swig_opts.append('-modern')
+ self.swig_opts.append('-builtin')
+
+ # These two lines are a workaround for
+ # http://bugs.python.org/issue2624 , hard-coding that we are only
+ # building a single extension with a known path; a proper patch to
+ # distutils would be in the run phase, when extension name and path are
+ # known.
+ self.swig_opts.append('-outdir')
+ self.swig_opts.append(os.path.join(self.build_lib, 'M2Crypto'))
+
self.include_dirs += [os.path.join(self.openssl, opensslIncludeDir),
os.path.join(os.getcwd(), 'SWIG')]
@@ -71,6 +82,19 @@ class _M2CryptoBuildExt(build_ext.build_ext):
self.library_dirs += [os.path.join(self.openssl, opensslLibraryDir)]
+ def run(self):
+ '''Overloaded build_ext implementation to allow inplace=1 to work,
+ which is needed for (python setup.py test).'''
+ # This is another workaround for http://bugs.python.org/issue2624 + the
+ # corresponding lack of support in setuptools' test command. Note that
+ # just using self.inplace in finalize_options() above does not work
+ # because swig is not rerun if the __m2crypto.so extension exists.
+ # Again, hard-coding our extension name and location.
+ build_ext.build_ext.run(self)
+ if self.inplace:
+ copy_file(os.path.join(self.build_lib, 'M2Crypto', '_m2crypto.py'),
+ os.path.join('M2Crypto', '_m2crypto.py'),
+ verbose=self.verbose, dry_run=self.dry_run)
if sys.version_info < (2,4):
--
1.8.4.2

39
recipes-devtools/python-m2crypto/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch

@ -0,0 +1,39 @@
From f11b9c71080513f9b867ba8f40613ba2ebc6e960 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Fri, 29 Mar 2013 15:17:17 +0100
Subject: [PATCH] setup.py: link in sysroot, not in host directories
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Upstream-status: Unknown
---
setup.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/setup.py b/setup.py
index e7c49eb..8deaa34 100644
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
self.openssl = 'c:\\pkg'
else:
self.libraries = ['ssl', 'crypto']
- self.openssl = '/usr'
+ self.openssl = os.environ.get( "STAGING_DIR" )
def finalize_options(self):
@@ -49,8 +49,8 @@ class _M2CryptoBuildExt(build_ext.build_ext):
build_ext.build_ext.finalize_options(self)
- opensslIncludeDir = os.path.join(self.openssl, 'include')
- opensslLibraryDir = os.path.join(self.openssl, 'lib')
+ opensslIncludeDir = os.environ.get( "STAGING_INCDIR" )
+ opensslLibraryDir = os.environ.get( "STAGING_LIBDIR" )
self.swig_opts = ['-I%s' % i for i in self.include_dirs + \
[opensslIncludeDir]]
--
1.8.1.4

45
recipes-devtools/python-m2crypto/python-m2crypto_0.21.1.bb

@ -0,0 +1,45 @@
SUMMARY = "A Python crypto and SSL toolkit"
HOMEPAGE = "http://chandlerproject.org/bin/view/Projects/MeTooCrypto"
DEPENDS = "openssl swig-native python"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
SRC_URI = "http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-${PV}.tar.gz \
file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \
file://0001-M2Crypto-Error-fix.patch"
SRC_URI[md5sum] = "f93d8462ff7646397a9f77a2fe602d17"
SRC_URI[sha256sum] = "25b94498505c2d800ee465db0cc1aff097b1615adc3ac042a1c85ceca264fc0a"
S = "${WORKDIR}/M2Crypto-${PV}"
inherit setuptools
SWIG_FEATURES_x86-64 = "-D__x86_64__"
SWIG_FEATURES ?= ""
export SWIG_FEATURES
# Get around a problem with swig, but only if the
# multilib header file exists.
#
do_compile_prepend() {
if [ "${SITEINFO_BITS}" = "64" ];then
bit="64"
else
bit="32"
fi
if [ -e ${STAGING_INCDIR}/openssl/opensslconf-${bit}.h ] ;then
for i in SWIG/_ec.i SWIG/_evp.i; do
sed -i -e "s/opensslconf.*\./opensslconf-${bit}\./" "$i"
done
elif [ -e ${STAGING_INCDIR}/openssl/opensslconf-n${bit}.h ] ;then
for i in SWIG/_ec.i SWIG/_evp.i; do
sed -i -e "s/opensslconf.*\./opensslconf-n${bit}\./" "$i"
done
fi
}
BBCLASSEXTEND = "native"

63
recipes-devtools/swig/swig.inc

@ -0,0 +1,63 @@
SUMMARY = "SWIG - Simplified Wrapper and Interface Generator"
HOMEPAGE = "http://swig.sourceforge.net/"
LICENSE = "BSD & GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \
file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08"
SECTION = "devel"
DEPENDS = "libpcre python"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
inherit autotools pythonnative
EXTRA_OECONF = " \
--with-python=${PYTHON} \
--without-allegrocl \
--without-android \
--without-boost \
--without-chicken \
--without-clisp \
--without-csharp \
--without-d \
--without-gcj \
--without-go \
--without-guile \
--without-java \
--without-lua \
--without-mzscheme \
--without-ocaml \
--without-octave \
--without-perl5 \
--without-pike \
--without-php \
--without-python3 \
--without-r \
--without-ruby \
--without-tcl \
"
BBCLASSEXTEND = "native nativesdk"
do_configure() {
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/Tools/config
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/Tools/config
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
oe_runconf
}
do_install_append_class-nativesdk() {
cd ${D}${bindir}
ln -s swig swig2.0
}
def swiglib_relpath(d):
swiglib = d.getVar('datadir', True) + "/" + d.getVar('BPN', True) + "/" + d.getVar('PV', True)
return os.path.relpath(swiglib, d.getVar('bindir', True))
do_install_append_class-native() {
create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}
}

69
recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch

@ -0,0 +1,69 @@
From a4a0440a644c6c5e5da096efe3cf05ba309a284f Mon Sep 17 00:00:00 2001
From: "NODA, Kai" <nodakai@gmail.com>
Date: Sun, 22 Apr 2012 17:01:02 +0900
Subject: [PATCH] Use /proc/self/exe for "swig -swiglib" on non-Win32
platforms.
If it wasn't found, then fall back to a fixed string just as before.
Upstream-Status: Submitted
http://sourceforge.net/mailarchive/message.php?msg_id=29179733
---
Source/Modules/main.cxx | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index d2f5d3b..cbb0a12 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -26,6 +26,11 @@ char cvsroot_main_cxx[] = "$Id$";
#include "cparse.h"
#include <ctype.h>
#include <limits.h> // for INT_MAX
+#ifndef _WIN32
+#include <cstddef>
+#include <unistd.h> // for readlink
+#include <sys/stat.h> // for stat
+#endif
// Global variables
@@ -902,9 +907,9 @@ int SWIG_main(int argc, char *argv[], Language *l) {
// Check for SWIG_LIB environment variable
if ((c = getenv("SWIG_LIB")) == (char *) 0) {
+ char *p;
#if defined(_WIN32)
char buf[MAX_PATH];
- char *p;
if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) {
*(p + 1) = '\0';
SwigLib = NewStringf("%sLib", buf); // Native windows installation path
@@ -914,7 +919,22 @@ int SWIG_main(int argc, char *argv[], Language *l) {
if (Len(SWIG_LIB_WIN_UNIX) > 0)
SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw)
#else
- SwigLib = NewString(SWIG_LIB);
+ char buf[PATH_MAX];
+ if (0 < ::readlink("/proc/self/exe", buf, sizeof(buf)) &&
+ (p = ::strstr(buf, "/bin/swig"))) {
+ int major, minor, patch;
+ const int ret = ::sscanf(VERSION, "%d.%d.%d", &major, &minor, &patch);
+ if (3 == ret) {
+ const ::ptrdiff_t dir_part_len = p - buf;
+ ::snprintf(p, PATH_MAX - dir_part_len, "/share/swig/%d.%d.%d", major, minor, patch);
+ struct ::stat stat_res;
+ if (0 == ::stat(buf, &stat_res) && S_ISDIR(stat_res.st_mode)) {
+ SwigLib = NewString(buf);
+ }
+ }
+ }
+ if (NULL == SwigLib)
+ SwigLib = NewString(SWIG_LIB);
#endif
} else {
SwigLib = NewString(c);
--
1.7.9.5

64
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@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@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

8
recipes-devtools/swig/swig_3.0.6.bb

@ -0,0 +1,8 @@
require ${BPN}.inc
SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
file://0001-configure-use-pkg-config-for-pcre-detection.patch \
"
SRC_URI[md5sum] = "df43ae271642bcfa61c1e59f970f9963"
SRC_URI[sha256sum] = "c67f63ea11956106e4cda66416d5020330dc4ce2ee45057d39a9494ce33eca05"
Loading…
Cancel
Save