git: a1ea3c4249cc - main - math/qxfun: new port, quad precision package with special functions

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Sun, 05 Nov 2023 18:32:55 UTC
The branch main has been updated by thierry:

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

commit a1ea3c4249cc2c6cb5ff5030e03e2c27bfc6b722
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2023-11-05 18:29:43 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2023-11-05 18:32:49 +0000

    math/qxfun: new port, quad precision package with special functions
---
 math/Makefile        |  3 +++
 math/qxfun/Makefile  | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 math/qxfun/distinfo  |  3 +++
 math/qxfun/pkg-descr |  8 ++++++++
 math/qxfun/pkg-plist |  9 +++++++++
 5 files changed, 77 insertions(+)

diff --git a/math/Makefile b/math/Makefile
index cd303f2e1b65..1d22dd2e5fbf 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -268,12 +268,14 @@
     SUBDIR += curv
     SUBDIR += cvc5
     SUBDIR += dbcsr
+    SUBDIR += ddfun
     SUBDIR += deal.ii
     SUBDIR += dgl
     SUBDIR += dieharder
     SUBDIR += dihydrogen
     SUBDIR += dionysus
     SUBDIR += disco
+    SUBDIR += dqfun
     SUBDIR += drgeo
     SUBDIR += dsdp
     SUBDIR += dune-alugrid
@@ -1093,6 +1095,7 @@
     SUBDIR += qrupdate
     SUBDIR += qtiplot-doc
     SUBDIR += qwtplot3d
+    SUBDIR += qxfun
     SUBDIR += randlib
     SUBDIR += rankwidth
     SUBDIR += rapid
diff --git a/math/qxfun/Makefile b/math/qxfun/Makefile
new file mode 100644
index 000000000000..77d57e6cd7d9
--- /dev/null
+++ b/math/qxfun/Makefile
@@ -0,0 +1,54 @@
+PORTNAME=	qxfun
+DISTVERSIONPREFIX=v
+DISTVERSION=	01
+CATEGORIES=	math
+MASTER_SITES=	https://www.davidhbailey.com/dhbsoftware/
+
+MAINTAINER=	fortran@FreeBSD.org
+COMMENT=	Quad precision package with special functions
+WWW=		https://crd-legacy.lbl.gov/~dhbailey/mpdist
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/DISCLAIMER.txt
+
+USES=		fortran
+
+BINARY_ALIAS=	gfortran=${FC}
+FFLAGS+=	-O3
+BUILD_WRKSRC=	${WRKSRC}/fortran
+
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
+pre-configure:
+.for f in gnu-complib-qx.scr gnu-complink-qx.scr
+	${REINPLACE_CMD} -e 's|-O3|${FFLAGS}|' ${BUILD_WRKSRC}/${f}
+.endfor
+
+do-build:
+	cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ./gnu-complib-qx.scr
+
+do-build-EXAMPLES-on:
+	cd ${BUILD_WRKSRC} &&	\
+		${SETENV} ${MAKE_ENV} ./gnu-complink-qx.scr tpslqm1qx
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/include
+	cd ${BUILD_WRKSRC} &&	\
+	${INSTALL_DATA} *.mod ${STAGEDIR}${PREFIX}/include
+
+do-install-EXAMPLES-on:
+	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	cd ${BUILD_WRKSRC} &&	\
+	${INSTALL_PROGRAM} tpslqm1qx ${STAGEDIR}${EXAMPLESDIR}	&&	\
+	${INSTALL_DATA} tpslqm1qx.f90 ${STAGEDIR}${EXAMPLESDIR}
+
+do-install-DOCS-on:
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README-qxfun.txt ${STAGEDIR}${DOCSDIR}
+	cd ${BUILD_WRKSRC} &&	\
+	${INSTALL_DATA} *.ref.txt ${STAGEDIR}${DOCSDIR}
+
+do-test:
+	cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ./gnu-qxfun-tests.scr
+
+.include <bsd.port.mk>
diff --git a/math/qxfun/distinfo b/math/qxfun/distinfo
new file mode 100644
index 000000000000..1e3adee92168
--- /dev/null
+++ b/math/qxfun/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1699205427
+SHA256 (qxfun-v01.tar.gz) = 2c75c1386817d17e4b3f1486c24a8dc10c1c30f82679308653b70982ff7b7933
+SIZE (qxfun-v01.tar.gz) = 56855
diff --git a/math/qxfun/pkg-descr b/math/qxfun/pkg-descr
new file mode 100644
index 000000000000..8b133067dcee
--- /dev/null
+++ b/math/qxfun/pkg-descr
@@ -0,0 +1,8 @@
+QXFUN: A quad precision package with special functions (approximately 33 digit
+precision).
+
+This package enhances an IEEE quad precision floating-point facility (approx. 33
+digit accuracy) to include a library of numerous special functions, all by
+making only very minor changes to existing Fortran programs. The package should
+run correctly on any Unix-based system supporting a Fortran-2008 compiler and
+IEEE 128-bit floating-point arithmetic, in hardware or software.
diff --git a/math/qxfun/pkg-plist b/math/qxfun/pkg-plist
new file mode 100644
index 000000000000..0d25bb3cd3d6
--- /dev/null
+++ b/math/qxfun/pkg-plist
@@ -0,0 +1,9 @@
+include/qxfune.mod
+include/qxmodule.mod
+%%PORTDOCS%%%%DOCSDIR%%/README-qxfun.txt
+%%PORTDOCS%%%%DOCSDIR%%/testqxfun.ref.txt
+%%PORTDOCS%%%%DOCSDIR%%/tpphixqx.ref.txt
+%%PORTDOCS%%%%DOCSDIR%%/tpslqm1qx.ref.txt
+%%PORTDOCS%%%%DOCSDIR%%/tquadqx.ref.txt
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tpslqm1qx
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tpslqm1qx.f90