76 lines
2.2 KiB
Bash
76 lines
2.2 KiB
Bash
# Template file for 'apr'
|
|
pkgname=apr
|
|
version=1.7.4
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--with-installbuilddir=/usr/share/apr-1/build"
|
|
makedepends="expat-devel libuuid-devel"
|
|
checkdepends="gdb iana-etc"
|
|
short_desc="Apache Portable Runtime Library"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="Apache-2.0"
|
|
homepage="https://apr.apache.org/"
|
|
distfiles="https://archive.apache.org/dist/apr/apr-${version}.tar.bz2"
|
|
checksum=fc648de983f3a2a6c9e78dea1f180639bd2fad6c06d556d4367a701fe5c35577
|
|
|
|
# Can't run test programs when cross compiling
|
|
# NOTE always diff between native and cross build!!!
|
|
if [ "$CROSS_BUILD" ]; then
|
|
configure_args+=" apr_cv_pthreads_cflags=-pthread"
|
|
configure_args+=" apr_cv_process_shared_works=yes"
|
|
configure_args+=" apr_cv_mutex_robust_shared=yes"
|
|
configure_args+=" apr_cv_tcp_nodelay_with_cork=yes"
|
|
configure_args+=" ac_cv_func_sem_open=yes"
|
|
configure_args+=" ac_cv_mmap__dev_zero=yes"
|
|
configure_args+=" ac_cv_struct_rlimit=yes"
|
|
fi
|
|
|
|
# The apr package doesn't use crypt_r, however apr-util does,
|
|
# and apr-util uses the apr.h generated by apr's ./configure.
|
|
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
|
|
makedepends+=" libxcrypt-devel"
|
|
fi
|
|
|
|
do_check() {
|
|
local _args
|
|
cd test
|
|
if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
|
|
sed -i 's/if BROKEN_IN_CI/if 0/' testsockets.c
|
|
if [ "$XBPS_LIBC" = musl ]; then
|
|
# unable to resolve back from 127.0.0.1
|
|
_args="-x testsock"
|
|
fi
|
|
fi
|
|
make ${makejobs}
|
|
./testall ${_args}
|
|
}
|
|
|
|
post_install() {
|
|
sed -i -e 's,-ffile-prefix-map=[^[:space:]]*,,' \
|
|
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
|
|
if [ "$CROSS_BUILD" ]; then
|
|
sed -i -e 's;cross_compiling=.*;cross_compiling=;' \
|
|
"$DESTDIR/usr/bin/apr-1-config"
|
|
sed -i -e "s,$XBPS_CROSS_BASE,,g" \
|
|
"$DESTDIR/usr/share/apr-1/build/apr_rules.mk"
|
|
fi
|
|
}
|
|
|
|
apr-devel_package() {
|
|
depends="libtool libuuid-devel apr>=${version}_${revision}"
|
|
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
|
|
depends+=" libxcrypt-devel"
|
|
fi
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/bin
|
|
vmove usr/share
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove "usr/lib/*.exp"
|
|
vmove usr/lib/pkgconfig
|
|
ln -sf ../../../bin/libtool "$PKGDESTDIR/usr/share/apr-1/build/"
|
|
}
|
|
}
|