commit:     836dfe489e3087ef00970829697777315ec1f7f6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 20 22:28:33 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 20 22:29:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=836dfe48

dev-libs/libmcrypt: fix -Wimplicit-int

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libmcrypt-2.5.8-implicit-int.patch       | 31 ++++++++++++++++++++++
 ...t-2.5.8-r5.ebuild => libmcrypt-2.5.8-r6.ebuild} |  3 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/dev-libs/libmcrypt/files/libmcrypt-2.5.8-implicit-int.patch 
b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-implicit-int.patch
new file mode 100644
index 000000000000..f504014011e3
--- /dev/null
+++ b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-implicit-int.patch
@@ -0,0 +1,31 @@
+Add return and argument types to fake prototypes in mcrypt_symb.c.
+This avoids build failures with future compilers that do not support
+implicit function declarations.
+
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -23,8 +23,8 @@ mcrypt_symb.c: mcrypt_internal.h
+       @echo "/* This is automatically created. Don't touch... */" >> 
mcrypt_symb.c
+       @echo "" >> mcrypt_symb.c
+       -@for i in $(EXTRA_ALGOS); do \
+-              if test -f ../modules/algorithms/$$i.c; then cat 
../modules/algorithms/$$i.c 2>/dev/null|grep define|grep LTX|awk '{print 
"extern "$$3"();";}' >> mcrypt_symb.c 2>/dev/null; fi; \
+-              if test -f ../modules/modes/$$i.c; then cat 
../modules/modes/$$i.c 2>/dev/null|grep define|grep LTX|awk '{print "extern 
"$$3"();";}' >> mcrypt_symb.c 2>/dev/null; fi; \
++              if test -f ../modules/algorithms/$$i.c; then cat 
../modules/algorithms/$$i.c 2>/dev/null|grep define|grep LTX|awk '{print 
"extern void "$$3"(void);";}' >> mcrypt_symb.c 2>/dev/null; fi; \
++              if test -f ../modules/modes/$$i.c; then cat 
../modules/modes/$$i.c 2>/dev/null|grep define|grep LTX|awk '{print "extern 
void "$$3"(void);";}' >> mcrypt_symb.c 2>/dev/null; fi; \
+       done
+       @echo "" >> mcrypt_symb.c
+       @echo "const mcrypt_preloaded mps[] = {" >> mcrypt_symb.c
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -561,8 +561,8 @@ mcrypt_symb.c: mcrypt_internal.h
+       @echo "/* This is automatically created. Don't touch... */" >> 
mcrypt_symb.c
+       @echo "" >> mcrypt_symb.c
+       -@for i in $(EXTRA_ALGOS); do \
+-              if test -f ../modules/algorithms/$$i.c; then cat 
../modules/algorithms/$$i.c 2>/dev/null|grep define|grep LTX|awk '{print 
"extern "$$3"();";}' >> mcrypt_symb.c 2>/dev/null; fi; \
+-              if test -f ../modules/modes/$$i.c; then cat 
../modules/modes/$$i.c 2>/dev/null|grep define|grep LTX|awk '{print "extern 
"$$3"();";}' >> mcrypt_symb.c 2>/dev/null; fi; \
++              if test -f ../modules/algorithms/$$i.c; then cat 
../modules/algorithms/$$i.c 2>/dev/null|grep define|grep LTX|awk '{print 
"extern void "$$3"(void);";}' >> mcrypt_symb.c 2>/dev/null; fi; \
++              if test -f ../modules/modes/$$i.c; then cat 
../modules/modes/$$i.c 2>/dev/null|grep define|grep LTX|awk '{print "extern 
void "$$3"(void);";}' >> mcrypt_symb.c 2>/dev/null; fi; \
+       done
+       @echo "" >> mcrypt_symb.c
+       @echo "const mcrypt_preloaded mps[] = {" >> mcrypt_symb.c
+

diff --git a/dev-libs/libmcrypt/libmcrypt-2.5.8-r5.ebuild 
b/dev-libs/libmcrypt/libmcrypt-2.5.8-r6.ebuild
similarity index 94%
rename from dev-libs/libmcrypt/libmcrypt-2.5.8-r5.ebuild
rename to dev-libs/libmcrypt/libmcrypt-2.5.8-r6.ebuild
index 54637cd96a4f..3f96b287c0eb 100644
--- a/dev-libs/libmcrypt/libmcrypt-2.5.8-r5.ebuild
+++ b/dev-libs/libmcrypt/libmcrypt-2.5.8-r6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -25,6 +25,7 @@ PATCHES=(
        # 
http://sourceforge.net/tracker/index.php?func=detail&aid=1872801&group_id=87941&atid=584895
        "${FILESDIR}/${P}-uninitialized.patch"
        "${FILESDIR}/${P}-prototypes.patch"
+       "${FILESDIR}/${P}-implicit-int.patch"
 )
 
 src_prepare() {

Reply via email to