| Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | SUMMARY = "Apache Portable Runtime (APR) library" | 
|  | 2 | HOMEPAGE = "http://apr.apache.org/" | 
|  | 3 | SECTION = "libs" | 
|  | 4 | DEPENDS = "util-linux" | 
|  | 5 |  | 
|  | 6 | LICENSE = "Apache-2.0" | 
|  | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \ | 
|  | 8 | file://include/apr_lib.h;endline=15;md5=823b3d1a7225df8f7b68a69c3c2b4c71" | 
|  | 9 |  | 
|  | 10 | BBCLASSEXTEND = "native nativesdk" | 
|  | 11 |  | 
|  | 12 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ | 
|  | 13 | file://run-ptest \ | 
| Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 14 | file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \ | 
|  | 15 | file://0003-Makefile.in-configure.in-support-cross-compiling.patch \ | 
|  | 16 | file://0004-Fix-packet-discards-HTTP-redirect.patch \ | 
|  | 17 | file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \ | 
|  | 18 | file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \ | 
|  | 19 | file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \ | 
| Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 20 | file://libtoolize_check.patch \ | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | file://0001-Add-option-to-disable-timed-dependant-tests.patch \ | 
| Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 22 | " | 
|  | 23 |  | 
|  | 24 | SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7" | 
|  | 25 | SRC_URI[sha256sum] = "e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea" | 
|  | 26 |  | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 27 | inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script | 
| Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 28 |  | 
|  | 29 | OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" | 
|  | 30 |  | 
|  | 31 | # Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928 | 
|  | 32 | CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" | 
|  | 33 |  | 
|  | 34 | # Also suppress trying to use sctp. | 
|  | 35 | # | 
|  | 36 | CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" | 
|  | 37 |  | 
|  | 38 | CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes" | 
|  | 39 | CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes" | 
|  | 40 |  | 
|  | 41 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | 
|  | 42 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 43 | PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests," | 
| Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 44 |  | 
|  | 45 | do_configure_prepend() { | 
|  | 46 | # Avoid absolute paths for grep since it causes failures | 
|  | 47 | # when using sstate between different hosts with different | 
|  | 48 | # install paths for grep. | 
|  | 49 | export GREP="grep" | 
|  | 50 |  | 
|  | 51 | cd ${S} | 
| Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 52 | # The "2" means libtool version 2. | 
|  | 53 | ./buildconf 2 | 
| Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 54 | } | 
|  | 55 |  | 
| Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apr-1-config \ | 
|  | 57 | ${PN}-dev:${datadir}/build-1/apr_rules.mk" | 
|  | 58 |  | 
| Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 59 | FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*" | 
|  | 60 | RDEPENDS_${PN}-dev += "bash" | 
|  | 61 |  | 
| Brad Bishop | 393846f | 2019-05-20 12:24:11 -0400 | [diff] [blame] | 62 | RDEPENDS_${PN}-ptest += "libgcc" | 
|  | 63 |  | 
| Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 64 | #for some reason, build/libtool.m4 handled by buildconf still be overwritten | 
|  | 65 | #when autoconf, so handle it again. | 
|  | 66 | do_configure_append() { | 
|  | 67 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4 | 
|  | 68 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk | 
|  | 69 | } | 
|  | 70 |  | 
|  | 71 | do_install_append() { | 
|  | 72 | oe_multilib_header apr.h | 
|  | 73 | install -d ${D}${datadir}/apr | 
|  | 74 | } | 
|  | 75 |  | 
|  | 76 | do_install_append_class-target() { | 
|  | 77 | sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \ | 
|  | 78 | -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk | 
|  | 79 | sed -i -e 's,${STAGING_DIR_HOST},,g' \ | 
|  | 80 | -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \ | 
|  | 81 | -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config | 
|  | 82 | } | 
|  | 83 |  | 
|  | 84 | SSTATE_SCAN_FILES += "apr_rules.mk libtool" | 
|  | 85 |  | 
|  | 86 | SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess" | 
|  | 87 |  | 
|  | 88 | apr_sysroot_preprocess () { | 
|  | 89 | d=${SYSROOT_DESTDIR}${datadir}/apr | 
|  | 90 | install -d $d/ | 
|  | 91 | cp ${S}/build/apr_rules.mk $d/ | 
|  | 92 | sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk | 
|  | 93 | sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk | 
|  | 94 | sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk | 
|  | 95 | sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk | 
|  | 96 | cp ${S}/build/mkdir.sh $d/ | 
|  | 97 | cp ${S}/build/make_exports.awk $d/ | 
|  | 98 | cp ${S}/build/make_var_export.awk $d/ | 
|  | 99 | cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool | 
|  | 100 | } | 
|  | 101 |  | 
|  | 102 | do_compile_ptest() { | 
|  | 103 | cd ${S}/test | 
|  | 104 | oe_runmake | 
|  | 105 | } | 
|  | 106 |  | 
|  | 107 | do_install_ptest() { | 
|  | 108 | t=${D}${PTEST_PATH}/test | 
|  | 109 | mkdir -p $t/.libs | 
|  | 110 | cp -r ${S}/test/data $t/ | 
|  | 111 | cp -r ${S}/test/.libs/*.so $t/.libs/ | 
|  | 112 | cp ${S}/test/proc_child $t/ | 
|  | 113 | cp ${S}/test/readchild $t/ | 
|  | 114 | cp ${S}/test/sockchild $t/ | 
|  | 115 | cp ${S}/test/sockperf $t/ | 
|  | 116 | cp ${S}/test/testall $t/ | 
|  | 117 | cp ${S}/test/tryread $t/ | 
|  | 118 | } | 
|  | 119 |  | 
|  | 120 | export CONFIG_SHELL="/bin/bash" |