Gentoo Archives: gentoo-commits

From: Thomas Kahle <tomka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/normaliz/files/, sci-mathematics/normaliz/
Date: Tue, 29 Sep 2015 12:16:29
Message-Id: 1443528967.03698a3eb9ff3491c9b678a09c49e0fdf7567004.tomka@gentoo
1 commit: 03698a3eb9ff3491c9b678a09c49e0fdf7567004
2 Author: Thomas Kahle <tomka <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 29 12:15:51 2015 +0000
4 Commit: Thomas Kahle <tomka <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 29 12:16:07 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03698a3e
7
8 sci-mathematics/normaliz: Bump to 3.0.0
9
10 Package-Manager: portage-2.2.20.1
11
12 sci-mathematics/normaliz/Manifest | 1 +
13 .../files/normaliz-3.0.0-respect-flags.patch | 47 ++++++++++++++++
14 sci-mathematics/normaliz/normaliz-3.0.0.ebuild | 64 ++++++++++++++++++++++
15 3 files changed, 112 insertions(+)
16
17 diff --git a/sci-mathematics/normaliz/Manifest b/sci-mathematics/normaliz/Manifest
18 index 34b83e0..bf7a9f9 100644
19 --- a/sci-mathematics/normaliz/Manifest
20 +++ b/sci-mathematics/normaliz/Manifest
21 @@ -1 +1,2 @@
22 DIST Normaliz2.12.2.zip 6432949 SHA256 230772425b3c9964b9e144c0919c75fac0ec95260a1943c10a8a94eea9d7273e SHA512 fd42071cb87b8efbaf9af0885c173a0583e0b38dedb8821a83225eeebb44060a7b5748c44adfc4faeac20c3a1706071bcb9883cb4447e4a1ff3aeb770bd22038 WHIRLPOOL cb2974e02eac6e6d51c234214a719a24ad2e12d1400f0a6f8aee3e7a4ba3aa2ba053beec65c9032f42726e4dd4f1866820bb5b7b96f7c3d34cd132fcdbdb91af
23 +DIST Normaliz3.0.0.zip 8607387 SHA256 4dbc315de34a1f115a911194b22628948a32a993c486bda03623e6786172857b SHA512 b4ce7b5ab849982ee986e3b1cbef1ed620ddf57c8d89ef3d5973509ead52d49c2a59a2924357fb70838963ec1490f68cfe0c5c294b05c571402f8445234bdbf5 WHIRLPOOL f90b81eb7ea426a393cd515932765ad9e48b888e47c07a709ab085f15960c4cda4c70f90ba61bf590bbe9a2ee2ca125a46bd9a24bb0940c1e2b09203b0f16452
24
25 diff --git a/sci-mathematics/normaliz/files/normaliz-3.0.0-respect-flags.patch b/sci-mathematics/normaliz/files/normaliz-3.0.0-respect-flags.patch
26 new file mode 100644
27 index 0000000..cfd91d2
28 --- /dev/null
29 +++ b/sci-mathematics/normaliz/files/normaliz-3.0.0-respect-flags.patch
30 @@ -0,0 +1,47 @@
31 +diff -U 3 -dHrN Normaliz3.0.orig/source/Makefile Normaliz3.0/source/Makefile
32 +--- Normaliz3.0.orig/source/Makefile 2015-09-29 14:05:44.960631514 +0200
33 ++++ Normaliz3.0/source/Makefile 2015-09-29 14:06:06.510346764 +0200
34 +@@ -19,16 +19,16 @@
35 + @$(MAKE) normaliz
36 +
37 + normaliz.o: $(SOURCES) $(HEADERS) $(LIBHEADERS)
38 +- $(CXX) $(CXXFLAGS) $(NORMFLAGS) -c Normaliz.cpp -o normaliz.o
39 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -c Normaliz.cpp -o normaliz.o
40 +
41 + normaliz: $(SOURCES) $(HEADERS) normaliz.o libnormaliz/libnormaliz.a
42 +- $(CXX) $(CXXFLAGS) $(NORMFLAGS) normaliz.o libnormaliz/libnormaliz.a $(LINKFLAGS) -o normaliz
43 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) normaliz.o libnormaliz/libnormaliz.a $(LINKFLAGS) -o normaliz
44 +
45 + normaliz1: $(SOURCES) $(HEADERS) $(LIBHEADERS) $(LIBSOURCES)
46 +- $(CXX) $(CXXFLAGS) $(NORMFLAGS) Normaliz-impl.cpp $(LINKFLAGS) -o normaliz1
47 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) Normaliz-impl.cpp $(LINKFLAGS) -o normaliz1
48 +
49 + normaliz-pg: $(SOURCES) $(HEADERS) $(LIBHEADERS) $(LIBSOURCES)
50 +- $(CXX) $(CXXFLAGS) $(NORMFLAGS) -pg Normaliz-impl.cpp $(LINKFLAGS) -o normaliz-pg
51 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -pg Normaliz-impl.cpp $(LINKFLAGS) -o normaliz-pg
52 +
53 +
54 + #always go down the directory and let the make there check what has to be done
55 +diff -U 3 -dHrN Normaliz3.0.orig/source/Makefile.configuration Normaliz3.0/source/Makefile.configuration
56 +--- Normaliz3.0.orig/source/Makefile.configuration 2015-09-29 14:05:44.960631514 +0200
57 ++++ Normaliz3.0/source/Makefile.configuration 2015-09-29 14:07:16.419426513 +0200
58 +@@ -1,11 +1,9 @@
59 + ##
60 + ## Makefile configuration for normaliz
61 + ##
62 +-CXX = g++
63 + #CXX = linux32 g++ -m32 -march=i686 #compile it for linux32
64 + CXXFLAGS += -std=c++0x
65 + CXXFLAGS += -Wall -pedantic
66 +-CXXFLAGS += -O3 -funroll-loops
67 + #CXXFLAGS += -I /usr/local/boost_1_45_0
68 + #CXXFLAGS += -g ## debugging
69 + #CXXFLAGS += -pg ## profiling
70 +@@ -21,7 +19,6 @@
71 + endif
72 +
73 + ## for distributing the executables link static (does not work for mac)
74 +-CXXFLAGS += -static
75 + ## for almost static compilation on Mac use
76 + #CXXFLAGS += -static-libgcc
77 + ## make it compatible with older Mac versions
78
79 diff --git a/sci-mathematics/normaliz/normaliz-3.0.0.ebuild b/sci-mathematics/normaliz/normaliz-3.0.0.ebuild
80 new file mode 100644
81 index 0000000..749e006
82 --- /dev/null
83 +++ b/sci-mathematics/normaliz/normaliz-3.0.0.ebuild
84 @@ -0,0 +1,64 @@
85 +# Copyright 1999-2015 Gentoo Foundation
86 +# Distributed under the terms of the GNU General Public License v2
87 +# $Id$
88 +
89 +EAPI=5
90 +
91 +inherit eutils toolchain-funcs versionator
92 +
93 +MYPV=$(get_version_component_range 1-2)
94 +MYP="Normaliz${MYPV}"
95 +
96 +DESCRIPTION="Tool for computations in affine monoids and more"
97 +HOMEPAGE="http://www.mathematik.uni-osnabrueck.de/normaliz/"
98 +SRC_URI="http://www.mathematik.uni-osnabrueck.de/${PN}/${MYP}/Normaliz${PV}.zip"
99 +
100 +LICENSE="GPL-3"
101 +SLOT="0"
102 +KEYWORDS="~amd64 ~x86"
103 +IUSE="doc extras openmp"
104 +
105 +RDEPEND="dev-libs/gmp[cxx]"
106 +DEPEND="${RDEPEND}
107 + app-arch/unzip
108 + dev-libs/boost"
109 +# Only a boost header is needed -> not RDEPEND
110 +
111 +S=${WORKDIR}/${MYP}
112 +
113 +src_prepare () {
114 + epatch "${FILESDIR}/${P}-respect-flags.patch"
115 + epatch "${FILESDIR}/${PN}-2.12.2-gcc49.patch"
116 +
117 + # Respect users AR tool (Bug 474532)
118 + sed -e "s:ar -cr:$(tc-getAR) -cr:" -i source/libnormaliz/Makefile || die
119 +
120 + if use openmp && tc-has-openmp; then
121 + export OPENMP=yes
122 + else
123 + export OPENMP=no
124 + fi
125 +}
126 +
127 +src_compile(){
128 + emake CXX="$(tc-getCXX)" OPENMP="${OPENMP}" -C source
129 +}
130 +
131 +src_install() {
132 + dobin source/normaliz
133 + if use doc ; then
134 + dodoc doc/"Normaliz.pdf"
135 + dodoc doc/"NmzIntegrate.pdf"
136 + fi
137 + if use extras; then
138 + elog "You have selected to install extras which consist of Macaulay2"
139 + elog "and Singular packages. These have been installed into "
140 + elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
141 + elog "to the homepages of the respective projects for additional information."
142 + elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
143 + elog "copies of these interface packages. Usually you don't need normaliz's versions."
144 + insinto "/usr/share/${PN}"
145 + doins Singular/normaliz.lib
146 + doins Macaulay2/Normaliz.m2
147 + fi
148 +}