summaryrefslogtreecommitdiff
path: root/math/pcg
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2015-12-29 02:04:08 +0000
committeragc <agc@pkgsrc.org>2015-12-29 02:04:08 +0000
commitf97a49f759c1d00e12fa810b31cf01e2b621a75d (patch)
tree4b8ad718081be82238f4128b4a575e2bda2adba4 /math/pcg
parent50d72ac95771b0e23c848d28b3417c7d7b8c5c46 (diff)
downloadpkgsrc-f97a49f759c1d00e12fa810b31cf01e2b621a75d.tar.gz
Add pcg version 0.94 to the packages collection
The PCG family of Random Number Generators combines properties not previously seen together in the same generation scheme: + It's really easy to use, and yet its very flexible and offers powerful features (including some that allow you to perform silly party tricks). + It's very fast, and can occupy very little space. + It has small code size. + It's performance in statistical tests is excellent (see the PCG paper for full details). + It's much less predictable and thus more secure than most generators. + It's open source software, with a permissive license (the Apache license).
Diffstat (limited to 'math/pcg')
-rw-r--r--math/pcg/DESCR17
-rw-r--r--math/pcg/Makefile30
-rw-r--r--math/pcg/PLIST3
-rw-r--r--math/pcg/distinfo7
-rw-r--r--math/pcg/patches/patch-Makefile22
5 files changed, 79 insertions, 0 deletions
diff --git a/math/pcg/DESCR b/math/pcg/DESCR
new file mode 100644
index 00000000000..51f333e3109
--- /dev/null
+++ b/math/pcg/DESCR
@@ -0,0 +1,17 @@
+The PCG family of Random Number Generators combines properties not
+previously seen together in the same generation scheme:
+
++ It's really easy to use, and yet its very flexible and offers
+powerful features (including some that allow you to perform silly
+party tricks).
+
++ It's very fast, and can occupy very little space.
+
++ It has small code size.
+
++ It's performance in statistical tests is excellent (see the PCG
+paper for full details).
+
++ It's much less predictable and thus more secure than most generators.
+
++ It's open source software, with a permissive license (the Apache license).
diff --git a/math/pcg/Makefile b/math/pcg/Makefile
new file mode 100644
index 00000000000..43b4dd72d6c
--- /dev/null
+++ b/math/pcg/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2015/12/29 02:04:08 agc Exp $
+
+DISTNAME= pcg-c-0.94
+PKGNAME= ${DISTNAME:S/-c//}
+CATEGORIES= math
+MASTER_SITES= http://www.pcg-random.org/downloads/
+EXTRACT_SUFX= .zip
+
+MAINTAINER= agc@NetBSD.org
+HOMEPAGE= http://www.pcg-random.org/
+COMMENT= Random number generator
+LICENSE= apache-2.0
+
+USE_TOOLS+= gmake
+AUTO_MKDIRS= yes
+
+do-test:
+ for t in check-pcg128i check-pcg128si check-pcg16i check-pcg16si \
+ check-pcg32 check-pcg32f check-pcg32i check-pcg32s \
+ check-pcg32si check-pcg32u check-pcg64 check-pcg64f \
+ check-pcg64i check-pcg64s check-pcg64si check-pcg64u \
+ check-pcg8i check-pcg8si check-pcg32-global \
+ check-pcg64-global; do \
+ (cd ${WRKSRC}/test-high && ./$$t); \
+ done
+ for t in pcg32-demo pcg32-global-demo pcg32x2-demo pcg64-demo; do \
+ (cd ${WRKSRC}/sample && ./$$t); \
+ done
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/math/pcg/PLIST b/math/pcg/PLIST
new file mode 100644
index 00000000000..3120affe7ed
--- /dev/null
+++ b/math/pcg/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2015/12/29 02:04:08 agc Exp $
+include/pcg_variants.h
+lib/libpcg_random.a
diff --git a/math/pcg/distinfo b/math/pcg/distinfo
new file mode 100644
index 00000000000..ca5974c9a4e
--- /dev/null
+++ b/math/pcg/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2015/12/29 02:04:08 agc Exp $
+
+SHA1 (pcg-c-0.94.zip) = b70a455def217fedb30645a3d2e00b60b6a5ae6b
+RMD160 (pcg-c-0.94.zip) = fadc610f9ace596a0595f09ba7c91168d08fedf3
+SHA512 (pcg-c-0.94.zip) = df1afc788b3c9ef12fde7bdb1057144ea0963345506be37c646575ac5e1432609e06ffd175bcf8245ad7d527a7c3832daff51b7d39317592e8741afc7a74cf51
+Size (pcg-c-0.94.zip) = 207717 bytes
+SHA1 (patch-Makefile) = 8ababb41930af81dbbe1fcf807cf3f4b71c4437b
diff --git a/math/pcg/patches/patch-Makefile b/math/pcg/patches/patch-Makefile
new file mode 100644
index 00000000000..cc97334de76
--- /dev/null
+++ b/math/pcg/patches/patch-Makefile
@@ -0,0 +1,22 @@
+$NetBSD: patch-Makefile,v 1.1 2015/12/29 02:04:08 agc Exp $
+
+Make user destdir ready
+Use make(1) variables properly
+Don't hardcode installation PREFIX
+
+--- Makefile 2015/10/16 22:41:45 1.1
++++ Makefile 2015/10/16 22:41:49
+@@ -27,11 +27,9 @@
+ cd test-high; $(MAKE)
+ cd sample; $(MAKE)
+
+-PREFIX = /usr/local
+-
+ install: all
+- install src/libpcg_random.a $PREFIX/lib
+- install -m 0644 include/pcg_variants.h $PREFIX/include
++ install src/libpcg_random.a ${DESTDIR}${PREFIX}/lib
++ install -m 0644 include/pcg_variants.h ${DESTDIR}${PREFIX}/include
+
+ test: all
+ cd test-low; $(MAKE) test