diff options
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/gfan/Manifest | 1 | ||||
-rw-r--r-- | sci-mathematics/gfan/files/gfan-0.6.2-Makefile.patch | 155 | ||||
-rw-r--r-- | sci-mathematics/gfan/files/gfan-0.6.2-testsuite.patch | 222 | ||||
-rw-r--r-- | sci-mathematics/gfan/files/gfan-0.6.2-xcode9.3_compat.patch | 13 | ||||
-rw-r--r-- | sci-mathematics/gfan/gfan-0.6.2.ebuild | 56 |
5 files changed, 447 insertions, 0 deletions
diff --git a/sci-mathematics/gfan/Manifest b/sci-mathematics/gfan/Manifest index 09b70904371c..b0e6c30ed01b 100644 --- a/sci-mathematics/gfan/Manifest +++ b/sci-mathematics/gfan/Manifest @@ -1 +1,2 @@ DIST gfan0.5.tar.gz 1134987 BLAKE2B 73ea793f5dbceb76a9f143a258ee3e38e1466e4e15ed96dbabb58f33d3a091a885479dd00f8179d3bf2c85cf275605823f63aa33272f1f9984e0fc5841ab35e9 SHA512 11a9657adcd5b39f73244450c09b132d8cd19474d0f9151c0127682bc16847537e4096d39e8a0a63b5c6aef6720e54a72bfd361a5271808d5a5595fd2df494fa +DIST gfan0.6.2.tar.gz 1321059 BLAKE2B 1ed61e1e084a1ceb65dd21848440bc3a90486c0ce4012b3b64c8029e89636696d2b0e5446ea156d2cf050b5db179c7c2f25c97e683cecf6e9616e8553d8513bf SHA512 5961820750af2522fdc1a86c0254742c3b003607a8707df5d6cd5f0bc6461e4d3db3b1d3cb537979d57eb9dff387974a58aeb91d0b5246d7c701cadc5a2cf4cf diff --git a/sci-mathematics/gfan/files/gfan-0.6.2-Makefile.patch b/sci-mathematics/gfan/files/gfan-0.6.2-Makefile.patch new file mode 100644 index 000000000000..8e8db53bc911 --- /dev/null +++ b/sci-mathematics/gfan/files/gfan-0.6.2-Makefile.patch @@ -0,0 +1,155 @@ +diff --git a/Makefile b/Makefile +index 2c9f949..a49a590 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,8 +2,8 @@ ALL: default + + # When -g is used, it seems that stackdump does not work. + # GPROFFLAG = -pg +-GPROFFLAG = -g +-#GPROFFLAG = ++#GPROFFLAG = -g ++GPROFFLAG = + + PREFIX?=/usr/local + +@@ -22,20 +22,8 @@ STACTDUMP_OPTIONS = -DSTACKDUMP_ENABLED -D__assert_fail=__assert_fail2 + endif + + +-ifeq ($(sagepath),) +-SAGE_LINKOPTIONS = +-SAGE_INCLUDEOPTIONS = +-else +-SAGE_LINKOPTIONS = -L$(sagepath)/ -lpython2.6 -lcsage -lsingular +-SAGE_INCLUDEOPTIONS = -I $(sagepath)/ +-SAGE_OBJECTS = sage.o sage_link.so +- +-sage_link.so: sage_link.pyx setup.py +- python setup.py build_ext --inplace --pyrex-include-dirs=$(SAGE_ROOT)/devel/sage/ +-endif +- + ifeq ($(gmppath),) +-GMP_LINKOPTIONS = -lgmp ++GMP_LINKOPTIONS = -lgmp -lm + GMP_INCLUDEOPTIONS = + else + GMP_LINKOPTIONS = $(gmppath)/lib/libgmp.a +@@ -49,7 +37,7 @@ CDDDEFINE_PREFIX = -DNOCDDPREFIX + endif + + ifeq ($(cddpath),) +-CDD_LINKOPTIONS = -L/usr/local -lcddgmp ++CDD_LINKOPTIONS = -lcddgmp + CDD_INCLUDEOPTIONS = + else + CDD_LINKOPTIONS = $(cddpath)/lib/libcddgmp.a +@@ -71,37 +59,8 @@ SOPLEX_OBJECTS = lp_soplexcdd.o + endif + + +-# rememember to adjust USEFACTORY in field_rationalfunctions2 +-ifeq ($(singular),) +-ifeq ($(factory),) +-SINGULAR_PATH = +-SINGULAR_LINKOPTIONS = +-SINGULAR_INCLUDEOPTIONS = +-SINGULAR_OBJECTS = src/polynomialgcd.o +-else +-SINGULAR_PATH = +-SINGULAR_LINKOPTIONS = -lcf -lcfmem +-SINGULAR_INCLUDEOPTIONS = -I /usr/local/include/factory/ +-SINGULAR_OBJECTS = src/polynomialgcd.o src/ftmpl_inst.o +-endif +-else +-#SINGULAR_PATH = $(HOME)/math/software/Singular-3-1-0 +-#SINGULAR_LINKOPTIONS = -L$(SINGULAR_PATH)/Singular -lsingular -lncurses -lreadline +-#SINGULAR_INCLUDEOPTIONS = -I $(SINGULAR_PATH)/kernel -I $(SINGULAR_PATH)/omalloc +-#SINGULAR_OBJECTS = src/singular.o src/singularconversion.o +-SINGULAR_PATH = $(HOME)/math/software/Singular-svn/trunk/x86_64-Linux +-SINGULAR_LINKOPTIONS = -L$(SINGULAR_PATH)/lib -lsingular -lncurses -lreadline -lcf -lcfmem +-SINGULAR_INCLUDEOPTIONS = -I $(SINGULAR_PATH)/include -I $(SINGULAR_PATH)/include/omalloc +-SINGULAR_OBJECTS = src/ftmpl_inst.o src/singular.o src/singularconversion.o +-#Run the following line before running gfan +-#export LD_LIBRARY_PATH="/home/anders/math/software/Singular-svn/trunk/x86_64-Linux/lib/:${LD_LIBRARY_PATH}" +-endif +- +-# To produce factory templates: +-#g++ -c /home/anders/math/software/factory-3-1-7/ftmpl_inst.cc -fno-implicit-templates -I /usr/local/include/factory/ -I/home/anders/math/software/factory-3-1-7/ -O2 -fomit-frame-pointer -o ftmpl_inst.o +- +-ADDITIONALLINKOPTIONS = $(CDD_LINKOPTIONS) $(GMP_LINKOPTIONS) $(SOPLEX_LINKOPTIONS) $(SINGULAR_LINKOPTIONS) $(SAGE_LINKOPTIONS) +-ADDITIONALINCLUDEOPTIONS = $(CDD_INCLUDEOPTIONS) $(GMP_INCLUDEOPTIONS) $(SOPLEX_INCLUDEOPTIONS) $(SINGULAR_INCLUDEOPTIONS) $(SAGE_INCLUDEOPTIONS) ++ADDITIONALLINKOPTIONS = $(CDD_LINKOPTIONS) $(GMP_LINKOPTIONS) $(SOPLEX_LINKOPTIONS) ++ADDITIONALINCLUDEOPTIONS = $(CDD_INCLUDEOPTIONS) $(GMP_INCLUDEOPTIONS) $(SOPLEX_INCLUDEOPTIONS) + + + MKDIR=mkdir -p +@@ -110,13 +69,11 @@ MKDIR=mkdir -p + PREFIX = + SHELL = /bin/sh + #ARCH = LINUX +-CC = $(PREFIX)gcc +-CLINKER = $(CC) +-CXX = $(PREFIX)g++ +-CCLINKER = $(CXX) ++CC ?= $(PREFIX)gcc ++CXX ?= $(PREFIX)g++ + #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 + #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,10 +82,10 @@ OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O2 #-O3 - + #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) -D_GLIBCXX_DEBUG -std=c++0x -g $(CDDDEFINE_PREFIX) #-pedantic +-CCFLAGS = $(CFLAGS) +-FFLAGS = $(OPTFLAGS) ++CFLAGS := $(CFLAGS) $(OPTFLAGS) $(GPROFFLAG) $(ADDITIONALINCLUDEOPTIONS) #-pedantic ++CXXFLAGS := $(CXXFLAGS) $(OPTFLAGS) $(GPROFFLAG) $(ADDITIONALINCLUDEOPTIONS) #-pedantic ++ ++SINGULAR_OBJECTS = src/polynomialgcd.o + + CATSOBJECTS = lp_cdd.o \ + parser.o \ +@@ -394,16 +351,15 @@ 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) $(CXXFLAGS) -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 ++# $(CXX) $(CXXFLAGS) -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o + + # Define suffixes to make the program compile on legolas.imf.au.dk : + .SUFFIXES: .o .cpp .c + + OBJECTS = $(addprefix src/,$(SOPLEX_OBJECTS)) \ + $(SINGULAR_OBJECTS) \ +- $(SAGE_OBJECTS) \ + $(addprefix src/,$(CATSOBJECTS)) \ + $(addprefix src/,$(APPOBJECTS)) \ + src/symmetrictraversal.o +@@ -420,7 +376,7 @@ default: $(OBJECTS) $(ADDITIONALOBJECTS) $(EXECS) + + $(MAIN): $(OBJECTS) + # $(CCLINKER) $(OBJECTS) $(ADDITIONALLINKOPTIONS) $(GPROFFLAG) -lpthread -o $(MAIN) +- $(CCLINKER) $(OBJECTS) $(ADDITIONALLINKOPTIONS) $(GPROFFLAG) -lpthread -rdynamic -o $(MAIN) ++ $(CXX) $(CXXFLAGS) -pthread -o $(MAIN) $(LDFLAGS) $(OBJECTS) -lpthread $(ADDITIONALLINKOPTIONS) $(GPROFFLAG) + + release: + rm -f -r $(RELEASEDIR)/* +@@ -546,7 +502,7 @@ check: + .c.o: + $(CC) $(CFLAGS) -c $< -o $(patsubst %.c,%.o,$<) + .cpp.o: +- $(CXX) $(CFLAGS) -c $< -o $(patsubst %.cpp,%.o,$<) ++ $(CXX) $(CXXFLAGS) -c $< -o $(patsubst %.cpp,%.o,$<) + + # wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.2.tar.gz + # tar -xzvf gmp-4.2.2.tar.gz diff --git a/sci-mathematics/gfan/files/gfan-0.6.2-testsuite.patch b/sci-mathematics/gfan/files/gfan-0.6.2-testsuite.patch new file mode 100644 index 000000000000..920646e486e4 --- /dev/null +++ b/sci-mathematics/gfan/files/gfan-0.6.2-testsuite.patch @@ -0,0 +1,222 @@ +diff --git a/src/app_test.cpp b/src/app_test.cpp +index 755bfe6..183c735 100644 +--- a/src/app_test.cpp ++++ b/src/app_test.cpp +@@ -562,6 +562,9 @@ int testIntegers() + failed.push_back(i->folder); + } + cout<<"\n"; ++ cout<<"Number of succesful tests "<<good<<endl; ++ cout<<"Number of failed tests "<<bad<<endl; ++ + if(!failed.empty()) + { + cout<<"Failed tests:\n-------------\n"; +@@ -569,11 +572,9 @@ int testIntegers() + { + cout<<*i<<" FAILED!\n"; + } ++ return 1; + } + +- cout<<"Number of succesful tests "<<good<<endl; +- cout<<"Number of failed tests "<<bad<<endl; +- + return 0; + } + }; +diff --git a/testsuite/0008PolynomialSetUnion/command b/testsuite/0008PolynomialSetUnion/command +index cbb23d6..d61cb71 100644 +--- a/testsuite/0008PolynomialSetUnion/command ++++ b/testsuite/0008PolynomialSetUnion/command +@@ -1 +1 @@ +-%s _bases | %s _polynomialsetunion |sort ++%s _bases | %s _polynomialsetunion |LC_ALL=C sort|tail -n +2 | sed -e '$ d' +diff --git a/testsuite/0008PolynomialSetUnion/output b/testsuite/0008PolynomialSetUnion/output +index 38dfb6f..12a65c7 100644 +--- a/testsuite/0008PolynomialSetUnion/output ++++ b/testsuite/0008PolynomialSetUnion/output +@@ -1,62 +1,60 @@ +-{ ++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/testsuite/0008PolynomialSetUnion/outputNew b/testsuite/0008PolynomialSetUnion/outputNew +index 38dfb6f..12a65c7 100644 +--- a/testsuite/0008PolynomialSetUnion/outputNew ++++ b/testsuite/0008PolynomialSetUnion/outputNew +@@ -1,62 +1,60 @@ +-{ ++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/sci-mathematics/gfan/files/gfan-0.6.2-xcode9.3_compat.patch b/sci-mathematics/gfan/files/gfan-0.6.2-xcode9.3_compat.patch new file mode 100644 index 000000000000..83f4b66f8239 --- /dev/null +++ b/sci-mathematics/gfan/files/gfan-0.6.2-xcode9.3_compat.patch @@ -0,0 +1,13 @@ +diff --git a/src/app_main.cpp b/src/app_main.cpp +index a33c042..e7ade81 100644 +--- a/src/app_main.cpp ++++ b/src/app_main.cpp +@@ -205,7 +205,7 @@ public: + } + + ep->close(); +- delete ep;//<--- In next release, make the class virtual ++// delete ep;//<--- In next release, make the class virtual # this is miscompiled clang@xcode-6.3 + + printf("\n"); + diff --git a/sci-mathematics/gfan/gfan-0.6.2.ebuild b/sci-mathematics/gfan/gfan-0.6.2.ebuild new file mode 100644 index 000000000000..07d32ab49077 --- /dev/null +++ b/sci-mathematics/gfan/gfan-0.6.2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Compute Groebner fans and tropical varieties" +HOMEPAGE="https://users-math.au.dk/~jensen/software/gfan/gfan.html" +SRC_URI="https://users-math.au.dk/~jensen/software/${PN}/${PN}${PV}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux" +IUSE="doc" + +BDEPEND="doc? ( virtual/latex-base )" +DEPEND="dev-libs/gmp:0=[cxx] + sci-libs/cddlib:0=" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-0.6.2-xcode9.3_compat.patch" + "${FILESDIR}/${PN}-0.6.2-testsuite.patch" + "${FILESDIR}/${PN}-0.6.2-Makefile.patch" + ) + +pkg_setup() { + tc-export CC CXX + append-cxxflags -DNOCDDPREFIX +} + +src_configure() { + # The upstream Makefile says that GCC produces bad code with -O3. + replace-flags "-O3" "-O2" + default +} + +src_compile() { + default + if use doc; then + pushd doc > /dev/null || die + # The LaTeX build commands need to be repeated until the + # document "stops changing," which is not as easy as it + # sounds to detect. Running it twice seems to work here. + pdflatex manual.tex && bibtex manual && pdflatex manual.tex || die + popd > /dev/null || die + fi +} + +src_install() { + emake PREFIX="${ED}/usr" install + use doc && dodoc doc/manual.pdf +} |