commit:     1952d4a6a76f61055d67ba83bffdaa30a6865790
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 14 03:27:11 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 14 03:27:17 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1952d4a6

dev-vcs/rcs: fix configure w/ clang 16

Closes: https://bugs.gentoo.org/898786
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../rcs/files/rcs-5.10.1-configure-clang16.patch   | 24 ++++++++++++++++++++++
 .../{rcs-5.10.1.ebuild => rcs-5.10.1-r1.ebuild}    | 11 ++++++++--
 2 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/dev-vcs/rcs/files/rcs-5.10.1-configure-clang16.patch 
b/dev-vcs/rcs/files/rcs-5.10.1-configure-clang16.patch
new file mode 100644
index 000000000000..4ad5df89042d
--- /dev/null
+++ b/dev-vcs/rcs/files/rcs-5.10.1-configure-clang16.patch
@@ -0,0 +1,24 @@
+https://savannah.gnu.org/bugs/index.php?64036
+https://bugs.gentoo.org/898786
+
+Include <stdio.h> for the rename and perror functions.  This avoids an
+implicit function declaration and build failures with future compilers.
+--- a/configure.ac
++++ b/configure.ac
+@@ -384,6 +384,7 @@ m4_pushdef([GOOD],[test ! -f conftest-A && test -f 
conftest-B])dnl
+ m4_pushdef([HMMM],[./conftest$EXEEXT && GOOD])dnl
+   ZONK
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++#include <stdio.h>
+ #include <unistd.h>
+ ]],[
+   return 0 > rename ("conftest-A", "conftest-B");
+@@ -480,6 +481,7 @@ AC_DEFINE_UNQUOTED([MMAP_SIGNAL],[${rcs_cv_mmap_signal-0}],
+ 
+ AC_CACHE_CHECK([if `wait' can handle ignored SIGCHLD],[rcs_cv_tolerant_wait],[
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++#include <stdio.h>
+ #include <sys/types.h>
+ #include <errno.h>
+ #include <signal.h>
+

diff --git a/dev-vcs/rcs/rcs-5.10.1.ebuild b/dev-vcs/rcs/rcs-5.10.1-r1.ebuild
similarity index 82%
rename from dev-vcs/rcs/rcs-5.10.1.ebuild
rename to dev-vcs/rcs/rcs-5.10.1-r1.ebuild
index 912c4167c015..8040c42241d1 100644
--- a/dev-vcs/rcs/rcs-5.10.1.ebuild
+++ b/dev-vcs/rcs/rcs-5.10.1-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit flag-o-matic unpacker
+inherit autotools flag-o-matic unpacker
 
 DESCRIPTION="Revision Control System"
 HOMEPAGE="https://www.gnu.org/software/rcs/";
@@ -19,11 +19,18 @@ RDEPEND="sys-apps/diffutils
 DEPEND="${RDEPEND}"
 BDEPEND="$(unpacker_src_uri_depends)"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-5.10.1-configure-clang16.patch
+)
+
 src_prepare() {
        default
 
        sed -i -e '/gets is a security hole/d' \
                lib/stdio.in.h || die
+
+       # Drop when clang 16 patch isn't needed anymore
+       eautoreconf
 }
 
 src_configure() {

Reply via email to