From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- poky/meta/recipes-support/libpcre/libpcre/Makefile | 183 +++++++++++++++++++++ .../libpcre/libpcre/fix-pcre-name-collision.patch | 41 +++++ .../libpcre/libpcre/pcre-cross.patch | 48 ++++++ .../meta/recipes-support/libpcre/libpcre/run-ptest | 3 + .../libpcre/libpcre2/pcre-cross.patch | 65 ++++++++ .../meta/recipes-support/libpcre/libpcre2_10.30.bb | 61 +++++++ poky/meta/recipes-support/libpcre/libpcre_8.41.bb | 87 ++++++++++ 7 files changed, 488 insertions(+) create mode 100644 poky/meta/recipes-support/libpcre/libpcre/Makefile create mode 100644 poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch create mode 100644 poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch create mode 100644 poky/meta/recipes-support/libpcre/libpcre/run-ptest create mode 100644 poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch create mode 100644 poky/meta/recipes-support/libpcre/libpcre2_10.30.bb create mode 100644 poky/meta/recipes-support/libpcre/libpcre_8.41.bb (limited to 'poky/meta/recipes-support/libpcre') diff --git a/poky/meta/recipes-support/libpcre/libpcre/Makefile b/poky/meta/recipes-support/libpcre/libpcre/Makefile new file mode 100644 index 000000000..708d807d0 --- /dev/null +++ b/poky/meta/recipes-support/libpcre/libpcre/Makefile @@ -0,0 +1,183 @@ +TESTS = pcre_stringpiece_unittest RunTest RunGrepTest +subdir = . +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +am__sh_e_setup = case $$- in *e*) set +e;; esac +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +MKDIR_P = /bin/mkdir -p +PACKAGE_STRING = PCRE 8.36 +SHELL = /bin/sh +srcdir = . +top_srcdir = . +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done; \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +pcre_stringpiece_unittest.log: pcre_stringpiece_unittest$(EXEEXT) + @p='pcre_stringpiece_unittest$(EXEEXT)'; \ + b='pcre_stringpiece_unittest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) -- "$$tst" +RunTest.log: RunTest + @p='RunTest'; \ + b='RunTest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) -- "$$tst" +RunGrepTest.log: RunGrepTest + @p='RunGrepTest'; \ + b='RunGrepTest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) -- "$$tst" diff --git a/poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch b/poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch new file mode 100644 index 000000000..89b44f6aa --- /dev/null +++ b/poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch @@ -0,0 +1,41 @@ +Upstream-Status: Inappropriate [debian patch] + +This patch address a namespace collision with libc. + +Although there is no "#include " in the source file, at +runtime, it's unintentionally linked to the libc version, the regcomp of +libc is called instead the pcre one using pcre's data structure... +that looks like a disaster. + +Can patch is from Debian (and Ubuntu 11.04alpha has it also). + +[sgw: added patch comment] +Signed-off-by: Qing He +Signed-off-by: Saul Wold + +--- a/pcreposix.h 2010-05-17 00:17:23.000000000 +0800 ++++ b/pcreposix.h 2009-01-15 04:32:17.000000000 +0800 +@@ -133,14 +130,19 @@ + + /* The functions */ + +-PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int); +-PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t, ++PCREPOSIX_EXP_DECL int pcreposix_regcomp(regex_t *, const char *, int); ++PCREPOSIX_EXP_DECL int pcreposix_regexec(const regex_t *, const char *, size_t, + regmatch_t *, int); +-PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t); +-PCREPOSIX_EXP_DECL void regfree(regex_t *); ++PCREPOSIX_EXP_DECL size_t pcreposix_regerror(int, const regex_t *, char *, size_t); ++PCREPOSIX_EXP_DECL void pcreposix_regfree(regex_t *); + + #ifdef __cplusplus + } /* extern "C" */ + #endif + ++#define regcomp pcreposix_regcomp ++#define regexec pcreposix_regexec ++#define regerror pcreposix_regerror ++#define regfree pcreposix_regfree ++ + #endif /* End of pcreposix.h */ diff --git a/poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch b/poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch new file mode 100644 index 000000000..83880f709 --- /dev/null +++ b/poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch @@ -0,0 +1,48 @@ +Upstream-Status: Pending + +--- pcre-8.32.orig/Makefile.am ++++ pcre-8.32/Makefile.am +@@ -197,8 +197,18 @@ bin_SCRIPTS = pcre-config + ++CC_FOR_BUILD = @CC_FOR_BUILD@ ++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CCLD_FOR_BUILD = @CCLD_FOR_BUILD@ ++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ ++ + if WITH_REBUILD_CHARTABLES + + noinst_PROGRAMS += dftables + dftables_SOURCES = dftables.c ++dftables_LINK = $(CCLD_FOR_BUILD) -o $@ ++dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD) ++ ++dftables.o: $(srcdir)/dftables.c ++ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/dftables.c + + pcre_chartables.c: dftables$(EXEEXT) + ./dftables$(EXEEXT) $@ +--- pcre-8.32.orig/configure.ac ++++ pcre-8.32/configure.ac +@@ -72,6 +72,22 @@ then + fi + fi + ++if test x"$cross_compiling" = xyes; then ++ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}" ++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}" ++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}" ++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}" ++else ++ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}" ++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}" ++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}" ++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}" ++fi ++AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler]) ++AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend]) ++AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments]) ++AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments]) ++ + # AC_PROG_CXX will return "g++" even if no c++ compiler is installed. + # Check for that case, and just disable c++ code if g++ doesn't run. + AC_LANG_PUSH(C++) diff --git a/poky/meta/recipes-support/libpcre/libpcre/run-ptest b/poky/meta/recipes-support/libpcre/libpcre/run-ptest new file mode 100644 index 000000000..990d4a12a --- /dev/null +++ b/poky/meta/recipes-support/libpcre/libpcre/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make check-TESTS diff --git a/poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch b/poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch new file mode 100644 index 000000000..871cdfcb7 --- /dev/null +++ b/poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch @@ -0,0 +1,65 @@ +Fix for cross compiling + +Fixed: +| ./dftables src/pcre2_chartables.c +| make: ./dftables: Command not found +| make: *** [src/pcre2_chartables.c] Error 127 + +Upstream-Status: Pending + +Signed-off-by: Robert Yang + +Index: pcre2-10.30/Makefile.am +=================================================================== +--- pcre2-10.30.orig/Makefile.am ++++ pcre2-10.30/Makefile.am +@@ -325,9 +325,21 @@ bin_SCRIPTS = pcre2-config + ## to copy a distributed set of tables that are defined for ASCII code. In this + ## case, dftables is not needed. + ++CC_FOR_BUILD = @CC_FOR_BUILD@ ++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CCLD_FOR_BUILD = @CCLD_FOR_BUILD@ ++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ ++ + if WITH_REBUILD_CHARTABLES + noinst_PROGRAMS += dftables + dftables_SOURCES = src/dftables.c ++ ++dftables_LINK = $(CCLD_FOR_BUILD) -o $@ ++dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD) ++ ++src/dftables.o: $(srcdir)/src/dftables.c ++ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/src/dftables.c ++ + src/pcre2_chartables.c: dftables$(EXEEXT) + rm -f $@ + ./dftables$(EXEEXT) $@ +Index: pcre2-10.30/configure.ac +=================================================================== +--- pcre2-10.30.orig/configure.ac ++++ pcre2-10.30/configure.ac +@@ -60,6 +60,23 @@ fi + # This is a new thing required to stop a warning from automake 1.12 + m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + ++if test x"$cross_compiling" = xyes; then ++ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}" ++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}" ++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}" ++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}" ++else ++ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}" ++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}" ++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}" ++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}" ++fi ++AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler]) ++AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend]) ++AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments]) ++AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments]) ++ ++ + # Check for a 64-bit integer type + AC_TYPE_INT64_T + diff --git a/poky/meta/recipes-support/libpcre/libpcre2_10.30.bb b/poky/meta/recipes-support/libpcre/libpcre2_10.30.bb new file mode 100644 index 000000000..46c2d630e --- /dev/null +++ b/poky/meta/recipes-support/libpcre/libpcre2_10.30.bb @@ -0,0 +1,61 @@ +DESCRIPTION = "There are two major versions of the PCRE library. The \ +newest version is PCRE2, which is a re-working of the original PCRE \ +library to provide an entirely new API. The original, very widely \ +deployed PCRE library's API and feature are stable, future releases \ + will be for bugfixes only. All new future features will be to PCRE2, \ +not the original PCRE 8.x series." +SUMMARY = "Perl Compatible Regular Expressions version 2" +HOMEPAGE = "http://www.pcre.org" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENCE;md5=12d55e15a0c6da5c645ba40382bd3293" + +SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2 \ + file://pcre-cross.patch \ +" + +SRC_URI[md5sum] = "d3adf4b130eed854a530390f00020a65" +SRC_URI[sha256sum] = "90bd41c605d30e3745771eb81928d779f158081a51b2f314bbcc1f73de5773db" + +CVE_PRODUCT = "pcre2" + +S = "${WORKDIR}/pcre2-${PV}" + +PROVIDES += "pcre2" +DEPENDS += "bzip2 zlib" + +BINCONFIG = "${bindir}/pcre2-config" + +inherit autotools binconfig-disabled + +EXTRA_OECONF = "\ + --enable-newline-is-lf \ + --enable-rebuild-chartables \ + --with-link-size=2 \ + --with-match-limit=10000000 \ + --enable-pcre2-16 \ + --enable-pcre2-32 \ +" +# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to +# set CFLAGS_FOR_BUILD, required for the libpcre build. +BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}/src" +CFLAGS += "-D_REENTRANT" +CXXFLAGS_append_powerpc = " -lstdc++" + +export CCLD_FOR_BUILD ="${BUILD_CCLD}" + +PACKAGES =+ "libpcre2-16 libpcre2-32 pcre2grep pcre2grep-doc pcre2test pcre2test-doc" + +SUMMARY_pcre2grep = "grep utility that uses perl 5 compatible regexes" +SUMMARY_pcre2grep-doc = "grep utility that uses perl 5 compatible regexes - docs" +SUMMARY_pcre2test = "program for testing Perl-comatible regular expressions" +SUMMARY_pcre2test-doc = "program for testing Perl-comatible regular expressions - docs" + +FILES_libpcre2-16 = "${libdir}/libpcre2-16.so.*" +FILES_libpcre2-32 = "${libdir}/libpcre2-32.so.*" +FILES_pcre2grep = "${bindir}/pcre2grep" +FILES_pcre2grep-doc = "${mandir}/man1/pcre2grep.1" +FILES_pcre2test = "${bindir}/pcre2test" +FILES_pcre2test-doc = "${mandir}/man1/pcre2test.1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-support/libpcre/libpcre_8.41.bb b/poky/meta/recipes-support/libpcre/libpcre_8.41.bb new file mode 100644 index 000000000..0187c08f5 --- /dev/null +++ b/poky/meta/recipes-support/libpcre/libpcre_8.41.bb @@ -0,0 +1,87 @@ +DESCRIPTION = "The PCRE library is a set of functions that implement regular \ +expression pattern matching using the same syntax and semantics as Perl 5. PCRE \ +has its own native API, as well as a set of wrapper functions that correspond \ +to the POSIX regular expression API." +SUMMARY = "Perl Compatible Regular Expressions" +HOMEPAGE = "http://www.pcre.org" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENCE;md5=60da32d84d067f53e22071c4ecb4384d" +SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \ + file://pcre-cross.patch \ + file://fix-pcre-name-collision.patch \ + file://run-ptest \ + file://Makefile \ +" + +SRC_URI[md5sum] = "c160d22723b1670447341b08c58981c1" +SRC_URI[sha256sum] = "e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530" + +CVE_PRODUCT = "pcre" + +S = "${WORKDIR}/pcre-${PV}" + +PROVIDES += "pcre" +DEPENDS += "bzip2 zlib" + +PACKAGECONFIG ??= "pcre8 unicode-properties" + +PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8" +PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16" +PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32" +PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline," +PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties" + +BINCONFIG = "${bindir}/pcre-config" + +inherit autotools binconfig-disabled ptest + +EXTRA_OECONF = "\ + --enable-newline-is-lf \ + --enable-rebuild-chartables \ + --enable-utf \ + --with-link-size=2 \ + --with-match-limit=10000000 \ +" + +# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to +# set CFLAGS_FOR_BUILD, required for the libpcre build. +BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}" +CFLAGS += "-D_REENTRANT" +CXXFLAGS_append_powerpc = " -lstdc++" + +export CCLD_FOR_BUILD ="${BUILD_CCLD}" + +PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc" + +SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions" +SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API" +SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes" +SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs" +SUMMARY_pcretest = "program for testing Perl-comatible regular expressions" +SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs" + +FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*" +FILES_libpcreposix = "${libdir}/libpcreposix.so.*" +FILES_pcregrep = "${bindir}/pcregrep" +FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1" +FILES_pcretest = "${bindir}/pcretest" +FILES_pcretest-doc = "${mandir}/man1/pcretest.1" + +BBCLASSEXTEND = "native nativesdk" + +do_install_ptest() { + t=${D}${PTEST_PATH} + cp ${WORKDIR}/Makefile $t + cp -r ${S}/testdata $t + for i in pcre_stringpiece_unittest pcregrep pcretest; \ + do cp ${B}/.libs/$i $t; \ + done + for i in RunTest RunGrepTest test-driver; \ + do cp ${S}/$i $t; \ + done + # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested. + # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8 + # locale so the test fails if fr_FR is UTF-8 locale. + sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest +} -- cgit v1.2.3