Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 nativesdk" |
| 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] = "866825c04da827c6e5f53daff5569f42" |
| 19 | SRC_URI[sha256sum] = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19" |
| 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 \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | --with-expat=${STAGING_DIR_HOST}${prefix}" |
| 28 | |
| 29 | |
| 30 | inherit autotools lib_package binconfig |
| 31 | |
| 32 | PR = "r1" |
| 33 | |
| 34 | OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" |
| 35 | |
| 36 | do_configure_append() { |
| 37 | if [ "${CLASSOVERRIDE}" = "class-target" ]; then |
| 38 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk |
| 39 | fi |
| 40 | } |
| 41 | do_configure_prepend_class-native() { |
| 42 | mkdir ${B}/build |
| 43 | cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk |
| 44 | } |
| 45 | do_configure_append_class-native() { |
| 46 | sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk |
| 47 | # sometimes there isn't SHELL |
| 48 | sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk |
| 49 | } |
| 50 | |
| 51 | do_configure_prepend_class-nativesdk() { |
| 52 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk |
| 53 | } |
| 54 | |
| 55 | do_configure_append_class-nativesdk() { |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 56 | sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
| 57 | sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
| 58 | sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
| 59 | sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 60 | } |
| 61 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 62 | do_install_append_class-target() { |
| 63 | sed -i -e 's,${STAGING_DIR_HOST},,g' \ |
| 64 | -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \ |
| 65 | -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config |
| 66 | } |
| 67 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 68 | PACKAGECONFIG ??= "crypto" |
| 69 | PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" |
| 70 | PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl" |
| 71 | PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3" |
| 72 | |
| 73 | #files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN} |
| 74 | FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}" |
| 75 | FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la" |
| 76 | FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a" |
| 77 | |
| 78 | INSANE_SKIP_${PN} += "dev-so" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 79 | |
| 80 | inherit ptest |
| 81 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 82 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7" |
| 83 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 84 | do_compile_ptest() { |
| 85 | cd ${B}/test |
| 86 | oe_runmake |
| 87 | } |
| 88 | |
| 89 | do_install_ptest() { |
| 90 | t=${D}${PTEST_PATH}/test |
| 91 | mkdir $t |
| 92 | for i in testall data; do \ |
| 93 | cp -r ${B}/test/$i $t; \ |
| 94 | done |
| 95 | } |