summaryrefslogtreecommitdiff
path: root/dev-haskell/cryptonite
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-23 02:48:52 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-23 02:48:52 +0100
commitfd70f5e3ed54d5e013c11a3f3e632e80838171d0 (patch)
treec6bf0dac8239e644ccc09b184e4eb9cca9701dcf /dev-haskell/cryptonite
parent5deadca7219297a3c1f90eca00544a00e33efdbc (diff)
gentoo auto-resync : 23:07:2022 - 02:48:51
Diffstat (limited to 'dev-haskell/cryptonite')
-rw-r--r--dev-haskell/cryptonite/Manifest5
-rw-r--r--dev-haskell/cryptonite/cryptonite-0.28.ebuild58
-rw-r--r--dev-haskell/cryptonite/metadata.xml1
3 files changed, 63 insertions, 1 deletions
diff --git a/dev-haskell/cryptonite/Manifest b/dev-haskell/cryptonite/Manifest
index 59b7cb80fa98..39fe1bc9be36 100644
--- a/dev-haskell/cryptonite/Manifest
+++ b/dev-haskell/cryptonite/Manifest
@@ -1,3 +1,6 @@
DIST cryptonite-0.26.tar.gz 581153 BLAKE2B 2becdd3d0c6f1e037fd4d38143a2a8644e38e9826faa271c971d4feff8a4ab1e4c0a04df338c99a8454cff626f79f3334a0a37b19cc136f33e7c8f53e66bd33a SHA512 4236d411542fd104e5cace61fbdeda615f7d13e442594d7fa12acc682d917b0494b10b242a88fef19e91e93489797206fee07497bff92e43d3849ebac8ee11b0
+DIST cryptonite-0.28.tar.gz 616309 BLAKE2B 3fa11777574fab06c264709d4de7b56fd4b276fbee93f4731683a9a18f83cf77d2042679f2eac3044d336c5be382e1e4eb0c90862c20b0f452eaafdee401e616 SHA512 c1e485522938f94f15910a5b5a4a3e4dfecbb62df463c80faaa51e9d883c2612611b8486bd0fd13660766cfb6d62d366fbbd03df2db874d525514aae247b6242
+DIST cryptonite-338.patch 1823 BLAKE2B 99a502e16ec061b37e1d3dc343760c86c1eb1cecf23a9061ef3198082d2777fa129196af3322153558e1da7e87b125bfa3a1e32501482767bbbe2e4ca874d65f SHA512 1f00a31791fef52e7bdb2b052912f8ede9022ee4013d1f74321ff10517c4c8df68be9b97d4bfd88140f5686b3b9d01e0937909dd5a2c462920e559accde8e72d
EBUILD cryptonite-0.26-r1.ebuild 1467 BLAKE2B 1edc40a2a7cd40fa975c5536c4d4af4b6ffeb4d37893d88eda24d728d72c5fa074f42d93e6ab0e032944fda95faea5f20ec904613688c90d712ab5fdfb477d18 SHA512 05c6197336561311e83020460505ad25001849d2dfd12b8a1c2cd73f340ecd6e9f91cebfa85bcb0485578af5971014c5dfa1706ca9277d9d11349d0ca2a4c75e
-MISC metadata.xml 1259 BLAKE2B 33389edee851d4a46d7f1dbfb792b74870fa59e491b2a56e00ff2f2665a882dd9418f7a2dea6e67fe04f0462914971ffb7dd0bbf79e86a0ea4421f38fad30436 SHA512 53aaef7362492c410b5b22b0fb36eed9e25e6e7ac977a1162243aee084ada72766eb5eb563fd3ae0319ffa9cbcea01dc49551dcdf9cfb7ac9d6a24e3500e5102
+EBUILD cryptonite-0.28.ebuild 1954 BLAKE2B 742c5284df75753bce2a4227fbbae47ae3aed2234130c70777da1dac72c1ae83393764f310e348adf7fe88752adc774e185e84f346289e93aa6503c2ff236904 SHA512 993b12d911fcdba64e9fc448d5d9a2a76b84743ef674acbbe6906a54d3bbd02bbce661f764e5c0f2caabac1dc7ed5f2917eef2a9b3e46cc2a366a5b886bfe178
+MISC metadata.xml 1369 BLAKE2B dce4bc44ed0f1348aa690a9012811c9ed24c2826f5ab47612426621c69ea865576cb748c7d887a34b5fd6ea14c67d1eb40b95d9283cd2e15ac9c2b835dad6560 SHA512 5e3f9bc2d199ccedc44f4545bf3ed955f5d6b5eb7e9c2a3c1fccf380e95c946e5ccdf86383900d8de91cf44e3eb5ad4fd98d9fe27214b068287ce389237e97a5
diff --git a/dev-haskell/cryptonite/cryptonite-0.28.ebuild b/dev-haskell/cryptonite/cryptonite-0.28.ebuild
new file mode 100644
index 000000000000..72d0c2fc464b
--- /dev/null
+++ b/dev-haskell/cryptonite/cryptonite-0.28.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# ebuild generated by hackport 0.6.7.9999
+#hackport: flags: -check_alignment,-old_toolchain_inliner,+support_deepseq,support_aesni:cpu_flags_x86_aes,support_pclmuldq:cpu_flags_x86_sse4_1,support_sse:cpu_flags_x86_sse,support_rdrand:cpu_flags_x86_rdrand
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
+inherit flag-o-matic haskell-cabal
+
+DESCRIPTION="Cryptography Primitives sink"
+HOMEPAGE="https://github.com/haskell-crypto/cryptonite"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz
+ https://github.com/haskell-crypto/cryptonite/pull/338.patch -> ${PN}-338.patch"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="cpu_flags_x86_rdrand cpu_flags_x86_aes cpu_flags_x86_sse cpu_flags_x86_sse4_1 +integer-gmp +target-attributes"
+
+RDEPEND=">=dev-haskell/basement-0.0.6:=[profile?]
+ >=dev-haskell/memory-0.14.18:=[profile?]
+ >=dev-lang/ghc-8.4.3:=
+ virtual/libc
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-2.2.0.1
+ test? ( dev-haskell/tasty
+ dev-haskell/tasty-hunit
+ dev-haskell/tasty-kat
+ dev-haskell/tasty-quickcheck )
+"
+
+PATCHES=( "${DISTDIR}"/${PN}-338.patch )
+
+src_prepare() {
+ default
+
+ # On AVX2 cryptonite's own test suite crashes on unaligned access:
+ # https://github.com/haskell-crypto/cryptonite/issues/347
+ # Disable extensions that might require extra alignment.
+ use amd64 && append-flags -mno-avx2
+ use x86 && append-flags -mno-avx2
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ --flag=-check_alignment \
+ $(cabal_flag integer-gmp integer-gmp) \
+ --flag=-old_toolchain_inliner \
+ $(cabal_flag cpu_flags_x86_aes support_aesni) \
+ --flag=support_deepseq \
+ $(cabal_flag cpu_flags_x86_sse4_1 support_pclmuldq) \
+ $(cabal_flag cpu_flags_x86_rdrand support_rdrand) \
+ $(cabal_flag cpu_flags_x86_sse support_sse) \
+ $(cabal_flag target-attributes use_target_attributes)
+}
diff --git a/dev-haskell/cryptonite/metadata.xml b/dev-haskell/cryptonite/metadata.xml
index 11b4001ffcbf..91b640f27b37 100644
--- a/dev-haskell/cryptonite/metadata.xml
+++ b/dev-haskell/cryptonite/metadata.xml
@@ -30,6 +30,7 @@
</longdescription>
<use>
<flag name="integer-gmp">Whether or not to use GMP for some functions</flag>
+ <flag name="target-attributes">use GCC / clang function attributes instead of global target options.</flag>
</use>
<upstream>
<remote-id type="github">haskell-crypto/cryptonite</remote-id>