blob: 88b4300f9d39ac1987c14431bd80cb83467e5abd [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "Apache Portable Runtime (APR) companion library"
2HOMEPAGE = "http://apr.apache.org/"
3SECTION = "libs"
4DEPENDS = "apr expat gdbm"
5
6BBCLASSEXTEND = "native nativesdk"
7
8LICENSE = "Apache-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
10 file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42"
11
12SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
13 file://configfix.patch \
14 file://configure_fixes.patch \
15 file://run-ptest \
16"
17
18SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f"
19SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459"
20
21EXTRA_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 --with-expat=${STAGING_DIR_HOST}${prefix}"
28
29
30inherit autotools lib_package binconfig
31
32OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
33
34do_configure_append() {
35 if [ "${CLASSOVERRIDE}" = "class-target" ]; then
36 cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
37 fi
38}
39do_configure_prepend_class-native() {
40 mkdir ${B}/build
41 cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
42}
43do_configure_append_class-native() {
44 sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
45 # sometimes there isn't SHELL
46 sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
47}
48
49do_configure_prepend_class-nativesdk() {
50 cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
51}
52
53do_configure_append_class-nativesdk() {
54 sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
55 sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
56 sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
57 sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
58}
59
60do_install_append_class-target() {
61 sed -i -e 's,${STAGING_DIR_HOST},,g' \
62 -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
63 -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
64}
65
66PACKAGECONFIG ??= "crypto"
67PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
68PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
69PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
70
71#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
72FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
73FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
74FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
75
76INSANE_SKIP_${PN} += "dev-so"
77
78inherit ptest
79
80RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
81
82do_compile_ptest() {
83 cd ${B}/test
84 oe_runmake
85}
86
87do_install_ptest() {
88 t=${D}${PTEST_PATH}/test
89 mkdir $t
90 for i in testall data; do \
91 cp -r ${B}/test/$i $t; \
92 done
93}