Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [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=b8221cbf43c5587f90ccf228f1185cc2" |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame^] | 10 | |
| 11 | |
| 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/projects/pcre/files/prce/8.39/pcre-${PV}.tar.bz2 \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 13 | file://pcre-cross.patch \ |
| 14 | file://fix-pcre-name-collision.patch \ |
| 15 | file://run-ptest \ |
| 16 | file://Makefile \ |
| 17 | " |
| 18 | |
| 19 | SRC_URI[md5sum] = "e3fca7650a0556a2647821679d81f585" |
| 20 | SRC_URI[sha256sum] = "b858099f82483031ee02092711689e7245586ada49e534a06e678b8ea9549e8b" |
| 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 |
| 83 | } |