summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2021-01-10 04:36:13 +0100
committerLars Wendler <polynomial-c@gentoo.org>2021-01-10 04:36:29 +0100
commit7fe608c5ea9b01ae313c87348f6e2bcd8a8286cf (patch)
tree44abb9074d84dd77d71fdf3fbb36c6d1584e7150 /dev-libs/apr
parentwww-client/firefox: stabilize 78.6.1 on amd64 (diff)
downloadgentoo-7fe608c5ea9b01ae313c87348f6e2bcd8a8286cf.tar.gz
gentoo-7fe608c5ea9b01ae313c87348f6e2bcd8a8286cf.tar.bz2
gentoo-7fe608c5ea9b01ae313c87348f6e2bcd8a8286cf.zip
dev-libs/apr: Fixed build with sys-devel/autoconf-2.70
Thanks-to: Sergei Trofimovich <slyfox@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@gentoo.org>
Diffstat (limited to 'dev-libs/apr')
-rw-r--r--dev-libs/apr/apr-1.7.0-r1.ebuild1
-rw-r--r--dev-libs/apr/files/apr-1.7.0-autoconf-2.70.patch64
2 files changed, 65 insertions, 0 deletions
diff --git a/dev-libs/apr/apr-1.7.0-r1.ebuild b/dev-libs/apr/apr-1.7.0-r1.ebuild
index 090739bcb80f..f4a3aa30f6b1 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 000000000000..488c3c59321d
--- /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])