summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-haskell/mersenne-random-pure64
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-haskell/mersenne-random-pure64')
-rw-r--r--dev-haskell/mersenne-random-pure64/Manifest2
-rw-r--r--dev-haskell/mersenne-random-pure64/files/mersenne-random-pure64-0.2.0.3-double-for-32bits.patch67
-rw-r--r--dev-haskell/mersenne-random-pure64/mersenne-random-pure64-0.2.0.3.ebuild30
-rw-r--r--dev-haskell/mersenne-random-pure64/mersenne-random-pure64-0.2.0.4.ebuild26
-rw-r--r--dev-haskell/mersenne-random-pure64/metadata.xml22
5 files changed, 147 insertions, 0 deletions
diff --git a/dev-haskell/mersenne-random-pure64/Manifest b/dev-haskell/mersenne-random-pure64/Manifest
new file mode 100644
index 000000000000..9aff4cef3ab0
--- /dev/null
+++ b/dev-haskell/mersenne-random-pure64/Manifest
@@ -0,0 +1,2 @@
+DIST mersenne-random-pure64-0.2.0.3.tar.gz 8758 SHA256 1fe7174cad1763875d5ac9ee00c48098d97f2ae8d347ba09a0aad8136873d233 SHA512 df3c33da7d3c3f83203183f9ec51731acc1c1c35122d8bbf70e60640a547bfd19cde1c88af2bd3ac6e790966d08c7bf3d767b3825fb52a123138523e45365aa0 WHIRLPOOL 48a9d28080c7287e3a10842f7eb230aa113d37905ae34f78851334a76162390a9cb5e9be096d12fbc9e40f021cd47d6a9d0390780337bd3e258ae3173bb215d9
+DIST mersenne-random-pure64-0.2.0.4.tar.gz 6900 SHA256 302534036199a7835841f1a52668ec9ea71e9c51fab78ec1616486e7ac170762 SHA512 1997f9d03f10131c472e7ca22574059e2618a94271f00093e1687063f042602a4e8a5670387afab3e8f77d0d4cc6347dfac2e4064453fd5095c8a996fa7491d5 WHIRLPOOL 2af652e4b3034467b2b9c7ff600848e49d1f6b3c4e3c6e8d01be4f075f817e3e1b8687b68110fc8dd8542d64a3d4c0dd0fb00cdd487d789d816a425aa332c799
diff --git a/dev-haskell/mersenne-random-pure64/files/mersenne-random-pure64-0.2.0.3-double-for-32bits.patch b/dev-haskell/mersenne-random-pure64/files/mersenne-random-pure64-0.2.0.3-double-for-32bits.patch
new file mode 100644
index 000000000000..96e8165b08f2
--- /dev/null
+++ b/dev-haskell/mersenne-random-pure64/files/mersenne-random-pure64-0.2.0.3-double-for-32bits.patch
@@ -0,0 +1,67 @@
+diff -rN -u old-mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64/Base.hsc mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64/Base.hsc
+--- old-mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64/Base.hsc 2008-10-16 11:01:29.000000000 +0200
++++ mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64/Base.hsc 2008-10-16 11:01:29.000000000 +0200
+@@ -48,6 +48,9 @@
+ foreign import ccall unsafe "mix_bits"
+ c_mix_word64 :: Word64 -> Word64
+
++foreign import ccall unsafe "double_from_long_long"
++ c_double_from_long_long :: Word64 -> Double
++
+ foreign import ccall unsafe "seed_genrand64_block"
+ c_seed_genrand64_block :: Ptr a -> Word64 -> IO ()
+
+diff -rN -u old-mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64/MTBlock.hs mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64/MTBlock.hs
+--- old-mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64/MTBlock.hs 2008-10-16 11:01:29.000000000 +0200
++++ mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64/MTBlock.hs 2008-10-16 11:01:29.000000000 +0200
+@@ -27,6 +27,7 @@
+ -- * Misc functions
+ blockLen,
+ mixWord64,
++ word64ToDouble,
+ ) where
+
+ import GHC.Exts
+@@ -92,3 +93,8 @@
+ in
+ W64# x4
+ -}
++
++word64ToDouble :: Word64 -> Double
++word64ToDouble = c_double_from_long_long
++
++-- word64ToDouble i = fromIntegral (i `div` 2048) / 9007199254740992
+diff -rN -u old-mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64.hs mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64.hs
+--- old-mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64.hs 2008-10-16 11:01:29.000000000 +0200
++++ mersenne-random-pure64-0.2.0.2/System/Random/Mersenne/Pure64.hs 2008-10-16 11:01:29.000000000 +0200
+@@ -98,7 +98,7 @@
+
+ -- | Efficiently yield a new 53-bit precise 'Double' value, and a new generator.
+ randomDouble :: PureMT -> (Double,PureMT)
+-randomDouble g = (fromIntegral (i `div` 2048) / 9007199254740992, g')
++randomDouble g = (word64ToDouble i, g')
+ where (i, g') = randomWord64 g
+ {-# INLINE randomDouble #-}
+
+diff -rN -u old-mersenne-random-pure64-0.2.0.2/cbits/mt19937-64-block.c mersenne-random-pure64-0.2.0.2/cbits/mt19937-64-block.c
+--- old-mersenne-random-pure64-0.2.0.2/cbits/mt19937-64-block.c 2008-10-16 11:01:29.000000000 +0200
++++ mersenne-random-pure64-0.2.0.2/cbits/mt19937-64-block.c 2008-10-16 11:01:29.000000000 +0200
+@@ -97,3 +97,8 @@
+ x ^= (x >> 43);
+ return x;
+ }
++
++double double_from_long_long(unsigned long long x)
++{
++ return (x >> 11) * (1.0L/9007199254740992.0);
++}
+diff -rN -u old-mersenne-random-pure64-0.2.0.2/include/mt19937-64-block.h mersenne-random-pure64-0.2.0.2/include/mt19937-64-block.h
+--- old-mersenne-random-pure64-0.2.0.2/include/mt19937-64-block.h 2008-10-16 11:01:29.000000000 +0200
++++ mersenne-random-pure64-0.2.0.2/include/mt19937-64-block.h 2008-10-16 11:01:29.000000000 +0200
+@@ -71,3 +71,5 @@
+ void next_genrand64_block(mt_block st, mt_block newst);
+
+ unsigned long long mix_bits(unsigned long long x);
++
++double double_from_long_long(unsigned long long x);
+
diff --git a/dev-haskell/mersenne-random-pure64/mersenne-random-pure64-0.2.0.3.ebuild b/dev-haskell/mersenne-random-pure64/mersenne-random-pure64-0.2.0.3.ebuild
new file mode 100644
index 000000000000..bbd2c85f3080
--- /dev/null
+++ b/dev-haskell/mersenne-random-pure64/mersenne-random-pure64-0.2.0.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+CABAL_FEATURES="lib profile haddock hscolour hoogle"
+inherit haskell-cabal eutils
+
+DESCRIPTION="Generate high quality pseudorandom numbers purely using a Mersenne Twister"
+HOMEPAGE="http://code.haskell.org/~dons/code/mersenne-random-pure64/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/ghc-6.8.2
+ dev-haskell/random"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.2.0"
+
+src_prepare() {
+ if use x86; then
+ # int-e's patch to improve 32-bit performance.
+ # this might be applicable to other arches as well, not sure
+ epatch "${FILESDIR}/${P}-double-for-32bits.patch"
+ fi
+}
diff --git a/dev-haskell/mersenne-random-pure64/mersenne-random-pure64-0.2.0.4.ebuild b/dev-haskell/mersenne-random-pure64/mersenne-random-pure64-0.2.0.4.ebuild
new file mode 100644
index 000000000000..92f7a4f97cf2
--- /dev/null
+++ b/dev-haskell/mersenne-random-pure64/mersenne-random-pure64-0.2.0.4.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.4.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Generate high quality pseudorandom numbers purely using a Mersenne Twister"
+HOMEPAGE="http://code.haskell.org/~dons/code/mersenne-random-pure64/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/random:=[profile?]
+ >=dev-lang/ghc-6.10.4:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.6.0.3
+"
diff --git a/dev-haskell/mersenne-random-pure64/metadata.xml b/dev-haskell/mersenne-random-pure64/metadata.xml
new file mode 100644
index 000000000000..e88086f1e6c0
--- /dev/null
+++ b/dev-haskell/mersenne-random-pure64/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>haskell</herd>
+ <longdescription>
+ The Mersenne twister is a pseudorandom number generator developed by
+ Makoto Matsumoto and Takuji Nishimura that is based on a matrix linear
+ recurrence over a finite binary field. It provides for fast generation
+ of very high quality pseudorandom numbers. The source for the C code
+ can be found here:
+
+ &lt;http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt64.html&gt;
+
+ This library provides a purely functional binding to the 64 bit
+ classic mersenne twister, along with instances of RandomGen, so the
+ generator can be used with System.Random. The generator should
+ typically be a few times faster than the default StdGen (but a tad
+ slower than the impure &#39;mersenne-random&#39; library based on SIMD
+ instructions and destructive state updates.
+
+ </longdescription>
+</pkgmetadata>