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

2024-03-03 Thread Sam James
commit: 741aaf3c9b3093bb21c137f2dd1293ad3b21793b
Author: Sam James  gentoo  org>
AuthorDate: Mon Mar  4 02:57:23 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Mar  4 02:57:23 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=741aaf3c

dev-libs/libgcrypt: drop 1.9.4-r2, 1.10.1-r2, 1.10.1-r3, 1.10.3

Signed-off-by: Sam James  gentoo.org>

 dev-libs/libgcrypt/Manifest|   4 -
 .../libgcrypt-1.10-build-Allow-build-with-Oz.patch |  50 --
 .../files/libgcrypt-1.10.1-configure-clang16.patch | 134 ---
 .../libgcrypt-1.9.4-arm-neon-compile-fix.patch |  44 -
 dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild  | 176 
 dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild  | 179 
 dev-libs/libgcrypt/libgcrypt-1.10.3.ebuild | 180 -
 dev-libs/libgcrypt/libgcrypt-1.9.4-r2.ebuild   | 142 
 8 files changed, 909 deletions(-)

diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest
index 3160e534cd66..2bbd8c896934 100644
--- a/dev-libs/libgcrypt/Manifest
+++ b/dev-libs/libgcrypt/Manifest
@@ -1,8 +1,4 @@
-DIST libgcrypt-1.10.1.tar.bz2 3778457 BLAKE2B 
46f30459891183b6d9ec18f1c7907fee0ad156c7dd75044f3db2b4d1c19dc6f30b2dfa6f85bc82adc9243aaba913e40fb6faf77d2226ca5a33897220d032437a
 SHA512 
e5ca7966624fff16c3013795836a2c4377f0193dbb4ac5ad2b79654b1fa8992e17d83816569a402212dc8367a7980d4141f5d6ac282bae6b9f02186365b61f13
-DIST libgcrypt-1.10.1.tar.bz2.sig 119 BLAKE2B 
5261d7dbfd5d82b2d3fa2ebf864a9ef0c7c978dd66a71c078df7bbb3b63f5d85180e5f909f43a49712fc16c45f7aabaa6bc30ed82a39ffc9a5d483ea6a94d162
 SHA512 
b156ae05079776698bc95ba5a9e48e95de8f716aa1760ef4b2e7cb8518ccec660337fc7823f865bde870461800d472fd8e458d03a7095b6bb614f6dd96f796d8
 DIST libgcrypt-1.10.2.tar.bz2 3795164 BLAKE2B 
c86b29648664aae3fb694b20ad258828d2cecbb09db2b83df00fbdebd5d74228c92015c50f659c250cb0768ccaef7949294d9b7cdcd47e1387b7dce81d35da19
 SHA512 
3a850baddfe8ffe8b3e96dc54af3fbb9e1dab204db1f06b9b90b8fbbfb7fb7276260cd1e61ba4dde5a662a2385385007478834e62e95f785d2e3d32652adb29e
 DIST libgcrypt-1.10.2.tar.bz2.sig 119 BLAKE2B 
3753134a1ed1fd2bfd2c64f175c3745db02791359646b3f0229c80ce4ccedbb147ee889a6b8c4fe4bf7e9067d804ee18a8411cd347026cd1656ad1d4d5686bec
 SHA512 
9350444a0bcfa49217815a831f2286ccea470311673257bd809eb5dedbe97d2a5543b0bc7fb752312df69adeb7ac5f064e433f2545a8bf3e494027986cd8020c
 DIST libgcrypt-1.10.3.tar.bz2 3783827 BLAKE2B 
1a228e02820e886016eb55dee75936c4422a15fb4f95a2f9bcd1e4faac4015d4321c7c8d23f164eb08ece5d62935ab3b3d3104eabfdd22db997ab3e5689dfa6f
 SHA512 
8a8d4c61a6622d8481ceb9edc88ec43f58da32e316f79f8d4775325a48f8936aaa9eb355923b39e2c267b784e9c390600daeb62e0c94f00e30bbadb0d8c0865d
 DIST libgcrypt-1.10.3.tar.bz2.sig 238 BLAKE2B 
216baebca91b2e940f60d70a4260b6b6b8221ef88cfb42b020bc7b3743a465ef2cf105316648ed1e689cbbf7d79da421aa9f08b5af21c5b862734cf01f377214
 SHA512 
73795781a458c334ec6daade1b86ae8b788dd5da0b7198b46b8e54a103c5ec4c65a5dd7e6a9d173d136889f24e7f5721992f59117334f39bd1c8a94e3b55a048
-DIST libgcrypt-1.9.4.tar.bz2 3239704 BLAKE2B 
b8244bc12a68955797b0c2b474ac5c95df1014231f7180a2ffa113e3aacedc98eed60ee1e4b30b032a5fcd6a04855ae07142c223906d5db9c28328a71e014f33
 SHA512 
