forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
28c70f3
commit 586d18c
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# 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 | ||
) | ||
|
||
#src_configure() { | ||
# CRYPTX_LDFLAGS='-ltommath -ltomcrypt' perl-module_src_configure | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- a/Makefile.PL | ||
+++ b/Makefile.PL | ||
@@ -27,20 +27,6 @@ else { | ||
); | ||
$mycflags = " $Config{ccflags} $Config{cccdlflags} $Config{optimize} "; # keep leading + trailing spaces | ||
|
||
- my $try_aes_ni = 0; | ||
- $try_aes_ni = 1 if $Config{archname} =~ /x86_64/; # x86_64-cygwin-threads-multi / x86_64-linux-thread-multi | ||
- $try_aes_ni = 1 if $Config{archname} =~ /MSWin32-x64/; # MSWin32-x64-multi-thread | ||
- $try_aes_ni = 1 if $Config{archname} =~ /amd64/; # OpenBSD.amd64-openbsd-thread-multi / amd64-freebsd | ||
- $try_aes_ni = 1 if $Config{archname} =~ /darwin/ && $Config{myuname} =~ /x86_64/; # darwin-thread-multi-2level / darwin-2level | ||
- $try_aes_ni = 1 if $Config{archname} =~ /i86pc-solaris(-.+)?-64/; # i86pc-solaris-thread-multi-64 / i86pc-solaris-64 | ||
- if ($try_aes_ni && $Config{gccversion}) { | ||
- my $ver1; | ||
- $ver1 ||= $1 if $Config{gccversion} =~ /^([0-9]+)\./; # gccversion='10.2.0' | ||
- $ver1 ||= $1 if $Config{gccversion} =~ /LLVM ([0-9]+)\./i; # gccversion='Apple LLVM 14.0.0 (clang-1400.0.29.202)' | ||
- $ver1 ||= $1 if $Config{gccversion} =~ /Clang ([0-9]+)\./i; # gccversion='FreeBSD Clang 13.0.0 ([email protected]:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)' or 'OpenBSD Clang 13.0.0' | ||
- $mycflags .= " -msse4.1 -maes" if $ver1 > 4; # supported since gcc-4.4 | ||
- } | ||
- | ||
#FIX: this is particularly useful for Debian https://github.com/DCIT/perl-CryptX/pull/39 | ||
$mycflags .= " $ENV{CFLAGS} " if $ENV{CFLAGS}; | ||
$mycflags .= " $ENV{CPPFLAGS} " if $ENV{CPPFLAGS}; |