summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/Makefile2
-rw-r--r--math/gfan/Makefile46
-rw-r--r--math/gfan/distinfo3
-rw-r--r--math/gfan/files/patch-Makefile40
-rw-r--r--math/gfan/files/patch-testsuite_0008PolynomialSetUnion_output94
-rw-r--r--math/gfan/pkg-descr17
-rw-r--r--math/gfan/pkg-message10
-rw-r--r--math/gfan/pkg-plist92
-rw-r--r--math/gfanlib/Makefile41
-rw-r--r--math/gfanlib/distinfo3
-rw-r--r--math/gfanlib/pkg-descr17
-rw-r--r--math/gfanlib/pkg-plist20
12 files changed, 385 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 058c79a378f9..f217bbe2c7d0 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -234,6 +234,8 @@
SUBDIR += geogram
SUBDIR += geonext
SUBDIR += gexpr
+ SUBDIR += gfan
+ SUBDIR += gfanlib
SUBDIR += ggobi
SUBDIR += gh-bc
SUBDIR += giacxcas
diff --git a/math/gfan/Makefile b/math/gfan/Makefile
new file mode 100644
index 000000000000..a56106f32e55
--- /dev/null
+++ b/math/gfan/Makefile
@@ -0,0 +1,46 @@
+# Created by: Lorenzo Salvadore
+# $FreeBSD$
+
+PORTNAME= gfan
+DISTVERSION= 0.6.2
+CATEGORIES= math
+MASTER_SITES= http://home.math.au.dk/jensen/software/gfan/
+DISTNAME= ${PORTNAME}${DISTVERSION}
+
+MAINTAINER= phascolarctos@protonmail.ch
+COMMENT= Software for computing Groebner fans and tropical varieties
+
+LICENSE= GPLv2+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+LIB_DEPENDS= libcddgmp.so:math/cddlib \
+ libgmp.so:math/gmp
+
+USES= gmake
+
+CFLAGS+= -I${LOCALBASE}/include -DGMPRATIONAL
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+post-patch:
+ @${REINPLACE_CMD} \
+ 's,ADDITIONALLINKOPTIONS = ,ADDITIONALLINKOPTIONS = -L${LOCALBASE}/lib ,' \
+ ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/gfan ${STAGEDIR}${PREFIX}/bin
+ cd ${STAGEDIR}${PREFIX}/bin && ./gfan installlinks
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/doc/manual.dvi ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/doc/*.eps ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
+
+do-test:
+ cd ${WRKSRC} && ./gfan _test
+
+.include <bsd.port.mk>
diff --git a/math/gfan/distinfo b/math/gfan/distinfo
new file mode 100644
index 000000000000..dd07fa419d7c
--- /dev/null
+++ b/math/gfan/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1535465532
+SHA256 (gfan0.6.2.tar.gz) = a674d5e5dc43634397de0d55dd5da3c32bd358d05f72b73a50e62c1a1686f10a
+SIZE (gfan0.6.2.tar.gz) = 1321059
diff --git a/math/gfan/files/patch-Makefile b/math/gfan/files/patch-Makefile
new file mode 100644
index 000000000000..386e4a353358
--- /dev/null
+++ b/math/gfan/files/patch-Makefile
@@ -0,0 +1,40 @@
+--- Makefile.orig 2017-09-28 13:44:12 UTC
++++ Makefile
+@@ -110,13 +110,13 @@ MKDIR=mkdir -p
+ PREFIX =
+ SHELL = /bin/sh
+ #ARCH = LINUX
+-CC = $(PREFIX)gcc
++CC ?= $(PREFIX)gcc
+ CLINKER = $(CC)
+-CXX = $(PREFIX)g++
++CXX ?= $(PREFIX)g++
+ CCLINKER = $(CXX)
+ #OPTFLAGS = -O2 -DGMPRATIONAL -DNDEBUG
+ # Note that gcc produces wrong code with -O3
+-OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O2 #-O3 -fno-guess-branch-probability #-DNDEBUG
++#OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O2 #-O3 -fno-guess-branch-probability #-DNDEBUG
+ #OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O3 -mavx -msse2 -finline-limit=1000 -ffast-math -Wuninitialized # -fno-guess-branch-probability #-DNDEBUG -ftree-vectorizer-verbose=2
+ #OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O1 -fno-guess-branch-probability
+ #-DNDEBUG
+@@ -125,9 +125,9 @@ OPTFLAGS = -DGMPRATIONAL -Wuninitial
+ #OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O3 -msse2 -ftree-vectorizer-verbose=2 -ffast-math #-DNDEBUG
+ #OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O3 -mavx -msse2 -ftree-vectorizer-verbose=2 -ffast-math #-DNDEBUG
+
+-CFLAGS = $(OPTFLAGS) $(GPROFFLAG) $(STACTDUMP_OPTIONS) $(ADDITIONALINCLUDEOPTIONS) -std=c++0x -g $(CDDDEFINE_PREFIX) #-pedantic
++CFLAGS += $(OPTFLAGS) $(GPROFFLAG) $(STACTDUMP_OPTIONS) $(ADDITIONALINCLUDEOPTIONS) -std=c++0x -g $(CDDDEFINE_PREFIX) #-pedantic
+ #CFLAGS = $(OPTFLAGS) $(GPROFFLAG) $(STACTDUMP_OPTIONS) $(ADDITIONALINCLUDEOPTIONS) -D_GLIBCXX_DEBUG -std=c++0x -g $(CDDDEFINE_PREFIX) #-pedantic
+-CCFLAGS = $(CFLAGS)
++CCFLAGS += $(CFLAGS)
+ FFLAGS = $(OPTFLAGS)
+
+ CATSOBJECTS = lp_cdd.o \
+@@ -394,7 +394,7 @@ EXECS = $(MAIN)
+ # (compiling with gcc version 4.7.2 and running gfan _tropicaltraverse on a starting cone for Grassmann3_7)
+ # Either this is a bug in the code or in the compiler. The bug disappears by compiling with -fno-guess-branch-probability
+ src/symmetrictraversal.o: src/symmetrictraversal.cpp
+- $(CXX) $(CFLAGS) -fno-guess-branch-probability -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
++ $(CXX) $(CFLAGS) -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
+ # If compiling with clang, use the line below instead:
+ # $(CXX) $(CFLAGS) -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
+
diff --git a/math/gfan/files/patch-testsuite_0008PolynomialSetUnion_output b/math/gfan/files/patch-testsuite_0008PolynomialSetUnion_output
new file mode 100644
index 000000000000..32067e9162a4
--- /dev/null
+++ b/math/gfan/files/patch-testsuite_0008PolynomialSetUnion_output
@@ -0,0 +1,94 @@
+--- testsuite/0008PolynomialSetUnion/output.orig 2013-09-23 12:03:23 UTC
++++ testsuite/0008PolynomialSetUnion/output
+@@ -1,62 +1,62 @@
+-{
++Q[a,b,c]
++a*b-c^6,
++a*b^2-c^3,
++a*b^4-b,
++a*c-b^6,
++a*c^2-b,
++a*c^6-c,
++a-b^11,
++a-b^2*c,
++a-c^9,
+ a^11-c,
+ a^15-a,
++a^2*b-c,
+ a^2*b^3-a,
++a^2*c-b^3,
+ a^2-b^8,
+-a^2*b-c,
+ a^2-c^4,
+-a^2*c-b^3,
+-a^3-b^5,
+-a^3-b*c^2,
+ a^3*c^2-c}
+-a^4-b^2,
++a^3-b*c^2,
++a^3-b^5,
+ a^4*c-a,
++a^4-b^2,
+ a^5-c^3,
+ a^6*b-a,
+ a^6-b*c,
+ a^8-c^2,
+ a^9-b,
+-a-b^11,
+-a-b^2*c,
+-a*b^2-c^3,
+-a*b^4-b,
+-a*b-c^6,
+-a*c^2-b,
+-a*c^6-c,
+-a-c^9,
+-a*c-b^6,
++b*c-a^6,
++b*c^2-a^3,
++b*c^4-c,
++b-a*c^2,
++b-a^9,
++b-c^11,
+ b^11-a,
+ b^15-b,
+-b^2-a^4,
++b^2*c-a,
+ b^2*c^3-b,
++b^2-a^4,
+ b^2-c^8,
+-b^2*c-a,
+ b^3-a^2*c,
+ b^3-c^5,
+ b^4-c^2,
+ b^5-a^3,
+-b^6-a*c,
+ b^6*c-b,
++b^6-a*c,
+ b^8-a^2,
+ b^9-c,
+-b-a^9,
+-b-a*c^2,
+-b-c^11,
+-b*c^2-a^3,
+-b*c^4-c,
+-b*c-a^6,
++c-a^11,
++c-a^2*b,
++c-b^9,
+ c^11-b,
+ c^15-c,
+ c^2-a^8,
+ c^2-b^4,
+-c^3-a^5,
+ c^3-a*b^2,
++c^3-a^5,
+ c^4-a^2,
+ c^5-b^3,
+ c^6-a*b,
+ c^8-b^2,
+ c^9-a,
+-c-a^11,
+-c-a^2*b,
+-c-b^9,
+-Q[a,b,c]
++{
diff --git a/math/gfan/pkg-descr b/math/gfan/pkg-descr
new file mode 100644
index 000000000000..04b25c5406f0
--- /dev/null
+++ b/math/gfan/pkg-descr
@@ -0,0 +1,17 @@
+Gfan is a software package for computing Groebner fans and tropical
+varieties. These are polyhedral fans associated to polynomial ideals.
+The maximal cones of a Groebner fan are in bijection with the marked
+reduced Groebner bases of its defining ideal. The software computes
+all marked reduced Groebner bases of an ideal. Their union is a
+universal Greobner basis. The tropical variety of a polynomial ideal
+is a certain subcomplex of the Groebner fan. Gfan contains algorithms
+for computing this complex for general ideals and specialized
+algorithms for tropical curves, tropical hypersurfaces and tropical
+varieties of prime ideals. In addition to the above core functions
+the package contains many tools which are useful in the study of
+Groebner bases, initial ideals and tropical geometry.
+
+This port provides gfan together with some handy symlinks. The static
+library libgfan.a is provided by the port math/gfanlib.
+
+WWW: http://home.math.au.dk/jensen/software/gfan/gfan.html
diff --git a/math/gfan/pkg-message b/math/gfan/pkg-message
new file mode 100644
index 000000000000..098c54d4f3bb
--- /dev/null
+++ b/math/gfan/pkg-message
@@ -0,0 +1,10 @@
+Gfan can also be linked to Sage, Singular or Soplex. I refrain to
+include those optional dependencies because Sage and Singular support
+is not documented in gfan's manual and Soplex has a very restrictive
+license (you can use or distribute it only if you are a member of a
+noncommercial and academic institution).
+
+If you feel you need any of those optional dependencies, please let
+me know and I will do my best to provide it as fast as possible.
+
+The mantainer.
diff --git a/math/gfan/pkg-plist b/math/gfan/pkg-plist
new file mode 100644
index 000000000000..eaedc0ba38f0
--- /dev/null
+++ b/math/gfan/pkg-plist
@@ -0,0 +1,92 @@
+bin/gfan
+bin/gfan_bases
+bin/gfan_buchberger
+bin/gfan_combinerays
+bin/gfan_doesidealcontain
+bin/gfan_fancommonrefinement
+bin/gfan_fanhomology
+bin/gfan_fanisbalanced
+bin/gfan_fanlink
+bin/gfan_fanproduct
+bin/gfan_fansubfan
+bin/gfan_genericlinearchange
+bin/gfan_groebnercone
+bin/gfan_groebnerfan
+bin/gfan_homogeneityspace
+bin/gfan_homogenize
+bin/gfan_initialforms
+bin/gfan_interactive
+bin/gfan_ismarkedgroebnerbasis
+bin/gfan_krulldimension
+bin/gfan_latticeideal
+bin/gfan_leadingterms
+bin/gfan_list
+bin/gfan_markpolynomialset
+bin/gfan_minkowskisum
+bin/gfan_minors
+bin/gfan_mixedvolume
+bin/gfan_overintegers
+bin/gfan_padic
+bin/gfan_polynomialsetunion
+bin/gfan_render
+bin/gfan_renderstaircase
+bin/gfan_resultantfan
+bin/gfan_saturation
+bin/gfan_secondaryfan
+bin/gfan_stats
+bin/gfan_substitute
+bin/gfan_symmetries
+bin/gfan_tolatex
+bin/gfan_topolyhedralfan
+bin/gfan_tropicalbasis
+bin/gfan_tropicalbruteforce
+bin/gfan_tropicalcurve
+bin/gfan_tropicalevaluation
+bin/gfan_tropicalfunction
+bin/gfan_tropicalhypersurface
+bin/gfan_tropicalintersection
+bin/gfan_tropicallifting
+bin/gfan_tropicallinearspace
+bin/gfan_tropicalmultiplicity
+bin/gfan_tropicalrank
+bin/gfan_tropicalstartingcone
+bin/gfan_tropicaltraverse
+bin/gfan_tropicalweildivisor
+bin/gfan_version
+%%PORTDOCS%%%%DOCSDIR%%/manual.dvi
+%%PORTDOCS%%%%DOCSDIR%%/gfan.eps
+%%PORTDOCS%%%%DOCSDIR%%/nonconst.eps
+%%PORTDOCS%%%%DOCSDIR%%/polyformat.eps
+%%PORTDOCS%%%%DOCSDIR%%/staircase.eps
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of2x3
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of2x4
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of3x3
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/2x2of4x4
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x4
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x5
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of3x5.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of4x4
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/3x3of4x4sym.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/4x4of4x5
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/4x4of5x5
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/6x6-subPfaffians
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/commat2x2
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/commat2x2.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cyclic4
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cyclic5
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/examplePaper
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_5
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_5.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_6
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann2_6.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann3_6
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/grassmann3_6.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x4
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x4.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x5
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hankel3x3of4x5.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/linhyper5_2
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/linhyper5_2.cone
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pablo
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sturmfels3.9
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/symmetryTest
diff --git a/math/gfanlib/Makefile b/math/gfanlib/Makefile
new file mode 100644
index 000000000000..1b9adc5457ed
--- /dev/null
+++ b/math/gfanlib/Makefile
@@ -0,0 +1,41 @@
+# Created by: Lorenzo Salvadore
+# $FreeBSD$
+
+PORTNAME= gfanlib
+DISTVERSION= 0.6.2
+CATEGORIES= math
+MASTER_SITES= http://home.math.au.dk/jensen/software/gfan/
+DISTNAME= gfan${DISTVERSION}
+
+MAINTAINER= phascolarctos@protonmail.ch
+COMMENT= Static library for computing Groebner fans and tropical varieties
+
+LICENSE= GPLv2+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= ${LOCALBASE}/include/cdd/cdd.h:math/cddlib
+LIB_DEPENDS= libgmp.so:math/gmp
+
+USES= gmake
+
+GNU_CONFIGURE= yes
+CPPFLAGS+= -I${LOCALBASE}/include \
+ -I${LOCALBASE}/include/cdd
+
+CONFIGURE_WRKSRC= ${WRKSRC}/gfanlib
+BUILD_WRKSRC= ${WRKSRC}/gfanlib
+
+pre-configure:
+ for x in ${WRKSRC}/src/gfanlib*; do ${MV} $$x ${WRKSRC}/gfanlib; done
+# this is not supported yet, see ${WRKSRC}/Makefile: gfanlib_tableau.h
+# is commented in GFANLIBFILES' declaration
+ ${RM} ${WRKSRC}/gfanlib/gfanlib_tableau.h
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/include/gfanlib
+ ${INSTALL_DATA} ${WRKSRC}/gfanlib/gfanlib*.h \
+ ${STAGEDIR}${PREFIX}/include/gfanlib
+ ${INSTALL_DATA} ${WRKSRC}/gfanlib/libgfan.a \
+ ${STAGEDIR}${PREFIX}/lib/libgfan.a
+
+.include <bsd.port.mk>
diff --git a/math/gfanlib/distinfo b/math/gfanlib/distinfo
new file mode 100644
index 000000000000..dd07fa419d7c
--- /dev/null
+++ b/math/gfanlib/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1535465532
+SHA256 (gfan0.6.2.tar.gz) = a674d5e5dc43634397de0d55dd5da3c32bd358d05f72b73a50e62c1a1686f10a
+SIZE (gfan0.6.2.tar.gz) = 1321059
diff --git a/math/gfanlib/pkg-descr b/math/gfanlib/pkg-descr
new file mode 100644
index 000000000000..689f577c7b13
--- /dev/null
+++ b/math/gfanlib/pkg-descr
@@ -0,0 +1,17 @@
+Gfan is a software package for computing Groebner fans and tropical
+varieties. These are polyhedral fans associated to polynomial ideals.
+The maximal cones of a Groebner fan are in bijection with the marked
+reduced Groebner bases of its defining ideal. The software computes
+all marked reduced Groebner bases of an ideal. Their union is a
+universal Greobner basis. The tropical variety of a polynomial ideal
+is a certain subcomplex of the Groebner fan. Gfan contains algorithms
+for computing this complex for general ideals and specialized
+algorithms for tropical curves, tropical hypersurfaces and tropical
+varieties of prime ideals. In addition to the above core functions
+the package contains many tools which are useful in the study of
+Groebner bases, initial ideals and tropical geometry.
+
+This port provides only the static library libgfan.a: you can get the
+rest of the software package from the port math/gfan.
+
+WWW: http://home.math.au.dk/jensen/software/gfan/gfan.html
diff --git a/math/gfanlib/pkg-plist b/math/gfanlib/pkg-plist
new file mode 100644
index 000000000000..b4607203f1ed
--- /dev/null
+++ b/math/gfanlib/pkg-plist
@@ -0,0 +1,20 @@
+include/gfanlib/gfanlib.h
+include/gfanlib/gfanlib_circuittableint.h
+include/gfanlib/gfanlib_field.h
+include/gfanlib/gfanlib_matrix.h
+include/gfanlib/gfanlib_mixedvolume.h
+include/gfanlib/gfanlib_ordering.h
+include/gfanlib/gfanlib_paralleltraverser.h
+include/gfanlib/gfanlib_polyhedralfan.h
+include/gfanlib/gfanlib_polymakefile.h
+include/gfanlib/gfanlib_q.h
+include/gfanlib/gfanlib_symmetriccomplex.h
+include/gfanlib/gfanlib_symmetry.h
+include/gfanlib/gfanlib_traversal.h
+include/gfanlib/gfanlib_tropicalhomotopy.h
+include/gfanlib/gfanlib_tropicalintersection.h
+include/gfanlib/gfanlib_vector.h
+include/gfanlib/gfanlib_z.h
+include/gfanlib/gfanlib_zcone.h
+include/gfanlib/gfanlib_zfan.h
+lib/libgfan.a