d0e117ac73c94d70e9521ee1e6328691498cc8328f8c4e21338096908f5c04c7b838966eb63d59494565f4e19f506c07dab4f4d922150d75610d9f7b57abbf60
-DIST libgcrypt-1.9.4.tar.bz2.sig 119 BLAKE2B 
4012c22259a9fd56f9da6c87d60077cea0dbfef85d4d4ad1ff6a2375ddefafc4cd03ee9083d18e080c14c95887b495062af886732a9593bcf1b8f187d21073fe
 SHA512 
4aee16449b4b50dac62bd80217e769f32f43fb7cd994402b7d9cffbb1934b2771041c8c0c41a63ced9c8d9408025f9c5608ffc7f00e5e9a9b92a07cb5118a98a

diff --git 
a/dev-libs/libgcrypt/files/libgcrypt-1.10-build-Allow-build-with-Oz.patch 
b/dev-libs/libgcrypt/files/libgcrypt-1.10-build-Allow-build-with-Oz.patch
deleted file mode 100644
index c54499e15dba..
--- a/dev-libs/libgcrypt/files/libgcrypt-1.10-build-Allow-build-with-Oz.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-https://bugs.gentoo.org/902765
-https://dev.gnupg.org/T6432
-https://dev.gnupg.org/rC7edf1abb9a0d892a80cbf7ab42f64b2720671ee9
-
-From 7edf1abb9a0d892a80cbf7ab42f64b2720671ee9 Mon Sep 17 00:00:00 2001
-From: NIIBE Yutaka 
-Date: Mon, 3 Apr 2023 14:00:15 +0900
-Subject: [PATCH] build: Allow build with -Oz.
-
-* cipher/Makefile.am [ENABLE_O_FLAG_MUNGING]: Support -Oz.
-* random/Makefile.am [ENABLE_O_FLAG_MUNGING]: Support -Oz.
-
---
-
-GnuPG-bug-id: 6432
-Signed-off-by: NIIBE Yutaka 

- cipher/Makefile.am | 2 +-
- random/Makefile.am | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cipher/Makefile.am b/cipher/Makefile.am
-index cf1fbe85..e67b1ee2 100644
 a/cipher/Makefile.am
-+++ b/cipher/Makefile.am
-@@ -165,7 +165,7 @@ gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c
- 
- 
- if ENABLE_O_FLAG_MUNGING
--o_flag_munging = sed -e 's/-O\([2-9sg][2-9sg]*\)/-O1/' -e 's/-Ofast/-O1/g'
-+o_flag_munging = sed -e 

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

2022-12-04 Thread Sam James
commit: c83f55a74056999bbced2e91f4664172b63f9a2c
Author: Sam James  gentoo  org>
AuthorDate: Mon Dec  5 03:52:52 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Dec  5 03:52:52 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83f55a7

dev-libs/libgcrypt: fix configure w/ clang 16

Signed-off-by: Sam James  gentoo.org>

 .../files/libgcrypt-1.10.1-configure-clang16.patch | 134 +
 dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild  | 164 +
 2 files changed, 298 insertions(+)

diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.10.1-configure-clang16.patch 
b/dev-libs/libgcrypt/files/libgcrypt-1.10.1-configure-clang16.patch
new file mode 100644
index ..fa80c999a3aa
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.10.1-configure-clang16.patch
@@ -0,0 +1,134 @@
+https://lists.gnupg.org/pipermail/gcrypt-devel/2022-December/005410.html
+
+--- a/configure.ac
 b/configure.ac
