Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/gfan/, sci-mathematics/gfan/files/
Date: Fri, 06 Mar 2020 16:58:30
Message-Id: 1583513608.72f1a1873ac70ee1a9ecd27afa8c3c5fb10b58f7.mjo@gentoo
1 commit: 72f1a1873ac70ee1a9ecd27afa8c3c5fb10b58f7
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 6 16:52:59 2020 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 6 16:53:28 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72f1a187
7
8 sci-mathematics/gfan: new version 0.6.2.
9
10 Update our version of gfan to the latest upstream v0.6.2, from
11 September 28th 2017. The new ebuild is based off of the version that
12 François Bissey maintains in the sage-on-gentoo overlay, with a few
13 additional changes:
14
15 * Merged the EAPI=7 and slot dependency updates from ::gentoo.
16
17 * Change the LICENSE to "GPL-2+", to match the upstream LICENSE file.
18
19 * Stripped some more CFLAGS mangling out of the upstream Makefile.
20 Corresponding to this we now replace "-O3" by "-O2" in the ebuild.
21
22 * Added USE="doc", to build and install the LaTeX manual.
23
24 Closes: https://bugs.gentoo.org/711492
25 Package-Manager: Portage-2.3.84, Repoman-2.3.20
26 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
27
28 sci-mathematics/gfan/Manifest | 1 +
29 .../gfan/files/gfan-0.6.2-Makefile.patch | 155 ++++++++++++++
30 .../gfan/files/gfan-0.6.2-testsuite.patch | 222 +++++++++++++++++++++
31 .../gfan/files/gfan-0.6.2-xcode9.3_compat.patch | 13 ++
32 sci-mathematics/gfan/gfan-0.6.2.ebuild | 56 ++++++
33 5 files changed, 447 insertions(+)
34
35 diff --git a/sci-mathematics/gfan/Manifest b/sci-mathematics/gfan/Manifest
36 index 09b70904371..b0e6c30ed01 100644
37 --- a/sci-mathematics/gfan/Manifest
38 +++ b/sci-mathematics/gfan/Manifest
39 @@ -1 +1,2 @@
40 DIST gfan0.5.tar.gz 1134987 BLAKE2B 73ea793f5dbceb76a9f143a258ee3e38e1466e4e15ed96dbabb58f33d3a091a885479dd00f8179d3bf2c85cf275605823f63aa33272f1f9984e0fc5841ab35e9 SHA512 11a9657adcd5b39f73244450c09b132d8cd19474d0f9151c0127682bc16847537e4096d39e8a0a63b5c6aef6720e54a72bfd361a5271808d5a5595fd2df494fa
41 +DIST gfan0.6.2.tar.gz 1321059 BLAKE2B 1ed61e1e084a1ceb65dd21848440bc3a90486c0ce4012b3b64c8029e89636696d2b0e5446ea156d2cf050b5db179c7c2f25c97e683cecf6e9616e8553d8513bf SHA512 5961820750af2522fdc1a86c0254742c3b003607a8707df5d6cd5f0bc6461e4d3db3b1d3cb537979d57eb9dff387974a58aeb91d0b5246d7c701cadc5a2cf4cf
42
43 diff --git a/sci-mathematics/gfan/files/gfan-0.6.2-Makefile.patch b/sci-mathematics/gfan/files/gfan-0.6.2-Makefile.patch
44 new file mode 100644
45 index 00000000000..8e8db53bc91
46 --- /dev/null
47 +++ b/sci-mathematics/gfan/files/gfan-0.6.2-Makefile.patch
48 @@ -0,0 +1,155 @@
49 +diff --git a/Makefile b/Makefile
50 +index 2c9f949..a49a590 100644
51 +--- a/Makefile
52 ++++ b/Makefile
53 +@@ -2,8 +2,8 @@ ALL: default
54 +
55 + # When -g is used, it seems that stackdump does not work.
56 + # GPROFFLAG = -pg
57 +-GPROFFLAG = -g
58 +-#GPROFFLAG =
59 ++#GPROFFLAG = -g
60 ++GPROFFLAG =
61 +
62 + PREFIX?=/usr/local
63 +
64 +@@ -22,20 +22,8 @@ STACTDUMP_OPTIONS = -DSTACKDUMP_ENABLED -D__assert_fail=__assert_fail2
65 + endif
66 +
67 +
68 +-ifeq ($(sagepath),)
69 +-SAGE_LINKOPTIONS =
70 +-SAGE_INCLUDEOPTIONS =
71 +-else
72 +-SAGE_LINKOPTIONS = -L$(sagepath)/ -lpython2.6 -lcsage -lsingular
73 +-SAGE_INCLUDEOPTIONS = -I $(sagepath)/
74 +-SAGE_OBJECTS = sage.o sage_link.so
75 +-
76 +-sage_link.so: sage_link.pyx setup.py
77 +- python setup.py build_ext --inplace --pyrex-include-dirs=$(SAGE_ROOT)/devel/sage/
78 +-endif
79 +-
80 + ifeq ($(gmppath),)
81 +-GMP_LINKOPTIONS = -lgmp
82 ++GMP_LINKOPTIONS = -lgmp -lm
83 + GMP_INCLUDEOPTIONS =
84 + else
85 + GMP_LINKOPTIONS = $(gmppath)/lib/libgmp.a
86 +@@ -49,7 +37,7 @@ CDDDEFINE_PREFIX = -DNOCDDPREFIX
87 + endif
88 +
89 + ifeq ($(cddpath),)
90 +-CDD_LINKOPTIONS = -L/usr/local -lcddgmp
91 ++CDD_LINKOPTIONS = -lcddgmp
92 + CDD_INCLUDEOPTIONS =
93 + else
94 + CDD_LINKOPTIONS = $(cddpath)/lib/libcddgmp.a
95 +@@ -71,37 +59,8 @@ SOPLEX_OBJECTS = lp_soplexcdd.o
96 + endif
97 +
98 +
99 +-# rememember to adjust USEFACTORY in field_rationalfunctions2
100 +-ifeq ($(singular),)
101 +-ifeq ($(factory),)
102 +-SINGULAR_PATH =
103 +-SINGULAR_LINKOPTIONS =
104 +-SINGULAR_INCLUDEOPTIONS =
105 +-SINGULAR_OBJECTS = src/polynomialgcd.o
106 +-else
107 +-SINGULAR_PATH =
108 +-SINGULAR_LINKOPTIONS = -lcf -lcfmem
109 +-SINGULAR_INCLUDEOPTIONS = -I /usr/local/include/factory/
110 +-SINGULAR_OBJECTS = src/polynomialgcd.o src/ftmpl_inst.o
111 +-endif
112 +-else
113 +-#SINGULAR_PATH = $(HOME)/math/software/Singular-3-1-0
114 +-#SINGULAR_LINKOPTIONS = -L$(SINGULAR_PATH)/Singular -lsingular -lncurses -lreadline
115 +-#SINGULAR_INCLUDEOPTIONS = -I $(SINGULAR_PATH)/kernel -I $(SINGULAR_PATH)/omalloc
116 +-#SINGULAR_OBJECTS = src/singular.o src/singularconversion.o
117 +-SINGULAR_PATH = $(HOME)/math/software/Singular-svn/trunk/x86_64-Linux
118 +-SINGULAR_LINKOPTIONS = -L$(SINGULAR_PATH)/lib -lsingular -lncurses -lreadline -lcf -lcfmem
119 +-SINGULAR_INCLUDEOPTIONS = -I $(SINGULAR_PATH)/include -I $(SINGULAR_PATH)/include/omalloc
120 +-SINGULAR_OBJECTS = src/ftmpl_inst.o src/singular.o src/singularconversion.o
121 +-#Run the following line before running gfan
122 +-#export LD_LIBRARY_PATH="/home/anders/math/software/Singular-svn/trunk/x86_64-Linux/lib/:${LD_LIBRARY_PATH}"
123 +-endif
124 +-
125 +-# To produce factory templates:
126 +-#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
127 +-
128 +-ADDITIONALLINKOPTIONS = $(CDD_LINKOPTIONS) $(GMP_LINKOPTIONS) $(SOPLEX_LINKOPTIONS) $(SINGULAR_LINKOPTIONS) $(SAGE_LINKOPTIONS)
129 +-ADDITIONALINCLUDEOPTIONS = $(CDD_INCLUDEOPTIONS) $(GMP_INCLUDEOPTIONS) $(SOPLEX_INCLUDEOPTIONS) $(SINGULAR_INCLUDEOPTIONS) $(SAGE_INCLUDEOPTIONS)
130 ++ADDITIONALLINKOPTIONS = $(CDD_LINKOPTIONS) $(GMP_LINKOPTIONS) $(SOPLEX_LINKOPTIONS)
131 ++ADDITIONALINCLUDEOPTIONS = $(CDD_INCLUDEOPTIONS) $(GMP_INCLUDEOPTIONS) $(SOPLEX_INCLUDEOPTIONS)
132 +
133 +
134 + MKDIR=mkdir -p
135 +@@ -110,13 +69,11 @@ MKDIR=mkdir -p
136 + PREFIX =
137 + SHELL = /bin/sh
138 + #ARCH = LINUX
139 +-CC = $(PREFIX)gcc
140 +-CLINKER = $(CC)
141 +-CXX = $(PREFIX)g++
142 +-CCLINKER = $(CXX)
143 ++CC ?= $(PREFIX)gcc
144 ++CXX ?= $(PREFIX)g++
145 + #OPTFLAGS = -O2 -DGMPRATIONAL -DNDEBUG
146 + # Note that gcc produces wrong code with -O3
147 +-OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O2 #-O3 -fno-guess-branch-probability #-DNDEBUG
148 ++OPTFLAGS = -DGMPRATIONAL -Wuninitialized
149 + #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
150 + #OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O1 -fno-guess-branch-probability
151 + #-DNDEBUG
152 +@@ -125,10 +82,10 @@ OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O2 #-O3 -
153 + #OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O3 -msse2 -ftree-vectorizer-verbose=2 -ffast-math #-DNDEBUG
154 + #OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O3 -mavx -msse2 -ftree-vectorizer-verbose=2 -ffast-math #-DNDEBUG
155 +
156 +-CFLAGS = $(OPTFLAGS) $(GPROFFLAG) $(STACTDUMP_OPTIONS) $(ADDITIONALINCLUDEOPTIONS) -std=c++0x -g $(CDDDEFINE_PREFIX) #-pedantic
157 +-#CFLAGS = $(OPTFLAGS) $(GPROFFLAG) $(STACTDUMP_OPTIONS) $(ADDITIONALINCLUDEOPTIONS) -D_GLIBCXX_DEBUG -std=c++0x -g $(CDDDEFINE_PREFIX) #-pedantic
158 +-CCFLAGS = $(CFLAGS)
159 +-FFLAGS = $(OPTFLAGS)
160 ++CFLAGS := $(CFLAGS) $(OPTFLAGS) $(GPROFFLAG) $(ADDITIONALINCLUDEOPTIONS) #-pedantic
161 ++CXXFLAGS := $(CXXFLAGS) $(OPTFLAGS) $(GPROFFLAG) $(ADDITIONALINCLUDEOPTIONS) #-pedantic
162 ++
163 ++SINGULAR_OBJECTS = src/polynomialgcd.o
164 +
165 + CATSOBJECTS = lp_cdd.o \
166 + parser.o \
167 +@@ -394,16 +351,15 @@ EXECS = $(MAIN)
168 + # (compiling with gcc version 4.7.2 and running gfan _tropicaltraverse on a starting cone for Grassmann3_7)
169 + # Either this is a bug in the code or in the compiler. The bug disappears by compiling with -fno-guess-branch-probability
170 + src/symmetrictraversal.o: src/symmetrictraversal.cpp
171 +- $(CXX) $(CFLAGS) -fno-guess-branch-probability -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
172 ++ $(CXX) $(CXXFLAGS) -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
173 + # If compiling with clang, use the line below instead:
174 +-# $(CXX) $(CFLAGS) -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
175 ++# $(CXX) $(CXXFLAGS) -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
176 +
177 + # Define suffixes to make the program compile on legolas.imf.au.dk :
178 + .SUFFIXES: .o .cpp .c
179 +
180 + OBJECTS = $(addprefix src/,$(SOPLEX_OBJECTS)) \
181 + $(SINGULAR_OBJECTS) \
182 +- $(SAGE_OBJECTS) \
183 + $(addprefix src/,$(CATSOBJECTS)) \
184 + $(addprefix src/,$(APPOBJECTS)) \
185 + src/symmetrictraversal.o
186 +@@ -420,7 +376,7 @@ default: $(OBJECTS) $(ADDITIONALOBJECTS) $(EXECS)
187 +
188 + $(MAIN): $(OBJECTS)
189 + # $(CCLINKER) $(OBJECTS) $(ADDITIONALLINKOPTIONS) $(GPROFFLAG) -lpthread -o $(MAIN)
190 +- $(CCLINKER) $(OBJECTS) $(ADDITIONALLINKOPTIONS) $(GPROFFLAG) -lpthread -rdynamic -o $(MAIN)
191 ++ $(CXX) $(CXXFLAGS) -pthread -o $(MAIN) $(LDFLAGS) $(OBJECTS) -lpthread $(ADDITIONALLINKOPTIONS) $(GPROFFLAG)
192 +
193 + release:
194 + rm -f -r $(RELEASEDIR)/*
195 +@@ -546,7 +502,7 @@ check:
196 + .c.o:
197 + $(CC) $(CFLAGS) -c $< -o $(patsubst %.c,%.o,$<)
198 + .cpp.o:
199 +- $(CXX) $(CFLAGS) -c $< -o $(patsubst %.cpp,%.o,$<)
200 ++ $(CXX) $(CXXFLAGS) -c $< -o $(patsubst %.cpp,%.o,$<)
201 +
202 + # wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.2.tar.gz
203 + # tar -xzvf gmp-4.2.2.tar.gz
204
205 diff --git a/sci-mathematics/gfan/files/gfan-0.6.2-testsuite.patch b/sci-mathematics/gfan/files/gfan-0.6.2-testsuite.patch
206 new file mode 100644
207 index 00000000000..920646e486e
208 --- /dev/null
209 +++ b/sci-mathematics/gfan/files/gfan-0.6.2-testsuite.patch
210 @@ -0,0 +1,222 @@
211 +diff --git a/src/app_test.cpp b/src/app_test.cpp
212 +index 755bfe6..183c735 100644
213 +--- a/src/app_test.cpp
214 ++++ b/src/app_test.cpp
215 +@@ -562,6 +562,9 @@ int testIntegers()
216 + failed.push_back(i->folder);
217 + }
218 + cout<<"\n";
219 ++ cout<<"Number of succesful tests "<<good<<endl;
220 ++ cout<<"Number of failed tests "<<bad<<endl;
221 ++
222 + if(!failed.empty())
223 + {
224 + cout<<"Failed tests:\n-------------\n";
225 +@@ -569,11 +572,9 @@ int testIntegers()
226 + {
227 + cout<<*i<<" FAILED!\n";
228 + }
229 ++ return 1;
230 + }
231 +
232 +- cout<<"Number of succesful tests "<<good<<endl;
233 +- cout<<"Number of failed tests "<<bad<<endl;
234 +-
235 + return 0;
236 + }
237 + };
238 +diff --git a/testsuite/0008PolynomialSetUnion/command b/testsuite/0008PolynomialSetUnion/command
239 +index cbb23d6..d61cb71 100644
240 +--- a/testsuite/0008PolynomialSetUnion/command
241 ++++ b/testsuite/0008PolynomialSetUnion/command
242 +@@ -1 +1 @@
243 +-%s _bases | %s _polynomialsetunion |sort
244 ++%s _bases | %s _polynomialsetunion |LC_ALL=C sort|tail -n +2 | sed -e '$ d'
245 +diff --git a/testsuite/0008PolynomialSetUnion/output b/testsuite/0008PolynomialSetUnion/output
246 +index 38dfb6f..12a65c7 100644
247 +--- a/testsuite/0008PolynomialSetUnion/output
248 ++++ b/testsuite/0008PolynomialSetUnion/output
249 +@@ -1,62 +1,60 @@
250 +-{
251 ++a*b-c^6,
252 ++a*b^2-c^3,
253 ++a*b^4-b,
254 ++a*c-b^6,
255 ++a*c^2-b,
256 ++a*c^6-c,
257 ++a-b^11,
258 ++a-b^2*c,
259 ++a-c^9,
260 + a^11-c,
261 + a^15-a,
262 ++a^2*b-c,
263 + a^2*b^3-a,
264 ++a^2*c-b^3,
265 + a^2-b^8,
266 +-a^2*b-c,
267 + a^2-c^4,
268 +-a^2*c-b^3,
269 +-a^3-b^5,
270 +-a^3-b*c^2,
271 + a^3*c^2-c}
272 +-a^4-b^2,
273 ++a^3-b*c^2,
274 ++a^3-b^5,
275 + a^4*c-a,
276 ++a^4-b^2,
277 + a^5-c^3,
278 + a^6*b-a,
279 + a^6-b*c,
280 + a^8-c^2,
281 + a^9-b,
282 +-a-b^11,
283 +-a-b^2*c,
284 +-a*b^2-c^3,
285 +-a*b^4-b,
286 +-a*b-c^6,
287 +-a*c^2-b,
288 +-a*c^6-c,
289 +-a-c^9,
290 +-a*c-b^6,
291 ++b*c-a^6,
292 ++b*c^2-a^3,
293 ++b*c^4-c,
294 ++b-a*c^2,
295 ++b-a^9,
296 ++b-c^11,
297 + b^11-a,
298 + b^15-b,
299 +-b^2-a^4,
300 ++b^2*c-a,
301 + b^2*c^3-b,
302 ++b^2-a^4,
303 + b^2-c^8,
304 +-b^2*c-a,
305 + b^3-a^2*c,
306 + b^3-c^5,
307 + b^4-c^2,
308 + b^5-a^3,
309 +-b^6-a*c,
310 + b^6*c-b,
311 ++b^6-a*c,
312 + b^8-a^2,
313 + b^9-c,
314 +-b-a^9,
315 +-b-a*c^2,
316 +-b-c^11,
317 +-b*c^2-a^3,
318 +-b*c^4-c,
319 +-b*c-a^6,
320 ++c-a^11,
321 ++c-a^2*b,
322 ++c-b^9,
323 + c^11-b,
324 + c^15-c,
325 + c^2-a^8,
326 + c^2-b^4,
327 +-c^3-a^5,
328 + c^3-a*b^2,
329 ++c^3-a^5,
330 + c^4-a^2,
331 + c^5-b^3,
332 + c^6-a*b,
333 + c^8-b^2,
334 + c^9-a,
335 +-c-a^11,
336 +-c-a^2*b,
337 +-c-b^9,
338 +-Q[a,b,c]
339 +diff --git a/testsuite/0008PolynomialSetUnion/outputNew b/testsuite/0008PolynomialSetUnion/outputNew
340 +index 38dfb6f..12a65c7 100644
341 +--- a/testsuite/0008PolynomialSetUnion/outputNew
342 ++++ b/testsuite/0008PolynomialSetUnion/outputNew
343 +@@ -1,62 +1,60 @@
344 +-{
345 ++a*b-c^6,
346 ++a*b^2-c^3,
347 ++a*b^4-b,
348 ++a*c-b^6,
349 ++a*c^2-b,
350 ++a*c^6-c,
351 ++a-b^11,
352 ++a-b^2*c,
353 ++a-c^9,
354 + a^11-c,
355 + a^15-a,
356 ++a^2*b-c,
357 + a^2*b^3-a,
358 ++a^2*c-b^3,
359 + a^2-b^8,
360 +-a^2*b-c,
361 + a^2-c^4,
362 +-a^2*c-b^3,
363 +-a^3-b^5,
364 +-a^3-b*c^2,
365 + a^3*c^2-c}
366 +-a^4-b^2,
367 ++a^3-b*c^2,
368 ++a^3-b^5,
369 + a^4*c-a,
370 ++a^4-b^2,
371 + a^5-c^3,
372 + a^6*b-a,
373 + a^6-b*c,
374 + a^8-c^2,
375 + a^9-b,
376 +-a-b^11,
377 +-a-b^2*c,
378 +-a*b^2-c^3,
379 +-a*b^4-b,
380 +-a*b-c^6,
381 +-a*c^2-b,
382 +-a*c^6-c,
383 +-a-c^9,
384 +-a*c-b^6,
385 ++b*c-a^6,
386 ++b*c^2-a^3,
387 ++b*c^4-c,
388 ++b-a*c^2,
389 ++b-a^9,
390 ++b-c^11,
391 + b^11-a,
392 + b^15-b,
393 +-b^2-a^4,
394 ++b^2*c-a,
395 + b^2*c^3-b,
396 ++b^2-a^4,
397 + b^2-c^8,
398 +-b^2*c-a,
399 + b^3-a^2*c,
400 + b^3-c^5,
401 + b^4-c^2,
402 + b^5-a^3,
403 +-b^6-a*c,
404 + b^6*c-b,
405 ++b^6-a*c,
406 + b^8-a^2,
407 + b^9-c,
408 +-b-a^9,
409 +-b-a*c^2,
410 +-b-c^11,
411 +-b*c^2-a^3,
412 +-b*c^4-c,
413 +-b*c-a^6,
414 ++c-a^11,
415 ++c-a^2*b,
416 ++c-b^9,
417 + c^11-b,
418 + c^15-c,
419 + c^2-a^8,
420 + c^2-b^4,
421 +-c^3-a^5,
422 + c^3-a*b^2,
423 ++c^3-a^5,
424 + c^4-a^2,
425 + c^5-b^3,
426 + c^6-a*b,
427 + c^8-b^2,
428 + c^9-a,
429 +-c-a^11,
430 +-c-a^2*b,
431 +-c-b^9,
432 +-Q[a,b,c]
433
434 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
435 new file mode 100644
436 index 00000000000..83f4b66f823
437 --- /dev/null
438 +++ b/sci-mathematics/gfan/files/gfan-0.6.2-xcode9.3_compat.patch
439 @@ -0,0 +1,13 @@
440 +diff --git a/src/app_main.cpp b/src/app_main.cpp
441 +index a33c042..e7ade81 100644
442 +--- a/src/app_main.cpp
443 ++++ b/src/app_main.cpp
444 +@@ -205,7 +205,7 @@ public:
445 + }
446 +
447 + ep->close();
448 +- delete ep;//<--- In next release, make the class virtual
449 ++// delete ep;//<--- In next release, make the class virtual # this is miscompiled clang@xcode-6.3
450 +
451 + printf("\n");
452 +
453
454 diff --git a/sci-mathematics/gfan/gfan-0.6.2.ebuild b/sci-mathematics/gfan/gfan-0.6.2.ebuild
455 new file mode 100644
456 index 00000000000..07d32ab4907
457 --- /dev/null
458 +++ b/sci-mathematics/gfan/gfan-0.6.2.ebuild
459 @@ -0,0 +1,56 @@
460 +# Copyright 1999-2020 Gentoo Authors
461 +# Distributed under the terms of the GNU General Public License v2
462 +
463 +EAPI=7
464 +
465 +inherit flag-o-matic toolchain-funcs
466 +
467 +DESCRIPTION="Compute Groebner fans and tropical varieties"
468 +HOMEPAGE="https://users-math.au.dk/~jensen/software/gfan/gfan.html"
469 +SRC_URI="https://users-math.au.dk/~jensen/software/${PN}/${PN}${PV}.tar.gz"
470 +
471 +LICENSE="GPL-2+"
472 +SLOT="0"
473 +KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
474 +IUSE="doc"
475 +
476 +BDEPEND="doc? ( virtual/latex-base )"
477 +DEPEND="dev-libs/gmp:0=[cxx]
478 + sci-libs/cddlib:0="
479 +RDEPEND="${DEPEND}"
480 +
481 +S="${WORKDIR}/${PN}${PV}"
482 +
483 +PATCHES=(
484 + "${FILESDIR}/${PN}-0.6.2-xcode9.3_compat.patch"
485 + "${FILESDIR}/${PN}-0.6.2-testsuite.patch"
486 + "${FILESDIR}/${PN}-0.6.2-Makefile.patch"
487 + )
488 +
489 +pkg_setup() {
490 + tc-export CC CXX
491 + append-cxxflags -DNOCDDPREFIX
492 +}
493 +
494 +src_configure() {
495 + # The upstream Makefile says that GCC produces bad code with -O3.
496 + replace-flags "-O3" "-O2"
497 + default
498 +}
499 +
500 +src_compile() {
501 + default
502 + if use doc; then
503 + pushd doc > /dev/null || die
504 + # The LaTeX build commands need to be repeated until the
505 + # document "stops changing," which is not as easy as it
506 + # sounds to detect. Running it twice seems to work here.
507 + pdflatex manual.tex && bibtex manual && pdflatex manual.tex || die
508 + popd > /dev/null || die
509 + fi
510 +}
511 +
512 +src_install() {
513 + emake PREFIX="${ED}/usr" install
514 + use doc && dodoc doc/manual.pdf
515 +}