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 \ |
| 27 | --without-sqlite3 \ |
| 28 | --with-expat=${STAGING_DIR_HOST}${prefix}" |
| 29 | |
| 30 | |
| 31 | inherit autotools lib_package binconfig |
| 32 | |
| 33 | PR = "r1" |
| 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#" ${S}/build/rules.mk |
| 58 | sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${S}/build/rules.mk |
| 59 | sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${S}/build/rules.mk |
| 60 | sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${S}/build/rules.mk |
| 61 | } |
| 62 | |
| 63 | FILES_${PN} += "${libdir}/apr-util-1/apr_dbm_gdbm-1.so" |
| 64 | FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/apr_dbm_gdbm.so* ${libdir}/apr-util-1/apr_dbm_gdbm.la" |
| 65 | FILES_${PN}-dbg += "${libdir}/apr-util-1/.debug/*" |
| 66 | FILES_${PN}-staticdev += "${libdir}/apr-util-1/apr_dbm_gdbm.a" |
| 67 | |
| 68 | inherit ptest |
| 69 | |
| 70 | do_compile_ptest() { |
| 71 | cd ${B}/test |
| 72 | oe_runmake |
| 73 | } |
| 74 | |
| 75 | do_install_ptest() { |
| 76 | t=${D}${PTEST_PATH}/test |
| 77 | mkdir $t |
| 78 | for i in testall data; do \ |
| 79 | cp -r ${B}/test/$i $t; \ |
| 80 | done |
| 81 | } |