blob: e5471e81da3b4f980599cb4ab5f0412c463562f0 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -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-3-Clause"
9LIC_FILES_CHKSUM = "file://LICENCE;md5=3bb381a66a5385b246d4877922e7511e"
10SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \
11 file://fix-pcre-name-collision.patch \
12 file://run-ptest \
13 file://Makefile \
14 "
15
16SRC_URI[md5sum] = "cf7326204cc46c755b5b2608033d9d24"
17SRC_URI[sha256sum] = "19108658b23b3ec5058edc9f66ac545ea19f9537234be1ec62b714c84399366d"
18
19CVE_PRODUCT = "pcre"
20
21S = "${WORKDIR}/pcre-${PV}"
22
23PROVIDES += "pcre"
24DEPENDS += "bzip2 zlib"
25
26PACKAGECONFIG ??= "pcre8 unicode-properties jit"
27
28PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
29PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
30PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
31PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
32PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
33PACKAGECONFIG[jit] = "--enable-jit=auto,--disable-jit"
34
35BINCONFIG = "${bindir}/pcre-config"
36
37inherit autotools binconfig-disabled ptest
38
39EXTRA_OECONF = "--enable-utf"
40
41PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
42
43SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
44SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
45SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
46SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
47SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
48SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
49
50FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
51FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
52FILES_pcregrep = "${bindir}/pcregrep"
53FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
54FILES_pcretest = "${bindir}/pcretest"
55FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
56
57BBCLASSEXTEND = "native nativesdk"
58
59do_install_ptest() {
60 t=${D}${PTEST_PATH}
61 cp ${WORKDIR}/Makefile $t
62 cp -r ${S}/testdata $t
63 for i in pcre_stringpiece_unittest pcregrep pcretest; \
64 do cp ${B}/.libs/$i $t; \
65 done
66 for i in RunTest RunGrepTest test-driver; \
67 do cp ${S}/$i $t; \
68 done
69 # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested.
70 # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8
71 # locale so the test fails if fr_FR is UTF-8 locale.
72 sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest
73}
74
75RDEPENDS_${PN}-ptest += "make"