summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libpcre
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-02-09 19:42:02 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-23 12:49:49 -0800
commit839568db9db79a74a499cde658ed4c97b5c80cb1 (patch)
tree0de69818c3f43178dfc9e678b6a824aecf7c2cfd /meta/recipes-support/libpcre
parentd16219b754a259ec6277bf76001eb8aacd4a210c (diff)
downloadpoky-839568db9db79a74a499cde658ed4c97b5c80cb1.tar.gz
libpcre2: add it for newer vte
There are two major versions of the PCRE library. The newest version, PCRE2, was released in 2015 and is at version 10.22. The original, very widely deployed PCRE library, originally released in 1997, is at version 8.40, and the API and feature set are stable, future releases will be for bugfixes only. All new future features will be to PCRE2, not the original PCRE 8.x series. The newer vte depends on libpcre2, so add it. (From OE-Core rev: f7165d379cb67c4d4918a8a3e9509d3d823d61da) (From OE-Core rev: 69c4d94dd6b825c710c6e76fe77e5255ddd1183d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libpcre')
-rw-r--r--meta/recipes-support/libpcre/libpcre2/pcre-cross.patch65
-rw-r--r--meta/recipes-support/libpcre/libpcre2_10.22.bb56
2 files changed, 121 insertions, 0 deletions
diff --git a/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch b/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
new file mode 100644
index 0000000000..9516caf51a
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
@@ -0,0 +1,65 @@
1Fix for cross compiling
2
3Fixed:
4| ./dftables src/pcre2_chartables.c
5| make: ./dftables: Command not found
6| make: *** [src/pcre2_chartables.c] Error 127
7
8Upstream-Status: Pending
9
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11
12diff --git a/Makefile.am b/Makefile.am
13index 38f1d41..2bde083 100644
14--- a/Makefile.am
15+++ b/Makefile.am
16@@ -298,9 +298,21 @@ bin_SCRIPTS = pcre2-config
17 ## to copy a distributed set of tables that are defined for ASCII code. In this
18 ## case, dftables is not needed.
19
20+CC_FOR_BUILD = @CC_FOR_BUILD@
21+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
22+CCLD_FOR_BUILD = @CCLD_FOR_BUILD@
23+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
24+
25 if WITH_REBUILD_CHARTABLES
26 noinst_PROGRAMS += dftables
27 dftables_SOURCES = src/dftables.c
28+
29+dftables_LINK = $(CCLD_FOR_BUILD) -o $@
30+dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD)
31+
32+src/dftables.o: $(srcdir)/src/dftables.c
33+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/src/dftables.c
34+
35 src/pcre2_chartables.c: dftables$(EXEEXT)
36 rm -f $@
37 ./dftables$(EXEEXT) $@
38diff --git a/configure.ac b/configure.ac
39index d7c57aa..d6eb0aa 100644
40--- a/configure.ac
41+++ b/configure.ac
42@@ -59,6 +59,23 @@ then
43 fi
44 fi
45
46+if test x"$cross_compiling" = xyes; then
47+ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
48+ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}"
49+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}"
50+ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}"
51+else
52+ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}"
53+ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}"
54+ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}"
55+ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}"
56+fi
57+AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler])
58+AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend])
59+AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments])
60+AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments])
61+
62+
63 # Check for a 64-bit integer type
64 AC_TYPE_INT64_T
65
diff --git a/meta/recipes-support/libpcre/libpcre2_10.22.bb b/meta/recipes-support/libpcre/libpcre2_10.22.bb
new file mode 100644
index 0000000000..1e00ed54d1
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre2_10.22.bb
@@ -0,0 +1,56 @@
1DESCRIPTION = "There are two major versions of the PCRE library. The \
2newest version is PCRE2, which is a re-working of the original PCRE \
3library to provide an entirely new API. The original, very widely \
4deployed PCRE library's API and feature are stable, future releases \
5 will be for bugfixes only. All new future features will be to PCRE2, \
6not the original PCRE 8.x series."
7SUMMARY = "Perl Compatible Regular Expressions version 2"
8HOMEPAGE = "http://www.pcre.org"
9SECTION = "devel"
10LICENSE = "BSD"
11LIC_FILES_CHKSUM = "file://LICENCE;md5=ab9633efd38d6f799398df2c248b5aec"
12
13SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2 \
14 file://pcre-cross.patch \
15"
16
17SRC_URI[md5sum] = "c0c02517938ee2b0d350d53edf450664"
18SRC_URI[sha256sum] = "b2b44619f4ac6c50ad74c2865fd56807571392496fae1c9ad7a70993d018f416"
19
20S = "${WORKDIR}/pcre2-${PV}"
21
22PROVIDES += "pcre2"
23DEPENDS += "bzip2 zlib"
24
25BINCONFIG = "${bindir}/pcre2-config"
26
27inherit autotools binconfig-disabled
28
29EXTRA_OECONF = "\
30 --enable-newline-is-lf \
31 --enable-rebuild-chartables \
32 --with-link-size=2 \
33 --with-match-limit=10000000 \
34"
35
36# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
37# set CFLAGS_FOR_BUILD, required for the libpcre build.
38BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}/src"
39CFLAGS += "-D_REENTRANT"
40CXXFLAGS_append_powerpc = " -lstdc++"
41
42export CCLD_FOR_BUILD ="${BUILD_CCLD}"
43
44PACKAGES =+ "pcre2grep pcre2grep-doc pcre2test pcre2test-doc"
45
46SUMMARY_pcre2grep = "grep utility that uses perl 5 compatible regexes"
47SUMMARY_pcre2grep-doc = "grep utility that uses perl 5 compatible regexes - docs"
48SUMMARY_pcre2test = "program for testing Perl-comatible regular expressions"
49SUMMARY_pcre2test-doc = "program for testing Perl-comatible regular expressions - docs"
50
51FILES_pcre2grep = "${bindir}/pcre2grep"
52FILES_pcre2grep-doc = "${mandir}/man1/pcre2grep.1"
53FILES_pcre2test = "${bindir}/pcre2test"
54FILES_pcre2test-doc = "${mandir}/man1/pcre2test.1"
55
56BBCLASSEXTEND = "native nativesdk"