summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/apr/apr_1.7.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/apr/apr_1.7.4.bb')
-rw-r--r--meta/recipes-support/apr/apr_1.7.4.bb138
1 files changed, 138 insertions, 0 deletions
diff --git a/meta/recipes-support/apr/apr_1.7.4.bb b/meta/recipes-support/apr/apr_1.7.4.bb
new file mode 100644
index 0000000000..4df741c766
--- /dev/null
+++ b/meta/recipes-support/apr/apr_1.7.4.bb
@@ -0,0 +1,138 @@
1SUMMARY = "Apache Portable Runtime (APR) library"
2
3DESCRIPTION = "Create and maintain software libraries that provide a predictable \
4and consistent interface to underlying platform-specific implementations."
5
6HOMEPAGE = "http://apr.apache.org/"
7SECTION = "libs"
8DEPENDS = "util-linux"
9
10LICENSE = "Apache-2.0"
11LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
12 file://include/apr_lib.h;endline=15;md5=823b3d1a7225df8f7b68a69c3c2b4c71"
13
14BBCLASSEXTEND = "native nativesdk"
15
16SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
17 file://run-ptest \
18 file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \
19 file://0004-Fix-packet-discards-HTTP-redirect.patch \
20 file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
21 file://libtoolize_check.patch \
22 file://0001-Add-option-to-disable-timed-dependant-tests.patch \
23 file://0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch \
24 file://autoconf-2.73.patch \
25 file://0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch \
26 "
27
28SRC_URI[sha256sum] = "fc648de983f3a2a6c9e78dea1f180639bd2fad6c06d556d4367a701fe5c35577"
29
30inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script
31
32OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
33
34# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
35CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
36# Enable largefile
37CACHED_CONFIGUREVARS += "apr_cv_use_lfs64=yes"
38# Additional AC_TRY_RUN tests which will need to be cached for cross compile
39CACHED_CONFIGUREVARS += "apr_cv_epoll=yes epoll_create1=yes apr_cv_sock_cloexec=yes \
40 ac_cv_struct_rlimit=yes \
41 ac_cv_func_sem_open=yes \
42 apr_cv_process_shared_works=yes \
43 apr_cv_mutex_robust_shared=yes \
44 "
45# Also suppress trying to use sctp.
46#
47CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
48
49# ac_cv_sizeof_struct_iovec is deduced using runtime check which will fail during cross-compile
50CACHED_CONFIGUREVARS += "${@['ac_cv_sizeof_struct_iovec=16','ac_cv_sizeof_struct_iovec=8'][d.getVar('SITEINFO_BITS') != '32']}"
51
52CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes"
53
54CACHED_CONFIGUREVARS:append:libc-musl = " ac_cv_strerror_r_rc_int=yes"
55PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
56PACKAGECONFIG:append:libc-musl = " xsi-strerror"
57PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
58PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests,"
59PACKAGECONFIG[xsi-strerror] = "ac_cv_strerror_r_rc_int=yes,ac_cv_strerror_r_rc_int=no,"
60
61do_configure:prepend() {
62 # Avoid absolute paths for grep since it causes failures
63 # when using sstate between different hosts with different
64 # install paths for grep.
65 export GREP="grep"
66
67 cd ${S}
68 # The "2" means libtool version 2.
69 ./buildconf 2
70}
71
72MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apr-1-config \
73 ${PN}-dev:${datadir}/build-1/apr_rules.mk"
74
75FILES:${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
76RDEPENDS:${PN}-dev += "bash libtool"
77
78RDEPENDS:${PN}-ptest += "libgcc"
79
80#for some reason, build/libtool.m4 handled by buildconf still be overwritten
81#when autoconf, so handle it again.
82do_configure:append() {
83 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
84 sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
85}
86
87do_install:append() {
88 oe_multilib_header apr.h
89 install -d ${D}${datadir}/apr
90}
91
92do_install:append:class-target() {
93 rm -f ${D}${datadir}/build-1/libtool
94 sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g ${D}${datadir}/build-1/apr_rules.mk
95 sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \
96 -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
97 sed -i -e 's,${STAGING_DIR_HOST},,g' \
98 -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
99 -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
100}
101
102SSTATE_SCAN_FILES += "apr_rules.mk libtool"
103
104SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
105
106apr_sysroot_preprocess () {
107 d=${SYSROOT_DESTDIR}${datadir}/apr
108 install -d $d/
109 cp ${S}/build/apr_rules.mk $d/
110 sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
111 sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
112 sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g $d/apr_rules.mk
113 sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
114 cp ${S}/build/mkdir.sh $d/
115 cp ${S}/build/make_exports.awk $d/
116 cp ${S}/build/make_var_export.awk $d/
117 cp ${S}/libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
118}
119
120do_compile_ptest() {
121 cd ${S}/test
122 oe_runmake
123}
124
125do_install_ptest() {
126 t=${D}${PTEST_PATH}/test
127 mkdir -p $t/.libs
128 cp -r ${S}/test/data $t/
129 cp -r ${S}/test/.libs/*.so $t/.libs/
130 cp ${S}/test/proc_child $t/
131 cp ${S}/test/readchild $t/
132 cp ${S}/test/sockchild $t/
133 cp ${S}/test/sockperf $t/
134 cp ${S}/test/testall $t/
135 cp ${S}/test/tryread $t/
136}
137
138export CONFIG_SHELL="/bin/bash"