Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [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=158aa0b1efe0c12f23d4b007ddb9a5db \ |
Brad Bishop | c4ea075 | 2018-11-15 14:30:15 -0800 | [diff] [blame] | 10 | file://include/apu_version.h;endline=15;md5=823b3d1a7225df8f7b68a69c3c2b4c71" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 11 | |
| 12 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \ |
| 13 | file://configfix.patch \ |
| 14 | file://configure_fixes.patch \ |
| 15 | file://run-ptest \ |
Brad Bishop | bba38f3 | 2018-08-23 16:11:46 +0800 | [diff] [blame] | 16 | file://0001-Fix-error-handling-in-gdbm.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | " |
| 18 | |
| 19 | SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f" |
| 20 | SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459" |
| 21 | |
| 22 | EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ |
| 23 | --without-odbc \ |
| 24 | --without-pgsql \ |
| 25 | --with-dbm=gdbm \ |
| 26 | --with-gdbm=${STAGING_DIR_HOST}${prefix} \ |
| 27 | --without-sqlite2 \ |
| 28 | --with-expat=${STAGING_DIR_HOST}${prefix}" |
| 29 | |
| 30 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 31 | inherit autotools lib_package binconfig multilib_script |
| 32 | |
| 33 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apu-1-config" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 34 | |
| 35 | OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" |
| 36 | |
| 37 | do_configure_append() { |
| 38 | if [ "${CLASSOVERRIDE}" = "class-target" ]; then |
| 39 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk |
| 40 | fi |
| 41 | } |
| 42 | do_configure_prepend_class-native() { |
| 43 | mkdir ${B}/build |
| 44 | cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk |
| 45 | } |
| 46 | do_configure_append_class-native() { |
| 47 | sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk |
| 48 | # sometimes there isn't SHELL |
| 49 | sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk |
| 50 | } |
| 51 | |
| 52 | do_configure_prepend_class-nativesdk() { |
| 53 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk |
| 54 | } |
| 55 | |
| 56 | do_configure_append_class-nativesdk() { |
| 57 | sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
| 58 | sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
| 59 | sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
| 60 | sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk |
| 61 | } |
| 62 | |
| 63 | do_install_append_class-target() { |
| 64 | sed -i -e 's,${STAGING_DIR_HOST},,g' \ |
| 65 | -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \ |
| 66 | -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config |
| 67 | } |
| 68 | |
| 69 | PACKAGECONFIG ??= "crypto" |
| 70 | PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap" |
| 71 | PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl" |
| 72 | PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3" |
| 73 | |
| 74 | #files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN} |
| 75 | FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}" |
| 76 | FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la" |
| 77 | FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a" |
| 78 | |
| 79 | INSANE_SKIP_${PN} += "dev-so" |
| 80 | |
| 81 | inherit ptest |
| 82 | |
| 83 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7" |
Brad Bishop | 393846f | 2019-05-20 12:24:11 -0400 | [diff] [blame] | 84 | RDEPENDS_${PN}-ptest += "libgcc" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 85 | |
| 86 | do_compile_ptest() { |
| 87 | cd ${B}/test |
| 88 | oe_runmake |
| 89 | } |
| 90 | |
| 91 | do_install_ptest() { |
| 92 | t=${D}${PTEST_PATH}/test |
| 93 | mkdir $t |
| 94 | for i in testall data; do \ |
| 95 | cp -r ${B}/test/$i $t; \ |
| 96 | done |
| 97 | } |