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" |
| 9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=3bb381a66a5385b246d4877922e7511e" |
| 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 | |
| 15 | SRC_URI[md5sum] = "cf7326204cc46c755b5b2608033d9d24" |
| 16 | SRC_URI[sha256sum] = "19108658b23b3ec5058edc9f66ac545ea19f9537234be1ec62b714c84399366d" |
| 17 | |
| 18 | CVE_PRODUCT = "pcre" |
| 19 | |
| 20 | S = "${WORKDIR}/pcre-${PV}" |
| 21 | |
| 22 | PROVIDES += "pcre" |
| 23 | DEPENDS += "bzip2 zlib" |
| 24 | |
| 25 | PACKAGECONFIG ??= "pcre8 unicode-properties jit" |
| 26 | |
| 27 | PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8" |
| 28 | PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16" |
| 29 | PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32" |
| 30 | PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline," |
| 31 | PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties" |
| 32 | PACKAGECONFIG[jit] = "--enable-jit=auto,--disable-jit" |
| 33 | |
| 34 | BINCONFIG = "${bindir}/pcre-config" |
| 35 | |
| 36 | inherit autotools binconfig-disabled ptest |
| 37 | |
| 38 | EXTRA_OECONF = "--enable-utf" |
| 39 | |
| 40 | PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc" |
| 41 | |
| 42 | SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions" |
| 43 | SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API" |
| 44 | SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes" |
| 45 | SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs" |
| 46 | SUMMARY_pcretest = "program for testing Perl-comatible regular expressions" |
| 47 | SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs" |
| 48 | |
| 49 | FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*" |
| 50 | FILES_libpcreposix = "${libdir}/libpcreposix.so.*" |
| 51 | FILES_pcregrep = "${bindir}/pcregrep" |
| 52 | FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1" |
| 53 | FILES_pcretest = "${bindir}/pcretest" |
| 54 | FILES_pcretest-doc = "${mandir}/man1/pcretest.1" |
| 55 | |
| 56 | BBCLASSEXTEND = "native nativesdk" |
| 57 | |
| 58 | do_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 | |
| 74 | RDEPENDS_${PN}-ptest += "make" |