+@@ -1211,7 +1211,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for 
ARM assembly implementat
+ /* Test if '.type' and '.size' are supported.  */
+ ".size asmfunc,.-asmfunc;\n\t"
+ ".type asmfunc,%function;\n\t"
+-  );]], [ asmfunc(); ] )],
++  );
++void asmfunc(void);]], [ asmfunc(); ] )],
+ [gcry_cv_gcc_arm_platform_as_ok=yes])
+ fi])
+ if test "$gcry_cv_gcc_arm_platform_as_ok" = "yes" ; then
+@@ -1238,7 +1239,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for 
ARMv8/Aarch64 assembly i
+ "eor x0, x0, x30, ror #12;\n\t"
+ "add x0, x0, x30, asr #12;\n\t"
+ "eor v0.16b, v0.16b, v31.16b;\n\t"
+-  );]], [ asmfunc(); ] )],
++  );
++void asmfunc(void);]], [ asmfunc(); ] )],
+ [gcry_cv_gcc_aarch64_platform_as_ok=yes])
+ fi])
+ if test "$gcry_cv_gcc_aarch64_platform_as_ok" = "yes" ; then
+@@ -1267,7 +1269,8 @@ AC_CACHE_CHECK([whether GCC assembler supports for CFI 
directives],
+ ".cfi_restore_state\n\t"
+ ".long 0\n\t"
+ ".cfi_endproc\n\t"
+-);]])],
++);
++  void asmfunc(void)]])],
+   [gcry_cv_gcc_asm_cfi_directives=yes])])
+ if test "$gcry_cv_gcc_asm_cfi_directives" = "yes" ; then
+AC_DEFINE(HAVE_GCC_ASM_CFI_DIRECTIVES,1,
+@@ -1666,7 +1669,8 @@ if test $amd64_as_feature_detection = yes; then
+[gcry_cv_gcc_as_const_division_ok],
+[gcry_cv_gcc_as_const_division_ok=no
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+-  [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), 
%ebp;\n\t");]],
++  [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), 
%ebp;\n\t");
++  void fn(void);]],
+ [fn();])],
+   [gcry_cv_gcc_as_const_division_ok=yes])])
+   if test "$gcry_cv_gcc_as_const_division_ok" = "no" ; then
+@@ -1679,7 +1683,8 @@ if test $amd64_as_feature_detection = yes; then
+  [gcry_cv_gcc_as_const_division_with_wadivide_ok],
+  [gcry_cv_gcc_as_const_division_with_wadivide_ok=no
+   AC_LINK_IFELSE([AC_LANG_PROGRAM(
+-[[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), 
%ebp;\n\t");]],
++[[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), 
%ebp;\n\t");
++void fn(void);]],
+   [fn();])],
+ [gcry_cv_gcc_as_const_division_with_wadivide_ok=yes])])
+ if test "$gcry_cv_gcc_as_const_division_with_wadivide_ok" = "no" ; then
+@@ -1715,7 +1720,8 @@ if test $amd64_as_feature_detection = yes; then
+* and "-Wa,--divide" workaround failed, this causes assembly
+* to be disable on this machine. */
+   "xorl \$(123456789/12345678), %ebp;\n\t"
+-);]], [ asmfunc(); ])],
++);
++  void asmfunc(void);]], [ asmfunc(); ])],
+   [gcry_cv_gcc_amd64_platform_as_ok=yes])
+ fi])
+   if test "$gcry_cv_gcc_amd64_platform_as_ok" = "yes" ; then
+@@ -1734,7 +1740,8 @@ if test $amd64_as_feature_detection = yes; then
+   ".globl asmfunc\n\t"
+   "asmfunc:\n\t"
+   "xorq \$(1234), %rbp;\n\t"
+-  );]], [ asmfunc(); ])],
++  );
++void asmfunc(void);]], [ asmfunc(); ])],
+ [gcry_cv_gcc_win64_platform_as_ok=yes])])
+ if test "$gcry_cv_gcc_win64_platform_as_ok" = "yes" ; then
+   AC_DEFINE(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS,1,
+@@ -1767,7 +1774,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for 
Intel syntax assembly im
+ "sub eax, [esp + 4];\n\t"
+ "add dword ptr [esp + eax], 0b10101;\n\t"
+ ".att_syntax prefix\n\t"
+-);]], [ actest(); ])],
++);
++  void actest(void);]], [ actest(); ])],
+   [gcry_cv_gcc_platform_as_ok_for_intel_syntax=yes])
+ 

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

2022-06-15 Thread Sam James
commit: b54b910baa46dac7f6f78ca0889799e639becf83
Author: Sam James  gentoo  org>
AuthorDate: Wed Jun 15 20:58:01 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jun 15 20:58:01 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b54b910b

dev-libs/libgcrypt: backport -asm patch for HPPA

Closes: https://bugs.gentoo.org/832871
Signed-off-by: Sam James  gentoo.org>

 .../files/libgcrypt-1.10.1-fix-no-asm-hppa.patch   |  35 ++
 dev-libs/libgcrypt/libgcrypt-1.10.1-r1.ebuild  | 128 +
 2 files changed, 163 insertions(+)

diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.10.1-fix-no-asm-hppa.patch 
b/dev-libs/libgcrypt/files/libgcrypt-1.10.1-fix-no-asm-hppa.patch
new file mode 100644
index ..e665749db3a5
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.10.1-fix-no-asm-hppa.patch
@@ -0,0 +1,35 @@
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=c0692324fe8b3806eefc5017767917dca9cd94d0
+https://dev.gnupg.org/T5976
+https://bugs.gentoo.org/832871
+
+From c0692324fe8b3806eefc5017767917dca9cd94d0 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka 
+Date: Tue, 17 May 2022 10:44:55 +0900
+Subject: [PATCH] mpi: Allow building with --disable-asm for HPPA.
+
+* mpi/longlong.h [__hppa] (udiv_qrnnd): Only define
+when assembler is enabled.
+
+--
+
+GnuPG-bug-id: 5976
+Signed-off-by: NIIBE Yutaka 
+--- a/mpi/longlong.h
 b/mpi/longlong.h
+@@ -430,14 +430,14 @@ extern UDItype __udiv_qrnnd ();
+ #  define UMUL_TIME 40
+ #  define UDIV_TIME 80
+ # endif
+-# ifndef LONGLONG_STANDALONE
++# if !defined(LONGLONG_STANDALONE) && !defined(ASM_DISABLED)
+ #  define udiv_qrnnd(q, r, n1, n0, d) \
+   do { USItype __r;   \
+ (q) = __udiv_qrnnd (&__r, (n1), (n0), (d));   \
+ (r) = __r;
\
+   } while (0)
+ extern USItype __udiv_qrnnd ();
+-# endif /* !LONGLONG_STANDALONE */
++# endif /* !LONGLONG_STANDALONE && !ASM_DISABLED */
+ # define count_leading_zeros(count, x) \
+   do {   \
+ USItype __tmp;   \

diff --git a/dev-libs/libgcrypt/libgcrypt-1.10.1-r1.ebuild 
b/dev-libs/libgcrypt/libgcrypt-1.10.1-r1.ebuild
new file mode 100644
index ..b7a3aa4aaf26
--- /dev/null
+++ b/dev-libs/libgcrypt/libgcrypt-1.10.1-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs verify-sig
+
+DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
+HOMEPAGE="https://www.gnupg.org/;
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0/20" # subslot = soname major version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 
cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 
cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock 
cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc static-libs"
+
+# Build system only has --disable-arm-crypto-support right now
+# If changing this, update src_configure logic too.
+# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
+# but this looks like it might change in future. This is just a safety check
+# in case people somehow do have a CPU which only supports some. They must
+# for now disable them all if that's the case.
+REQUIRED_USE="
+   cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
+   cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
+   cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )
+   cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 )
+   cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
+"
+
+RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( virtual/texi2dvi )
+   verify-sig? ( sec-keys/openpgp-keys-gnupg )"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-multilib-syspath.patch
+   "${FILESDIR}"/${PN}-powerpc-darwin.patch
+   "${FILESDIR}"/${PN}-1.10.1-fix-no-asm-hppa.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+   /usr/bin/libgcrypt-config
+)
+
+src_prepare() {
+   default
+   eautoreconf
+}
+
+multilib_src_configure() {
+   if [[ ${CHOST} == *86*-solaris* ]] ; then
+   # ASM code uses GNU ELF syntax, divide in particular, we need to
+   # allow this via 

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

2022-02-10 Thread Sam James
commit: c20b92558b8c696c07ad55aa46f21bb2d931703b
Author: Sam James  gentoo  org>
AuthorDate: Thu Feb 10 11:57:23 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Feb 10 12:05:45 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c20b9255

dev-libs/libgcrypt: add musl build patch for 1.10.0

Signed-off-by: Sam James  gentoo.org>

 ...gcrypt-1.10.0-musl-jitterentropy-includes.patch | 26 ++
 dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild |  2 ++
 2 files changed, 28 insertions(+)

diff --git 
a/dev-libs/libgcrypt/files/libgcrypt-1.10.0-musl-jitterentropy-includes.patch 
b/dev-libs/libgcrypt/files/libgcrypt-1.10.0-musl-jitterentropy-includes.patch
new file mode 100644
index ..205944dd7a1b
--- /dev/null
+++ 
b/dev-libs/libgcrypt/files/libgcrypt-1.10.0-musl-jitterentropy-includes.patch
@@ -0,0 +1,26 @@
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=ffaef0be613121d3ee37867d82932a7a30c2bc6d
+
+From: Heiko Becker 
+Date: Thu, 3 Feb 2022 22:46:41 +
+Subject: [PATCH] jitterentropy: Include  and 
+
+* random/jitterentropy-base-user.h: Include  for O_RDONLY
+* random/jitterentropy-base-user.h: Include  for LONG_MAX
+
+--
+
+Fixes the build with musl libc.
+
+Signed-off-by: Heiko Becker 
+--- a/random/jitterentropy-base-user.h
 b/random/jitterentropy-base-user.h
+@@ -39,6 +39,9 @@
+  * DAMAGE.
+  */
+ 
++#include 
++#include 
++
+ #ifndef GCRYPT_JITTERENTROPY_BASE_USER_H
+ #define GCRYPT_JITTERENTROPY_BASE_USER_H
+ 

diff --git a/dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild 
b/dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild
index 513ccf607690..de6cdbebc481 100644
--- a/dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild
+++ b/dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild
@@ -38,6 +38,8 @@ BDEPEND="doc? ( virtual/texi2dvi )
 PATCHES=(
"${FILESDIR}"/${PN}-multilib-syspath.patch
"${FILESDIR}"/${PN}-powerpc-darwin.patch
+
+   "${FILESDIR}"/${P}-musl-jitterentropy-includes.patch
 )
 
 MULTILIB_CHOST_TOOLS=(



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

2021-12-27 Thread Fabian Groffen
commit: 5d716d5d68f836022655aafc3086d4c2abfa4542
Author: Fabian Groffen  gentoo  org>
AuthorDate: Mon Dec 27 12:52:58 2021 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Mon Dec 27 12:57:48 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d716d5d

dev-libs/libgcrypt-1.9.4: fix compilation for ppc-macos

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Fabian Groffen  gentoo.org>

 dev-libs/libgcrypt/files/libgcrypt-powerpc-darwin.patch | 16 
 dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild   |  1 +
 2 files changed, 17 insertions(+)

diff --git a/dev-libs/libgcrypt/files/libgcrypt-powerpc-darwin.patch 
b/dev-libs/libgcrypt/files/libgcrypt-powerpc-darwin.patch
new file mode 100644
index ..f1c7cf9e9500
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-powerpc-darwin.patch
@@ -0,0 +1,16 @@
+Drop guard for CPU detection, configure won't get this wrong, and this
+check fails on some PPC platforms where these guards aren't set (due to
+different kernel/libc).
+
+--- a/src/hwf-ppc.c
 b/src/hwf-ppc.c
+@@ -33,9 +33,6 @@
+ #include "g10lib.h"
+ #include "hwf-common.h"
+ 
+-#if !defined (__powerpc__) && !defined (__powerpc64__)
+-# error Module build for wrong CPU.
+-#endif
+ 
+ 
+ #if defined(HAVE_SYS_AUXV_H) && defined(HAVE_ELF_AUX_INFO) && \

diff --git a/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild 
b/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild
index 584154b6ff2d..544ba718baee 100644
--- a/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild
+++ b/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild
@@ -20,6 +20,7 @@ BDEPEND="doc? ( virtual/texi2dvi )"
 
 PATCHES=(
"${FILESDIR}"/${PN}-multilib-syspath.patch
+   "${FILESDIR}"/${PN}-powerpc-darwin.patch
 )
 
 MULTILIB_CHOST_TOOLS=(



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

2021-01-29 Thread Sam James
commit: c31ae3b3a3df3277b878f88de17d508bde370aee
Author: Sam James  gentoo  org>
AuthorDate: Fri Jan 29 20:43:14 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jan 29 20:45:50 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c31ae3b3

dev-libs/libgcrypt: fix USE=-asm build

Closes: https://bugs.gentoo.org/767859
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Sam James  gentoo.org>

 .../libgcrypt-1.9.1-fix-no-asm-on-amd64-x86.patch  | 141 +
 ...rypt-1.9.1.ebuild => libgcrypt-1.9.1-r1.ebuild} |   1 +
 2 files changed, 142 insertions(+)

diff --git 
a/dev-libs/libgcrypt/files/libgcrypt-1.9.1-fix-no-asm-on-amd64-x86.patch 
b/dev-libs/libgcrypt/files/libgcrypt-1.9.1-fix-no-asm-on-amd64-x86.patch
new file mode 100644
index 000..875c2237008
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.9.1-fix-no-asm-on-amd64-x86.patch
@@ -0,0 +1,141 @@
+Broken in 
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=8d404a629167d67ed56e45de3e65d1e0b7cdeb24;hp=3b34bd6e178614d6021ee7d1140646f7c8ed7519
+https://dev.gnupg.org/T5277
+https://bugs.gentoo.org/767859
+
+This is a revert of that commit, as suggested by upstream in the linked bug.
+diff --git a/random/rand-internal.h b/random/rand-internal.h
+index 34221569..d99c6671 100644
+--- a/random/rand-internal.h
 b/random/rand-internal.h
+@@ -141,7 +141,7 @@ void _gcry_rndhw_poll_fast (void (*add)(const void*, 
size_t,
+ enum random_origins origin);
+ size_t _gcry_rndhw_poll_slow (void (*add)(const void*, size_t,
+   enum random_origins),
+-  enum random_origins origin, size_t req_length);
++  enum random_origins origin);
+ 
+ 
+ 
+diff --git a/random/rndhw.c b/random/rndhw.c
+index 3cf9acc3..2829382c 100644
+--- a/random/rndhw.c
 b/random/rndhw.c
+@@ -198,33 +198,24 @@ _gcry_rndhw_poll_fast (void (*add)(const void*, size_t, 
enum random_origins),
+ 
+ 
+ /* Read 64 bytes from a hardware RNG and return the number of bytes
+-   actually read.  However hardware source is let account only
+-   for up to 50% (or 25% for RDRAND) of the requested bytes.  */
++   actually read.  */
+ size_t
+ _gcry_rndhw_poll_slow (void (*add)(const void*, size_t, enum random_origins),
+-   enum random_origins origin, size_t req_length)
++   enum random_origins origin)
+ {
+   size_t nbytes = 0;
+ 
+   (void)add;
+   (void)origin;
+ 
+-  req_length /= 2; /* Up to 50%. */
+-
+ #ifdef USE_DRNG
+   if ((_gcry_get_hw_features () & HWF_INTEL_RDRAND))
+-{
+-  req_length /= 2; /* Up to 25%. */
+-  nbytes += poll_drng (add, origin, 0);
+-}
++nbytes += poll_drng (add, origin, 0);
+ #endif
+ #ifdef USE_PADLOCK
+   if ((_gcry_get_hw_features () & HWF_PADLOCK_RNG))
+ nbytes += poll_padlock (add, origin, 0);
+ #endif
+ 
+-  if (nbytes > req_length)
+-nbytes = req_length;
+-
+   return nbytes;
+ }
+diff --git a/random/rndlinux.c b/random/rndlinux.c
+index a22db177..f378a549 100644
+--- a/random/rndlinux.c
 b/random/rndlinux.c
+@@ -190,10 +190,19 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, 
size_t,
+ }
+ 
+ 
+-  /* First read from a hardware source.  Note that _gcry_rndhw_poll_slow lets
+- it account only for up to 50% (or 25% for RDRAND) of the requested
+- bytes.  */
+-  n_hw = _gcry_rndhw_poll_slow (add, origin, length);
++  /* First read from a hardware source.  However let it account only
++ for up to 50% (or 25% for RDRAND) of the requested bytes.  */
++  n_hw = _gcry_rndhw_poll_slow (add, origin);
++  if ((_gcry_get_hw_features () & HWF_INTEL_RDRAND))
++{
++  if (n_hw > length/4)
++n_hw = length/4;
++}
++  else
++{
++  if (n_hw > length/2)
++n_hw = length/2;
++}
+   if (length > 1)
+ length -= n_hw;
+ 
+diff --git a/src/g10lib.h b/src/g10lib.h
+index 243997eb..cba2e237 100644
+--- a/src/g10lib.h
 b/src/g10lib.h
