aboutsummaryrefslogtreecommitdiff
path: root/math/libnormaliz
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2019-03-20 16:31:32 +0000
committerSteve Wills <swills@FreeBSD.org>2019-03-20 16:31:32 +0000
commit23369d11195eb06195d6b6c756e6cc029bf5962f (patch)
treea72a13cf97a1f018edc99b63957e0a18c565f791 /math/libnormaliz
parent9133e66efa092f8c82dd5f87043df3df2a014b8f (diff)
downloadports-23369d11195eb06195d6b6c756e6cc029bf5962f.tar.gz
ports-23369d11195eb06195d6b6c756e6cc029bf5962f.zip
math/libnormaliz: create port
Normaliz is an open source tool for computations in affine monoids, vector configurations, lattice polytopes, and rational cones. Computation goals: - convex hulls and dual cones; - conversion from generators to constraints and vice versa; - projections of cones and polyhedra; - triangulations, disjoint decompositions and Stanley decompositions; - Hilbert basis of rational, not necessarily pointed cones; - normalization of affine monoids; - lattice points of rational polytopes and (unbounded) polyhedra; - Euclidean and lattice normalized volumes of polytopes; - Hilbert (or Ehrhart) series and (quasi) polynomials under Z-gradings (for example, for rational polytopes); - generalized (or weighted) Ehrhart series and Lebesgue integrals of polynomials over rational polytopes. WWW: https://www.normaliz.uni-osnabrueck.de PR: 231806 Submitted by: Lorenzo Salvadore <phascolarctos@protonmail.ch>
Notes
Notes: svn path=/head/; revision=496352
Diffstat (limited to 'math/libnormaliz')
-rw-r--r--math/libnormaliz/Makefile50
-rw-r--r--math/libnormaliz/distinfo3
-rw-r--r--math/libnormaliz/files/patch-source_libnormaliz_Makefile.classic10
-rw-r--r--math/libnormaliz/files/patch-source_libnormaliz_nmz__integral.cpp11
-rw-r--r--math/libnormaliz/pkg-descr18
-rw-r--r--math/libnormaliz/pkg-plist17
6 files changed, 109 insertions, 0 deletions
diff --git a/math/libnormaliz/Makefile b/math/libnormaliz/Makefile
new file mode 100644
index 000000000000..1d32d3ad56ee
--- /dev/null
+++ b/math/libnormaliz/Makefile
@@ -0,0 +1,50 @@
+# $FreeBSD$
+
+PORTNAME= libnormaliz
+DISTVERSIONPREFIX= v
+DISTVERSION= 3.6.3
+CATEGORIES= math
+
+MAINTAINER= phascolarctos@protonmail.ch
+COMMENT= Computations in affin monoids, vector configurations etc
+
+LICENSE= GPLv3+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= ${LOCALBASE}/include/boost/dynamic_bitset.hpp:devel/boost-libs \
+ ${LOCALBASE}/include/gmpxx.h:math/gmp
+
+USES= gmake
+USE_GITHUB= yes
+
+GH_ACCOUNT= Normaliz
+GH_PROJECT= Normaliz
+
+BUILD_WRKSRC= ${WRKSRC}/source/libnormaliz
+INSTALL_WRKSRC= ${WRKSRC}/source/libnormaliz
+
+CXXFLAGS+= -I ${LOCALBASE}/include
+MAKEFILE= Makefile.classic
+
+OPTIONS_DEFINE= COCOA DOCS FLINT OPENMP
+COCOA_DESC= Link with libcocoa.a (might cause circular dependency)
+FLINT_DESC= Link with libflint.a
+COCOA_BUILD_DEPENDS= ${LOCALBASE}/lib/libcocoa.a:math/cocoalib
+COCOA_CXXFLAGS= -DNMZ_COCOA -DCoCoA_THREADSAFE_HACK
+COCOA_LDFLAGS= ${LOCALBASE}/lib -lcocoa
+FLINT_BUILD_DEPENDS= ${LOCALBASE}/lib/libflint.so:math/flint2
+FLINT_CXXFLAGS= -DNMZ_FLINT
+FLINT_LDFLAGS= -L ${LOCALBASE}/lib -lflint -lmpfr
+OPENMP_BUILD_DEPENDS= ${LOCALBASE}/lib/libomp.so:devel/openmp
+OPENMP_CXXFLAGS= -fopenmp
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/include/libnormaliz
+ ${INSTALL_DATA} ${INSTALL_WRKSRC}/libnormaliz.a ${STAGEDIR}${PREFIX}/lib
+ cd ${INSTALL_WRKSRC} && ${INSTALL_DATA} cone.h cone_property.h convert.h general.h HilbertSeries.h integer.h libnormaliz.h map_operations.h matrix.h my_omp.h normaliz_exception.h sublattice_representation.h vector_operations.h version.h nmz_integrate.h ${STAGEDIR}${PREFIX}/include/libnormaliz
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/doc/Normaliz.pdf ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/math/libnormaliz/distinfo b/math/libnormaliz/distinfo
new file mode 100644
index 000000000000..1cac8ad0dda4
--- /dev/null
+++ b/math/libnormaliz/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1536314303
+SHA256 (Normaliz-Normaliz-v3.6.3_GH0.tar.gz) = 1c3dad1f5256c92dde21b0eea1423afe95d98863c90f5e4cb429ffa71ba57f54
+SIZE (Normaliz-Normaliz-v3.6.3_GH0.tar.gz) = 9923720
diff --git a/math/libnormaliz/files/patch-source_libnormaliz_Makefile.classic b/math/libnormaliz/files/patch-source_libnormaliz_Makefile.classic
new file mode 100644
index 000000000000..69a06d3509dd
--- /dev/null
+++ b/math/libnormaliz/files/patch-source_libnormaliz_Makefile.classic
@@ -0,0 +1,10 @@
+--- source/libnormaliz/Makefile.classic.orig 2018-08-21 13:25:10 UTC
++++ source/libnormaliz/Makefile.classic
+@@ -1,7 +1,6 @@
+ ##
+ ## Makefile for libnormaliz
+ ##
+-include ../Makefile.configuration
+
+ INSTALLHDRS = cone.h cone_property.h convert.h general.h HilbertSeries.h integer.h libnormaliz.h map_operations.h matrix.h my_omp.h normaliz_exception.h sublattice_representation.h vector_operations.h version.h nmz_integrate.h
+
diff --git a/math/libnormaliz/files/patch-source_libnormaliz_nmz__integral.cpp b/math/libnormaliz/files/patch-source_libnormaliz_nmz__integral.cpp
new file mode 100644
index 000000000000..65acc64a4c04
--- /dev/null
+++ b/math/libnormaliz/files/patch-source_libnormaliz_nmz__integral.cpp
@@ -0,0 +1,11 @@
+--- source/libnormaliz/nmz_integral.cpp.orig 2018-09-25 05:50:07 UTC
++++ source/libnormaliz/nmz_integral.cpp
+@@ -403,7 +403,7 @@ try{
+ vector<Integer> test_grading=C.getSublattice().to_sublattice_dual_no_div(C.getGrading());
+ Integer corr_factor=v_gcd(test_grading);
+ mpz_class corr_mpz=convertTo<mpz_class>(corr_factor);
+- I*=BigInt(corr_mpz.get_mpz_t());
++ I*=BigIntFromMPZ(corr_mpz.get_mpz_t());
+
+ string result="Integral";
+ if(do_virt_mult)
diff --git a/math/libnormaliz/pkg-descr b/math/libnormaliz/pkg-descr
new file mode 100644
index 000000000000..7e2b5b37d441
--- /dev/null
+++ b/math/libnormaliz/pkg-descr
@@ -0,0 +1,18 @@
+Normaliz is an open source tool for computations in affine monoids,
+vector configurations, lattice polytopes, and rational cones.
+
+Computation goals:
+- convex hulls and dual cones;
+- conversion from generators to constraints and vice versa;
+- projections of cones and polyhedra;
+- triangulations, disjoint decompositions and Stanley decompositions;
+- Hilbert basis of rational, not necessarily pointed cones;
+- normalization of affine monoids;
+- lattice points of rational polytopes and (unbounded) polyhedra;
+- Euclidean and lattice normalized volumes of polytopes;
+- Hilbert (or Ehrhart) series and (quasi) polynomials under Z-gradings
+(for example, for rational polytopes);
+- generalized (or weighted) Ehrhart series and Lebesgue integrals of
+polynomials over rational polytopes.
+
+WWW: https://www.normaliz.uni-osnabrueck.de
diff --git a/math/libnormaliz/pkg-plist b/math/libnormaliz/pkg-plist
new file mode 100644
index 000000000000..1c9cac104323
--- /dev/null
+++ b/math/libnormaliz/pkg-plist
@@ -0,0 +1,17 @@
+include/libnormaliz/HilbertSeries.h
+include/libnormaliz/cone.h
+include/libnormaliz/cone_property.h
+include/libnormaliz/convert.h
+include/libnormaliz/general.h
+include/libnormaliz/integer.h
+include/libnormaliz/libnormaliz.h
+include/libnormaliz/map_operations.h
+include/libnormaliz/matrix.h
+include/libnormaliz/my_omp.h
+include/libnormaliz/nmz_integrate.h
+include/libnormaliz/normaliz_exception.h
+include/libnormaliz/sublattice_representation.h
+include/libnormaliz/vector_operations.h
+include/libnormaliz/version.h
+lib/libnormaliz.a
+%%PORTDOCS%%%%DOCSDIR%%/Normaliz.pdf