[gentoo-commits] repo/gentoo:master commit in: dev-libs/libmcrypt/files/, dev-libs/libmcrypt/

2022-10-28 Thread Pacho Ramos
commit: e061c314f7d3a02714453801c581bfa8b66f6fbb
Author: Pacho Ramos  gentoo  org>
AuthorDate: Fri Oct 28 21:29:27 2022 +
Commit: Pacho Ramos  gentoo  org>
CommitDate: Fri Oct 28 22:47:01 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e061c314

dev-libs/libmcrypt: Fixes from Fedora and drop .la files

Closes: https://bugs.gentoo.org/840966
Signed-off-by: Pacho Ramos  gentoo.org>

 .../files/libmcrypt-2.5.8-prototypes.patch | 35 ++
 .../files/libmcrypt-2.5.8-uninitialized.patch  | 12 +++
 dev-libs/libmcrypt/libmcrypt-2.5.8-r5.ebuild   | 41 ++
 3 files changed, 88 insertions(+)

diff --git a/dev-libs/libmcrypt/files/libmcrypt-2.5.8-prototypes.patch 
b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-prototypes.patch
new file mode 100644
index ..eca6e7793161
--- /dev/null
+++ b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-prototypes.patch
@@ -0,0 +1,35 @@
+diff -up libmcrypt-2.5.8/modules/algorithms/des.c.BAD 
libmcrypt-2.5.8/modules/algorithms/des.c
+--- libmcrypt-2.5.8/modules/algorithms/des.c.BAD   2008-08-25 
17:40:29.0 -0400
 libmcrypt-2.5.8/modules/algorithms/des.c   2008-08-25 17:40:51.0 
-0400
+@@ -35,9 +35,12 @@
+ 
+ /* #defineNULL0 */
+ 
+-static void permute_ip(), permute_fp(), perminit_ip(), spinit(),
+-perminit_fp();
+-static word32 f();
++static void permute_ip(char *, DES_KEY *, char *);
++static void permute_fp(char *, DES_KEY *, char *);
++static void perminit_ip(DES_KEY *);
++static void spinit(DES_KEY *);
++static void perminit_fp(DES_KEY *);
++static word32 f(DES_KEY *, register word32, register char *);
+ 
+ 
+ /* Tables defined in the Data Encryption Standard documents */
+diff -up libmcrypt-2.5.8/modules/algorithms/tripledes.c.BAD 
libmcrypt-2.5.8/modules/algorithms/tripledes.c
+--- libmcrypt-2.5.8/modules/algorithms/tripledes.c.BAD 2008-08-25 
17:40:56.0 -0400
 libmcrypt-2.5.8/modules/algorithms/tripledes.c 2008-08-25 
17:41:13.0 -0400
+@@ -36,8 +36,10 @@
+ 
+ /* #defineNULL0 */
+ 
+-static void permute(), perminit(), spinit();
+-static word32 f();
++static void permute(char *, char[16][16][8], char *);
++static void perminit(char[16][16][8], char[64]);
++static void spinit(TRIPLEDES_KEY *, int);
++static word32 f(TRIPLEDES_KEY *, int, register word32, register char *);
+ 
+ 
+ /* Tables defined in the Data Encryption Standard documents */

diff --git a/dev-libs/libmcrypt/files/libmcrypt-2.5.8-uninitialized.patch 
b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-uninitialized.patch
new file mode 100644
index ..f52dc9334b40
--- /dev/null
+++ b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-uninitialized.patch
@@ -0,0 +1,12 @@
+diff -up libmcrypt-2.5.8/modules/algorithms/twofish.c.BAD 
libmcrypt-2.5.8/modules/algorithms/twofish.c
+--- libmcrypt-2.5.8/modules/algorithms/twofish.c.BAD   2008-08-25 
17:38:21.0 -0400
 libmcrypt-2.5.8/modules/algorithms/twofish.c   2008-08-25 