+@@ -217,8 +217,6 @@ char **_gcry_strtokenize (const char *string, const char 
*delim);
+ 
+ 
+ /*-- src/hwfeatures.c --*/
+-#if defined(HAVE_CPU_ARCH_X86)
+-
+ #define HWF_PADLOCK_RNG (1 << 0)
+ #define HWF_PADLOCK_AES (1 << 1)
+ #define HWF_PADLOCK_SHA (1 << 2)
+@@ -238,28 +236,20 @@ char **_gcry_strtokenize (const char *string, const char 
*delim);
+ #define HWF_INTEL_RDTSC (1 << 15)
+ #define HWF_INTEL_SHAEXT(1 << 16)
+ 
+-#elif defined(HAVE_CPU_ARCH_ARM)
+-
+-#define HWF_ARM_NEON(1 << 0)
+-#define HWF_ARM_AES (1 << 1)
+-#define HWF_ARM_SHA1(1 << 2)
+-#define HWF_ARM_SHA2(1 << 3)
+-#define HWF_ARM_PMULL   (1 << 4)
+-
+-#elif defined(HAVE_CPU_ARCH_PPC)
++#define HWF_ARM_NEON(1 << 17)
++#define HWF_ARM_AES (1 << 18)
++#define HWF_ARM_SHA1(1 << 19)
++#define HWF_ARM_SHA2 

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

