From c44bf0733f70cf429b4db1410bc40c78f68a68f0 Mon Sep 17 00:00:00 2001 From: Thierry Thomas Date: Sun, 5 Nov 2023 19:27:20 +0100 Subject: math/ddfun: new port, double-double precision package with special functions --- math/ddfun/Makefile | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ math/ddfun/distinfo | 3 +++ math/ddfun/pkg-descr | 11 +++++++++++ math/ddfun/pkg-plist | 11 +++++++++++ 4 files changed, 79 insertions(+) create mode 100644 math/ddfun/Makefile create mode 100644 math/ddfun/distinfo create mode 100644 math/ddfun/pkg-descr create mode 100644 math/ddfun/pkg-plist diff --git a/math/ddfun/Makefile b/math/ddfun/Makefile new file mode 100644 index 000000000000..e4614a4e12e5 --- /dev/null +++ b/math/ddfun/Makefile @@ -0,0 +1,54 @@ +PORTNAME= ddfun +DISTVERSIONPREFIX=v +DISTVERSION= 03 +CATEGORIES= math +MASTER_SITES= https://www.davidhbailey.com/dhbsoftware/ + +MAINTAINER= fortran@FreeBSD.org +COMMENT= Double-double 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-dd.scr gnu-complink-dd.scr + ${REINPLACE_CMD} -e 's|-O3|${FFLAGS}|' ${BUILD_WRKSRC}/${f} +.endfor + +do-build: + cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ./gnu-complib-dd.scr + +do-build-EXAMPLES-on: + cd ${BUILD_WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ./gnu-complink-dd.scr tpslqm1dd + +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} tpslqm1dd ${STAGEDIR}${EXAMPLESDIR} && \ + ${INSTALL_DATA} tpslqm1dd.f90 ${STAGEDIR}${EXAMPLESDIR} + +do-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README-ddfun.txt ${STAGEDIR}${DOCSDIR} + cd ${BUILD_WRKSRC} && \ + ${INSTALL_DATA} *.ref.txt ${STAGEDIR}${DOCSDIR} + +do-test: + cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ./gnu-ddfun-tests.scr + +.include diff --git a/math/ddfun/distinfo b/math/ddfun/distinfo new file mode 100644 index 000000000000..6a29fbace038 --- /dev/null +++ b/math/ddfun/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1699206558 +SHA256 (ddfun-v03.tar.gz) = 34b9037d2cf1260e02adfc673cbc7ffedc979bd1738d6b48d8c2e6330afc0e61 +SIZE (ddfun-v03.tar.gz) = 101238 diff --git a/math/ddfun/pkg-descr b/math/ddfun/pkg-descr new file mode 100644 index 000000000000..39901bcba9ae --- /dev/null +++ b/math/ddfun/pkg-descr @@ -0,0 +1,11 @@ +DDFUN: A double-double package with special functions (approximately 30 digit +precision). + +This package permits one to perform floating-point computations (real and +complex) to double-double precision (approximately 30 digits), by making only +relatively minor changes to existing Fortran programs. It is intended as a +substitute for IEEE 128-bit quad precision on systems where quad precision is +not available. All basic arithmetic operations and transcendental functions are +supported, together with numerous special functions. The package should run +correctly on any Unix-based system supporting a Fortran-2008 compiler and IEEE +64-bit floating-point arithmetic. diff --git a/math/ddfun/pkg-plist b/math/ddfun/pkg-plist new file mode 100644 index 000000000000..6d966fa3dd90 --- /dev/null +++ b/math/ddfun/pkg-plist @@ -0,0 +1,11 @@ +include/ddfuna.mod +include/ddfune.mod +include/ddmodule.mod +%%PORTDOCS%%%%DOCSDIR%%/README-ddfun.txt +%%PORTDOCS%%%%DOCSDIR%%/testddfun.ref.txt +%%PORTDOCS%%%%DOCSDIR%%/testdqfun.ref.txt +%%PORTDOCS%%%%DOCSDIR%%/tpphixdd.ref.txt +%%PORTDOCS%%%%DOCSDIR%%/tpslqm1dd.ref.txt +%%PORTDOCS%%%%DOCSDIR%%/tquaddd.ref.txt +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tpslqm1dd +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tpslqm1dd.f90 -- cgit v1.2.3