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