2017-01-16 Thread Kristian Fiskerstrand
commit: b9721b858df2cc6c2a170758daa9a1c8dcd00a6e
Author: Kristian Fiskerstrand  gentoo  org>
AuthorDate: Mon Jan 16 23:33:45 2017 +
Commit: Kristian Fiskerstrand  gentoo  org>
CommitDate: Mon Jan 16 23:34:05 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9721b85

dev-libs/libgcrypt: Add fix for SSSE3 problems on Nehalem

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../files/libgcrypt-1.7.5-fix-nehalem.patch| 41 ++
 ...rypt-1.7.5.ebuild => libgcrypt-1.7.5-r1.ebuild} |  3 +-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.7.5-fix-nehalem.patch 
b/dev-libs/libgcrypt/files/libgcrypt-1.7.5-fix-nehalem.patch
new file mode 100644
index ..25633ad
--- /dev/null
+++ b/dev-libs/libgcrypt/files/libgcrypt-1.7.5-fix-nehalem.patch
@@ -0,0 +1,41 @@
+From aada604594fd42224d366d3cb98f67fd3b989cd6 Mon Sep 17 00:00:00 2001
+From: Jussi Kivilinna 
+Date: Wed, 4 Jan 2017 12:02:36 +0200
+Subject: [PATCH 1/1] rijndael-ssse3: fix counter operand from read-only to
+ read/write
+
+* cipher/rijndael-ssse3-amd64.c (_gcry_aes_ssse3_ctr_enc): Change
+'ctrlow' operand from read-only to read-write.
+--
+
+With read-only operand, compiler is allowed to pass temporary
+register to assembly block and throw away any calculation that
+have been done on that register. On the other hand, compiler is
+also allowed to keep operand value permanently in one register
+as value is treated as read-only, and effectly operates as
+expected. Selection between these two depends on compiler
+version and used flags.
+
+Signed-off-by: Jussi Kivilinna 
+---
+ cipher/rijndael-ssse3-amd64.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cipher/rijndael-ssse3-amd64.c b/cipher/rijndael-ssse3-amd64.c
+index a8e89d4..2adb73f 100644
+--- a/cipher/rijndael-ssse3-amd64.c
 b/cipher/rijndael-ssse3-amd64.c
