aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-07-09 10:10:20 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-07-09 10:10:20 +0000
commitc627bda70687ce314ec01bb39308f7533869d143 (patch)
tree90949126a2f717c319fcaff7b1c84b35e3ae1639
parent50cd20166a3fddb12282e6a0d5032cfdfbd63349 (diff)
math/tinymt: Add tinymt 1.1.2
Tiny Mersenne Twister(TinyMT) is a pseudo random number generators whose periods are 2^127-1.
-rw-r--r--math/Makefile1
-rw-r--r--math/tinymt/Makefile30
-rw-r--r--math/tinymt/distinfo3
-rw-r--r--math/tinymt/files/patch-Makefile12
-rw-r--r--math/tinymt/pkg-descr2
5 files changed, 48 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 83e191007bc1..f69d5b82a5b5 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -1187,6 +1187,7 @@
SUBDIR += the-algorithms-c++
SUBDIR += timbl
SUBDIR += tiny-bignum-c
+ SUBDIR += tinymt
SUBDIR += tlapack
SUBDIR += tmv
SUBDIR += tomsfastmath
diff --git a/math/tinymt/Makefile b/math/tinymt/Makefile
new file mode 100644
index 000000000000..405e2210c2f2
--- /dev/null
+++ b/math/tinymt/Makefile
@@ -0,0 +1,30 @@
+PORTNAME= tinymt
+PORTVERSION= 1.1.2
+DISTVERSIONPREFIX= v
+CATEGORIES= math
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Tiny Mersenne Twister
+WWW= https://github.com/MersenneTwister-Lab/TinyMT
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+WRKSRC_SUBDIR= tinymt
+
+PLIST_FILES= bin/tinymt-check32 \
+ bin/tinymt-check64 \
+ include/tinymt32.h \
+ include/tinymt64.h
+
+USE_GITHUB= yes
+GH_ACCOUNT= MersenneTwister-Lab
+GH_PROJECT= TinyMT
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/include
+ ${INSTALL_PROGRAM} ${WRKSRC}/check32 ${STAGEDIR}${PREFIX}/bin/tinymt-check32
+ ${INSTALL_PROGRAM} ${WRKSRC}/check64 ${STAGEDIR}${PREFIX}/bin/tinymt-check64
+ ${INSTALL_DATA} ${WRKSRC}/tinymt32.h ${WRKSRC}/tinymt64.h ${STAGEDIR}${PREFIX}/include
+
+.include <bsd.port.mk>
diff --git a/math/tinymt/distinfo b/math/tinymt/distinfo
new file mode 100644
index 000000000000..d91767fbfb68
--- /dev/null
+++ b/math/tinymt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1688166000
+SHA256 (MersenneTwister-Lab-TinyMT-v1.1.2_GH0.tar.gz) = 10dfa59d500b145bd4aa6f5eeac6db66da916de832945f30965d7a6e5020198c
+SIZE (MersenneTwister-Lab-TinyMT-v1.1.2_GH0.tar.gz) = 331826
diff --git a/math/tinymt/files/patch-Makefile b/math/tinymt/files/patch-Makefile
new file mode 100644
index 000000000000..fb5cd32f3722
--- /dev/null
+++ b/math/tinymt/files/patch-Makefile
@@ -0,0 +1,12 @@
+--- Makefile.orig 2020-08-07 00:15:00 UTC
++++ Makefile
+@@ -2,8 +2,7 @@
+
+ #DDEBUG = -O0 -g -ggdb -DDEBUG=1
+
+-CC = gcc -Wall -Wextra -Wsign-compare -Wconversion -Wmissing-prototypes \
+--O3 -std=c99 $(DDEBUG)
++#CC = gcc -Wall -Wextra -Wsign-compare -Wconversion -Wmissing-prototypes -O3 -std=c99 $(DDEBUG)
+ #CC = icc -Wall -O3 -std=c99 -Wmissing-prototypes $(DDEBUG)
+
+ all: check32 check64
diff --git a/math/tinymt/pkg-descr b/math/tinymt/pkg-descr
new file mode 100644
index 000000000000..496deae0a5ec
--- /dev/null
+++ b/math/tinymt/pkg-descr
@@ -0,0 +1,2 @@
+Tiny Mersenne Twister(TinyMT) is a pseudo random number generators whose periods
+are 2^127-1.