blob: 90dfb335588e2963583958ac6996245cf1d14283 [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -06001DESCRIPTION = "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"
9LIC_FILES_CHKSUM = "file://LICENCE;md5=b8221cbf43c5587f90ccf228f1185cc2"
Brad Bishop37a0e4d2017-12-04 01:01:44 -050010
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/projects/pcre/files/prce/8.39/pcre-${PV}.tar.bz2 \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060013 file://pcre-cross.patch \
14 file://fix-pcre-name-collision.patch \
15 file://run-ptest \
16 file://Makefile \
17"
18
19SRC_URI[md5sum] = "e3fca7650a0556a2647821679d81f585"
20SRC_URI[sha256sum] = "b858099f82483031ee02092711689e7245586ada49e534a06e678b8ea9549e8b"
21
22S = "${WORKDIR}/pcre-${PV}"
23
24PROVIDES += "pcre"
25DEPENDS += "bzip2 zlib"
26
27PACKAGECONFIG ??= "pcre8 unicode-properties"
28
29PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
30PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
31PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
32PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
33PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
34
35BINCONFIG = "${bindir}/pcre-config"
36
37inherit autotools binconfig-disabled ptest
38
39EXTRA_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.
49BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}"
50CFLAGS += "-D_REENTRANT"
51CXXFLAGS_append_powerpc = " -lstdc++"
52
53export CCLD_FOR_BUILD ="${BUILD_CCLD}"
54
55PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
56
57SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
58SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
59SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
60SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
61SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
62SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
63
64FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
65FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
66FILES_pcregrep = "${bindir}/pcregrep"
67FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
68FILES_pcretest = "${bindir}/pcretest"
69FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
70
71BBCLASSEXTEND = "native nativesdk"
72
73do_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}