public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libmcrypt/, dev-libs/libmcrypt/files/
@ 2023-04-20 22:30 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-04-20 22:30 UTC (permalink / raw
  To: gentoo-commits

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() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libmcrypt/, dev-libs/libmcrypt/files/
@ 2023-12-16  8:24 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-12-16  8:24 UTC (permalink / raw
  To: gentoo-commits

commit:     ea1df205e5207db476ea62971db3d64d345d46e7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 16 08:15:08 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 16 08:23:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea1df205

dev-libs/libmcrypt: fix more modern C issues

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

 .../libmcrypt/files/libmcrypt-2.5.8-c99-2.patch    | 42 ++++++++++++++++
 dev-libs/libmcrypt/files/libmcrypt-2.5.8-c99.patch | 56 ++++++++++++++++++++++
 dev-libs/libmcrypt/libmcrypt-2.5.8-r7.ebuild       | 45 +++++++++++++++++
 3 files changed, 143 insertions(+)

diff --git a/dev-libs/libmcrypt/files/libmcrypt-2.5.8-c99-2.patch b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-c99-2.patch
new file mode 100644
index 000000000000..ba2236de6c42
--- /dev/null
+++ b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-c99-2.patch
@@ -0,0 +1,42 @@
+https://src.fedoraproject.org/rpms/libmcrypt/blob/e02fbd614a5b7ba093e9e15ab322e7eb02d64e3b/f/libmcrypt-configure-c99-2.patch
+
+Fix glitches in the readdir and bcopy probes.  They were
+just invalid.
+
+diff --git a/configure b/configure
+index d0fb8783e147654b..4fe7660a16359171 100755
+--- a/configure
++++ b/configure
+@@ -6639,7 +6639,7 @@ fi
+ done
+ 
+ 
+-for ac_func in readdir,,
++for ac_func in readdir
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ echo "$as_me:$LINENO: checking for $ac_func" >&5
+@@ -6741,7 +6741,7 @@ fi
+ done
+ 
+ 
+-for ac_func in bcopy,,
++for ac_func in bcopy
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ echo "$as_me:$LINENO: checking for $ac_func" >&5
+diff --git a/configure.in b/configure.in
+index a815778931728ec2..f0c9a0e8f73e1153 100644
+--- a/configure.in
++++ b/configure.in
+@@ -204,8 +204,8 @@ AC_FUNC_MEMCMP
+ AC_FUNC_REALLOC
+ 
+ AC_CHECK_FUNCS([bzero memmove memset mlock readdir_r strchr strdup strrchr])
+-AC_CHECK_FUNCS([readdir,,])
+-AC_CHECK_FUNCS([bcopy,,])
++AC_CHECK_FUNCS([readdir])
++AC_CHECK_FUNCS([bcopy])
+ 
+ dnl Checks for libraries.
+ AC_C_BIGENDIAN

diff --git a/dev-libs/libmcrypt/files/libmcrypt-2.5.8-c99.patch b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-c99.patch
new file mode 100644
index 000000000000..25c555c99627
--- /dev/null
+++ b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-c99.patch
@@ -0,0 +1,56 @@
+https://src.fedoraproject.org/rpms/libmcrypt/blob/e02fbd614a5b7ba093e9e15ab322e7eb02d64e3b/f/libmcrypt-c99.patch
+
+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.
+
+Also fix a minor type error in the perminit calls in the Triple DES
+implementation.
+
+Submitted upstream: <https://sourceforge.net/p/mcrypt/patches/15/>
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index a1a09578858aaf3c..a92f150627a1f610 100644
+--- 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
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index 1baaa1e94be1abce..e0e690d1c831370f 100644
+--- 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/modules/algorithms/tripledes.c b/modules/algorithms/tripledes.c
+index 98e9bd45b4f336b1..2737d2fd8fd02a3f 100644
+--- a/modules/algorithms/tripledes.c
++++ b/modules/algorithms/tripledes.c
+@@ -201,8 +201,8 @@ static int _mcrypt_desinit(TRIPLEDES_KEY * key)
+ 	spinit(key, 0);
+ 	spinit(key, 1);
+ 	spinit(key, 2);
+-	perminit(&key->iperm, ip);
+-	perminit(&key->fperm, fp);
++	perminit(key->iperm, ip);
++	perminit(key->fperm, fp);
+ 
+ 
+ 	return 0;

diff --git a/dev-libs/libmcrypt/libmcrypt-2.5.8-r7.ebuild b/dev-libs/libmcrypt/libmcrypt-2.5.8-r7.ebuild
new file mode 100644
index 000000000000..3f3d5b686185
--- /dev/null
+++ b/dev-libs/libmcrypt/libmcrypt-2.5.8-r7.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Provides an uniform interface to access several encryption algorithms"
+HOMEPAGE="https://mcrypt.sourceforge.net"
+SRC_URI="mirror://sourceforge/mcrypt/${P}.tar.gz"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+
+DOCS=(
+	AUTHORS NEWS README THANKS TODO ChangeLog
+	doc/README.config doc/README.key doc/README.xtea
+	doc/example.c
+)
+
+PATCHES=(
+	"${FILESDIR}/${P}-rotate-mask.patch"
+	"${FILESDIR}/${P}-autoconf-2.70.patch" #775113
+	# 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}-c99.patch"
+	"${FILESDIR}/${P}-c99-2.patch"
+)
+
+src_prepare() {
+	default
+
+	mv configure.in configure.ac || die
+	mv libltdl/configure.in libltdl/configure.ac || die
+	sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac libltdl/configure.ac || die
+
+	eautoreconf # update stale autotools
+}
+
+src_install() {
+	default
+	find "${ED}" -type f -name '*.la' -delete || die
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-16  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20 22:30 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libmcrypt/, dev-libs/libmcrypt/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-12-16  8:24 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox