diff options
Diffstat (limited to 'dev-libs/apr')
-rw-r--r-- | dev-libs/apr/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/apr/apr-1.7.4-r3.ebuild | 163 | ||||
-rw-r--r-- | dev-libs/apr/files/apr-1.7.4-config-cross.patch | 19 | ||||
-rw-r--r-- | dev-libs/apr/files/apr-1.7.4-config-libdir.patch | 17 |
4 files changed, 202 insertions, 0 deletions
diff --git a/dev-libs/apr/Manifest b/dev-libs/apr/Manifest index 3a56c1b748ea..6f1f7c55eb6f 100644 --- a/dev-libs/apr/Manifest +++ b/dev-libs/apr/Manifest @@ -4,7 +4,10 @@ AUX apr-1.7.2-fix-pkgconfig-libs.patch 963 BLAKE2B fb36bb31050286064e17c2a9c9f3d AUX apr-1.7.2-libtool.patch 517 BLAKE2B da77ee1d94bc2bd46d4ef97f18f018fbcc67cceb17162787f0e2f02e7ae205f80121166551a90b62e24d77c5f4313a2fa68b90dca713923b1a78e649bcca70da SHA512 4e09e88bd2d9e5f25a1edc52bdb632b0e73b28d971a9b0974bdcff9f8217ef2abe5c3ab3ef8a592e56c272bf928569e5a9be78bd3124afafb5954b6b8ee6d0eb AUX apr-1.7.2-respect-flags.patch 652 BLAKE2B e9cef7a8eff52a0d1799c261b377026849d8b65770a9e6b1d93f936d5d6533635827d6bdada9cbfdd8f274b191234d4b07ec7afa640383cac965562153c54164 SHA512 8305861c1196bbc5262bdc5d9fe87ef7d5d38d827d829455db2007036c70d749901bc3d2b63570528a70dfb3ff6171e78b54ceaea8c9646e4aa53c173440e70b AUX apr-1.7.2-sysroot.patch 1399 BLAKE2B 921694b66e2a0fe687ec9acb7458b1c860c12665e553aba4e043d56732bc0adc944c7bdd609dd001fcf2c9716b30989a47207506d3ad9c0141174848ce6ad70c SHA512 0dc3cb41fa8ab909c14e3650f755a061b5a0fab052b6b94c16678af58013841614ff9a407c82764cd3435db5b1d5d5a5ce41bb1b430dae0b272cffc438e49003 +AUX apr-1.7.4-config-cross.patch 697 BLAKE2B 2968ec992b9e4bf94c2d0817b8d5140a091476da060a88aec9dbbb00c364f6b4a0ed0761c1589092ff9af87cbf734debb9dc1188b178b7bb6aba4eb0b46f08de SHA512 7ce8e7771b763aecb9a9ed7467aa2620b24db6a50e2d8789ef3d131acd9492e9cf2d8ed27c7a89c5208c1e53edfb525235dabddf946c644f1aa2fa9fb768623e +AUX apr-1.7.4-config-libdir.patch 802 BLAKE2B 28652eec482658ef4c0d3baad45a097b07813258cbad049f336b7f14b83d9edf3a90f867d9efc8e6d29215f15fcbf8631801ee126894ee057d99094b670d80f5 SHA512 ad516498d9c278496b22f2b3becaa4ace3e24388121b00a7e326e046d0385c31b8ad505c1cccf81960bb5b73afa80d3499b2fa6119e0525ff925d26b85f37792 AUX config.layout.patch 745 BLAKE2B 9877db3d76339b70f2bd354d118eff0df4d63bc81e4af9e65169c1c5862c3fa3532cc02df8e084b540e7a81091c3b16d50388c6234cba469b15fff896d0428fc SHA512 3a87e718859c8f95793f828b764d240907d65c21fe2c99143815ab835f8b657154092c4ad496e86d79490bd85ef03d394d3acb57a15186f2f06a518b32d77fdf DIST apr-1.7.4.tar.bz2 894526 BLAKE2B a93b9d3f2c46fe0a34ce1d544e7a43ba40720e2fae8b8a7d0957413ac695057902378dbf96f067ced7486da86c8e513b7fbd48fa79839efeeb40a3295fe2d3df SHA512 2342c997765ea2ca96eac158e5fd260232dba68fc41b90a79a7ba9b25c539fc217981867362090e0ebebe632289257c342275e3c5baedb698c474ef8f49a9dcd EBUILD apr-1.7.4-r2.ebuild 4376 BLAKE2B 36bf924e908a129f3f21ee8baa038aa1277e6c80e263155e2db8bb972fab6c0be51f05ff739c6fd4a97f8e132f15f334a9ae257059a9a50e29342d9e9f09d169 SHA512 f3c0d8c7858e2b82e39a1410a43a7f669d9aaf93101e8c5f8b81a034e972f8b560a5211f3289919fad203a17789d6e7e58293bfcb9471ef48bc756d670be9ad2 +EBUILD apr-1.7.4-r3.ebuild 4422 BLAKE2B e8dce0c1dfcf7507286e34b33bb2d11031dee0e6255652fa10b9697c65ca87667182e3f7853513e2d3475971a8cd3091441893d56d0a5f80606d06bcef11fc69 SHA512 e7b45efc34a65084e7e39f67bae585b20f945dada77fe948ac0b273070697672ee728115e49fd5995d528ebddc161be058703a4ea48a277b96bf691251986f1a MISC metadata.xml 487 BLAKE2B 826e5b4b8b87d0077f1b2063ae1c808447987ddea524eeb4cdd17d60bea8b3919a2a714cdb0706cf758dfcf86109b702399c04dd054872d8465e1f6b3469c795 SHA512 9e8fbae61974080394151944ca7e2fec92a6c99b2c2fe75dc2486dced890933ac4694c8ac2984504bbfe42706bed6895b7d5fe9f9a9ced96c5c0ead8016f4366 diff --git a/dev-libs/apr/apr-1.7.4-r3.ebuild b/dev-libs/apr/apr-1.7.4-r3.ebuild new file mode 100644 index 000000000000..a7f6b6d58e1d --- /dev/null +++ b/dev-libs/apr/apr-1.7.4-r3.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="Apache Portable Runtime Library" +HOMEPAGE="https://apr.apache.org/" +SRC_URI="mirror://apache/apr/${P}.tar.bz2" + +LICENSE="Apache-2.0" +SLOT="1/${PV%.*}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="doc old-kernel selinux static-libs +urandom valgrind" + +# See bug #815265 for libcrypt dependency +DEPEND=" + virtual/libcrypt:= + elibc_glibc? ( >=sys-apps/util-linux-2.16 ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-base-policy ) +" +DEPEND+=" valgrind? ( dev-debug/valgrind )" +BDEPEND=" + >=dev-build/libtool-2.4.2 + doc? ( app-text/doxygen ) +" + +DOCS=( CHANGES NOTICE README ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.3-skip-known-failing-tests.patch + "${FILESDIR}"/${PN}-1.7.2-libtool.patch + "${FILESDIR}"/${PN}-1.7.2-fix-pkgconfig-libs.patch + "${FILESDIR}"/${PN}-1.7.2-respect-flags.patch + "${FILESDIR}"/${PN}-1.7.2-autoconf-2.72.patch + "${FILESDIR}"/${PN}-1.7.4-config-cross.patch + "${FILESDIR}"/${PN}-1.7.4-config-libdir.patch + "${FILESDIR}"/config.layout.patch +) + +src_prepare() { + default + + mv configure.in configure.ac || die + AT_M4DIR="build" eautoreconf +} + +src_configure() { + tc-export AS CC CPP + + # the libtool script uses bash code in it and at configure time, tries + # to find a bash shell. if /bin/sh is bash, it uses that. this can + # cause problems for people who switch /bin/sh on the fly to other + # shells, so just force libtool to use /bin/bash all the time. + export CONFIG_SHELL="${EPREFIX}"/bin/bash + export ac_cv_path_SED="sed" + export ac_cv_path_EGREP="grep -E" + export ac_cv_path_EGREP_TRADITIONAL="grep -E" + export ac_cv_path_FGREP="grep -F" + export ac_cv_path_GREP="grep" + export ac_cv_path_lt_DD="dd" + + local myconf=( + --enable-layout=gentoo + --enable-nonportable-atomics + --enable-posix-shm + --enable-threads + $(use_enable static-libs static) + $(use_with valgrind) + --with-installbuilddir="${EPREFIX}"/usr/share/${PN}/build + ) + + tc-is-static-only && myconf+=( --disable-dso ) + + if use old-kernel; then + local apr_cv_accept4 apr_cv_dup3 apr_cv_epoll_create1 apr_cv_sock_cloexec + export apr_cv_accept4="no" + export apr_cv_dup3="no" + export apr_cv_epoll_create1="no" + export apr_cv_sock_cloexec="no" + fi + + if tc-is-cross-compiler; then + # The apache project relies heavily on AC_TRY_RUN and doesn't + # have any sane cross-compiling fallback logic. + export \ + ac_cv_file__dev_zero="yes" \ + ac_cv_func_sem_open="yes" \ + ac_cv_mmap__dev_zero="yes" \ + ac_cv_negative_eai="yes" \ + ac_cv_o_nonblock_inherited="no" \ + ac_cv_struct_rlimit="yes" \ + ap_cv_atomic_builtins="yes" \ + apr_cv_accept4="yes" \ + apr_cv_dup3="yes" \ + apr_cv_epoll="yes" \ + apr_cv_epoll_create1="yes" \ + apr_cv_gai_addrconfig="yes" \ + apr_cv_mutex_recursive="yes" \ + apr_cv_mutex_robust_shared="yes" \ + apr_cv_process_shared_works="yes" \ + apr_cv_pthreads_lib="-pthread" \ + apr_cv_sock_cloexec="yes" \ + apr_cv_tcp_nodelay_with_cork="yes" + fi + + if use urandom; then + myconf+=( --with-devrandom=/dev/urandom ) + else + myconf+=( --with-devrandom=/dev/random ) + fi + + # Avoid libapr containing undefined references (underlinked) + # undefined reference to `__sync_val_compare_and_swap_8' + # (May be possible to fix via libatomic linkage in future?) + # bug #740464 + append-atomic-flags + if use x86 || [[ ${LIBS} == *atomic* ]] ; then + myconf+=( --disable-nonportable-atomics ) + fi + + econf "${myconf[@]}" +} + +src_compile() { + if tc-is-cross-compiler; then + # This header is the same across targets, so use the build compiler. + emake tools/gen_test_char + + tc-export_build_env BUILD_CC + ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \ + tools/gen_test_char.c -o tools/gen_test_char || die + fi + + emake all $(usev doc dox) +} + +src_test() { + # Building tests in parallel is broken + emake -j1 check +} + +src_install() { + default + + if ! use static-libs; then + find "${ED}" -name '*.la' -delete || die + fi + + if use doc; then + docinto html + dodoc -r docs/dox/html/* + fi + + # This file is only used on AIX systems, which Gentoo is not, + # and causes collisions between the SLOTs, so remove it. + # Even in Prefix, we don't need this on AIX. + rm "${ED}/usr/$(get_libdir)/apr.exp" || die +} diff --git a/dev-libs/apr/files/apr-1.7.4-config-cross.patch b/dev-libs/apr/files/apr-1.7.4-config-cross.patch new file mode 100644 index 000000000000..5101f455230a --- /dev/null +++ b/dev-libs/apr/files/apr-1.7.4-config-cross.patch @@ -0,0 +1,19 @@ +The apr-config script can automatically adjust its paths to help with +cross-compiling, but it only does this if apr itself was originally +cross-compiled, which may not be the case. Forcing it to consider that +it might be cross-compiled doesn't do any harm though. + +Bug: https://bugs.gentoo.org/931829 + +diff -Naur a/apr-config.in b/apr-config.in +--- a/apr-config.in 2023-03-13 10:29:04.000000000 +0000 ++++ b/apr-config.in 2024-05-14 10:23:28.429984195 +0100 +@@ -48,7 +48,7 @@ + # NOTE: the following line is modified during 'make install': alter with care! + location=@APR_CONFIG_LOCATION@ + +-cross_compiling=@APR_CROSS_COMPILING@ ++cross_compiling=maybe + + if test "$cross_compiling" != "no"; then + diff --git a/dev-libs/apr/files/apr-1.7.4-config-libdir.patch b/dev-libs/apr/files/apr-1.7.4-config-libdir.patch new file mode 100644 index 000000000000..aed4aba59f9a --- /dev/null +++ b/dev-libs/apr/files/apr-1.7.4-config-libdir.patch @@ -0,0 +1,17 @@ +Don't add the libdir to the search path or bake the libdir as a runpath when +doing a native build because we always install to a standard location. + +Bug: https://bugs.gentoo.org/385775 + +diff -Naur a/apr-config.in b/apr-config.in +--- a/apr-config.in 2023-03-13 10:29:04.000000000 +0000 ++++ b/apr-config.in 2024-05-14 10:23:28.429984195 +0100 +@@ -233,7 +233,7 @@ + ### avoid using -L if libdir is a "standard" location like /usr/lib + # Since the user is specifying they are linking with libtool, we + # *know* that -R will be recognized by libtool. +- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}" ++ flags="$flags -l${APR_LIBNAME}" + elif test "$location" = "crosscompile"; then + flags="$flags -L${APR_TARGET_DIR}/$libdir -l${APR_LIBNAME}" + else |