commit:     6236187e8b9672b0006a0ba02520281821368036
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 22 21:06:54 2019 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jun 22 21:06:54 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6236187e

sci-mathematics/gfan: Port to EAPI 7

Package-Manager: Portage-2.3.67, Repoman-2.3.15
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../gfan/files/gfan-0.5-fix-build-system.patch     | 55 ++++++++++++++++++++++
 sci-mathematics/gfan/gfan-0.5-r1.ebuild            | 32 ++++++-------
 2 files changed, 70 insertions(+), 17 deletions(-)

diff --git a/sci-mathematics/gfan/files/gfan-0.5-fix-build-system.patch 
b/sci-mathematics/gfan/files/gfan-0.5-fix-build-system.patch
new file mode 100644
index 00000000000..3bf96ed088c
--- /dev/null
+++ b/sci-mathematics/gfan/files/gfan-0.5-fix-build-system.patch
@@ -0,0 +1,55 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,5 @@
+ ALL: default
+ 
+-# GPROFFLAG = -pg
+- GPROFFLAG = -g
+ 
+ PREFIX?=/usr/local
+ 
+@@ -77,16 +75,13 @@
+ 
+ SHELL       = /bin/sh
+ #ARCH        = LINUX
+-CC          = gcc
+ CLINKER     = $(CC)
+-CXX         = g++
+ CCLINKER    = $(CXX)
+-#OPTFLAGS    = -O2 -DGMPRATIONAL -DNDEBUG
+-OPTFLAGS    = -O2 -DGMPRATIONAL -Wuninitialized
+ 
+-CFLAGS          = $(OPTFLAGS) $(GPROFFLAG) $(ADDITIONALINCLUDEOPTIONS) 
#-pedantic
+-CCFLAGS         = $(CFLAGS)
+-FFLAGS          = $(OPTFLAGS)
++
++CFLAGS      += $(GPROFFLAG) $(ADDITIONALINCLUDEOPTIONS) -Wuninitialized
++CXXFLAGS    += $(GPROFFLAG) $(ADDITIONALINCLUDEOPTIONS) -Wuninitialized
++CPPFLAGS    += -DGMPRATIONAL -DNDEBUG
+ 
+ CATSOBJECTS = $(GCATSPATH)lp_cdd.o \
+               $(SOPLEX_OBJECTS) \
+@@ -317,7 +312,7 @@
+ default: $(OBJECTS) $(ADDITIONALOBJECTS) $(EXECS)
+ 
+ $(MAIN): $(OBJECTS)
+-      $(CCLINKER) $(OBJECTS) $(ADDITIONALLINKOPTIONS) $(GPROFFLAG) -o $(MAIN)
++      $(CCLINKER) $(LDFLAGS) $(OBJECTS) $(ADDITIONALLINKOPTIONS) $(GPROFFLAG) 
-o $(MAIN)
+ 
+ release:
+       rm -f -r $(RELEASEDIR)/*
+@@ -430,14 +425,6 @@
+       cp gfanlib.h gfanlib/
+       cp gfanlib_* gfanlib/
+       tar zcf -  gfanlib > gfanlib.tar.gz
+-.c.o:
+-      $(CC) $(CFLAGS) -c $<
+-.cc.o:
+-      $(CXX) -c $<
+-.cpp.o:
+-      $(CXX) $(CFLAGS) -c $<
+-.C.o:
+-      $(CXX) -c $<
+ # wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.2.tar.gz
+ # tar -xzvf gmp-4.2.2.tar.gz
+ # cd gmp-4.2.2

diff --git a/sci-mathematics/gfan/gfan-0.5-r1.ebuild 
b/sci-mathematics/gfan/gfan-0.5-r1.ebuild
index ec591ee1957..5d1d84e462a 100644
--- a/sci-mathematics/gfan/gfan-0.5-r1.ebuild
+++ b/sci-mathematics/gfan/gfan-0.5-r1.ebuild
@@ -1,38 +1,36 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
-DESCRIPTION="computes Groebner fans and tropical varities"
+DESCRIPTION="Compute Groebner fans and tropical varities"
 HOMEPAGE="http://www.math.tu-berlin.de/~jensen/software/gfan/gfan.html";
 SRC_URI="http://www.math.tu-berlin.de/~jensen/software/gfan/${PN}${PV}.tar.gz";
 
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
-IUSE=""
 
-DEPEND="dev-libs/gmp[cxx]
-       sci-libs/cddlib"
+DEPEND="
+       dev-libs/gmp:0=[cxx]
+       sci-libs/cddlib:0="
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${PN}${PV}/"
 
 PATCHES=(
-       "${FILESDIR}/${P}-double-declare-fix.patch"
-       "${FILESDIR}/${P}-gcc6.1-compat.patch"
-       )
-
-src_prepare () {
-       default
-       sed -i -e "s/-O2/${CXXFLAGS}/" \
-               -e "/GPROFFLAG =/d" \
-               -e "s/g++/$(tc-getCXX)/" \
-               -e "s/\$(CCLINKER)/& \$(LDFLAGS)/" Makefile || die
+       "${FILESDIR}"/${P}-double-declare-fix.patch
+       "${FILESDIR}"/${P}-gcc6.1-compat.patch
+       "${FILESDIR}"/${P}-fix-build-system.patch
+)
+
+src_configure() {
+       tc-export CXX
 }
 
 src_install() {
        emake PREFIX="${ED}/usr" install
+       einstalldocs
 }

Reply via email to