blob: 0187c08f5056ec8a2d4e64dce4bfbba1ef07e4a3 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -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=60da32d84d067f53e22071c4ecb4384d"
10SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \
11 file://pcre-cross.patch \
12 file://fix-pcre-name-collision.patch \
13 file://run-ptest \
14 file://Makefile \
15"
16
17SRC_URI[md5sum] = "c160d22723b1670447341b08c58981c1"
18SRC_URI[sha256sum] = "e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530"
19
20CVE_PRODUCT = "pcre"
21
22S = "${WORKDIR}/pcre-${PV}"
23
24PROVIDES += "pcre"
25DEPENDS += "bzip2 zlib"
26
27PACKAGECONFIG ??= "pcre8 unicode-properties"
28
29PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
30PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
31PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
32PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
33PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
34
35BINCONFIG = "${bindir}/pcre-config"
36
37inherit autotools binconfig-disabled ptest
38
39EXTRA_OECONF = "\
40 --enable-newline-is-lf \
41 --enable-rebuild-chartables \
42 --enable-utf \
43 --with-link-size=2 \
44 --with-match-limit=10000000 \
45"
46
47# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
48# set CFLAGS_FOR_BUILD, required for the libpcre build.
49BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}"
50CFLAGS += "-D_REENTRANT"
51CXXFLAGS_append_powerpc = " -lstdc++"
52
53export CCLD_FOR_BUILD ="${BUILD_CCLD}"
54
55PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
56
57SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
58SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
59SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
60SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
61SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
62SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
63
64FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
65FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
66FILES_pcregrep = "${bindir}/pcregrep"
67FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
68FILES_pcretest = "${bindir}/pcretest"
69FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
70
71BBCLASSEXTEND = "native nativesdk"
72
73do_install_ptest() {
74 t=${D}${PTEST_PATH}
75 cp ${WORKDIR}/Makefile $t
76 cp -r ${S}/testdata $t
77 for i in pcre_stringpiece_unittest pcregrep pcretest; \
78 do cp ${B}/.libs/$i $t; \
79 done
80 for i in RunTest RunGrepTest test-driver; \
81 do cp ${S}/$i $t; \
82 done
Brad Bishop316dfdd2018-06-25 12:45:53 -040083 # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested.
84 # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8
85 # locale so the test fails if fr_FR is UTF-8 locale.
86 sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest
Brad Bishopd7bf8c12018-02-25 22:55:05 -050087}