+@@ -387,8 +387,8 @@ _gcry_aes_ssse3_ctr_enc (RIJNDAEL_context *ctx, unsigned 
char *outbuf,
+ ".Lno_carry%=:\n\t"
+ 
+ "pshufb %%xmm6, %%xmm7\n\t"
+-:
+-: [ctr] "r" (ctr), [ctrlow] "r" (ctrlow)
++: [ctrlow] "+r" (ctrlow)
++: [ctr] "r" (ctr)
+ : "cc", "memory");
+ 
+   do_vpaes_ssse3_enc (ctx, nrounds, aes_const_ptr);
+-- 
+2.8.0.rc3
+

diff --git a/dev-libs/libgcrypt/libgcrypt-1.7.5.ebuild 
b/dev-libs/libgcrypt/libgcrypt-1.7.5-r1.ebuild
similarity index 96%
rename from dev-libs/libgcrypt/libgcrypt-1.7.5.ebuild
rename to dev-libs/libgcrypt/libgcrypt-1.7.5-r1.ebuild
index bdecc44..6c374f3 100644
--- a/dev-libs/libgcrypt/libgcrypt-1.7.5.ebuild
+++ b/dev-libs/libgcrypt/libgcrypt-1.7.5-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -30,6 +30,7 @@ DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
 PATCHES=(
"${FILESDIR}"/${PN}-1.6.1-uscore.patch
"${FILESDIR}"/${PN}-multilib-syspath.patch
+   "${FILESDIR}"/${P}-fix-nehalem.patch
 )
 
 MULTILIB_CHOST_TOOLS=(



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

2015-11-30 Thread Alon Bar-Lev
commit: 1519f072b810c69428badbe5fc54960f1a2a12b3
Author: Alon Bar-Lev  gentoo  org>
AuthorDate: Tue Dec  1 06:16:26 2015 +
Commit: Alon Bar-Lev  gentoo  org>
CommitDate: Tue Dec  1 06:16:26 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1519f072

dev-libs/libgcrypt: cleanup

Package-Manager: portage-2.2.20.1

 dev-libs/libgcrypt/Manifest|  1 -
 .../libgcrypt/files/libgcrypt-1.5.0-uscore.patch   | 33 -
 .../files/libgcrypt-1.5.4-clang-arm.patch  | 84 --
 dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild   | 57 ---
 dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild | 58 ---
 5 files changed, 233 deletions(-)

diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest
index 608b99b..79bf1a4 100644
--- a/dev-libs/libgcrypt/Manifest
+++ b/dev-libs/libgcrypt/Manifest
@@ -1,3 +1,2 @@
-DIST libgcrypt-1.5.4.tar.bz2 1512982 SHA256 
d5f88d9f41a46953dc250cdb8575129b37ee2208401b7fa338c897f667c7fb33 SHA512 
fe7e1d07eb10ee4ea8054bc955c35dc4b2109db645a08a6fa7757bf1e77a612e03c0838f9766086f04270b3621f34ccae0d6333f117cff204ccad9018c8a7908
 WHIRLPOOL 
221082d028a90235a3ddcc774b1772a8b8daec989a24b341491849e653e2ecb5cb0e3c8989a3f426524e39b28ebbe1b48532d5d9de7c54f4bdc19b450e22e4dc
 DIST libgcrypt-1.6.3.tar.bz2 2494052 SHA256 
41b4917b93ae34c6a0e2127378d7a4d66d805a2a86a09911d4f9bd871db7025f SHA512 
09a84fcc4d3d755df21f46302a549af4ba788d829ff7fa0cf65eeec033bc3744503f8fe3f4be55a51cc17b1b1b487736c328d7d7bc909f13139600236298c549
 WHIRLPOOL 
dd331afed5c8116df8a55742a7b559791c554a97c32983d64ab196a6d47c2d6bd7e15f8a63dda43947961bb269963185b98927ff0695c3f6d3b939face41e450
 DIST libgcrypt-1.6.4.tar.bz2 2549820 SHA256 
c9bc2c7fe2e5f4ea13b0c74f9d24bcbb1ad889bb39297d8082aebf23f4336026 SHA512 
d2abc81fc3e3acf58f3bf18db449bfb4bdbc28fe62f695276ddd35f34434996b0d686bb48a4724e5134c80ea6cab08ce04f4a0989cb9a72f2497ec833bb24df1
 WHIRLPOOL 
708de5d55845177aa38dc227920dd64eeef8105427d5c88b8196ca47978f577d57f3cd85cd4627af6574e6ab780b815c1cbc8c8ad02aaba72ef176810f7a8865

diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch 
b/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch
deleted file mode 100644
index 1d4f650..000
--- a/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-The version taken from GnuPG 1.4 assumes any cross-compiled package have
-prefixed underscores, which is not the case; by using libtool's own macro,
-we can avoid the whole issue.
-
-diff --git a/configure.ac b/configure.ac
-index ab160c3..6df49bf 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -886,7 +886,7 @@ fi
- #
- # Setup assembler stuff.
- #
--GNUPG_SYS_SYMBOL_UNDERSCORE()
-+LT_SYS_SYMBOL_USCORE
- AC_ARG_ENABLE(mpi-path,
-   AC_HELP_STRING([--enable-mpi-path=EXTRA_PATH],
- [prepend EXTRA_PATH to list of CPU specific optimizations]),
-diff --git a/mpi/config.links b/mpi/config.links
-index 7e910ee..9696828 100644
 a/mpi/config.links
-+++ b/mpi/config.links
-@@ -291,7 +291,7 @@ fi
- 
- # Make sysdep.h
- echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
--if test x$ac_cv_sys_symbol_underscore = xyes; then
-+if test x$sys_symbol_underscore = xyes; then
- cat <>./mpi/sysdep.h
- #if __STDC__
- #define C_SYMBOL_NAME(name) _##name
--- 
-1.7.6.1
-

diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch 
b/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch
deleted file mode 100644
index ab5d844..000
--- a/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-fix from upstream
-
-From e67c67321ce240c93dd0fa2b21c649c0a8e233f7 Mon Sep 17 00:00:00 2001
-From: Jussi Kivilinna 
-Date: Tue, 22 Oct 2013 17:07:53 +0300
-Subject: [PATCH] mpi: allow building with clang on ARM
-
-* mpi/longlong.h [__arm__] (add_ss, sub_ddmmss, umul_ppmm)
-(count_leading_zeros): Do not cast assembly output arguments.
-[__arm__] (umul_ppmm): Remove the extra '%' ahead of assembly comment.
-[_ARM_ARCH >= 4] (umul_ppmm): Use correct inputs and outputs instead of
-registers.
---
-
-Signed-off-by: Jussi Kivilinna 

- mpi/longlong.h | 27 +--
- 1 file changed, 13 insertions(+), 14 deletions(-)
-
-diff --git a/mpi/longlong.h b/mpi/longlong.h
-index c2ab9c5..8c8260e 100644
 a/mpi/longlong.h
-+++ b/mpi/longlong.h
-@@ -188,8 +188,8 @@ extern UDItype __udiv_qrnnd ();
- #define add_ss(sh, sl, ah, al, bh, bl) \
-   __asm__ ("adds %1, %4, %5\n"  \
-  "adc  %0, %2, %3"\
-- : "=r" ((USItype)(sh)),  \
--   "=" ((USItype)(sl))  \
-+ : "=r" ((sh)),   \
-+   "=" ((sl))