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