diff options
Diffstat (limited to 'meta/recipes-support/apr')
-rw-r--r-- | meta/recipes-support/apr/apr-util/configfix.patch | 51 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr-util/configure_fixes.patch | 31 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr-util/run-ptest | 6 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr-util_1.5.3.bb | 67 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/cleanup.patch | 43 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/configfix.patch | 53 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/configure_fixes.patch | 68 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/run-ptest | 6 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch | 48 | ||||
-rw-r--r-- | meta/recipes-support/apr/apr_1.5.1.bb | 95 |
10 files changed, 468 insertions, 0 deletions
diff --git a/meta/recipes-support/apr/apr-util/configfix.patch b/meta/recipes-support/apr/apr-util/configfix.patch new file mode 100644 index 0000000000..dbb1148809 --- /dev/null +++ b/meta/recipes-support/apr/apr-util/configfix.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: apr-util-1.3.4/apu-config.in | ||
4 | =================================================================== | ||
5 | --- apr-util-1.3.4.orig/apu-config.in 2009-01-12 17:08:06.000000000 +0000 | ||
6 | +++ apr-util-1.3.4/apu-config.in 2009-01-12 17:09:00.000000000 +0000 | ||
7 | @@ -134,14 +134,7 @@ | ||
8 | exit 0 | ||
9 | ;; | ||
10 | --includes) | ||
11 | - if test "$location" = "installed"; then | ||
12 | flags="$flags -I$includedir $INCLUDES" | ||
13 | - elif test "$location" = "source"; then | ||
14 | - flags="$flags -I$APU_SOURCE_DIR/include $INCLUDES" | ||
15 | - else | ||
16 | - # this is for VPATH builds | ||
17 | - flags="$flags -I$APU_BUILD_DIR/include -I$APU_SOURCE_DIR/include $INCLUDES" | ||
18 | - fi | ||
19 | ;; | ||
20 | --ldflags) | ||
21 | flags="$flags $LDFLAGS" | ||
22 | @@ -155,28 +148,10 @@ | ||
23 | exit 0 | ||
24 | ;; | ||
25 | --link-ld) | ||
26 | - if test "$location" = "installed"; then | ||
27 | - ### avoid using -L if libdir is a "standard" location like /usr/lib | ||
28 | flags="$flags -L$libdir -l$APRUTIL_LIBNAME" | ||
29 | - else | ||
30 | - flags="$flags -L$APU_BUILD_DIR -l$APRUTIL_LIBNAME" | ||
31 | - fi | ||
32 | ;; | ||
33 | --link-libtool) | ||
34 | - # If the LA_FILE exists where we think it should be, use it. If we're | ||
35 | - # installed and the LA_FILE does not exist, assume to use -L/-l | ||
36 | - # (the LA_FILE may not have been installed). If we're building ourselves, | ||
37 | - # we'll assume that at some point the .la file be created. | ||
38 | - if test -f "$LA_FILE"; then | ||
39 | - flags="$flags $LA_FILE" | ||
40 | - elif test "$location" = "installed"; then | ||
41 | - ### avoid using -L if libdir is a "standard" location like /usr/lib | ||
42 | - # Since the user is specifying they are linking with libtool, we | ||
43 | - # *know* that -R will be recognized by libtool. | ||
44 | - flags="$flags -L$libdir -R$libdir -l$APRUTIL_LIBNAME" | ||
45 | - else | ||
46 | - flags="$flags $LA_FILE" | ||
47 | - fi | ||
48 | + flags="$flags -l$APRUTIL_LIBNAME" | ||
49 | ;; | ||
50 | --apu-la-file) | ||
51 | if test -f "$LA_FILE"; then | ||
diff --git a/meta/recipes-support/apr/apr-util/configure_fixes.patch b/meta/recipes-support/apr/apr-util/configure_fixes.patch new file mode 100644 index 0000000000..91e244ce2c --- /dev/null +++ b/meta/recipes-support/apr/apr-util/configure_fixes.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: apr-util-1.4.1/configure.in | ||
4 | =================================================================== | ||
5 | --- apr-util-1.4.1.orig/configure.in 2009-12-18 03:15:19.000000000 +0800 | ||
6 | +++ apr-util-1.4.1/configure.in 2011-12-30 13:32:07.000000000 +0800 | ||
7 | @@ -8,15 +8,15 @@ | ||
8 | AC_CONFIG_HEADER(include/private/apu_config.h) | ||
9 | AC_CONFIG_AUX_DIR(build) | ||
10 | |||
11 | -sinclude(build/apu-conf.m4) | ||
12 | -sinclude(build/apu-iconv.m4) | ||
13 | -sinclude(build/apu-hints.m4) | ||
14 | -sinclude(build/apr_common.m4) | ||
15 | -sinclude(build/find_apr.m4) | ||
16 | -sinclude(build/crypto.m4) | ||
17 | -sinclude(build/dbm.m4) | ||
18 | -sinclude(build/dbd.m4) | ||
19 | -sinclude(build/dso.m4) | ||
20 | +#sinclude(build/apu-conf.m4) | ||
21 | +#sinclude(build/apu-iconv.m4) | ||
22 | +#sinclude(build/apu-hints.m4) | ||
23 | +#sinclude(build/apr_common.m4) | ||
24 | +#sinclude(build/find_apr.m4) | ||
25 | +#sinclude(build/crypto.m4) | ||
26 | +#sinclude(build/dbm.m4) | ||
27 | +#sinclude(build/dbd.m4) | ||
28 | +#sinclude(build/dso.m4) | ||
29 | |||
30 | dnl Generate ./config.nice for reproducing runs of configure | ||
31 | dnl | ||
diff --git a/meta/recipes-support/apr/apr-util/run-ptest b/meta/recipes-support/apr/apr-util/run-ptest new file mode 100644 index 0000000000..ae19a1d11b --- /dev/null +++ b/meta/recipes-support/apr/apr-util/run-ptest | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd test | ||
4 | ./testall |sed \ | ||
5 | -e 's|\(.*\): SUCCESS|PASS: \1|' \ | ||
6 | -e 's|\(.*\): FAILED|FAIL: \1|' | ||
diff --git a/meta/recipes-support/apr/apr-util_1.5.3.bb b/meta/recipes-support/apr/apr-util_1.5.3.bb new file mode 100644 index 0000000000..063a787396 --- /dev/null +++ b/meta/recipes-support/apr/apr-util_1.5.3.bb | |||
@@ -0,0 +1,67 @@ | |||
1 | SUMMARY = "Apache Portable Runtime (APR) companion library" | ||
2 | HOMEPAGE = "http://apr.apache.org/" | ||
3 | SECTION = "libs" | ||
4 | DEPENDS = "apr expat gdbm" | ||
5 | |||
6 | BBCLASSEXTEND = "native" | ||
7 | |||
8 | LICENSE = "Apache-2.0" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=519e0a18e03f7c023070568c14b077bb \ | ||
10 | file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42" | ||
11 | |||
12 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \ | ||
13 | file://configfix.patch \ | ||
14 | file://configure_fixes.patch \ | ||
15 | file://run-ptest \ | ||
16 | " | ||
17 | |||
18 | SRC_URI[md5sum] = "71a11d037240b292f824ba1eb537b4e3" | ||
19 | SRC_URI[sha256sum] = "76db34cb508e346e3bf69347c29ed1500bf0b71bcc48d54271ad9d1c25703743" | ||
20 | |||
21 | EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ | ||
22 | --without-odbc \ | ||
23 | --without-pgsql \ | ||
24 | --with-dbm=gdbm \ | ||
25 | --with-gdbm=${STAGING_DIR_HOST}${prefix} \ | ||
26 | --without-sqlite2 \ | ||
27 | --without-sqlite3 \ | ||
28 | --with-expat=${STAGING_DIR_HOST}${prefix}" | ||
29 | |||
30 | |||
31 | inherit autotools-brokensep lib_package binconfig | ||
32 | |||
33 | OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" | ||
34 | |||
35 | do_configure_append() { | ||
36 | if [ "${CLASSOVERRIDE}" = "class-target" ]; then | ||
37 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk | ||
38 | fi | ||
39 | } | ||
40 | do_configure_prepend_class-native() { | ||
41 | cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${S}/build/rules.mk | ||
42 | } | ||
43 | do_configure_append_class-native() { | ||
44 | sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${S}/build/rules.mk | ||
45 | # sometimes there isn't SHELL | ||
46 | sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${S}/build/rules.mk | ||
47 | } | ||
48 | |||
49 | FILES_${PN} += "${libdir}/apr-util-1/apr_dbm_gdbm-1.so" | ||
50 | FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/apr_dbm_gdbm.so* ${libdir}/apr-util-1/apr_dbm_gdbm.la" | ||
51 | FILES_${PN}-dbg += "${libdir}/apr-util-1/.debug/*" | ||
52 | FILES_${PN}-staticdev += "${libdir}/apr-util-1/apr_dbm_gdbm.a" | ||
53 | |||
54 | inherit ptest | ||
55 | |||
56 | do_compile_ptest() { | ||
57 | cd ${S}/test | ||
58 | oe_runmake | ||
59 | } | ||
60 | |||
61 | do_install_ptest() { | ||
62 | t=${D}${PTEST_PATH}/test | ||
63 | mkdir $t | ||
64 | for i in testall data; do \ | ||
65 | cp -r ${S}/test/$i $t; \ | ||
66 | done | ||
67 | } | ||
diff --git a/meta/recipes-support/apr/apr/cleanup.patch b/meta/recipes-support/apr/apr/cleanup.patch new file mode 100644 index 0000000000..b6784e015d --- /dev/null +++ b/meta/recipes-support/apr/apr/cleanup.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: apr-1.4.2/build/buildcheck.sh | ||
4 | =================================================================== | ||
5 | --- apr-1.4.2.orig/build/buildcheck.sh 2009-11-13 08:27:16.000000000 +0800 | ||
6 | +++ apr-1.4.2/build/buildcheck.sh 2010-11-26 15:44:00.000000000 +0800 | ||
7 | @@ -32,35 +32,4 @@ | ||
8 | echo "buildconf: autoconf version $ac_version (ok)" | ||
9 | fi | ||
10 | |||
11 | -# Sample libtool --version outputs: | ||
12 | -# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11) | ||
13 | -# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a | ||
14 | -# output is multiline from 1.5 onwards | ||
15 | - | ||
16 | -# Require libtool 1.4 or newer | ||
17 | -libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14` | ||
18 | -lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` | ||
19 | -if test -z "$lt_pversion"; then | ||
20 | -echo "buildconf: libtool not found." | ||
21 | -echo " You need libtool version 1.4 or newer installed" | ||
22 | -echo " to build APR from SVN." | ||
23 | -exit 1 | ||
24 | -fi | ||
25 | -lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'` | ||
26 | -IFS=.; set $lt_version; IFS=' ' | ||
27 | -lt_status="good" | ||
28 | -if test "$1" = "1"; then | ||
29 | - if test "$2" -lt "4"; then | ||
30 | - lt_status="bad" | ||
31 | - fi | ||
32 | -fi | ||
33 | -if test $lt_status = "good"; then | ||
34 | - echo "buildconf: libtool version $lt_pversion (ok)" | ||
35 | - exit 0 | ||
36 | -fi | ||
37 | - | ||
38 | -echo "buildconf: libtool version $lt_pversion found." | ||
39 | -echo " You need libtool version 1.4 or newer installed" | ||
40 | -echo " to build APR from SVN." | ||
41 | - | ||
42 | -exit 1 | ||
43 | +exit 0 | ||
diff --git a/meta/recipes-support/apr/apr/configfix.patch b/meta/recipes-support/apr/apr/configfix.patch new file mode 100644 index 0000000000..605c4f632c --- /dev/null +++ b/meta/recipes-support/apr/apr/configfix.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: apr-1.3.3/apr-config.in | ||
4 | =================================================================== | ||
5 | --- apr-1.3.3.orig/apr-config.in 2009-01-12 15:16:31.000000000 +0000 | ||
6 | +++ apr-1.3.3/apr-config.in 2009-01-12 15:19:25.000000000 +0000 | ||
7 | @@ -152,14 +152,7 @@ | ||
8 | flags="$flags $LDFLAGS" | ||
9 | ;; | ||
10 | --includes) | ||
11 | - if test "$location" = "installed"; then | ||
12 | flags="$flags -I$includedir $EXTRA_INCLUDES" | ||
13 | - elif test "$location" = "source"; then | ||
14 | - flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES" | ||
15 | - else | ||
16 | - # this is for VPATH builds | ||
17 | - flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES" | ||
18 | - fi | ||
19 | ;; | ||
20 | --srcdir) | ||
21 | echo $APR_SOURCE_DIR | ||
22 | @@ -181,29 +167,14 @@ | ||
23 | exit 0 | ||
24 | ;; | ||
25 | --link-ld) | ||
26 | - if test "$location" = "installed"; then | ||
27 | - ### avoid using -L if libdir is a "standard" location like /usr/lib | ||
28 | - flags="$flags -L$libdir -l${APR_LIBNAME}" | ||
29 | - else | ||
30 | - ### this surely can't work since the library is in .libs? | ||
31 | - flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}" | ||
32 | - fi | ||
33 | + flags="$flags -l${APR_LIBNAME}" | ||
34 | ;; | ||
35 | --link-libtool) | ||
36 | # If the LA_FILE exists where we think it should be, use it. If we're | ||
37 | # installed and the LA_FILE does not exist, assume to use -L/-l | ||
38 | # (the LA_FILE may not have been installed). If we're building ourselves, | ||
39 | # we'll assume that at some point the .la file be created. | ||
40 | - if test -f "$LA_FILE"; then | ||
41 | - flags="$flags $LA_FILE" | ||
42 | - elif test "$location" = "installed"; then | ||
43 | - ### avoid using -L if libdir is a "standard" location like /usr/lib | ||
44 | - # Since the user is specifying they are linking with libtool, we | ||
45 | - # *know* that -R will be recognized by libtool. | ||
46 | - flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}" | ||
47 | - else | ||
48 | - flags="$flags $LA_FILE" | ||
49 | - fi | ||
50 | + flags="$flags -l${APR_LIBNAME}" | ||
51 | ;; | ||
52 | --shlib-path-var) | ||
53 | echo "$SHLIBPATH_VAR" | ||
diff --git a/meta/recipes-support/apr/apr/configure_fixes.patch b/meta/recipes-support/apr/apr/configure_fixes.patch new file mode 100644 index 0000000000..0514000599 --- /dev/null +++ b/meta/recipes-support/apr/apr/configure_fixes.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: apr-1.3.3/configure.in | ||
4 | =================================================================== | ||
5 | --- apr-1.3.3.orig/configure.in | ||
6 | +++ apr-1.3.3/configure.in | ||
7 | @@ -794,39 +794,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm | ||
8 | create_area]) | ||
9 | |||
10 | APR_CHECK_DEFINE(MAP_ANON, sys/mman.h) | ||
11 | -AC_CHECK_FILE(/dev/zero) | ||
12 | - | ||
13 | -# Not all systems can mmap /dev/zero (such as HP-UX). Check for that. | ||
14 | -if test "$ac_cv_func_mmap" = "yes" && | ||
15 | - test "$ac_cv_file__dev_zero" = "yes"; then | ||
16 | - AC_MSG_CHECKING(for mmap that can map /dev/zero) | ||
17 | - AC_TRY_RUN([ | ||
18 | -#include <sys/types.h> | ||
19 | -#include <sys/stat.h> | ||
20 | -#include <fcntl.h> | ||
21 | -#ifdef HAVE_SYS_MMAN_H | ||
22 | -#include <sys/mman.h> | ||
23 | -#endif | ||
24 | - int main() | ||
25 | - { | ||
26 | - int fd; | ||
27 | - void *m; | ||
28 | - fd = open("/dev/zero", O_RDWR); | ||
29 | - if (fd < 0) { | ||
30 | - return 1; | ||
31 | - } | ||
32 | - m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); | ||
33 | - if (m == (void *)-1) { /* aka MAP_FAILED */ | ||
34 | - return 2; | ||
35 | - } | ||
36 | - if (munmap(m, sizeof(void*)) < 0) { | ||
37 | - return 3; | ||
38 | - } | ||
39 | - return 0; | ||
40 | - }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no]) | ||
41 | - | ||
42 | - AC_MSG_RESULT($ac_cv_file__dev_zero) | ||
43 | -fi | ||
44 | |||
45 | # Now we determine which one is our anonymous shmem preference. | ||
46 | haveshmgetanon="0" | ||
47 | @@ -1518,13 +1485,14 @@ else | ||
48 | bigendian=0 | ||
49 | fi | ||
50 | |||
51 | -APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h> | ||
52 | -#include <sys/uio.h>],struct iovec,0) | ||
53 | -if test "$ac_cv_sizeof_struct_iovec" = "0"; then | ||
54 | - have_iovec=0 | ||
55 | -else | ||
56 | - have_iovec=1 | ||
57 | -fi | ||
58 | +#APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h> | ||
59 | +##include <sys/uio.h>],struct iovec,0) | ||
60 | +#if test "$ac_cv_sizeof_struct_iovec" = "0"; then | ||
61 | +# have_iovec=0 | ||
62 | +#else | ||
63 | +# have_iovec=1 | ||
64 | +#fi | ||
65 | +have_iovec=1 | ||
66 | |||
67 | AC_SUBST(voidp_size) | ||
68 | AC_SUBST(short_value) | ||
diff --git a/meta/recipes-support/apr/apr/run-ptest b/meta/recipes-support/apr/apr/run-ptest new file mode 100644 index 0000000000..ae19a1d11b --- /dev/null +++ b/meta/recipes-support/apr/apr/run-ptest | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd test | ||
4 | ./testall |sed \ | ||
5 | -e 's|\(.*\): SUCCESS|PASS: \1|' \ | ||
6 | -e 's|\(.*\): FAILED|FAIL: \1|' | ||
diff --git a/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch b/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch new file mode 100644 index 0000000000..4bca38494b --- /dev/null +++ b/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | Makefile.in: fix cross compiling failed | ||
2 | |||
3 | The tools/gen_test_char was invoked at build time, | ||
4 | and it didn't work for the cross compiling, so we | ||
5 | compile it with $BUILD_CC. | ||
6 | |||
7 | Remove the 'tools' dir creation, it always existed. | ||
8 | And it caused gen_test_char unexpected rebuilt at | ||
9 | do_install time. | ||
10 | |||
11 | Upstream-Status: inappropriate [oe specific] | ||
12 | |||
13 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
14 | --- | ||
15 | Makefile.in | 10 ++-------- | ||
16 | 1 file changed, 2 insertions(+), 8 deletions(-) | ||
17 | |||
18 | diff --git a/Makefile.in b/Makefile.in | ||
19 | index 6f99733..5fe028f 100644 | ||
20 | --- a/Makefile.in | ||
21 | +++ b/Makefile.in | ||
22 | @@ -46,7 +46,6 @@ LT_VERSION = @LT_VERSION@ | ||
23 | |||
24 | CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \ | ||
25 | build/apr_rules.out tools/gen_test_char@EXEEXT@ \ | ||
26 | - tools/gen_test_char.o tools/gen_test_char.lo \ | ||
27 | include/private/apr_escape_test_char.h | ||
28 | DISTCLEAN_TARGETS = config.cache config.log config.status \ | ||
29 | include/apr.h include/arch/unix/apr_private.h \ | ||
30 | @@ -129,13 +128,8 @@ check: $(TARGET_LIB) | ||
31 | etags: | ||
32 | etags `find . -name '*.[ch]'` | ||
33 | |||
34 | -make_tools_dir: | ||
35 | - $(APR_MKDIR) tools | ||
36 | - | ||
37 | -OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) | ||
38 | -tools/gen_test_char.lo: make_tools_dir | ||
39 | -tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) | ||
40 | - $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) | ||
41 | +tools/gen_test_char@EXEEXT@: tools/gen_test_char.c | ||
42 | + $(BUILD_CC) $(CFLAGS_FOR_BUILD) $< -o $@ | ||
43 | |||
44 | include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ | ||
45 | $(APR_MKDIR) include/private | ||
46 | -- | ||
47 | 1.8.1.2 | ||
48 | |||
diff --git a/meta/recipes-support/apr/apr_1.5.1.bb b/meta/recipes-support/apr/apr_1.5.1.bb new file mode 100644 index 0000000000..a27b2338d1 --- /dev/null +++ b/meta/recipes-support/apr/apr_1.5.1.bb | |||
@@ -0,0 +1,95 @@ | |||
1 | SUMMARY = "Apache Portable Runtime (APR) library" | ||
2 | HOMEPAGE = "http://apr.apache.org/" | ||
3 | SECTION = "libs" | ||
4 | DEPENDS = "util-linux" | ||
5 | |||
6 | LICENSE = "Apache-2.0" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \ | ||
8 | file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96" | ||
9 | |||
10 | BBCLASSEXTEND = "native" | ||
11 | |||
12 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ | ||
13 | file://configure_fixes.patch \ | ||
14 | file://cleanup.patch \ | ||
15 | file://configfix.patch \ | ||
16 | file://run-ptest \ | ||
17 | file://upgrade-and-fix-1.5.1.patch \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[md5sum] = "5486180ec5a23efb5cae6d4292b300ab" | ||
21 | SRC_URI[sha256sum] = "e94abe431d4da48425fcccdb27b469bd0f8151488f82e5630a56f26590e198ac" | ||
22 | |||
23 | inherit autotools-brokensep lib_package binconfig multilib_header ptest | ||
24 | |||
25 | OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" | ||
26 | |||
27 | # Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928 | ||
28 | CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" | ||
29 | |||
30 | # Also suppress trying to use sctp. | ||
31 | # | ||
32 | CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" | ||
33 | |||
34 | do_configure_prepend() { | ||
35 | # Avoid absolute paths for grep since it causes failures | ||
36 | # when using sstate between different hosts with different | ||
37 | # install paths for grep. | ||
38 | export GREP="grep" | ||
39 | |||
40 | cd ${S} | ||
41 | ./buildconf | ||
42 | } | ||
43 | |||
44 | FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*" | ||
45 | RDEPENDS_${PN}-dev += "bash" | ||
46 | |||
47 | #for some reason, build/libtool.m4 handled by buildconf still be overwritten | ||
48 | #when autoconf, so handle it again. | ||
49 | do_configure_append() { | ||
50 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4 | ||
51 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk | ||
52 | } | ||
53 | |||
54 | do_install_append() { | ||
55 | oe_multilib_header apr.h | ||
56 | install -d ${D}${datadir}/apr | ||
57 | cp ${S}/${HOST_SYS}-libtool ${D}${datadir}/build-1/libtool | ||
58 | } | ||
59 | |||
60 | SSTATE_SCAN_FILES += "apr_rules.mk libtool" | ||
61 | |||
62 | SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess" | ||
63 | |||
64 | apr_sysroot_preprocess () { | ||
65 | d=${SYSROOT_DESTDIR}${datadir}/apr | ||
66 | install -d $d/ | ||
67 | cp ${S}/build/apr_rules.mk $d/ | ||
68 | sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk | ||
69 | sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk | ||
70 | sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk | ||
71 | sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk | ||
72 | cp ${S}/build/mkdir.sh $d/ | ||
73 | cp ${S}/build/make_exports.awk $d/ | ||
74 | cp ${S}/build/make_var_export.awk $d/ | ||
75 | } | ||
76 | |||
77 | do_compile_ptest() { | ||
78 | cd ${S}/test | ||
79 | oe_runmake | ||
80 | } | ||
81 | |||
82 | do_install_ptest() { | ||
83 | t=${D}${PTEST_PATH}/test | ||
84 | mkdir -p $t/.libs | ||
85 | cp -r ${S}/test/data $t/ | ||
86 | cp -r ${S}/test/.libs/*.so $t/.libs/ | ||
87 | cp ${S}/test/proc_child $t/ | ||
88 | cp ${S}/test/readchild $t/ | ||
89 | cp ${S}/test/sockchild $t/ | ||
90 | cp ${S}/test/sockperf $t/ | ||
91 | cp ${S}/test/testall $t/ | ||
92 | cp ${S}/test/tryread $t/ | ||
93 | } | ||
94 | |||
95 | export CONFIG_SHELL="/bin/bash" | ||