aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2021-05-12 23:23:06 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2021-05-12 23:23:33 +0000
commitddeceb22cff7a2565901a0e75f584069995a756e (patch)
tree4192ec7ceb01b5bfce4b465f3fdfac59d79173e3
parent226bdb1c670e3ac1ec824c74b46e364de4636851 (diff)
New port: math/gravity: Mathematical modeling for optimization and machine learning
-rw-r--r--math/Makefile1
-rw-r--r--math/gravity/Makefile41
-rw-r--r--math/gravity/distinfo3
-rw-r--r--math/gravity/files/patch-CMakeLists.txt12
-rw-r--r--math/gravity/pkg-descr4
-rw-r--r--math/gravity/pkg-plist26
6 files changed, 87 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 0a37ab1e46c9..f14be89f5521 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -327,6 +327,7 @@
SUBDIR += gp2c
SUBDIR += grace
SUBDIR += graphthing
+ SUBDIR += gravity
SUBDIR += gretl
SUBDIR += gri
SUBDIR += gringo
diff --git a/math/gravity/Makefile b/math/gravity/Makefile
new file mode 100644
index 000000000000..3a91bf2c94f3
--- /dev/null
+++ b/math/gravity/Makefile
@@ -0,0 +1,41 @@
+PORTNAME= gravity
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.1.20210512
+CATEGORIES= math
+PKGNAMEPREFIX= coin-or-
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Mathematical modeling for optimization and machine learning
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${LOCALBASE}/include/boost/graph/adjacency_list.hpp:devel/boost-libs \
+ gcc${GCC_DEFAULT}>0:lang/gcc${GCC_DEFAULT} # not sure why does it need gcc, maybe for libquadmath.so
+LIB_DEPENDS= libblas.so:math/blas \
+ libCbc.so:math/cbc \
+ libCgl.so:math/cgl \
+ libClp.so:math/clp \
+ libcoinasl.so:math/asl \
+ libCoinUtils.so:math/coinutils \
+ libipopt.so:math/ipopt \
+ liblapack.so:math/lapack \
+ libopenblas.so:math/openblas
+RUN_DEPENDS= gcc${GCC_DEFAULT}>0:lang/gcc${GCC_DEFAULT}
+
+USES= cmake compiler:c++11-lang eigen:3 localbase:ldflags pkgconfig
+
+USE_GITHUB= yes
+GH_ACCOUNT= coin-or
+GH_PROJECT= Gravity
+GH_TAGNAME= da941e9
+
+CMAKE_ARGS+= -DIPOPT_ROOT_DIR=${LOCALBASE}
+CMAKE_ON= Boost Ipopt
+
+LDFLAGS+= -L${LOCALBASE}/lib/gcc${GCC_DEFAULT}
+
+do-test:
+ @${WRKSRC}/bin/Release/gravity_test
+
+.include <bsd.port.mk>
diff --git a/math/gravity/distinfo b/math/gravity/distinfo
new file mode 100644
index 000000000000..3cc7461b3f6f
--- /dev/null
+++ b/math/gravity/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1620857771
+SHA256 (coin-or-Gravity-v1.1.20210512-da941e9_GH0.tar.gz) = 24937c346457a8367f2572238e52d7d0b1ecf9da6152e9f872c37c16c8a438f0
+SIZE (coin-or-Gravity-v1.1.20210512-da941e9_GH0.tar.gz) = 16886742
diff --git a/math/gravity/files/patch-CMakeLists.txt b/math/gravity/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..ec7b7333e712
--- /dev/null
+++ b/math/gravity/files/patch-CMakeLists.txt
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig 2021-05-12 22:20:46 UTC
++++ CMakeLists.txt
+@@ -317,7 +317,9 @@ endif()
+
+
+ add_subdirectory(src)
++if (BUILD_EXAMPLES)
+ add_subdirectory(examples)
++endif()
+ # add_subdirectory(solvers)
+
+ #Get user defined configuration including passing project source directory into c++ code
diff --git a/math/gravity/pkg-descr b/math/gravity/pkg-descr
new file mode 100644
index 000000000000..d37b905e9492
--- /dev/null
+++ b/math/gravity/pkg-descr
@@ -0,0 +1,4 @@
+Gravity is a Modeling Language for Mathematical Optimization and Machine
+Learning.
+
+WWW: https://www.gravityopt.com/
diff --git a/math/gravity/pkg-plist b/math/gravity/pkg-plist
new file mode 100644
index 000000000000..4d0c1c322682
--- /dev/null
+++ b/math/gravity/pkg-plist
@@ -0,0 +1,26 @@
+include/gravity/Arc.h
+include/gravity/Auxiliary.h
+include/gravity/BonminProgram.h
+include/gravity/CplexCallback.h
+include/gravity/CplexProgram.h
+include/gravity/GravityConfig.h
+include/gravity/GurobiProgram.h
+include/gravity/IpoptProgram.h
+include/gravity/MosekProgram.h
+include/gravity/Net.h
+include/gravity/Node.h
+include/gravity/Path.h
+include/gravity/constant.h
+include/gravity/constraint.h
+include/gravity/doctest.h
+include/gravity/expr.h
+include/gravity/func.h
+include/gravity/model.h
+include/gravity/param.h
+include/gravity/poly.h
+include/gravity/rapidcsv.h
+include/gravity/solver.h
+include/gravity/types.h
+include/gravity/utils.h
+include/gravity/var.h
+lib/libgravity.so