commit:     b6298932089618c5df75fdc5c86929c7e169df35
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 21 04:06:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 04:06:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6298932

dev-perl/Digest-Nilsimsa: fix build w/ clang 16

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

 ...0.0-r3.ebuild => Digest-Nilsimsa-0.60.0-r4.ebuild} |  6 +++++-
 .../files/Digest-Nilsimsa-0.60.0-clang16.patch        | 19 +++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/dev-perl/Digest-Nilsimsa/Digest-Nilsimsa-0.60.0-r3.ebuild 
b/dev-perl/Digest-Nilsimsa/Digest-Nilsimsa-0.60.0-r4.ebuild
similarity index 82%
rename from dev-perl/Digest-Nilsimsa/Digest-Nilsimsa-0.60.0-r3.ebuild
rename to dev-perl/Digest-Nilsimsa/Digest-Nilsimsa-0.60.0-r4.ebuild
index eb631b859acd..ba2130110c56 100644
--- a/dev-perl/Digest-Nilsimsa/Digest-Nilsimsa-0.60.0-r3.ebuild
+++ b/dev-perl/Digest-Nilsimsa/Digest-Nilsimsa-0.60.0-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -15,6 +15,10 @@ LICENSE="GPL-2+ LGPL-2"
 SLOT="0"
 KEYWORDS="~alpha amd64 ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux 
~ppc-macos"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.60.0-clang16.patch
+)
+
 src_compile() {
        mymake=(
                "OPTIMIZE=${CFLAGS}"

diff --git 
a/dev-perl/Digest-Nilsimsa/files/Digest-Nilsimsa-0.60.0-clang16.patch 
b/dev-perl/Digest-Nilsimsa/files/Digest-Nilsimsa-0.60.0-clang16.patch
new file mode 100644
index 000000000000..f8c7cd6b57c1
--- /dev/null
+++ b/dev-perl/Digest-Nilsimsa/files/Digest-Nilsimsa-0.60.0-clang16.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/870895
+https://rt.cpan.org/Public/Bug/Display.html?id=145874
+
+Add missing function prototypes.  This avoids implicit function
+declarations when building Nilsimsa.xs and build failures with future
+compilers.
+
+--- a/nilsimsa.h
++++ b/nilsimsa.h
+@@ -47,6 +47,8 @@ int nilsimsa(struct nsrecord *a,struct nsrecord *b);
+ void aggregate(int n);
+ void codetostr(struct nsrecord *a,char *str);
+ int strtocode(char *str,struct nsrecord *a);
++void makecode(struct nsrecord *a);
++void clear(struct nsrecord *a);
+ 
+ int accbuf(unsigned char *buf,int len,struct nsrecord *a);
+ void dprint(char *msg);
+

Reply via email to