xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-support/libpcre/libpcre_8.45.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunDESCRIPTION = "The PCRE library is a set of functions that implement regular \
2*4882a593Smuzhiyunexpression pattern matching using the same syntax and semantics as Perl 5. PCRE \
3*4882a593Smuzhiyunhas its own native API, as well as a set of wrapper functions that correspond \
4*4882a593Smuzhiyunto the POSIX regular expression API."
5*4882a593SmuzhiyunSUMMARY = "Perl Compatible Regular Expressions"
6*4882a593SmuzhiyunHOMEPAGE = "http://www.pcre.org"
7*4882a593SmuzhiyunSECTION = "devel"
8*4882a593SmuzhiyunLICENSE = "BSD-3-Clause"
9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENCE;md5=b5d5d1a69a24ea2718263f1ff85a1c58"
10*4882a593SmuzhiyunSRC_URI = "${SOURCEFORGE_MIRROR}/pcre/pcre-${PV}.tar.bz2 \
11*4882a593Smuzhiyun           file://run-ptest \
12*4882a593Smuzhiyun           file://Makefile \
13*4882a593Smuzhiyun           "
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunSRC_URI[sha256sum] = "4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunCVE_PRODUCT = "pcre"
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunS = "${WORKDIR}/pcre-${PV}"
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunPROVIDES += "pcre"
22*4882a593SmuzhiyunDEPENDS += "bzip2 zlib"
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunPACKAGECONFIG ??= "pcre8 unicode-properties jit"
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunPACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
27*4882a593SmuzhiyunPACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
28*4882a593SmuzhiyunPACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
29*4882a593SmuzhiyunPACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
30*4882a593SmuzhiyunPACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
31*4882a593SmuzhiyunPACKAGECONFIG[jit] = "--enable-jit=auto,--disable-jit"
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunBINCONFIG = "${bindir}/pcre-config"
34*4882a593Smuzhiyun
35*4882a593Smuzhiyuninherit autotools binconfig-disabled ptest
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunEXTRA_OECONF = "--enable-utf"
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunPACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunSUMMARY:libpcrecpp = "${SUMMARY} - C++ wrapper functions"
42*4882a593SmuzhiyunSUMMARY:libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
43*4882a593SmuzhiyunSUMMARY:pcregrep = "grep utility that uses perl 5 compatible regexes"
44*4882a593SmuzhiyunSUMMARY:pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
45*4882a593SmuzhiyunSUMMARY:pcretest = "program for testing Perl-comatible regular expressions"
46*4882a593SmuzhiyunSUMMARY:pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunFILES:libpcrecpp = "${libdir}/libpcrecpp.so.*"
49*4882a593SmuzhiyunFILES:libpcreposix = "${libdir}/libpcreposix.so.*"
50*4882a593SmuzhiyunFILES:pcregrep = "${bindir}/pcregrep"
51*4882a593SmuzhiyunFILES:pcregrep-doc = "${mandir}/man1/pcregrep.1"
52*4882a593SmuzhiyunFILES:pcretest = "${bindir}/pcretest"
53*4882a593SmuzhiyunFILES:pcretest-doc = "${mandir}/man1/pcretest.1"
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
56*4882a593Smuzhiyun
57*4882a593Smuzhiyundo_install_ptest() {
58*4882a593Smuzhiyun	t=${D}${PTEST_PATH}
59*4882a593Smuzhiyun	cp ${WORKDIR}/Makefile $t
60*4882a593Smuzhiyun	cp -r ${S}/testdata $t
61*4882a593Smuzhiyun	for i in pcre_stringpiece_unittest pcregrep pcretest; \
62*4882a593Smuzhiyun	  do cp ${B}/.libs/$i $t; \
63*4882a593Smuzhiyun	done
64*4882a593Smuzhiyun	for i in RunTest RunGrepTest test-driver; \
65*4882a593Smuzhiyun	  do cp ${S}/$i $t; \
66*4882a593Smuzhiyun	done
67*4882a593Smuzhiyun	# Skip the fr_FR locale test. If the locale fr_FR is found, it is tested.
68*4882a593Smuzhiyun	# If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8
69*4882a593Smuzhiyun	# locale so the test fails if fr_FR is UTF-8 locale.
70*4882a593Smuzhiyun	sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest
71*4882a593Smuzhiyun}
72*4882a593Smuzhiyun
73*4882a593SmuzhiyunRDEPENDS:${PN}-ptest += "make"
74