diff options
| author | Sona Sarmadi <sona.sarmadi@enea.com> | 2018-09-17 08:21:19 +0200 |
|---|---|---|
| committer | Sona Sarmadi <sona.sarmadi@enea.com> | 2018-09-17 08:21:19 +0200 |
| commit | bef574e8d1aedbbb99d0dea6f2d2b1e5166743ae (patch) | |
| tree | 0b4699346e649201d9b307a08a402430e07ddfe3 | |
| parent | 205f0cd0ded4b0c7b39202eac7b9d6c2470626b6 (diff) | |
| download | meta-el-common-bef574e8d1aedbbb99d0dea6f2d2b1e5166743ae.tar.gz | |
libpcre: 8.41 -> 8.42
The update fixes CVE-2017-11164.
Ref: https://nvd.nist.gov/vuln/detail/CVE-2017-11164
Backport from upstream master branch.
Change-Id: I18acd817fa4385974749996685a5aeeb7506d474
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
| -rw-r--r-- | recipes-support/libpcre/libpcre/Makefile | 183 | ||||
| -rw-r--r-- | recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch | 41 | ||||
| -rw-r--r-- | recipes-support/libpcre/libpcre/pcre-cross.patch | 48 | ||||
| -rw-r--r-- | recipes-support/libpcre/libpcre/run-ptest | 3 | ||||
| -rw-r--r-- | recipes-support/libpcre/libpcre_8.42.bb | 87 |
5 files changed, 362 insertions, 0 deletions
diff --git a/recipes-support/libpcre/libpcre/Makefile b/recipes-support/libpcre/libpcre/Makefile new file mode 100644 index 0000000..708d807 --- /dev/null +++ b/recipes-support/libpcre/libpcre/Makefile | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | TESTS = pcre_stringpiece_unittest RunTest RunGrepTest | ||
| 2 | subdir = . | ||
| 3 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
| 4 | am__vpath_adj = case $$p in \ | ||
| 5 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
| 6 | *) f=$$p;; \ | ||
| 7 | esac; | ||
| 8 | am__tty_colors_dummy = \ | ||
| 9 | mgn= red= grn= lgn= blu= brg= std=; \ | ||
| 10 | am__color_tests=no | ||
| 11 | am__tty_colors = { \ | ||
| 12 | $(am__tty_colors_dummy); \ | ||
| 13 | if test "X$(AM_COLOR_TESTS)" = Xno; then \ | ||
| 14 | am__color_tests=no; \ | ||
| 15 | elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ | ||
| 16 | am__color_tests=yes; \ | ||
| 17 | elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ | ||
| 18 | am__color_tests=yes; \ | ||
| 19 | fi; \ | ||
| 20 | if test $$am__color_tests = yes; then \ | ||
| 21 | red='[0;31m'; \ | ||
| 22 | grn='[0;32m'; \ | ||
| 23 | lgn='[1;32m'; \ | ||
| 24 | blu='[1;34m'; \ | ||
| 25 | mgn='[0;35m'; \ | ||
| 26 | brg='[1m'; \ | ||
| 27 | std='[m'; \ | ||
| 28 | fi; \ | ||
| 29 | } | ||
| 30 | am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } | ||
| 31 | am__sh_e_setup = case $$- in *e*) set +e;; esac | ||
| 32 | am__common_driver_flags = \ | ||
| 33 | --color-tests "$$am__color_tests" \ | ||
| 34 | --enable-hard-errors "$$am__enable_hard_errors" \ | ||
| 35 | --expect-failure "$$am__expect_failure" | ||
| 36 | am__check_pre = \ | ||
| 37 | $(am__sh_e_setup); \ | ||
| 38 | $(am__vpath_adj_setup) $(am__vpath_adj) \ | ||
| 39 | $(am__tty_colors); \ | ||
| 40 | srcdir=$(srcdir); export srcdir; \ | ||
| 41 | case "$@" in \ | ||
| 42 | */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ | ||
| 43 | *) am__odir=.;; \ | ||
| 44 | esac; \ | ||
| 45 | test "x$$am__odir" = x"." || test -d "$$am__odir" \ | ||
| 46 | || $(MKDIR_P) "$$am__odir" || exit $$?; \ | ||
| 47 | if test -f "./$$f"; then dir=./; \ | ||
| 48 | elif test -f "$$f"; then dir=; \ | ||
| 49 | else dir="$(srcdir)/"; fi; \ | ||
| 50 | tst=$$dir$$f; log='$@'; \ | ||
| 51 | if test -n '$(DISABLE_HARD_ERRORS)'; then \ | ||
| 52 | am__enable_hard_errors=no; \ | ||
| 53 | else \ | ||
| 54 | am__enable_hard_errors=yes; \ | ||
| 55 | fi; | ||
| 56 | am__set_TESTS_bases = \ | ||
| 57 | bases='$(TEST_LOGS)'; \ | ||
| 58 | bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ | ||
| 59 | bases=`echo $$bases` | ||
| 60 | RECHECK_LOGS = $(TEST_LOGS) | ||
| 61 | TEST_SUITE_LOG = test-suite.log | ||
| 62 | TEST_EXTENSIONS = .test | ||
| 63 | LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver | ||
| 64 | am__test_logs1 = $(TESTS:=.log) | ||
| 65 | am__test_logs2 = $(am__test_logs1:.log=.log) | ||
| 66 | TEST_LOGS = $(am__test_logs2:.test.log=.log) | ||
| 67 | MKDIR_P = /bin/mkdir -p | ||
| 68 | PACKAGE_STRING = PCRE 8.36 | ||
| 69 | SHELL = /bin/sh | ||
| 70 | srcdir = . | ||
| 71 | top_srcdir = . | ||
| 72 | $(TEST_SUITE_LOG): $(TEST_LOGS) | ||
| 73 | @$(am__set_TESTS_bases); \ | ||
| 74 | am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ | ||
| 75 | redo_bases=`for i in $$bases; do \ | ||
| 76 | am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ | ||
| 77 | done`; \ | ||
| 78 | st=0; \ | ||
| 79 | errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ | ||
| 80 | for i in $$redo_bases; do \ | ||
| 81 | test -f $$i.trs && test -r $$i.trs \ | ||
| 82 | || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ | ||
| 83 | test -f $$i.log && test -r $$i.log \ | ||
| 84 | || { echo "$$errmsg $$i.log" >&2; st=1; }; \ | ||
| 85 | done; \ | ||
| 86 | test $$st -eq 0 || exit 1; | ||
| 87 | @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ | ||
| 88 | ws='[ ]'; \ | ||
| 89 | results=`for b in $$bases; do echo $$b.trs; done`; \ | ||
| 90 | test -n "$$results" || results=/dev/null; \ | ||
| 91 | all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ | ||
| 92 | pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ | ||
| 93 | fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ | ||
| 94 | skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ | ||
| 95 | xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ | ||
| 96 | xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ | ||
| 97 | error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ | ||
| 98 | if test `expr $$fail + $$xpass + $$error` -eq 0; then \ | ||
| 99 | success=true; \ | ||
| 100 | else \ | ||
| 101 | success=false; \ | ||
| 102 | fi; \ | ||
| 103 | br='==================='; br=$$br$$br$$br$$br; \ | ||
| 104 | result_count () \ | ||
| 105 | { \ | ||
| 106 | if test x"$$1" = x"--maybe-color"; then \ | ||
| 107 | maybe_colorize=yes; \ | ||
| 108 | elif test x"$$1" = x"--no-color"; then \ | ||
| 109 | maybe_colorize=no; \ | ||
| 110 | else \ | ||
| 111 | echo "$@: invalid 'result_count' usage" >&2; exit 4; \ | ||
| 112 | fi; \ | ||
| 113 | shift; \ | ||
| 114 | desc=$$1 count=$$2; \ | ||
| 115 | if test $$maybe_colorize = yes && test $$count -gt 0; then \ | ||
| 116 | color_start=$$3 color_end=$$std; \ | ||
| 117 | else \ | ||
| 118 | color_start= color_end=; \ | ||
| 119 | fi; \ | ||
| 120 | echo "$${color_start}# $$desc $$count$${color_end}"; \ | ||
| 121 | }; \ | ||
| 122 | create_testsuite_report () \ | ||
| 123 | { \ | ||
| 124 | result_count $$1 "TOTAL:" $$all "$$brg"; \ | ||
| 125 | result_count $$1 "PASS: " $$pass "$$grn"; \ | ||
| 126 | result_count $$1 "SKIP: " $$skip "$$blu"; \ | ||
| 127 | result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ | ||
| 128 | result_count $$1 "FAIL: " $$fail "$$red"; \ | ||
| 129 | result_count $$1 "XPASS:" $$xpass "$$red"; \ | ||
| 130 | result_count $$1 "ERROR:" $$error "$$mgn"; \ | ||
| 131 | }; \ | ||
| 132 | { \ | ||
| 133 | echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ | ||
| 134 | $(am__rst_title); \ | ||
| 135 | create_testsuite_report --no-color; \ | ||
| 136 | echo; \ | ||
| 137 | echo ".. contents:: :depth: 2"; \ | ||
| 138 | echo; \ | ||
| 139 | for b in $$bases; do echo $$b; done; \ | ||
| 140 | } >$(TEST_SUITE_LOG).tmp || exit 1; \ | ||
| 141 | mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ | ||
| 142 | if $$success; then \ | ||
| 143 | col="$$grn"; \ | ||
| 144 | else \ | ||
| 145 | col="$$red"; \ | ||
| 146 | test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ | ||
| 147 | fi; \ | ||
| 148 | echo "$${col}$$br$${std}"; \ | ||
| 149 | echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ | ||
| 150 | echo "$${col}$$br$${std}"; \ | ||
| 151 | create_testsuite_report --maybe-color; \ | ||
| 152 | echo "$$col$$br$$std"; \ | ||
| 153 | if $$success; then :; else \ | ||
| 154 | echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ | ||
| 155 | echo "$$col$$br$$std"; \ | ||
| 156 | fi; \ | ||
| 157 | $$success || exit 1 | ||
| 158 | check-TESTS: | ||
| 159 | @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list | ||
| 160 | @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) | ||
| 161 | @set +e; $(am__set_TESTS_bases); \ | ||
| 162 | log_list=`for i in $$bases; do echo $$i.log; done`; \ | ||
| 163 | log_list=`echo $$log_list`; \ | ||
| 164 | $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ | ||
| 165 | exit $$?; | ||
| 166 | pcre_stringpiece_unittest.log: pcre_stringpiece_unittest$(EXEEXT) | ||
| 167 | @p='pcre_stringpiece_unittest$(EXEEXT)'; \ | ||
| 168 | b='pcre_stringpiece_unittest'; \ | ||
| 169 | $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ | ||
| 170 | --log-file $$b.log --trs-file $$b.trs \ | ||
| 171 | $(am__common_driver_flags) -- "$$tst" | ||
| 172 | RunTest.log: RunTest | ||
| 173 | @p='RunTest'; \ | ||
| 174 | b='RunTest'; \ | ||
| 175 | $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ | ||
| 176 | --log-file $$b.log --trs-file $$b.trs \ | ||
| 177 | $(am__common_driver_flags) -- "$$tst" | ||
| 178 | RunGrepTest.log: RunGrepTest | ||
| 179 | @p='RunGrepTest'; \ | ||
| 180 | b='RunGrepTest'; \ | ||
| 181 | $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ | ||
| 182 | --log-file $$b.log --trs-file $$b.trs \ | ||
| 183 | $(am__common_driver_flags) -- "$$tst" | ||
diff --git a/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch b/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch new file mode 100644 index 0000000..89b44f6 --- /dev/null +++ b/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | Upstream-Status: Inappropriate [debian patch] | ||
| 2 | |||
| 3 | This patch address a namespace collision with libc. | ||
| 4 | |||
| 5 | Although there is no "#include <regex.h>" in the source file, at | ||
| 6 | runtime, it's unintentionally linked to the libc version, the regcomp of | ||
| 7 | libc is called instead the pcre one using pcre's data structure... | ||
| 8 | that looks like a disaster. | ||
| 9 | |||
| 10 | Can patch is from Debian (and Ubuntu 11.04alpha has it also). | ||
| 11 | |||
| 12 | [sgw: added patch comment] | ||
| 13 | Signed-off-by: Qing He <qing.he@intel.com> | ||
| 14 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
| 15 | |||
| 16 | --- a/pcreposix.h 2010-05-17 00:17:23.000000000 +0800 | ||
| 17 | +++ b/pcreposix.h 2009-01-15 04:32:17.000000000 +0800 | ||
| 18 | @@ -133,14 +130,19 @@ | ||
| 19 | |||
| 20 | /* The functions */ | ||
| 21 | |||
| 22 | -PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int); | ||
| 23 | -PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t, | ||
| 24 | +PCREPOSIX_EXP_DECL int pcreposix_regcomp(regex_t *, const char *, int); | ||
| 25 | +PCREPOSIX_EXP_DECL int pcreposix_regexec(const regex_t *, const char *, size_t, | ||
| 26 | regmatch_t *, int); | ||
| 27 | -PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t); | ||
| 28 | -PCREPOSIX_EXP_DECL void regfree(regex_t *); | ||
| 29 | +PCREPOSIX_EXP_DECL size_t pcreposix_regerror(int, const regex_t *, char *, size_t); | ||
| 30 | +PCREPOSIX_EXP_DECL void pcreposix_regfree(regex_t *); | ||
| 31 | |||
| 32 | #ifdef __cplusplus | ||
| 33 | } /* extern "C" */ | ||
| 34 | #endif | ||
| 35 | |||
| 36 | +#define regcomp pcreposix_regcomp | ||
| 37 | +#define regexec pcreposix_regexec | ||
| 38 | +#define regerror pcreposix_regerror | ||
| 39 | +#define regfree pcreposix_regfree | ||
| 40 | + | ||
| 41 | #endif /* End of pcreposix.h */ | ||
diff --git a/recipes-support/libpcre/libpcre/pcre-cross.patch b/recipes-support/libpcre/libpcre/pcre-cross.patch new file mode 100644 index 0000000..83880f7 --- /dev/null +++ b/recipes-support/libpcre/libpcre/pcre-cross.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | --- pcre-8.32.orig/Makefile.am | ||
| 4 | +++ pcre-8.32/Makefile.am | ||
| 5 | @@ -197,8 +197,18 @@ bin_SCRIPTS = pcre-config | ||
| 6 | |||
| 7 | +CC_FOR_BUILD = @CC_FOR_BUILD@ | ||
| 8 | +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ | ||
| 9 | +CCLD_FOR_BUILD = @CCLD_FOR_BUILD@ | ||
| 10 | +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ | ||
| 11 | + | ||
| 12 | if WITH_REBUILD_CHARTABLES | ||
| 13 | |||
| 14 | noinst_PROGRAMS += dftables | ||
| 15 | dftables_SOURCES = dftables.c | ||
| 16 | +dftables_LINK = $(CCLD_FOR_BUILD) -o $@ | ||
| 17 | +dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD) | ||
| 18 | + | ||
| 19 | +dftables.o: $(srcdir)/dftables.c | ||
| 20 | + $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/dftables.c | ||
| 21 | |||
| 22 | pcre_chartables.c: dftables$(EXEEXT) | ||
| 23 | ./dftables$(EXEEXT) $@ | ||
| 24 | --- pcre-8.32.orig/configure.ac | ||
| 25 | +++ pcre-8.32/configure.ac | ||
| 26 | @@ -72,6 +72,22 @@ then | ||
| 27 | fi | ||
| 28 | fi | ||
| 29 | |||
| 30 | +if test x"$cross_compiling" = xyes; then | ||
| 31 | + CC_FOR_BUILD="${CC_FOR_BUILD-gcc}" | ||
| 32 | + CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}" | ||
| 33 | + CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}" | ||
| 34 | + LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}" | ||
| 35 | +else | ||
| 36 | + CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}" | ||
| 37 | + CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}" | ||
| 38 | + CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}" | ||
| 39 | + LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}" | ||
| 40 | +fi | ||
| 41 | +AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler]) | ||
| 42 | +AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend]) | ||
| 43 | +AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments]) | ||
| 44 | +AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments]) | ||
| 45 | + | ||
| 46 | # AC_PROG_CXX will return "g++" even if no c++ compiler is installed. | ||
| 47 | # Check for that case, and just disable c++ code if g++ doesn't run. | ||
| 48 | AC_LANG_PUSH(C++) | ||
diff --git a/recipes-support/libpcre/libpcre/run-ptest b/recipes-support/libpcre/libpcre/run-ptest new file mode 100644 index 0000000..990d4a1 --- /dev/null +++ b/recipes-support/libpcre/libpcre/run-ptest | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | make check-TESTS | ||
diff --git a/recipes-support/libpcre/libpcre_8.42.bb b/recipes-support/libpcre/libpcre_8.42.bb new file mode 100644 index 0000000..3a488c0 --- /dev/null +++ b/recipes-support/libpcre/libpcre_8.42.bb | |||
| @@ -0,0 +1,87 @@ | |||
| 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=fc5026403b44c868c25fc9546f7feb05" | ||
| 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] = "085b6aa253e0f91cae70b3cdbe8c1ac2" | ||
| 18 | SRC_URI[sha256sum] = "2cd04b7c887808be030254e8d77de11d3fe9d4505c39d4b15d2664ffe8bf9301" | ||
| 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 | ||
| 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 | ||
| 87 | } | ||
