blob: c1f7f380ed75fedd25e707e7dfa9276eb5dea8e5 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Apache Portable Runtime (APR) library"
2HOMEPAGE = "http://apr.apache.org/"
3SECTION = "libs"
4DEPENDS = "util-linux"
5
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
8 file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96"
9
10BBCLASSEXTEND = "native nativesdk"
11
12SRC_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 file://Fix-packet-discards-HTTP-redirect.patch \
19"
20
21SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa"
22SRC_URI[sha256sum] = "7d03ed29c22a7152be45b8e50431063736df9e1daa1ddf93f6a547ba7a28f67a"
23
24inherit autotools-brokensep lib_package binconfig multilib_header ptest
25
26OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
27
28# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
29CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
30
31# Also suppress trying to use sctp.
32#
33CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
34
35do_configure_prepend() {
36 # Avoid absolute paths for grep since it causes failures
37 # when using sstate between different hosts with different
38 # install paths for grep.
39 export GREP="grep"
40
41 cd ${S}
42 ./buildconf
43}
44
45FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
46RDEPENDS_${PN}-dev += "bash"
47
48#for some reason, build/libtool.m4 handled by buildconf still be overwritten
49#when autoconf, so handle it again.
50do_configure_append() {
51 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
52 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
53}
54
55do_install_append() {
56 oe_multilib_header apr.h
57 install -d ${D}${datadir}/apr
58 cp ${S}/${HOST_SYS}-libtool ${D}${datadir}/build-1/libtool
59}
60
61SSTATE_SCAN_FILES += "apr_rules.mk libtool"
62
63SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
64
65apr_sysroot_preprocess () {
66 d=${SYSROOT_DESTDIR}${datadir}/apr
67 install -d $d/
68 cp ${S}/build/apr_rules.mk $d/
69 sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
70 sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
71 sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
72 sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
73 cp ${S}/build/mkdir.sh $d/
74 cp ${S}/build/make_exports.awk $d/
75 cp ${S}/build/make_var_export.awk $d/
76}
77
78do_compile_ptest() {
79 cd ${S}/test
80 oe_runmake
81}
82
83do_install_ptest() {
84 t=${D}${PTEST_PATH}/test
85 mkdir -p $t/.libs
86 cp -r ${S}/test/data $t/
87 cp -r ${S}/test/.libs/*.so $t/.libs/
88 cp ${S}/test/proc_child $t/
89 cp ${S}/test/readchild $t/
90 cp ${S}/test/sockchild $t/
91 cp ${S}/test/sockperf $t/
92 cp ${S}/test/testall $t/
93 cp ${S}/test/tryread $t/
94}
95
96export CONFIG_SHELL="/bin/bash"