summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libpcre/libpcre
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2013-11-14 09:20:19 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-20 14:03:25 +0000
commitb609f91c5cca2011609198b81058e8c112edcad8 (patch)
tree77dd4549e576beb64bb76aa5cec5f54fe41e7efc /meta/recipes-support/libpcre/libpcre
parente3ff4a29191ed19213f8bcf7946be7e1db72fe52 (diff)
downloadpoky-b609f91c5cca2011609198b81058e8c112edcad8.tar.gz
libpcre: Cleanup FILESPATH
Setting of the FILESPATH is not needed anymore, so clean it up. Move files to libprce patch directory (From OE-Core rev: 32b2e20e7f6484830bac0510414b1950abbc1a96) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libpcre/libpcre')
-rw-r--r--meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch41
-rw-r--r--meta/recipes-support/libpcre/libpcre/pcre-cross.patch48
2 files changed, 89 insertions, 0 deletions
diff --git a/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch b/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
new file mode 100644
index 0000000000..89b44f6aa6
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Inappropriate [debian patch]
2
3This patch address a namespace collision with libc.
4
5Although there is no "#include <regex.h>" in the source file, at
6runtime, it's unintentionally linked to the libc version, the regcomp of
7libc is called instead the pcre one using pcre's data structure...
8that looks like a disaster.
9
10Can patch is from Debian (and Ubuntu 11.04alpha has it also).
11
12[sgw: added patch comment]
13Signed-off-by: Qing He <qing.he@intel.com>
14Signed-off-by: Saul Wold <sgw@linux.intel.com>
15
16--- a/pcreposix.h 2010-05-17 00:17:23.000000000 +0800
17+++ b/pcreposix.h 2009-01-15 04:32:17.000000000 +0800
18@@ -133,14 +130,19 @@
19
20 /* The functions */
21
22-PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
23-PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
24+PCREPOSIX_EXP_DECL int pcreposix_regcomp(regex_t *, const char *, int);
25+PCREPOSIX_EXP_DECL int pcreposix_regexec(const regex_t *, const char *, size_t,
26 regmatch_t *, int);
27-PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
28-PCREPOSIX_EXP_DECL void regfree(regex_t *);
29+PCREPOSIX_EXP_DECL size_t pcreposix_regerror(int, const regex_t *, char *, size_t);
30+PCREPOSIX_EXP_DECL void pcreposix_regfree(regex_t *);
31
32 #ifdef __cplusplus
33 } /* extern "C" */
34 #endif
35
36+#define regcomp pcreposix_regcomp
37+#define regexec pcreposix_regexec
38+#define regerror pcreposix_regerror
39+#define regfree pcreposix_regfree
40+
41 #endif /* End of pcreposix.h */
diff --git a/meta/recipes-support/libpcre/libpcre/pcre-cross.patch b/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
new file mode 100644
index 0000000000..83880f7098
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
@@ -0,0 +1,48 @@
1Upstream-Status: Pending
2
3--- pcre-8.32.orig/Makefile.am
4+++ pcre-8.32/Makefile.am
5@@ -197,8 +197,18 @@ bin_SCRIPTS = pcre-config
6
7+CC_FOR_BUILD = @CC_FOR_BUILD@
8+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
9+CCLD_FOR_BUILD = @CCLD_FOR_BUILD@
10+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
11+
12 if WITH_REBUILD_CHARTABLES
13
14 noinst_PROGRAMS += dftables
15 dftables_SOURCES = dftables.c
16+dftables_LINK = $(CCLD_FOR_BUILD) -o $@
17+dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD)
18+
19+dftables.o: $(srcdir)/dftables.c
20+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/dftables.c
21
22 pcre_chartables.c: dftables$(EXEEXT)
23 ./dftables$(EXEEXT) $@
24--- pcre-8.32.orig/configure.ac
25+++ pcre-8.32/configure.ac
26@@ -72,6 +72,22 @@ then
27 fi
28 fi
29
30+if test x"$cross_compiling" = xyes; then
31+ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
32+ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}"
33+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}"
34+ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}"
35+else
36+ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}"
37+ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}"
38+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}"
39+ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}"
40+fi
41+AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler])
42+AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend])
43+AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments])
44+AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments])
45+
46 # AC_PROG_CXX will return "g++" even if no c++ compiler is installed.
47 # Check for that case, and just disable c++ code if g++ doesn't run.
48 AC_LANG_PUSH(C++)