blob: 384c2fe79c4404165e644079e36e3863c26f8bb8 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001DESCRIPTION = "The PCRE library is a set of functions that implement regular \
2expression pattern matching using the same syntax and semantics as Perl 5. PCRE \
3has its own native API, as well as a set of wrapper functions that correspond \
4to the POSIX regular expression API."
5SUMMARY = "Perl Compatible Regular Expressions"
6HOMEPAGE = "http://www.pcre.org"
7SECTION = "devel"
8LICENSE = "BSD"
9LIC_FILES_CHKSUM = "file://LICENCE;md5=7e4937814aee14758c1c95b59c80c44d"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050010SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2 \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 file://pcre-cross.patch \
12 file://fix-pcre-name-collision.patch \
13 file://run-ptest \
14 file://Makefile \
15"
16
Patrick Williamsf1e5d692016-03-30 15:21:19 -050017SRC_URI[md5sum] = "00aabbfe56d5a48b270f999b508c5ad2"
18SRC_URI[sha256sum] = "b9e02d36e23024d6c02a2e5b25204b3a4fa6ade43e0a5f869f254f49535079df"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019
20S = "${WORKDIR}/pcre-${PV}"
21
22PROVIDES += "pcre"
23DEPENDS += "bzip2 zlib"
24
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050025PACKAGECONFIG ??= "pcre8 unicode-properties"
Patrick Williamsf1e5d692016-03-30 15:21:19 -050026
27PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
28PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
29PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050031PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032
33BINCONFIG = "${bindir}/pcre-config"
34
35inherit autotools binconfig-disabled ptest
36
37EXTRA_OECONF = "\
38 --enable-newline-is-lf \
39 --enable-rebuild-chartables \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050040 --enable-utf \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041 --with-link-size=2 \
42 --with-match-limit=10000000 \
43"
44
45# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
46# set CFLAGS_FOR_BUILD, required for the libpcre build.
47BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}"
48CFLAGS += "-D_REENTRANT"
49CXXFLAGS_append_powerpc = " -lstdc++"
50
51PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
52
53SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
54SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
55SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
56SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
57SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
58SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
59
60FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
61FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
62FILES_pcregrep = "${bindir}/pcregrep"
63FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
64FILES_pcretest = "${bindir}/pcretest"
65FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
66
67BBCLASSEXTEND = "native nativesdk"
68
69do_install_ptest() {
70 t=${D}${PTEST_PATH}
71 cp ${WORKDIR}/Makefile $t
72 cp -r ${S}/testdata $t
73 for i in pcre_stringpiece_unittest pcregrep pcretest; \
74 do cp ${B}/.libs/$i $t; \
75 done
76 for i in RunTest RunGrepTest test-driver; \
77 do cp ${S}/$i $t; \
78 done
79}