mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-01 18:42:22 +02:00
Upgrade libgcrypt 1.9.4
This commit is contained in:
parent
6efc0de2bc
commit
5c6b9c65e0
@ -1,6 +1,3 @@
|
|||||||
DIST libgcrypt-1.8.6.tar.bz2 2997781 BLAKE2B 90ecacae75633dfff248b9c07a72126aaa4a5c285141f89c42237326ae3bfb99c937eef05d87b466c3d8f5cf022725ccee5c0dbc74d4eb57523a8a2892864b65 SHA512 28a26f665b7e327b79815849ee6e84ab384ee9105d81d4d06e4feeea07d986f940cbbb9faaae8712068cace45b4110a62965a93201da0e1ad008b65808b2b29b
|
|
||||||
DIST libgcrypt-1.8.7.tar.bz2 2985660 BLAKE2B cb2132b826f3f3af240e6c9ac5fd992808aa17ce64144d17452591a5b1e402564af82c021b58f5fd620ebeb5894ac9654835f6d8376ec05ee41fc02189dd6825 SHA512 6309d17624d8029848990d225d5924886c951cef691266c8e010fbbb7f678972cee70cbb91d370ad0bcdc8c8761402a090c2c853c9427ec79293624a59da5060
|
DIST libgcrypt-1.8.7.tar.bz2 2985660 BLAKE2B cb2132b826f3f3af240e6c9ac5fd992808aa17ce64144d17452591a5b1e402564af82c021b58f5fd620ebeb5894ac9654835f6d8376ec05ee41fc02189dd6825 SHA512 6309d17624d8029848990d225d5924886c951cef691266c8e010fbbb7f678972cee70cbb91d370ad0bcdc8c8761402a090c2c853c9427ec79293624a59da5060
|
||||||
DIST libgcrypt-1.8.8.tar.bz2 2987685 BLAKE2B 7b590c06d91403f1bbfa108379b3747271e9c83acc5547a4d43ef9ada9b0b7c78654cdc24f6cd0db012d50628ae4ec9320dcb63a901ec2dadde6a7ed56dbed7e SHA512 9861f3b5da3cb013eb79efbf2859864f8c2c11b41484b051c981c45cc0bf1569202838226da10ebddeb7a7b7f39ebd3a95f107b9bf6f908074ccc9a51ea94db8
|
DIST libgcrypt-1.8.8.tar.bz2 2987685 BLAKE2B 7b590c06d91403f1bbfa108379b3747271e9c83acc5547a4d43ef9ada9b0b7c78654cdc24f6cd0db012d50628ae4ec9320dcb63a901ec2dadde6a7ed56dbed7e SHA512 9861f3b5da3cb013eb79efbf2859864f8c2c11b41484b051c981c45cc0bf1569202838226da10ebddeb7a7b7f39ebd3a95f107b9bf6f908074ccc9a51ea94db8
|
||||||
DIST libgcrypt-1.9.1.tar.bz2 3202683 BLAKE2B 102a61c855fb4a9e5c9433f52988ea87db7672de6586ed47f888526369d0ef8ad640752ca1ef144c2db73ce90464d6624cc3b12dbdeaf568d706222af3955672 SHA512 e8a028724cf5476fff0ca82c5c279a64b3bc5d1fd1472b784df4084b185266825baffc49e27b90db7453c8faef68cd0b8264f379abacee629bbdf6b11f2a28d6
|
DIST libgcrypt-1.9.4.tar.bz2 3239704 BLAKE2B b8244bc12a68955797b0c2b474ac5c95df1014231f7180a2ffa113e3aacedc98eed60ee1e4b30b032a5fcd6a04855ae07142c223906d5db9c28328a71e014f33 SHA512 d0e117ac73c94d70e9521ee1e6328691498cc8328f8c4e21338096908f5c04c7b838966eb63d59494565f4e19f506c07dab4f4d922150d75610d9f7b57abbf60
|
||||||
DIST libgcrypt-1.9.2.tar.bz2 3206187 BLAKE2B e0ceb02b0c26a7246c4146640a9dcea01429a365bd484532b9d85fdb0c8f4ac1308862e70899a1593f4665e4b2d16ceaa10029702f67720897975258a25d8ab0 SHA512 d2e3dc89788763229f554382b3cf0c3a2680f774258abc4c1fd9ef1ad44920d57d14422af9b6b405e42742e691d19ab2ee458fddf057e778964519eee090f016
|
|
||||||
DIST libgcrypt-1.9.3.tar.bz2 3219061 BLAKE2B 51a6273ba28829c016d9a93fffa181aec24170d0e4d3a363c788f336219e1531274344adeea289f3cc09161fdb2e56846551367a8ac880b14e03a52ab0dd551a SHA512 977e766887c14f19aa1b9fcc0214303036a649e41cd4278de76da7d734cf36888e2e1b6275590dac523dcb4ba8ab07993e6ee8209fd5f1a3383d738b09a060d6
|
|
||||||
|
@ -1,141 +0,0 @@
|
|||||||
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 (1 << 20)
|
|
||||||
+#define HWF_ARM_PMULL (1 << 21)
|
|
||||||
|
|
||||||
-#define HWF_PPC_VCRYPTO (1 << 0)
|
|
||||||
-#define HWF_PPC_ARCH_3_00 (1 << 1)
|
|
||||||
-#define HWF_PPC_ARCH_2_07 (1 << 2)
|
|
||||||
+#define HWF_PPC_VCRYPTO (1 << 22)
|
|
||||||
+#define HWF_PPC_ARCH_3_00 (1 << 23)
|
|
||||||
+#define HWF_PPC_ARCH_2_07 (1 << 24)
|
|
||||||
|
|
||||||
-#elif defined(HAVE_CPU_ARCH_S390X)
|
|
||||||
-
|
|
||||||
-#define HWF_S390X_MSA (1 << 0)
|
|
||||||
-#define HWF_S390X_MSA_4 (1 << 1)
|
|
||||||
-#define HWF_S390X_MSA_8 (1 << 2)
|
|
||||||
-#define HWF_S390X_VX (1 << 3)
|
|
||||||
-
|
|
||||||
-#endif
|
|
||||||
+#define HWF_S390X_MSA (1 << 25)
|
|
||||||
+#define HWF_S390X_MSA_4 (1 << 26)
|
|
||||||
+#define HWF_S390X_MSA_8 (1 << 27)
|
|
||||||
+#define HWF_S390X_VX (1 << 28)
|
|
||||||
|
|
||||||
gpg_err_code_t _gcry_disable_hw_feature (const char *name);
|
|
||||||
void _gcry_detect_hw_features (void);
|
|
@ -1,77 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
inherit autotools flag-o-matic multilib-minimal toolchain-funcs
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2.1 MIT"
|
|
||||||
SLOT="0/20" # subslot = soname major version
|
|
||||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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="doc o-flag-munging static-libs"
|
|
||||||
|
|
||||||
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
BDEPEND="doc? ( virtual/texi2dvi )"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-1.6.1-uscore.patch
|
|
||||||
"${FILESDIR}"/${PN}-multilib-syspath.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 ASFLAGS, since we don't have a flag-o-matic
|
|
||||||
# function for that, we'll have to abuse cflags for this
|
|
||||||
append-cflags -Wa,--divide
|
|
||||||
fi
|
|
||||||
local myeconfargs=(
|
|
||||||
CC_FOR_BUILD="$(tc-getBUILD_CC)"
|
|
||||||
--enable-noexecstack
|
|
||||||
# required for sys-power/suspend[crypt], bug 751568
|
|
||||||
$(use_enable static-libs static)
|
|
||||||
$(use_enable o-flag-munging O-flag-munging)
|
|
||||||
|
|
||||||
# disabled due to various applications requiring privileges
|
|
||||||
# after libgcrypt drops them (bug #468616)
|
|
||||||
--without-capabilities
|
|
||||||
|
|
||||||
# http://trac.videolan.org/vlc/ticket/620
|
|
||||||
# causes bus-errors on sparc64-solaris
|
|
||||||
$([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
|
|
||||||
$([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
|
|
||||||
|
|
||||||
GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
|
|
||||||
)
|
|
||||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
|
|
||||||
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_compile() {
|
|
||||||
default
|
|
||||||
multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install() {
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install_all() {
|
|
||||||
default
|
|
||||||
find "${D}" -type f -name '*.la' -delete || die
|
|
||||||
}
|
|
@ -11,7 +11,7 @@ SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
|
|||||||
|
|
||||||
LICENSE="LGPL-2.1 MIT"
|
LICENSE="LGPL-2.1 MIT"
|
||||||
SLOT="0/20" # subslot = soname major version
|
SLOT="0/20" # subslot = soname major version
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~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="doc o-flag-munging static-libs"
|
IUSE="doc o-flag-munging static-libs"
|
||||||
|
|
||||||
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
|
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
|
||||||
|
@ -1,88 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
inherit autotools flag-o-matic multilib-minimal toolchain-funcs
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2.1 MIT"
|
|
||||||
SLOT="0/20" # subslot = soname major version
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs"
|
|
||||||
|
|
||||||
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
BDEPEND="doc? ( virtual/texi2dvi )"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-1.6.1-uscore.patch
|
|
||||||
"${FILESDIR}"/${PN}-multilib-syspath.patch
|
|
||||||
"${FILESDIR}"/${PN}-1.9.1-fix-no-asm-on-amd64-x86.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 ASFLAGS, since we don't have a flag-o-matic
|
|
||||||
# function for that, we'll have to abuse cflags for this
|
|
||||||
append-cflags -Wa,--divide
|
|
||||||
fi
|
|
||||||
local myeconfargs=(
|
|
||||||
CC_FOR_BUILD="$(tc-getBUILD_CC)"
|
|
||||||
|
|
||||||
--enable-noexecstack
|
|
||||||
$(use_enable cpu_flags_arm_neon neon-support)
|
|
||||||
$(use_enable cpu_flags_x86_aes aesni-support)
|
|
||||||
$(use_enable cpu_flags_x86_avx avx-support)
|
|
||||||
$(use_enable cpu_flags_x86_avx2 avx2-support)
|
|
||||||
$(use_enable cpu_flags_x86_padlock padlock-support)
|
|
||||||
$(use_enable cpu_flags_x86_sha shaext-support)
|
|
||||||
$(use_enable cpu_flags_x86_sse4_1 sse41-support)
|
|
||||||
# required for sys-power/suspend[crypt], bug 751568
|
|
||||||
$(use_enable static-libs static)
|
|
||||||
$(use_enable o-flag-munging O-flag-munging)
|
|
||||||
|
|
||||||
# disabled due to various applications requiring privileges
|
|
||||||
# after libgcrypt drops them (bug #468616)
|
|
||||||
--without-capabilities
|
|
||||||
|
|
||||||
# http://trac.videolan.org/vlc/ticket/620
|
|
||||||
# causes bus-errors on sparc64-solaris
|
|
||||||
$([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
|
|
||||||
$([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
|
|
||||||
|
|
||||||
$(use asm || echo "--disable-asm")
|
|
||||||
|
|
||||||
GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
|
|
||||||
)
|
|
||||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
|
|
||||||
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_compile() {
|
|
||||||
default
|
|
||||||
multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install() {
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install_all() {
|
|
||||||
default
|
|
||||||
find "${ED}" -type f -name '*.la' -delete || die
|
|
||||||
}
|
|
@ -1,86 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
inherit autotools flag-o-matic multilib-minimal toolchain-funcs
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2.1 MIT"
|
|
||||||
SLOT="0/20" # subslot = soname major version
|
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs"
|
|
||||||
|
|
||||||
RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
BDEPEND="doc? ( virtual/texi2dvi )"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-multilib-syspath.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 ASFLAGS, since we don't have a flag-o-matic
|
|
||||||
# function for that, we'll have to abuse cflags for this
|
|
||||||
append-cflags -Wa,--divide
|
|
||||||
fi
|
|
||||||
local myeconfargs=(
|
|
||||||
CC_FOR_BUILD="$(tc-getBUILD_CC)"
|
|
||||||
|
|
||||||
--enable-noexecstack
|
|
||||||
$(use_enable cpu_flags_arm_neon neon-support)
|
|
||||||
$(use_enable cpu_flags_x86_aes aesni-support)
|
|
||||||
$(use_enable cpu_flags_x86_avx avx-support)
|
|
||||||
$(use_enable cpu_flags_x86_avx2 avx2-support)
|
|
||||||
$(use_enable cpu_flags_x86_padlock padlock-support)
|
|
||||||
$(use_enable cpu_flags_x86_sha shaext-support)
|
|
||||||
$(use_enable cpu_flags_x86_sse4_1 sse41-support)
|
|
||||||
# required for sys-power/suspend[crypt], bug 751568
|
|
||||||
$(use_enable static-libs static)
|
|
||||||
$(use_enable o-flag-munging O-flag-munging)
|
|
||||||
|
|
||||||
# disabled due to various applications requiring privileges
|
|
||||||
# after libgcrypt drops them (bug #468616)
|
|
||||||
--without-capabilities
|
|
||||||
|
|
||||||
# http://trac.videolan.org/vlc/ticket/620
|
|
||||||
# causes bus-errors on sparc64-solaris
|
|
||||||
$([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
|
|
||||||
$([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
|
|
||||||
|
|
||||||
$(use asm || echo "--disable-asm")
|
|
||||||
|
|
||||||
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
|
|
||||||
)
|
|
||||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
|
|
||||||
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_compile() {
|
|
||||||
default
|
|
||||||
multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install() {
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
|
|
||||||
}
|
|
||||||
|
|
||||||
multilib_src_install_all() {
|
|
||||||
default
|
|
||||||
find "${ED}" -type f -name '*.la' -delete || die
|
|
||||||
}
|
|
@ -1,10 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
<maintainer type="person">
|
<maintainer type="person">
|
||||||
<email>zlogene@gentoo.org</email>
|
<email>zlogene@gentoo.org</email>
|
||||||
<name>Mikle Kolyada</name>
|
<name>Mikle Kolyada</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>base-system@gentoo.org</email>
|
||||||
|
<name>Gentoo Base System</name>
|
||||||
|
</maintainer>
|
||||||
<upstream>
|
<upstream>
|
||||||
<remote-id type="cpe">cpe:/a:gnupg:libgcrypt</remote-id>
|
<remote-id type="cpe">cpe:/a:gnupg:libgcrypt</remote-id>
|
||||||
</upstream>
|
</upstream>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user