diff options
Diffstat (limited to 'dev-libs/apr')
-rw-r--r-- | dev-libs/apr/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/apr/apr-1.7.0-r6.ebuild | 163 | ||||
-rw-r--r-- | dev-libs/apr/files/apr-1.7.0-clang-16.patch | 174 |
3 files changed, 339 insertions, 0 deletions
diff --git a/dev-libs/apr/Manifest b/dev-libs/apr/Manifest index 6d3403e813d8..ddbed6627c47 100644 --- a/dev-libs/apr/Manifest +++ b/dev-libs/apr/Manifest @@ -5,8 +5,10 @@ AUX apr-1.5.0-sysroot.patch 1309 BLAKE2B de3dc13a44a9d5071c249875322b7d6be9ed765 AUX apr-1.6.3-skip-known-failing-tests.patch 512 BLAKE2B 29607bce9a35853d824f8872557f361f3d5ffa0f2c7cd35e06cbf4d449e54f1b12978c0220b8ce4ae5d590ee9e04b5cd77af22876e3880deef115efbeb5a1dcc SHA512 ac097d28d5ae0b2437522da0578ff8bd049190d8df576e4e5298426f827b2bf69891e4f33bd1ffaf1a3c53143927e71f10d8362567121faa03cdf908d4fbc6c2 AUX apr-1.7.0-CVE-2021-35940.patch 1749 BLAKE2B 256687934fd6b2af494198456d059f8a6edaaeb8b17f9186d0801bef489443faffefda3724d6c083f05811356c5168db31e5defbe19394699092090f7befdae6 SHA512 a2419817809dfd92a6d3b12e2067a802505d77d400fd47a4b9bb6fd5ae94c4be092e0d3b5894de429c6cc4a82d8133b801636bcab93d0f740c8f06a46516cd72 AUX apr-1.7.0-autoconf-2.70.patch 1970 BLAKE2B b552e2bb1be932a692e2d1fad5124b5db9163e45b1bef1fe97082db28efd6f6079d75253e961ca257bd31f53f814bdb11a2c6554fd5d1925d26fe7b42664db42 SHA512 63a56be83f555a78f422f9ce7074e5c3a497a4996d32ead78d9e1a05fba2e0dbdfb135c34143676b8ad16e8276642843d5ed8b17a540be58c6bf7e9662896c2f +AUX apr-1.7.0-clang-16.patch 4341 BLAKE2B 3d8a7d0e62016c4fd7f1b851d06ef595f8ddbacc4af2e3142cc922c711c6b56b2b99158abdffa611e20407f53f95ef5dc6ffe24cca90457d6d381176e2ce27a0 SHA512 adef5a1bccb6ccd4627c7e8416168aec3e87cb071f3c313ac18f0d246c502d1fc8cc41196e2c49958c1c52d01ffc82758e12ece802cf19bc675813a8064c74f5 AUX config.layout.patch 745 BLAKE2B 9877db3d76339b70f2bd354d118eff0df4d63bc81e4af9e65169c1c5862c3fa3532cc02df8e084b540e7a81091c3b16d50388c6234cba469b15fff896d0428fc SHA512 3a87e718859c8f95793f828b764d240907d65c21fe2c99143815ab835f8b657154092c4ad496e86d79490bd85ef03d394d3acb57a15186f2f06a518b32d77fdf DIST apr-1.7.0.tar.bz2 872238 BLAKE2B a8750c45ca6495073a7120f3ae9b858905aecb24b6af5966c3900b06ac1f6d6b55346b17a39a9604cf1b595882335adedf8c8cf4db10e322501bfff4ad7adfe7 SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148 EBUILD apr-1.7.0-r4.ebuild 4511 BLAKE2B 74ea0dd4227e2785e1a45eff3d1293d9fe937b57917107e736c0a1b056623eca5524e2bd3fe6c4f53c807e41394beca57513fed1318cf34c2b96abe8dede4c40 SHA512 dcf4320fe8c7ac38b3e89fe32a94fa9f4150d2269fc0e49822a9f488c9de485449f1ffa9e4d370b2f2c8ed1aecf46eea5313dfe779c1b08f55f4baa13bf0ac51 EBUILD apr-1.7.0-r5.ebuild 4568 BLAKE2B 6350799dc75d8c20c6aad27d7378fc7ea1f1b62600c80c77dcfefae2b4981313433c44e221a5200bb36b2e3a6458251a488c7c7a0607e485ec2815f928d331c4 SHA512 c368c2c5c05110da877abcc3a5ad57df0f532ed113d35d06f663b2db37cc82c8cd2dd65b9e50f6d41f1672999d927215edc2875bb14b52020bebbc2bb7ef8b0a +EBUILD apr-1.7.0-r6.ebuild 4624 BLAKE2B 64b6a74b0d0b88ac92bf4249b440e3b41bc06687efd31970596771532604798a62e25373e4f0f785b74a3472b95427e140a3c2730f0962e5906c0ce858dc6cbe SHA512 37bd853a818154762242877a38264f2e8aef0686915175c394999d10d15f534ed01116538c1634918cea315db1f95ad0c3cea0c35a6bf2be926d6abeb308887c MISC metadata.xml 511 BLAKE2B 5b4f31f74a9e3fe93b63bb337b5e0b7396c18439c269de0ec6c8308becf69ac8474d72dc921c80c06321bcaf708d49c9e26ec282036e84a9b03c08858c942980 SHA512 82063beddf8ce88d5f151ddeb8b3b69c10124af1c7b727b4c73885b4b14a427e93cd4164ddd4e3dfcdf7175727a8dffa357f1f14c3daee192a255f8995e6b0b5 diff --git a/dev-libs/apr/apr-1.7.0-r6.ebuild b/dev-libs/apr/apr-1.7.0-r6.ebuild new file mode 100644 index 000000000000..4ba3505bd8f8 --- /dev/null +++ b/dev-libs/apr/apr-1.7.0-r6.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools libtool 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 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc older-kernels-compatibility selinux static-libs +urandom" + +# See bug #815265 for libcrypt dependency +CDEPEND="virtual/libcrypt:= + elibc_glibc? ( >=sys-apps/util-linux-2.16 )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-base-policy )" +DEPEND="${CDEPEND} + >=sys-devel/libtool-2.4.2 + doc? ( app-doc/doxygen )" + +DOCS=( CHANGES NOTICE README ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.5.0-mint.patch + "${FILESDIR}"/${PN}-1.5.0-libtool.patch + "${FILESDIR}"/${PN}-1.5.0-cross-types.patch + "${FILESDIR}"/${PN}-1.5.0-sysroot.patch #385775 + "${FILESDIR}"/${PN}-1.6.3-skip-known-failing-tests.patch + "${FILESDIR}"/${PN}-1.7.0-autoconf-2.70.patch #750353 + "${FILESDIR}"/${PN}-1.7.0-CVE-2021-35940.patch #828545 + "${FILESDIR}"/${PN}-1.7.0-clang-16.patch #870004 +) + +src_prepare() { + default + + mv configure.in configure.ac || die + AT_M4DIR="build" eautoreconf + elibtoolize + + eapply "${FILESDIR}/config.layout.patch" +} + +src_configure() { + local myconf=( + --enable-layout=gentoo + --enable-nonportable-atomics + --enable-posix-shm + --enable-threads + $(use_enable static-libs static) + --with-installbuilddir="${EPREFIX}"/usr/share/${PN}/build + ) + + if use older-kernels-compatibility; 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_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 ) + elif (( ${CHOST#*-hpux11.} <= 11 )); then + : # no /dev/*random on hpux11.11 and before, ${PN} detects this. + else + myconf+=( --with-devrandom=/dev/random ) + fi + + tc-is-static-only && myconf+=( --disable-dso ) + + # shl_load does not search runpath, but hpux11 supports dlopen + [[ ${CHOST} == *-hpux11* ]] && myconf+=( --enable-dso=dlfcn ) + + if [[ ${CHOST} == *-solaris2.10 ]]; then + case $(<$([[ ${CHOST} != ${CBUILD} ]] && echo "${EPREFIX}/usr/${CHOST}")/usr/include/atomic.h) in + *atomic_cas_ptr*) ;; + *) + elog "You do not have Solaris Patch ID "$( + [[ ${CHOST} == sparc* ]] && echo 118884 || echo 118885 + )" (Problem 4954703) installed on your host ($(hostname))," + elog "using generic atomic operations instead." + myconf+=( --disable-nonportable-atomics ) + ;; + esac + else + if use ppc || use sparc || use mips; then + # 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 + myconf+=( --disable-nonportable-atomics ) + fi + 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 + + if use doc; then + emake dox + fi +} + +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.0-clang-16.patch b/dev-libs/apr/files/apr-1.7.0-clang-16.patch new file mode 100644 index 000000000000..2244b07a14ff --- /dev/null +++ b/dev-libs/apr/files/apr-1.7.0-clang-16.patch @@ -0,0 +1,174 @@ +https://bugs.gentoo.org/870004 + +Fixed upstream, hopefully (it's hard to keep track of 1.7.x branch churn): +- https://bz.apache.org/bugzilla/show_bug.cgi?id=64753 +- https://bz.apache.org/bugzilla/show_bug.cgi?id=65087 +--- a/build/apr_common.m4 ++++ b/build/apr_common.m4 +@@ -467,6 +467,7 @@ changequote([, ])dnl + AC_MSG_CHECKING(size of $2) + AC_CACHE_VAL(AC_CV_NAME, + [AC_TRY_RUN([#include <stdio.h> ++#include <stdlib.h> + $1 + #ifdef WIN32 + #define binmode "b" +@@ -531,7 +532,8 @@ AC_TRY_RUN([ + #include <errno.h> + #include <string.h> + #include <stdio.h> +-main() ++#include <stdlib.h> ++int main() + { + char buf[1024]; + if (strerror_r(ERANGE, buf, sizeof buf) < 1) { +--- a/build/apr_network.m4 ++++ b/build/apr_network.m4 +@@ -63,6 +63,10 @@ AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO], [ + #ifdef HAVE_SYS_SOCKET_H + #include <sys/socket.h> + #endif ++#include <stdlib.h> ++ ++#include <netinet/in.h> ++#include <arpa/inet.h> + + int main(void) { + struct addrinfo hints, *ai; +@@ -136,6 +140,11 @@ dnl + AC_DEFUN([APR_CHECK_WORKING_GETNAMEINFO], [ + AC_CACHE_CHECK(for working getnameinfo, ac_cv_working_getnameinfo,[ + AC_TRY_RUN( [ ++#include <sys/socket.h> ++#include <netinet/in.h> ++#include <arpa/inet.h> ++#include <stdlib.h> ++ + #ifdef HAVE_NETDB_H + #include <netdb.h> + #endif +@@ -195,6 +204,8 @@ AC_DEFUN([APR_CHECK_NEGATIVE_EAI], [ + #include <netdb.h> + #endif + ++#include <stdlib.h> ++ + int main(void) { + if (EAI_ADDRFAMILY < 0) { + exit(0); +@@ -388,9 +399,14 @@ AC_DEFUN([APR_CHECK_TCP_NODELAY_INHERITED], [ + AC_CACHE_CHECK(if TCP_NODELAY setting is inherited from listening sockets, ac_cv_tcp_nodelay_inherited,[ + AC_TRY_RUN( [ + #include <stdio.h> ++#include <stdlib.h> ++ + #ifdef HAVE_SYS_TYPES_H + #include <sys/types.h> +-#endif ++#end ++#ifdef HAVE_STRING_H ++#include <string.h> ++#endifif + #ifdef HAVE_SYS_SOCKET_H + #include <sys/socket.h> + #endif +@@ -734,6 +750,9 @@ AC_TRY_COMPILE([ + #ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> + #endif ++ ++#include <sys/socket.h> ++#include <netinet/in.h> + ],[ + inet_addr("127.0.0.1"); + ],[ +@@ -754,6 +773,9 @@ fi + AC_DEFUN([APR_CHECK_INET_NETWORK], [ + AC_CACHE_CHECK(for inet_network, ac_cv_func_inet_network,[ + AC_TRY_COMPILE([ ++#include <sys/socket.h> ++#include <netinet/in.h> ++ + #ifdef HAVE_SYS_TYPES_H + #include <sys/types.h> + #endif +--- a/configure.in ++++ b/configure.in +@@ -1440,8 +1440,6 @@ AC_CHECK_FUNCS(sigaction, [ have_sigaction="1" ], [ have_sigaction="0" ]) + AC_DECL_SYS_SIGLIST + + AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ]) +-APR_CHECK_INET_ADDR +-APR_CHECK_INET_NETWORK + AC_SUBST(apr_inaddr_none) + AC_CHECK_FUNC(_getch) + AC_CHECK_FUNCS(strerror_r, [ strerror_r="1" ], [ strerror_r="0" ]) +@@ -1547,6 +1545,9 @@ APR_FLAG_HEADERS( + sys/un.h \ + sys/wait.h) + ++APR_CHECK_INET_ADDR ++APR_CHECK_INET_NETWORK ++ + # IRIX 6.5 has a problem in <netinet/tcp.h> which prevents it from + # being included by itself. Check for <netinet/tcp.h> manually, + # including another header file first. +@@ -2208,7 +2209,8 @@ AC_TRY_RUN([ + #include <sys/types.h> + #include <sys/time.h> + #include <sys/resource.h> +-main() ++#include <stdlib.h> ++int main() + { + struct rlimit limit; + limit.rlim_cur = 0; +@@ -2247,7 +2249,7 @@ AC_TRY_RUN([ + #ifndef SEM_FAILED + #define SEM_FAILED (-1) + #endif +-main() ++int main() + { + sem_t *psem; + const char *sem_name = "/apr_autoconf"; +@@ -2307,6 +2309,7 @@ if test "$threads" = "1"; then + AC_TRY_RUN([ + #include <sys/types.h> + #include <pthread.h> ++#include <stdlib.h> + int main() + { + pthread_mutex_t mutex; +@@ -2435,6 +2438,8 @@ int fd; + struct flock proc_mutex_lock_it = {0}; + const char *fname = "conftest.fcntl"; + ++int lockit(); ++ + int main() + { + int rc, status;; +--- a/poll/os2/pollset.c ++++ b/poll/os2/pollset.c +@@ -308,7 +308,7 @@ APR_DECLARE(apr_status_t) apr_pollset_wakeup(apr_pollset_t *pollset) + + + +-APR_DECLARE(const char *) apr_poll_method_defname() ++APR_DECLARE(const char *) apr_poll_method_defname(void) + { + return "select"; + } +--- a/poll/unix/pollset.c ++++ b/poll/unix/pollset.c +@@ -188,7 +188,7 @@ APR_DECLARE(const char *) apr_pollset_method_name(apr_pollset_t *pollset) + return pollset->provider->name; + } + +-APR_DECLARE(const char *) apr_poll_method_defname() ++APR_DECLARE(const char *) apr_poll_method_defname(void) + { + const apr_pollset_provider_t *provider = NULL; + |