Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | DESCRIPTION = "The PCRE library is a set of functions that implement regular \ |
| 2 | expression pattern matching using the same syntax and semantics as Perl 5. PCRE \ |
| 3 | has its own native API, as well as a set of wrapper functions that correspond \ |
| 4 | to the POSIX regular expression API." |
| 5 | SUMMARY = "Perl Compatible Regular Expressions" |
| 6 | HOMEPAGE = "http://www.pcre.org" |
| 7 | SECTION = "devel" |
| 8 | LICENSE = "BSD-3-Clause" |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=b5d5d1a69a24ea2718263f1ff85a1c58" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 10 | SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | file://run-ptest \ |
| 12 | file://Makefile \ |
| 13 | " |
| 14 | |
Andrew Geissler | 5f35090 | 2021-07-23 13:09:54 -0400 | [diff] [blame] | 15 | SRC_URI[sha256sum] = "4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | |
| 17 | CVE_PRODUCT = "pcre" |
| 18 | |
| 19 | S = "${WORKDIR}/pcre-${PV}" |
| 20 | |
| 21 | PROVIDES += "pcre" |
| 22 | DEPENDS += "bzip2 zlib" |
| 23 | |
| 24 | PACKAGECONFIG ??= "pcre8 unicode-properties jit" |
| 25 | |
| 26 | PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8" |
| 27 | PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16" |
| 28 | PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32" |
| 29 | PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline," |
| 30 | PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties" |
| 31 | PACKAGECONFIG[jit] = "--enable-jit=auto,--disable-jit" |
| 32 | |
| 33 | BINCONFIG = "${bindir}/pcre-config" |
| 34 | |
| 35 | inherit autotools binconfig-disabled ptest |
| 36 | |
| 37 | EXTRA_OECONF = "--enable-utf" |
| 38 | |
| 39 | PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc" |
| 40 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | SUMMARY:libpcrecpp = "${SUMMARY} - C++ wrapper functions" |
| 42 | SUMMARY:libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API" |
| 43 | SUMMARY:pcregrep = "grep utility that uses perl 5 compatible regexes" |
| 44 | SUMMARY:pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs" |
| 45 | SUMMARY:pcretest = "program for testing Perl-comatible regular expressions" |
| 46 | SUMMARY:pcretest-doc = "program for testing Perl-comatible regular expressions - docs" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 47 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 48 | FILES:libpcrecpp = "${libdir}/libpcrecpp.so.*" |
| 49 | FILES:libpcreposix = "${libdir}/libpcreposix.so.*" |
| 50 | FILES:pcregrep = "${bindir}/pcregrep" |
| 51 | FILES:pcregrep-doc = "${mandir}/man1/pcregrep.1" |
| 52 | FILES:pcretest = "${bindir}/pcretest" |
| 53 | FILES:pcretest-doc = "${mandir}/man1/pcretest.1" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 54 | |
| 55 | BBCLASSEXTEND = "native nativesdk" |
| 56 | |
| 57 | do_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 73 | RDEPENDS:${PN}-ptest += "make" |