mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
math/stanmath: New port: C++ template library for automatic differentiation
This commit is contained in:
parent
50ae877785
commit
5f8880a8d7
7 changed files with 1839 additions and 0 deletions
|
@ -987,6 +987,7 @@
|
||||||
SUBDIR += spooles-mpich
|
SUBDIR += spooles-mpich
|
||||||
SUBDIR += spot
|
SUBDIR += spot
|
||||||
SUBDIR += sprng
|
SUBDIR += sprng
|
||||||
|
SUBDIR += stanmath
|
||||||
SUBDIR += stp
|
SUBDIR += stp
|
||||||
SUBDIR += suitesparse
|
SUBDIR += suitesparse
|
||||||
SUBDIR += suitesparse-amd
|
SUBDIR += suitesparse-amd
|
||||||
|
|
35
math/stanmath/Makefile
Normal file
35
math/stanmath/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
PORTNAME= stanmath
|
||||||
|
DISTVERSIONPREFIX= v
|
||||||
|
DISTVERSION= 4.1.0
|
||||||
|
CATEGORIES= math
|
||||||
|
|
||||||
|
MAINTAINER= yuri@FreeBSD.org
|
||||||
|
COMMENT= C++ template library for automatic differentiation
|
||||||
|
|
||||||
|
LICENSE= BSD3CLAUSE
|
||||||
|
LICENSE_FILE= ${WRKSRC}/LICENSE.md
|
||||||
|
|
||||||
|
RUN_DEPENDS= ${LOCALBASE}/include/boost/math/constants/constants.hpp:devel/boost-libs \
|
||||||
|
${LOCALBASE}/include/tbb/task_arena.h:devel/onetbb # compiler define -DTBB_INTERFACE_NEW chooses oneTBB as opposed to TBB
|
||||||
|
TEST_DEPENDS= gmake:devel/gmake
|
||||||
|
|
||||||
|
USES= eigen:3,run, python:test shebangfix
|
||||||
|
|
||||||
|
USE_GITHUB= yes
|
||||||
|
GH_ACCOUNT= stan-dev
|
||||||
|
GH_PROJECT= math
|
||||||
|
|
||||||
|
SHEBANG_FILES= runTests.py
|
||||||
|
|
||||||
|
MAKE_ENV= TBB_LIB="${LOCALBASE}/lib"
|
||||||
|
|
||||||
|
NO_BUILD= yes
|
||||||
|
NO_ARCH= yes
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
@cd ${WRKSRC} && ${COPYTREE_SHARE} stan ${STAGEDIR}${PREFIX}/include
|
||||||
|
|
||||||
|
do-test: # fail to compile: https://github.com/stan-dev/math/issues/2571
|
||||||
|
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./runTests.py test/unit test/prob
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
3
math/stanmath/distinfo
Normal file
3
math/stanmath/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
TIMESTAMP = 1630043342
|
||||||
|
SHA256 (stan-dev-math-v4.1.0_GH0.tar.gz) = f526be5f24864f256409ae5e4a17a5858e762a23c329d615a0709cd3935197ba
|
||||||
|
SIZE (stan-dev-math-v4.1.0_GH0.tar.gz) = 28210482
|
14
math/stanmath/files/patch-make_compiler__flags
Normal file
14
math/stanmath/files/patch-make_compiler__flags
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
--- make/compiler_flags.orig 2021-08-28 03:13:59 UTC
|
||||||
|
+++ make/compiler_flags
|
||||||
|
@@ -274,9 +274,9 @@ LDLIBS_TBB ?= $(LDFLAGS_TBB)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
-ifdef TBB_INTERFACE_NEW
|
||||||
|
+#ifdef TBB_INTERFACE_NEW
|
||||||
|
CPPFLAGS_TBB ?= -DTBB_INTERFACE_NEW
|
||||||
|
-endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Setup STAN_THREADS
|
11
math/stanmath/files/patch-runTests.py
Normal file
11
math/stanmath/files/patch-runTests.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- runTests.py.orig 2021-08-28 03:33:35 UTC
|
||||||
|
+++ runTests.py
|
||||||
|
@@ -172,7 +172,7 @@ def generateTests(j):
|
||||||
|
if isWin():
|
||||||
|
doCommand("mingw32-make -j%d generate-tests -s" % (j or 1))
|
||||||
|
else:
|
||||||
|
- doCommand("make -j%d generate-tests -s" % (j or 1))
|
||||||
|
+ doCommand("gmake -j%d generate-tests -s" % (j or 1))
|
||||||
|
|
||||||
|
|
||||||
|
def divide_chunks(l, n):
|
6
math/stanmath/pkg-descr
Normal file
6
math/stanmath/pkg-descr
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
The Stan Math Library is a C++, reverse-mode automatic differentiation library
|
||||||
|
designed to be usable, extensive and extensible, efficient, scalable, stable,
|
||||||
|
portable, and redistributable in order to facilitate the construction and
|
||||||
|
utilization of algorithms that utilize derivatives.
|
||||||
|
|
||||||
|
WWW: https://mc-stan.org/math/
|
1769
math/stanmath/pkg-plist
Normal file
1769
math/stanmath/pkg-plist
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue