* [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/
@ 2017-05-31 6:56 Lars Wendler
0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2017-05-31 6:56 UTC (permalink / raw
To: gentoo-commits
commit: a14342e4ce11023ce5eb4b9969d8c6d0a298d80a
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed May 31 06:56:12 2017 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed May 31 06:56:35 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a14342e4
dev-libs/apr: Removed old.
Package-Manager: Portage-2.3.6, Repoman-2.3.2
dev-libs/apr/Manifest | 2 -
dev-libs/apr/apr-1.5.0-r2.ebuild | 139 --------------------
dev-libs/apr/apr-1.5.1-r1.ebuild | 144 ---------------------
.../files/apr-1.5.1-parallel_make_install.patch | 19 ---
4 files changed, 304 deletions(-)
diff --git a/dev-libs/apr/Manifest b/dev-libs/apr/Manifest
index 056054a3308..593061921ed 100644
--- a/dev-libs/apr/Manifest
+++ b/dev-libs/apr/Manifest
@@ -1,3 +1 @@
-DIST apr-1.5.0.tar.bz2 813976 SHA256 17287d36a5917e27281e60d47e7b147bd5ddcd1ca832702c2318f5e0724f1221 SHA512 d54d995a67fe13a619d4781cbfcfae07679d15defa49634ee472c6a93f9521f7964e6e3e366188f1817c01a8fdb98b4ff042e56d8bd9bc379683d6c4ccff2a3e WHIRLPOOL 083da7589f85fb2212b4ced33004ee30848a40cf4718de36a21dfcba15b794dc9b57a9324cdd400e2df74564f9ad27899119de55075f1e0285415471b47f90e7
-DIST apr-1.5.1.tar.bz2 817569 SHA256 e94abe431d4da48425fcccdb27b469bd0f8151488f82e5630a56f26590e198ac SHA512 0d8dea97490cd0b0689eb090d0e32ab9b582e4a0248ea7028e2a44552fc3839013b18cff985547aa9bbb549d93bc4859cca1d8ef95b32d4d4fd610ed19bde435 WHIRLPOOL 553efdefdb58ae44015ef36505c70b52122b750e6c3f63d9ccaa0878efd476dac249a62e2fb644d3e709c372a2805b1d76869c0e9b880b6273f46ef2e9937ace
DIST apr-1.5.2.tar.bz2 826885 SHA256 7d03ed29c22a7152be45b8e50431063736df9e1daa1ddf93f6a547ba7a28f67a SHA512 d1156ad16abf07887797777b56c2147c890f16d8445829b3e3b4917950d24c5fd2f8febd439992467a5ea0511da562c0fb4a7cfd8a235ab55882388bfa2b919d WHIRLPOOL 3f6fbb9410f7cd3ace2f80f361a02b190e14d744f38dbd6f87a5c60b4b1c4a99cd902ba9351a235d9f3bab044a981de21fb6c193d3ab3caba2448bf6c4e1bd1b
diff --git a/dev-libs/apr/apr-1.5.0-r2.ebuild b/dev-libs/apr/apr-1.5.0-r2.ebuild
deleted file mode 100644
index e038238ae89..00000000000
--- a/dev-libs/apr/apr-1.5.0-r2.ebuild
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit autotools eutils libtool multilib toolchain-funcs
-
-DESCRIPTION="Apache Portable Runtime Library"
-HOMEPAGE="http://apr.apache.org/"
-SRC_URI="mirror://apache/apr/${P}.tar.bz2"
-
-LICENSE="Apache-2.0"
-SLOT="1"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc elibc_FreeBSD older-kernels-compatibility selinux static-libs +urandom"
-
-CDEPEND="elibc_glibc? ( >=sys-apps/util-linux-2.16 )
- elibc_mintlib? ( >=sys-apps/util-linux-2.18 )"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-apache )"
-DEPEND="${CDEPEND}
- >=sys-devel/libtool-2.4.2
- doc? ( app-doc/doxygen )"
-
-DOCS=(CHANGES NOTICE README)
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.5.0-mint.patch
- epatch "${FILESDIR}"/${PN}-1.5.0-libtool.patch
- epatch "${FILESDIR}"/${PN}-1.5.0-cross-types.patch
- epatch "${FILESDIR}"/${PN}-1.5.0-sysroot.patch #385775
-
- epatch_user #449048
-
- AT_M4DIR="build" eautoreconf
- elibtoolize
-
- epatch "${FILESDIR}/config.layout.patch"
-}
-
-src_configure() {
- local myconf=()
-
- [[ ${CHOST} == *-mint* ]] && export ac_cv_func_poll=no
-
- 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
- fi
-
- econf \
- --enable-layout=gentoo \
- --enable-nonportable-atomics \
- --enable-threads \
- $(use_enable static-libs static) \
- "${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_install() {
- default
-
- find "${ED}" -name "*.la" -delete
-
- if use doc; then
- dohtml -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 -f "${ED}usr/$(get_libdir)/apr.exp"
-}
diff --git a/dev-libs/apr/apr-1.5.1-r1.ebuild b/dev-libs/apr/apr-1.5.1-r1.ebuild
deleted file mode 100644
index 1321e7bdee7..00000000000
--- a/dev-libs/apr/apr-1.5.1-r1.ebuild
+++ /dev/null
@@ -1,144 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit autotools eutils libtool multilib toolchain-funcs
-
-DESCRIPTION="Apache Portable Runtime Library"
-HOMEPAGE="http://apr.apache.org/"
-SRC_URI="mirror://apache/apr/${P}.tar.bz2"
-
-LICENSE="Apache-2.0"
-SLOT="1"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc elibc_FreeBSD older-kernels-compatibility selinux static-libs +urandom"
-
-CDEPEND="elibc_glibc? ( >=sys-apps/util-linux-2.16 )
- elibc_mintlib? ( >=sys-apps/util-linux-2.18 )"
-RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-apache )"
-DEPEND="${CDEPEND}
- >=sys-devel/libtool-2.4.2
- doc? ( app-doc/doxygen )"
-
-DOCS=(CHANGES NOTICE README)
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.5.0-mint.patch
- epatch "${FILESDIR}"/${PN}-1.5.0-libtool.patch
- epatch "${FILESDIR}"/${PN}-1.5.0-cross-types.patch
- epatch "${FILESDIR}"/${PN}-1.5.0-sysroot.patch #385775
- epatch "${FILESDIR}"/${PN}-1.5.1-parallel_make_install.patch
-
- epatch_user #449048
-
- AT_M4DIR="build" eautoreconf
- elibtoolize
-
- epatch "${FILESDIR}/config.layout.patch"
-}
-
-src_configure() {
- local myconf=()
-
- [[ ${CHOST} == *-mint* ]] && export ac_cv_func_poll=no
-
- 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
- fi
-
- econf \
- --enable-layout=gentoo \
- --enable-nonportable-atomics \
- --enable-posix-shm \
- --enable-threads \
- $(use_enable static-libs static) \
- "${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_install() {
- default
-
- # Prallel install breaks since apr-1.5.1
- #make -j1 DESTDIR="${D}" install || die
-
- prune_libtool_files --all
-
- if use doc; then
- dohtml -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 -f "${ED}usr/$(get_libdir)/apr.exp"
-}
diff --git a/dev-libs/apr/files/apr-1.5.1-parallel_make_install.patch b/dev-libs/apr/files/apr-1.5.1-parallel_make_install.patch
deleted file mode 100644
index a58a229c378..00000000000
--- a/dev-libs/apr/files/apr-1.5.1-parallel_make_install.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-http://www.mail-archive.com/dev@apr.apache.org/msg25738.html
-
---- apr-1.5.1/Makefile.in
-+++ apr-1.5.1/Makefile.in
-@@ -129,11 +129,11 @@
- etags:
- etags `find . -name '*.[ch]'`
-
--make_tools_dir:
-+OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
-+tools/gen_test_char.lo: tools/gen_test_char.c
- $(APR_MKDIR) tools
-+ $(LT_COMPILE)
-
--OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
--tools/gen_test_char.lo: make_tools_dir
- tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
-
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/
@ 2021-01-10 3:36 Lars Wendler
0 siblings, 0 replies; 8+ messages in thread
From: Lars Wendler @ 2021-01-10 3:36 UTC (permalink / raw
To: gentoo-commits
commit: 7fe608c5ea9b01ae313c87348f6e2bcd8a8286cf
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 10 03:36:13 2021 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Jan 10 03:36:29 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fe608c5
dev-libs/apr: Fixed build with sys-devel/autoconf-2.70
Thanks-to: Sergei Trofimovich <slyfox <AT> gentoo.org>
Closes: https://bugs.gentoo.org/750353
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
dev-libs/apr/apr-1.7.0-r1.ebuild | 1 +
dev-libs/apr/files/apr-1.7.0-autoconf-2.70.patch | 64 ++++++++++++++++++++++++
2 files changed, 65 insertions(+)
diff --git a/dev-libs/apr/apr-1.7.0-r1.ebuild b/dev-libs/apr/apr-1.7.0-r1.ebuild
index 090739bcb80..f4a3aa30f6b 100644
--- a/dev-libs/apr/apr-1.7.0-r1.ebuild
+++ b/dev-libs/apr/apr-1.7.0-r1.ebuild
@@ -30,6 +30,7 @@ PATCHES=(
"${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
)
src_prepare() {
diff --git a/dev-libs/apr/files/apr-1.7.0-autoconf-2.70.patch b/dev-libs/apr/files/apr-1.7.0-autoconf-2.70.patch
new file mode 100644
index 00000000000..488c3c59321
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.0-autoconf-2.70.patch
@@ -0,0 +1,64 @@
+From 5593f23e8e062da108ed585535e7281b87346ee1 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed, 25 Nov 2020 09:36:25 +0000
+Subject: [PATCH] build/apr_common.m4: avoid explicit inclusion of
+ '"confdefs.h"'
+
+The failure is observed on `autoconf-2.69d` (soon to be released
+as `autoconf-2.70`). There `int64_t` detection fails as:
+
+```
+$ autoreconf && ./configure
+...
+checking whether int64_t and int use fmt %d... no
+checking whether int64_t and long use fmt %ld... no
+checking whether int64_t and long long use fmt %lld... no
+configure: error: could not determine the string function for int64_t
+```
+
+This happens because `./configure` always stumbles on warning:
+
+```
+configure:3350: gcc -c -g -O2 -Werror conftest.c >&5
+In file included from conftest.c:31:
+confdefs.h:22: error: "__STDC_WANT_IEC_60559_ATTRIBS_EXT__" redefined [-Werror]
+ 22 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
+ |
+```
+
+It's triggered by double inclusion of `"confdefs.h"` contents:
+explicitly in `APR_TRY_COMPILE_NO_WARNING` macro and implicitly
+via `AC_LANG_SOURCE` use.
+
+To fix it and avoid having to define `main()` declaration the change
+uses `AC_LANG_PROGRAM` instead.
+
+Tested on both `autoconf-2.69` and `autoconf-2.69d`.
+
+Bug: https://bugs.gentoo.org/738156
+Bug: https://bugs.gentoo.org/750353
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ build/apr_common.m4 | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/build/apr_common.m4 b/build/apr_common.m4
+index f4e2dfd0a7..6f5782e674 100644
+--- a/build/apr_common.m4
++++ b/build/apr_common.m4
+@@ -504,13 +504,9 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ AC_COMPILE_IFELSE(
+- [AC_LANG_SOURCE(
+- [#include "confdefs.h"
+- ]
+- [[$1]]
+- [int main(int argc, const char *const *argv) {]
++ [AC_LANG_PROGRAM(
++ [[$1]],
+ [[$2]]
+- [ return 0; }]
+ )], [CFLAGS=$apr_save_CFLAGS
+ $3], [CFLAGS=$apr_save_CFLAGS
+ $4])
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/
@ 2022-07-27 20:10 David Seifert
0 siblings, 0 replies; 8+ messages in thread
From: David Seifert @ 2022-07-27 20:10 UTC (permalink / raw
To: gentoo-commits
commit: dd6485e89a94392dfbcf012ca16cadc00f2983ee
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 27 20:09:43 2022 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Jul 27 20:09:43 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd6485e8
dev-libs/apr: drop 1.6.3-r7, 1.6.5-r4
Signed-off-by: David Seifert <soap <AT> gentoo.org>
dev-libs/apr/Manifest | 2 -
dev-libs/apr/apr-1.6.3-r7.ebuild | 164 ---------------------
dev-libs/apr/apr-1.6.5-r4.ebuild | 163 --------------------
...3-fix-overflow-check-in-overflow_strfsize.patch | 21 ---
4 files changed, 350 deletions(-)
diff --git a/dev-libs/apr/Manifest b/dev-libs/apr/Manifest
index d237c17a11d5..c7cbafa5c57b 100644
--- a/dev-libs/apr/Manifest
+++ b/dev-libs/apr/Manifest
@@ -1,3 +1 @@
-DIST apr-1.6.3.tar.bz2 854100 BLAKE2B ac3d38ef201d92bb2e50a35b6f41de6120e6196f1412377eae56f013dfebbe7fe8461fcd4e5e82be275bde51253a7f1c5f708e780203382b64fe61637d97226c SHA512 f6b8679ae7fafff793c825c78775c84a646267c441710a50664589850e13148719b4eab48ab6e7c95b7aed085cff831115687434a7b160dcc2faa0eae63ac996
-DIST apr-1.6.5.tar.bz2 855393 BLAKE2B ee01a841aaf5e98175c77e406baebcd82a2148bb8220f2cfac00d91dff38525606bb0f66ecb549eb6edf1fece53cb4eec4876423a864f09ce42bd0d999dc77e6 SHA512 d3511e320457b5531f565813e626e7941f6b82864852db6aa03dd298a65dbccdcdc4bd580f5314f8be45d268388edab25efe88cf8340b7d2897a4dbe9d0a41fc
DIST apr-1.7.0.tar.bz2 872238 BLAKE2B a8750c45ca6495073a7120f3ae9b858905aecb24b6af5966c3900b06ac1f6d6b55346b17a39a9604cf1b595882335adedf8c8cf4db10e322501bfff4ad7adfe7 SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148
diff --git a/dev-libs/apr/apr-1.6.3-r7.ebuild b/dev-libs/apr/apr-1.6.3-r7.ebuild
deleted file mode 100644
index ab54bd385307..000000000000
--- a/dev-libs/apr/apr-1.6.3-r7.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-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 ~mips ppc ppc64 ~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-fix-overflow-check-in-overflow_strfsize.patch
- "${FILESDIR}"/${PN}-1.6.3-skip-known-failing-tests.patch
-)
-
-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=/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
-
- # Parallel install breaks since apr-1.5.1
- #make -j1 DESTDIR="${D}" install || die
-
- 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 -f "${ED%/}/usr/$(get_libdir)/apr.exp"
-}
diff --git a/dev-libs/apr/apr-1.6.5-r4.ebuild b/dev-libs/apr/apr-1.6.5-r4.ebuild
deleted file mode 100644
index 47fc612f3ec9..000000000000
--- a/dev-libs/apr/apr-1.6.5-r4.ebuild
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-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 ~mips ~ppc ~ppc64 ~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
-)
-
-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
-
- # Parallel install breaks since apr-1.5.1
- #make -j1 DESTDIR="${D}" install || die
-
- 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 -f "${ED%/}/usr/$(get_libdir)/apr.exp"
-}
diff --git a/dev-libs/apr/files/apr-1.6.3-fix-overflow-check-in-overflow_strfsize.patch b/dev-libs/apr/files/apr-1.6.3-fix-overflow-check-in-overflow_strfsize.patch
deleted file mode 100644
index d6e1f54fc074..000000000000
--- a/dev-libs/apr/files/apr-1.6.3-fix-overflow-check-in-overflow_strfsize.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://bz.apache.org/bugzilla/show_bug.cgi?id=62056
-
---- apr-1.6.3.orig/test/teststr.c
-+++ apr-1.6.3.orig/test/teststr.c
-@@ -307,10 +307,15 @@
- for (; off < 999999999; off += 999) {
- apr_strfsize(off, buf);
- }
-- for (off = 1; off < LONG_MAX && off > 0; off *= 2) {
-+
-+ off = 1;
-+ while (1) {
- apr_strfsize(off, buf);
- apr_strfsize(off + 1, buf);
- apr_strfsize(off - 1, buf);
-+ if (off > LONG_MAX / 2)
-+ break;
-+ off *= 2;
- }
-
- ABTS_ASSERT(tc, "strfsize overflowed", buf[5] == '$');
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/
@ 2022-08-20 8:23 Hans de Graaff
0 siblings, 0 replies; 8+ messages in thread
From: Hans de Graaff @ 2022-08-20 8:23 UTC (permalink / raw
To: gentoo-commits
commit: f00c644c3393ceb36ae94a52cad5f56ae4d6f60c
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 20 08:22:07 2022 +0000
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sat Aug 20 08:23:11 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f00c644c
dev-libs/apr: apply fix for CVE-2021-35940
Bug: https://bugs.gentoo.org/828545
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
dev-libs/apr/apr-1.7.0-r5.ebuild | 162 ++++++++++++++++++++++
dev-libs/apr/files/apr-1.7.0-CVE-2021-35940.patch | 53 +++++++
2 files changed, 215 insertions(+)
diff --git a/dev-libs/apr/apr-1.7.0-r5.ebuild b/dev-libs/apr/apr-1.7.0-r5.ebuild
new file mode 100644
index 000000000000..b3db9ef05212
--- /dev/null
+++ b/dev-libs/apr/apr-1.7.0-r5.ebuild
@@ -0,0 +1,162 @@
+# 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
+)
+
+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-CVE-2021-35940.patch b/dev-libs/apr/files/apr-1.7.0-CVE-2021-35940.patch
new file mode 100644
index 000000000000..f23d729f523e
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.0-CVE-2021-35940.patch
@@ -0,0 +1,53 @@
+
+SECURITY: CVE-2021-35940 (cve.mitre.org)
+
+Restore fix for CVE-2017-12613 which was missing in 1.7.x branch, though
+was addressed in 1.6.x in 1.6.3 and later via r1807976.
+
+The fix was merged back to 1.7.x in r1891198.
+
+Since this was a regression in 1.7.0, a new CVE name has been assigned
+to track this, CVE-2021-35940.
+
+Thanks to Iveta Cesalova <icesalov redhat.com> for reporting this issue.
+
+https://svn.apache.org/viewvc?view=revision&revision=1891198
+
+Index: time/unix/time.c
+===================================================================
+--- a/time/unix/time.c (revision 1891197)
++++ b/time/unix/time.c (revision 1891198)
+@@ -142,6 +142,9 @@
+ static const int dayoffset[12] =
+ {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
+
++ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
++ return APR_EBADDATE;
++
+ /* shift new year to 1st March in order to make leap year calc easy */
+
+ if (xt->tm_mon < 2)
+Index: time/win32/time.c
+===================================================================
+--- a/time/win32/time.c (revision 1891197)
++++ b/time/win32/time.c (revision 1891198)
+@@ -54,6 +54,9 @@
+ static const int dayoffset[12] =
+ {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
+
++ if (tm->wMonth < 1 || tm->wMonth > 12)
++ return APR_EBADDATE;
++
+ /* Note; the caller is responsible for filling in detailed tm_usec,
+ * tm_gmtoff and tm_isdst data when applicable.
+ */
+@@ -228,6 +231,9 @@
+ static const int dayoffset[12] =
+ {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
+
++ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
++ return APR_EBADDATE;
++
+ /* shift new year to 1st March in order to make leap year calc easy */
+
+ if (xt->tm_mon < 2)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/
@ 2022-11-13 17:25 James Le Cuirot
0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2022-11-13 17:25 UTC (permalink / raw
To: gentoo-commits
commit: 7080fc27a36a02b528415b262a2a83f0a8462ba9
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 13 17:25:12 2022 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 13 17:25:25 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7080fc27
dev-libs/apr: Apply patch to fix cross-compiling 1.7.0-r6
Fixes detection of /dev/zero. Thanks to Alexandra Parker for the patch.
This has not yet been submitted upstream.
Closes: https://bugs.gentoo.org/830833
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
dev-libs/apr/apr-1.7.0-r6.ebuild | 1 +
dev-libs/apr/files/apr-1.7.0-dev-zero.patch | 34 +++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/dev-libs/apr/apr-1.7.0-r6.ebuild b/dev-libs/apr/apr-1.7.0-r6.ebuild
index 4ba3505bd8f8..4d8630a847e9 100644
--- a/dev-libs/apr/apr-1.7.0-r6.ebuild
+++ b/dev-libs/apr/apr-1.7.0-r6.ebuild
@@ -34,6 +34,7 @@ PATCHES=(
"${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
+ "${FILESDIR}"/${PN}-1.7.0-dev-zero.patch #830833
)
src_prepare() {
diff --git a/dev-libs/apr/files/apr-1.7.0-dev-zero.patch b/dev-libs/apr/files/apr-1.7.0-dev-zero.patch
new file mode 100644
index 000000000000..be6433dd46bc
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.0-dev-zero.patch
@@ -0,0 +1,34 @@
+APR (ab)uses AC_TRY_RUN to determine if:
+
+* We have /dev/zero
+* We can mmap /dev/zero
+
+The APR ebuild sets ac_cv_file__dev_zero=yes when cross compiling
+to fill in an answer for the first question, but the configure script
+immediately defeats that when answering the second.
+
+AC_TRY_FUN takes four arguments: the test, and what happens on success,
+failure, and cross-compiling. The APR script uses this as a "gate" to
+clear ac_cv_file__dev_zero when /dev/zero exists but it turns out not
+to be useable. They take a pessimistic approach: if you can't "prove"
+it is mmap-able, clear the flag.
+
+This patch changes that to leave the flag alone while cross compiling;
+just assume /dev/zero is mmap-able. It relies on ac_cv_file__dev_zero
+to be correctly set for the target. The fourth parameter is changed to
+[:] and not [] because [] engages autoconf's default cross-compiling
+behavior, which raises an error.
+
+Signed-off-by: Alexandra Parker <alex.iris.parker@gmail.com>
+
+--- a/configure.in 2022-01-09 00:31:05.552582255 -0800
++++ b/configure.in 2022-01-09 00:31:19.824582533 -0800
+@@ -1203,7 +1203,7 @@
+ return 3;
+ }
+ return 0;
+- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
++ }], [], [ac_cv_file__dev_zero=no], [:])
+
+ AC_MSG_RESULT($ac_cv_file__dev_zero)
+ fi
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/
@ 2023-02-13 7:04 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2023-02-13 7:04 UTC (permalink / raw
To: gentoo-commits
commit: 7f8fe2b7fedf4372a89b3a11865c04a645a84c88
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 06:28:09 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 06:54:07 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f8fe2b7
dev-libs/apr: add 1.7.2
Bug: https://bugs.gentoo.org/870004
Bug: https://bugs.gentoo.org/875167
Bug: https://bugs.gentoo.org/893406
Closes: https://bugs.gentoo.org/811765
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/apr/Manifest | 1 +
dev-libs/apr/apr-1.7.2.ebuild | 167 +++++++++++++++++++++
.../apr/files/apr-1.7.2-fix-pkgconfig-libs.patch | 35 +++++
dev-libs/apr/files/apr-1.7.2-libtool.patch | 16 ++
dev-libs/apr/files/apr-1.7.2-respect-flags.patch | 22 +++
dev-libs/apr/files/apr-1.7.2-sysroot.patch | 37 +++++
dev-libs/apr/metadata.xml | 1 +
7 files changed, 279 insertions(+)
diff --git a/dev-libs/apr/Manifest b/dev-libs/apr/Manifest
index c7cbafa5c57b..02b7c0352595 100644
--- a/dev-libs/apr/Manifest
+++ b/dev-libs/apr/Manifest
@@ -1 +1,2 @@
DIST apr-1.7.0.tar.bz2 872238 BLAKE2B a8750c45ca6495073a7120f3ae9b858905aecb24b6af5966c3900b06ac1f6d6b55346b17a39a9604cf1b595882335adedf8c8cf4db10e322501bfff4ad7adfe7 SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148
+DIST apr-1.7.2.tar.bz2 890218 BLAKE2B a17ee4311a33acee0bdeb9e5225a198f9dec1b2e0267a742080c77d5342e5052392a5a2100a0ba85f5a192b8679838a7002d4c9a12aa5bdd7921eff025b75d15 SHA512 0a3a27ccc97bbe4865c1bc0b803012e3da6d5b1f17d4fb0da6f5f58eec01f6d2ae1f25e52896ea5f9c5ac04c5fddcfd1ac606b301c322cf40d5c4d4ce0a1b76e
diff --git a/dev-libs/apr/apr-1.7.2.ebuild b/dev-libs/apr/apr-1.7.2.ebuild
new file mode 100644
index 000000000000..771d24bf8a2e
--- /dev/null
+++ b/dev-libs/apr/apr-1.7.2.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools 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 old-kernel selinux static-libs +urandom"
+
+# 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 )
+"
+BDEPEND="
+ >=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.6.3-skip-known-failing-tests.patch
+ "${FILESDIR}"/${PN}-1.7.2-libtool.patch
+ "${FILESDIR}"/${PN}-1.7.2-sysroot.patch # bug #385775
+ "${FILESDIR}"/${PN}-1.7.2-fix-pkgconfig-libs.patch
+ "${FILESDIR}"/${PN}-1.7.2-respect-flags.patch
+ "${FILESDIR}"/config.layout.patch
+)
+
+src_prepare() {
+ default
+
+ mv configure.in configure.ac || die
+ AT_M4DIR="build" eautoreconf
+}
+
+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
+ )
+
+ 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 )
+ elif (( ${CHOST#*-hpux11.} <= 11 )); then
+ : # no /dev/*random on hpux11.11 and before, apr detects this.
+ else
+ myconf+=( --with-devrandom=/dev/random )
+ fi
+
+ # shl_load does not search runpath, but hpux11 supports dlopen
+ if [[ ${CHOST} == *-hpux11* ]]; then
+ myconf+=( --enable-dso=dlfcn )
+ elif [[ ${CHOST} == *-solaris2.10 ]]; then
+ local atomic_contents=$(<$([[ ${CHOST} != ${CBUILD} ]] && echo "${EPREFIX}/usr/${CHOST}")/usr/include/atomic.h)
+
+ case "${atomic_contents}" in
+ *atomic_cas_ptr*)
+ ;;
+ *)
+ local patch_id=$([[ ${CHOST} == sparc* ]] && echo 118884 || echo 118885)
+
+ elog "You do not have Solaris Patch ID ${patch_id} (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 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.2-fix-pkgconfig-libs.patch b/dev-libs/apr/files/apr-1.7.2-fix-pkgconfig-libs.patch
new file mode 100644
index 000000000000..9b4935fe7f0a
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.2-fix-pkgconfig-libs.patch
@@ -0,0 +1,35 @@
+Don't pollute Libs with internal bits like libcrypt.
+
+https://bugs.gentoo.org/811765
+https://sources.debian.org/patches/apr/1.7.2-2/fix-apr.pc.patch/
+https://sources.debian.org/patches/apr/1.7.2-2/omit_extra_libs.patch/
+
+From: <tfheen@debian.org>
+Subject: No description.
+
+--- a/apr.pc.in
++++ b/apr.pc.in
+@@ -7,5 +7,6 @@
+ Name: APR
+ Description: The Apache Portable Runtime library
+ Version: @APR_DOTTED_VERSION@
+-Libs: -L${libdir} -l@APR_LIBNAME@ @EXTRA_LIBS@
+-Cflags: @EXTRA_CPPFLAGS@ @EXTRA_CFLAGS@ -I${includedir}
++Libs: -L${libdir} -l@APR_LIBNAME@
++Libs.private: @EXTRA_LIBS@
++Cflags: @EXTRA_CPPFLAGS@ -I${includedir}
+
+From: Stefan Fritsch <sf@debian.org>
+Subject: #463399
+
+--- a/apr-config.in
++++ b/apr-config.in
+@@ -36,7 +36,7 @@ SHELL="@SHELL@"
+ CPPFLAGS="@EXTRA_CPPFLAGS@"
+ CFLAGS="@EXTRA_CFLAGS@"
+ LDFLAGS="@EXTRA_LDFLAGS@"
+-LIBS="@EXTRA_LIBS@"
++LIBS=""
+ EXTRA_INCLUDES="@EXTRA_INCLUDES@"
+ SHLIBPATH_VAR="@shlibpath_var@"
+ APR_SOURCE_DIR="@apr_srcdir@"
diff --git a/dev-libs/apr/files/apr-1.7.2-libtool.patch b/dev-libs/apr/files/apr-1.7.2-libtool.patch
new file mode 100644
index 000000000000..121e4374f9fc
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.2-libtool.patch
@@ -0,0 +1,16 @@
+generate a local copy of libtool for use in compiling
+
+https://bugs.gentoo.org/374355
+--- a/configure.in
++++ b/configure.in
+@@ -268,9 +268,7 @@ case $host in
+ fi
+ else
+ dnl libtoolize requires that the following not be indented
+- dnl should become LT_INIT(win32-dll)
+-AC_LIBTOOL_WIN32_DLL
+-AC_PROG_LIBTOOL
++LT_INIT(win32-dll)
+ # get libtool's setting of shlibpath_var
+ if test "x$shlibpath_var" = "x"; then
+ eval `grep "^shlibpath_var=[[A-Z_]]*$" $apr_builddir/libtool`
diff --git a/dev-libs/apr/files/apr-1.7.2-respect-flags.patch b/dev-libs/apr/files/apr-1.7.2-respect-flags.patch
new file mode 100644
index 000000000000..f075fc0514d2
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.2-respect-flags.patch
@@ -0,0 +1,22 @@
+https://sources.debian.org/patches/apr/1.7.2-2/dont_override_external_buildflags/
+
+# Don't force apr-using projects to use the compile flags used during
+# apr's compilation.
+--- a/build/apr_rules.mk.in
++++ b/build/apr_rules.mk.in
+@@ -42,10 +42,10 @@ LIBTOOL=@LIBTOOL@
+ # compilation and linking flags that are supposed to be set only by the user.
+ # configure adds to them for tests, but we restore them at the end.
+ #
+-CFLAGS=@CFLAGS@
+-CPPFLAGS=@CPPFLAGS@
+-LDFLAGS=@LDFLAGS@
+-LIBS=@LIBS@
++CFLAGS?=@CFLAGS@
++CPPFLAGS?=@CPPFLAGS@
++LDFLAGS?=@LDFLAGS@
++LIBS?=@LIBS@
+ DEFS=@DEFS@
+
+ # anything added to the standard flags by configure is moved to EXTRA_*
+
diff --git a/dev-libs/apr/files/apr-1.7.2-sysroot.patch b/dev-libs/apr/files/apr-1.7.2-sysroot.patch
new file mode 100644
index 000000000000..3b666ebfd833
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.2-sysroot.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/385775
+
+utilize $SYSROOT to find the right includedir tree
+
+drop the -L/-R paths since we know our libdir is the standard path which
+the compiler already knows how to locate
+--- a/apr-config.in
++++ b/apr-config.in
+@@ -27,8 +27,8 @@ bindir="@bindir@"
+ libdir="@libdir@"
+ datarootdir="@datadir@"
+ datadir="@datadir@"
+-installbuilddir="@installbuilddir@"
+-includedir="@includedir@"
++installbuilddir="${SYSROOT}@installbuilddir@"
++includedir="${SYSROOT}@includedir@"
+
+ CC="@CC@"
+ CPP="@CPP@"
+@@ -199,7 +199,7 @@ while test $# -gt 0; do
+ --link-ld)
+ if test "$location" = "installed"; then
+ ### avoid using -L if libdir is a "standard" location like /usr/lib
+- flags="$flags -L$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
+@@ -218,7 +218,7 @@ while test $# -gt 0; do
+ ### 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
diff --git a/dev-libs/apr/metadata.xml b/dev-libs/apr/metadata.xml
index 94b201450b4b..d898d5a8b907 100644
--- a/dev-libs/apr/metadata.xml
+++ b/dev-libs/apr/metadata.xml
@@ -6,6 +6,7 @@
<name>Apache project</name>
</maintainer>
<use>
+ <flag name="old-kernel">Enable compatibility with older kernels</flag>
<flag name="older-kernels-compatibility">Enable binary compatibility with older kernels</flag>
<flag name="urandom">Use /dev/urandom instead of /dev/random</flag>
</use>
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/
@ 2023-03-20 21:51 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2023-03-20 21:51 UTC (permalink / raw
To: gentoo-commits
commit: c7811b149e4ba00f756c4495ba9511026ca71487
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 20 21:48:52 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 20 21:48:52 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7811b14
dev-libs/apr: fix build w/ autoconf-2.72 (9999)
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/apr/apr-1.7.2-r1.ebuild | 170 +++++++++++++++++++++++
dev-libs/apr/files/apr-1.7.2-autoconf-2.72.patch | 23 +++
2 files changed, 193 insertions(+)
diff --git a/dev-libs/apr/apr-1.7.2-r1.ebuild b/dev-libs/apr/apr-1.7.2-r1.ebuild
new file mode 100644
index 000000000000..9ab51b0ca62a
--- /dev/null
+++ b/dev-libs/apr/apr-1.7.2-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools 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 old-kernel selinux static-libs +urandom"
+
+# 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 )
+"
+BDEPEND="
+ >=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.6.3-skip-known-failing-tests.patch
+ "${FILESDIR}"/${PN}-1.7.2-libtool.patch
+ "${FILESDIR}"/${PN}-1.7.2-sysroot.patch # bug #385775
+ "${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}"/config.layout.patch
+)
+
+src_prepare() {
+ default
+
+ mv configure.in configure.ac || die
+ AT_M4DIR="build" eautoreconf
+}
+
+src_configure() {
+ tc-export AS CC CPP
+
+ 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
+ )
+
+ 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 )
+ elif (( ${CHOST#*-hpux11.} <= 11 )); then
+ : # no /dev/*random on hpux11.11 and before, apr detects this.
+ else
+ myconf+=( --with-devrandom=/dev/random )
+ fi
+
+ # shl_load does not search runpath, but hpux11 supports dlopen
+ if [[ ${CHOST} == *-hpux11* ]]; then
+ myconf+=( --enable-dso=dlfcn )
+ elif [[ ${CHOST} == *-solaris2.10 ]]; then
+ local atomic_contents=$(<$([[ ${CHOST} != ${CBUILD} ]] && echo "${EPREFIX}/usr/${CHOST}")/usr/include/atomic.h)
+
+ case "${atomic_contents}" in
+ *atomic_cas_ptr*)
+ ;;
+ *)
+ local patch_id=$([[ ${CHOST} == sparc* ]] && echo 118884 || echo 118885)
+
+ elog "You do not have Solaris Patch ID ${patch_id} (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 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.2-autoconf-2.72.patch b/dev-libs/apr/files/apr-1.7.2-autoconf-2.72.patch
new file mode 100644
index 000000000000..49d3fd3f1638
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.7.2-autoconf-2.72.patch
@@ -0,0 +1,23 @@
+https://src.fedoraproject.org/rpms/apr/raw/rawhide/f/apr-1.7.2-autoconf.patch
+
+Similar to https://github.com/apache/apr/commit/a15958a37a06f71c42c690278f9c958b93b7ee20.
+--- a/build/apr_common.m4
++++ b/build/apr_common.m4
+@@ -468,15 +468,8 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
+ fi
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+- [
+-#ifndef PACKAGE_NAME
+-#include "confdefs.h"
+-#endif
+- ]
+- [[$1]]
+- [int main(int argc, const char *const *argv) {]
++ [[$1]],
+ [[$2]]
+- [ return 0; }]
+ )], [CFLAGS=$apr_save_CFLAGS
+ $3], [CFLAGS=$apr_save_CFLAGS
+ $4])
+
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/
@ 2024-05-14 9:45 James Le Cuirot
0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2024-05-14 9:45 UTC (permalink / raw
To: gentoo-commits
commit: af5ea045bdf3530b2e01c26f5155e067eac684da
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue May 14 09:40:09 2024 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue May 14 09:40:28 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af5ea045
dev-libs/apr: Fix cross-compiling as using SYSROOT no longer works
The old patch added SYSROOT to some paths shown by apr-config, but the script
now also automatically adjusts the paths when it has been cross-compiled,
leading to the paths being doubled. This removes the SYSROOT hack and forces
it to consider that it might be cross-compiled.
Closes: https://bugs.gentoo.org/931829
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
dev-libs/apr/apr-1.7.4-r3.ebuild | 163 +++++++++++++++++++++++
dev-libs/apr/files/apr-1.7.4-config-cross.patch | 19 +++
dev-libs/apr/files/apr-1.7.4-config-libdir.patch | 17 +++
3 files changed, 199 insertions(+)
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-05-14 9:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14 9:45 [gentoo-commits] repo/gentoo:master commit in: dev-libs/apr/, dev-libs/apr/files/ James Le Cuirot
-- strict thread matches above, loose matches on Subject: below --
2023-03-20 21:51 Sam James
2023-02-13 7:04 Sam James
2022-11-13 17:25 James Le Cuirot
2022-08-20 8:23 Hans de Graaff
2022-07-27 20:10 David Seifert
2021-01-10 3:36 Lars Wendler
2017-05-31 6:56 Lars Wendler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox