git: c627bda70687 - main - math/tinymt: Add tinymt 1.1.2

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 09 Jul 2023 10:33:25 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c627bda70687ce314ec01bb39308f7533869d143

commit c627bda70687ce314ec01bb39308f7533869d143
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-07-09 10:10:20 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-07-09 10:10:20 +0000

    math/tinymt: Add tinymt 1.1.2
    
    Tiny Mersenne Twister(TinyMT) is a pseudo random number generators whose periods
    are 2^127-1.
---
 math/Makefile                    |  1 +
 math/tinymt/Makefile             | 30 ++++++++++++++++++++++++++++++
 math/tinymt/distinfo             |  3 +++
 math/tinymt/files/patch-Makefile | 12 ++++++++++++
 math/tinymt/pkg-descr            |  2 ++
 5 files changed, 48 insertions(+)

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.