dev-haskell/splitmix: add 0.1.0.4

Signed-off-by: hololeap <hololeap@protonmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
hololeap 2023-10-02 23:09:45 -06:00 committed by Sam James
parent b0bb5ce880
commit e614a37e62
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 58 additions and 24 deletions

View File

@ -1 +1,3 @@
DIST splitmix-0.1.0.3.tar.gz 20754 BLAKE2B b9eecbdc2f05361aaa852afd8f6b0c6ca220b2d09e0a0d598796636ace0f995c39defb6d84c6c3ed1bba2e3822ef1bf48f2f34d5ac4406031c4ae5b6cf6d0824 SHA512 22a3f0759e1c1150aabde01a77b48087509dfc7ff9614e97e5e06af73f533170993ff2e18101d940e7ddba81b8d6e496795be3851fccfa07b75e9d922f325064
DIST splitmix-0.1.0.4-rev2.cabal 6537 BLAKE2B ca7d01b9fd1f16d89699e6cd024096bccd39b0ef370726c37b016ce3c3da7db9231e6cea2313d9fc2e91b046e9dd65d24c85139ce598495d055a2e90d98c6dff SHA512 7c23b28ed7af57c7c08c286da9a8de7cb2d4e24f9bea0b36a5c0235e2f8e2e9a25fd23af1792b726780822ae27cc89c0143158693acc5f916106a6ceb40cd2ed
DIST splitmix-0.1.0.4.tar.gz 22382 BLAKE2B 1a6636790bae725410cb3b7c75cf0b24f1e0669b399248d9236d7f7d22547229f3cb05d61d1b6f66bb4cb9ca15a1c11f1143797b5de5c88e81315aff9309dc55 SHA512 9a5cbe8100d44fadeb8bf009b03b1770d6b86ef0f71d625e3fb909881d599f4122833647c13a78152369e2744327d5c3f8b552fdc6a47d2705891ca6331c268e

View File

@ -8,28 +8,8 @@
<use>
<flag name="optimised-mixer">Use JavaScript for mix32</flag>
</use>
<longdescription>
Pure Haskell implementation of SplitMix described in
Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.
Fast splittable pseudorandom number generators. In Proceedings
of the 2014 ACM International Conference on Object Oriented
Programming Systems Languages &amp; Applications (OOPSLA &#39;14). ACM,
New York, NY, USA, 453-472. DOI:
&lt;https://doi.org/10.1145/2660193.2660195&gt;
The paper describes a new algorithm /SplitMix/ for /splittable/
pseudorandom number generator that is quite fast: 9 64 bit arithmetic/logical
operations per 64 bits generated.
/SplitMix/ is tested with two standard statistical test suites (DieHarder and
TestU01, this implementation only using the former) and it appears to be
adequate for &quot;everyday&quot; use, such as Monte Carlo algorithms and randomized
data structures where speed is important.
In particular, it __should not be used for cryptographic or security applications__,
because generated sequences of pseudorandom values are too predictable
(the mixing functions are easily inverted, and two successive outputs
suffice to reconstruct the internal state).
</longdescription>
<upstream>
<remote-id type="hackage">splitmix</remote-id>
<remote-id type="github">haskellari/splitmix</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,52 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# ebuild generated by hackport 0.8.0.0.9999
CABAL_HACKAGE_REVISION=2
CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
inherit haskell-cabal
DESCRIPTION="Fast Splittable PRNG"
HOMEPAGE="https://hackage.haskell.org/package/splitmix"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
IUSE="optimised-mixer"
RDEPEND="
>=dev-lang/ghc-8.4.3:=
"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-2.2.0.1
test? (
>=dev-haskell/async-2.2.1 <dev-haskell/async-2.3
>=dev-haskell/base-compat-0.11.1 <dev-haskell/base-compat-0.13
>=dev-haskell/base-compat-batteries-0.10.5 <dev-haskell/base-compat-batteries-0.13
>=dev-haskell/hunit-1.6.0.0 <dev-haskell/hunit-1.7
>=dev-haskell/math-functions-0.3.3.0 <dev-haskell/math-functions-0.4
|| ( dev-lang/ghc ( >=dev-haskell/process-1.0.1.5 <dev-haskell/process-1.7 ) )
dev-haskell/random
>=dev-haskell/test-framework-0.8.2.0 <dev-haskell/test-framework-0.9
>=dev-haskell/test-framework-hunit-0.3.0.2 <dev-haskell/test-framework-hunit-0.4
>=dev-haskell/tf-random-0.5 <dev-haskell/tf-random-0.6
>=dev-haskell/vector-0.11.0.0 <dev-haskell/vector-0.13
)
"
pkg_pretend() {
if use test; then
ewarn "The \"test\" USE flag for this package creates cycles within the"
ewarn "dependency graph. This may give you problems during 'haskell-updater' runs."
ewarn "It is recommended to leave it disabled unless explicitly testing the package."
fi
}
src_configure() {
haskell-cabal_src_configure \
$(cabal_flag optimised-mixer optimised-mixer)
}