Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -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" |
| 9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=60da32d84d067f53e22071c4ecb4384d" |
| 10 | SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \ |
| 11 | file://pcre-cross.patch \ |
| 12 | file://fix-pcre-name-collision.patch \ |
| 13 | file://run-ptest \ |
| 14 | file://Makefile \ |
| 15 | " |
| 16 | |
| 17 | SRC_URI[md5sum] = "c160d22723b1670447341b08c58981c1" |
| 18 | SRC_URI[sha256sum] = "e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530" |
| 19 | |
| 20 | CVE_PRODUCT = "pcre" |
| 21 | |
| 22 | S = "${WORKDIR}/pcre-${PV}" |
| 23 | |
| 24 | PROVIDES += "pcre" |
| 25 | DEPENDS += "bzip2 zlib" |
| 26 | |
| 27 | PACKAGECONFIG ??= "pcre8 unicode-properties" |
| 28 | |
| 29 | PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8" |
| 30 | PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16" |
| 31 | PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32" |
| 32 | PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline," |
| 33 | PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties" |
| 34 | |
| 35 | BINCONFIG = "${bindir}/pcre-config" |
| 36 | |
| 37 | inherit autotools binconfig-disabled ptest |
| 38 | |
| 39 | EXTRA_OECONF = "\ |
| 40 | --enable-newline-is-lf \ |
| 41 | --enable-rebuild-chartables \ |
| 42 | --enable-utf \ |
| 43 | --with-link-size=2 \ |
| 44 | --with-match-limit=10000000 \ |
| 45 | " |
| 46 | |
| 47 | # Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to |
| 48 | # set CFLAGS_FOR_BUILD, required for the libpcre build. |
| 49 | BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}" |
| 50 | CFLAGS += "-D_REENTRANT" |
| 51 | CXXFLAGS_append_powerpc = " -lstdc++" |
| 52 | |
| 53 | export CCLD_FOR_BUILD ="${BUILD_CCLD}" |
| 54 | |
| 55 | PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc" |
| 56 | |
| 57 | SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions" |
| 58 | SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API" |
| 59 | SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes" |
| 60 | SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs" |
| 61 | SUMMARY_pcretest = "program for testing Perl-comatible regular expressions" |
| 62 | SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs" |
| 63 | |
| 64 | FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*" |
| 65 | FILES_libpcreposix = "${libdir}/libpcreposix.so.*" |
| 66 | FILES_pcregrep = "${bindir}/pcregrep" |
| 67 | FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1" |
| 68 | FILES_pcretest = "${bindir}/pcretest" |
| 69 | FILES_pcretest-doc = "${mandir}/man1/pcretest.1" |
| 70 | |
| 71 | BBCLASSEXTEND = "native nativesdk" |
| 72 | |
| 73 | do_install_ptest() { |
| 74 | t=${D}${PTEST_PATH} |
| 75 | cp ${WORKDIR}/Makefile $t |
| 76 | cp -r ${S}/testdata $t |
| 77 | for i in pcre_stringpiece_unittest pcregrep pcretest; \ |
| 78 | do cp ${B}/.libs/$i $t; \ |
| 79 | done |
| 80 | for i in RunTest RunGrepTest test-driver; \ |
| 81 | do cp ${S}/$i $t; \ |
| 82 | done |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 83 | # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested. |
| 84 | # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8 |
| 85 | # locale so the test fails if fr_FR is UTF-8 locale. |
| 86 | sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 87 | } |