17:38:30.0 -0400
+@@ -499,7 +499,7 @@ static void f_rnd(int i, word32* blk, TW
+ /* encrypt a block of text  */
+ WIN32DLL_DEFINE void _mcrypt_encrypt(TWI * pkey, word32 * in_blk)
+ {
+-  word32 t0, t1, blk[4];
++  word32 t0 = 0, t1 = 0, blk[4];
+ #ifdef WORDS_BIGENDIAN
+   blk[0] = byteswap32(in_blk[0]) ^ pkey->l_key[0];
+   blk[1] = byteswap32(in_blk[1]) ^ pkey->l_key[1];

diff --git a/dev-libs/libmcrypt/libmcrypt-2.5.8-r5.ebuild 
b/dev-libs/libmcrypt/libmcrypt-2.5.8-r5.ebuild
new file mode 100644
index ..cf8ea98d268d
--- /dev/null
+++ b/dev-libs/libmcrypt/libmcrypt-2.5.8-r5.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="libmcrypt provides uniform interface to access several encryption 
algorithms"
+HOMEPAGE="http://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 ~sparc-solaris ~x86-solaris"
+
+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=1872801_id=87941=584895
+   "${FILESDIR}/${P}-uninitialized.patch"
+   "${FILESDIR}/${P}-prototypes.patch"
+)
+
+src_prepare() {
+   default
+   mv configure.in configure.ac
+   mv libltdl/configure.in libltdl/configure.ac
+   sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac 
libltdl/configure.ac || die
+   eautoreconf # need new libtool for interix (elibtoolize would suffice 
for freebsd)
+}
+
+src_install() {
+   default
+   find 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/libmcrypt/files/, dev-libs/libmcrypt/

2021-03-16 Thread Lars Wendler
commit: fb3ef54d0a6a8e3e8e24dddc0b151d1aaeedf38c
Author: Lars Wendler  gentoo  org>
AuthorDate: Tue Mar 16 12:23:34 2021 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Tue Mar 16 13:19:42 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb3ef54d

dev-libs/libmcrypt: Fixed build with >=sys-devel/autoconf-2.70

Closes: https://bugs.gentoo.org/775113
Signed-off-by: Lars Wendler  gentoo.org>

 .../libmcrypt/files/libmcrypt-2.5.8-autoconf-2.70.patch  | 16 
 dev-libs/libmcrypt/libmcrypt-2.5.8-r4.ebuild |  1 +
 2 files changed, 17 insertions(+)

diff --git a/dev-libs/libmcrypt/files/libmcrypt-2.5.8-autoconf-2.70.patch 
b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-autoconf-2.70.patch
new file mode 100644
index 000..0fa3bc0e7ce
--- /dev/null
+++ b/dev-libs/libmcrypt/files/libmcrypt-2.5.8-autoconf-2.70.patch
@@ -0,0 +1,16 @@
+--- libmcrypt-2.5.8/libltdl/configure.in
 libmcrypt-2.5.8/libltdl/configure.in
+@@ -2,13 +2,6 @@
+ 
+ AC_INIT(ltdl.c)
+ 
+-dnl We shouldn't be using these internal macros of autoconf,
+-dnl but CONFIG_AUX_DIR($with_auxdir) breaks automake.
+-AC_ARG_WITH(auxdir,
+-[  --with-auxdir=DIR   path to autoconf auxiliary files],
+-[AC_CONFIG_AUX_DIRS($with_auxdir)],
+-[AC_CONFIG_AUX_DIR_DEFAULT])
+-
+ if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
+   if test -f ${srcdir}/ltmain.sh; then
+ # if libltdl is libtoolized, it is assumed to be stand-alone and

diff --git a/dev-libs/libmcrypt/libmcrypt-2.5.8-r4.ebuild 
b/dev-libs/libmcrypt/libmcrypt-2.5.8-r4.ebuild
index 8aa8182e938..d8332e4f750 100644
--- a/dev-libs/libmcrypt/libmcrypt-2.5.8-r4.ebuild
+++ b/dev-libs/libmcrypt/libmcrypt-2.5.8-r4.ebuild
@@ -21,6 +21,7 @@ DOCS=(
 
 PATCHES=(
"${FILESDIR}/${P}-rotate-mask.patch"
+   "${FILESDIR}/${P}-autoconf-2.70.patch" #775113
 )
 
 src_prepare() {