diff options
Diffstat (limited to 'meta/recipes-support/apr/apr_1.5.1.bb')
-rw-r--r-- | meta/recipes-support/apr/apr_1.5.1.bb | 87 |
1 files changed, 87 insertions, 0 deletions
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..2720b523f3 --- /dev/null +++ b/meta/recipes-support/apr/apr_1.5.1.bb | |||
@@ -0,0 +1,87 @@ | |||
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 | cd ${S} | ||
36 | ./buildconf | ||
37 | } | ||
38 | |||
39 | FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*" | ||
40 | |||
41 | #for some reason, build/libtool.m4 handled by buildconf still be overwritten | ||
42 | #when autoconf, so handle it again. | ||
43 | do_configure_append() { | ||
44 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4 | ||
45 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk | ||
46 | } | ||
47 | |||
48 | do_install_append() { | ||
49 | oe_multilib_header apr.h | ||
50 | install -d ${D}${datadir}/apr | ||
51 | cp ${S}/${HOST_SYS}-libtool ${D}${datadir}/build-1/libtool | ||
52 | } | ||
53 | |||
54 | SSTATE_SCAN_FILES += "apr_rules.mk libtool" | ||
55 | |||
56 | SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess" | ||
57 | |||
58 | apr_sysroot_preprocess () { | ||
59 | d=${SYSROOT_DESTDIR}${datadir}/apr | ||
60 | install -d $d/ | ||
61 | cp ${S}/build/apr_rules.mk $d/ | ||
62 | sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk | ||
63 | sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk | ||
64 | sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk | ||
65 | sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk | ||
66 | cp ${S}/build/mkdir.sh $d/ | ||
67 | cp ${S}/build/make_exports.awk $d/ | ||
68 | cp ${S}/build/make_var_export.awk $d/ | ||
69 | } | ||
70 | |||
71 | do_compile_ptest() { | ||
72 | cd ${S}/test | ||
73 | oe_runmake | ||
74 | } | ||
75 | |||
76 | do_install_ptest() { | ||
77 | t=${D}${PTEST_PATH}/test | ||
78 | mkdir -p $t/.libs | ||
79 | cp -r ${S}/test/data $t/ | ||
80 | cp -r ${S}/test/.libs/*.so $t/.libs/ | ||
81 | cp ${S}/test/proc_child $t/ | ||
82 | cp ${S}/test/readchild $t/ | ||
83 | cp ${S}/test/sockchild $t/ | ||
84 | cp ${S}/test/sockperf $t/ | ||
85 | cp ${S}/test/testall $t/ | ||
86 | cp ${S}/test/tryread $t/ | ||
87 | } | ||