mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-perl/CryptX: fix build w/ sse4.1 but w/o aesni
Closes: https://bugs.gentoo.org/916387 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
52
dev-perl/CryptX/CryptX-0.80.0-r1.ebuild
Normal file
52
dev-perl/CryptX/CryptX-0.80.0-r1.ebuild
Normal file
@@ -0,0 +1,52 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# TODO: unbundle libtommath, libtomcrypt. There's experimental support upstream.
|
||||
# bug #732634
|
||||
|
||||
DIST_AUTHOR=MIK
|
||||
DIST_VERSION=0.080
|
||||
inherit perl-module
|
||||
|
||||
DESCRIPTION="Self-contained crypto toolkit"
|
||||
|
||||
LICENSE="|| ( Artistic GPL-1+ ) public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="minimal"
|
||||
|
||||
RDEPEND="
|
||||
virtual/perl-Math-BigInt
|
||||
!minimal? (
|
||||
dev-perl/JSON
|
||||
)
|
||||
"
|
||||
BDEPEND="
|
||||
${RDEPEND}
|
||||
virtual/perl-ExtUtils-MakeMaker
|
||||
test? (
|
||||
>=virtual/perl-Test-Simple-0.880.0
|
||||
!minimal? (
|
||||
>=virtual/perl-Math-BigInt-1.999.715
|
||||
>=virtual/perl-Storable-2.0.0
|
||||
)
|
||||
)
|
||||
"
|
||||
|
||||
PERL_RM_FILES=(
|
||||
t/002_all_pm.t
|
||||
t/003_all_pm_pod.t
|
||||
t/004_all_pm_pod_spelling.t
|
||||
t/005_all_pm_pod_coverage.t
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.80.0-respect-flags.patch
|
||||
"${FILESDIR}"/${PN}-0.80.0-aesni.patch
|
||||
)
|
||||
|
||||
#src_configure() {
|
||||
# CRYPTX_LDFLAGS='-ltommath -ltomcrypt' perl-module_src_configure
|
||||
#}
|
||||
38
dev-perl/CryptX/files/CryptX-0.80.0-aesni.patch
Normal file
38
dev-perl/CryptX/files/CryptX-0.80.0-aesni.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
https://github.com/DCIT/perl-CryptX/pull/99
|
||||
https://bugs.gentoo.org/916387
|
||||
--- a/src/ltc/headers/tomcrypt_cfg.h
|
||||
+++ b/src/ltc/headers/tomcrypt_cfg.h
|
||||
@@ -96,6 +96,9 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const char *s1, const char *s2);
|
||||
#define LTC_AMD64_SSE4_1
|
||||
#endif
|
||||
#endif
|
||||
+ #if defined(__AES__)
|
||||
+ #define LTC_AMD64_AES_NI
|
||||
+ #endif
|
||||
#endif
|
||||
|
||||
/* detect PPC32 */
|
||||
--- a/src/ltc/headers/tomcrypt_private.h
|
||||
+++ b/src/ltc/headers/tomcrypt_private.h
|
||||
@@ -77,7 +77,7 @@ typedef struct
|
||||
|
||||
/* tomcrypt_cipher.h */
|
||||
|
||||
-#if defined(LTC_AES_NI) && defined(LTC_AMD64_SSE4_1)
|
||||
+#if defined(LTC_AES_NI) && defined(LTC_AMD64_AES_NI)
|
||||
#define LTC_HAS_AES_NI
|
||||
#endif
|
||||
|
||||
--- a/src/ltc/misc/crypt/crypt.c
|
||||
+++ b/src/ltc/misc/crypt/crypt.c
|
||||
@@ -416,7 +416,7 @@ const char *crypt_build_settings =
|
||||
#if defined(LTC_ADLER32)
|
||||
" ADLER32 "
|
||||
#endif
|
||||
-#if defined(LTC_AES_NI) && defined(LTC_AMD64_SSE4_1)
|
||||
+#if defined(LTC_AES_NI) && defined(LTC_AMD64_AES_NI)
|
||||
" AES-NI "
|
||||
#endif
|
||||
#if defined(LTC_BASE64)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user