public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/normaliz/files/, sci-mathematics/normaliz/
@ 2015-09-29 12:16 Thomas Kahle
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Kahle @ 2015-09-29 12:16 UTC (permalink / raw
  To: gentoo-commits

commit:     03698a3eb9ff3491c9b678a09c49e0fdf7567004
Author:     Thomas Kahle <tomka <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 29 12:15:51 2015 +0000
Commit:     Thomas Kahle <tomka <AT> gentoo <DOT> org>
CommitDate: Tue Sep 29 12:16:07 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03698a3e

sci-mathematics/normaliz: Bump to 3.0.0

Package-Manager: portage-2.2.20.1

 sci-mathematics/normaliz/Manifest                  |  1 +
 .../files/normaliz-3.0.0-respect-flags.patch       | 47 ++++++++++++++++
 sci-mathematics/normaliz/normaliz-3.0.0.ebuild     | 64 ++++++++++++++++++++++
 3 files changed, 112 insertions(+)

diff --git a/sci-mathematics/normaliz/Manifest b/sci-mathematics/normaliz/Manifest
index 34b83e0..bf7a9f9 100644
--- a/sci-mathematics/normaliz/Manifest
+++ b/sci-mathematics/normaliz/Manifest
@@ -1 +1,2 @@
 DIST Normaliz2.12.2.zip 6432949 SHA256 230772425b3c9964b9e144c0919c75fac0ec95260a1943c10a8a94eea9d7273e SHA512 fd42071cb87b8efbaf9af0885c173a0583e0b38dedb8821a83225eeebb44060a7b5748c44adfc4faeac20c3a1706071bcb9883cb4447e4a1ff3aeb770bd22038 WHIRLPOOL cb2974e02eac6e6d51c234214a719a24ad2e12d1400f0a6f8aee3e7a4ba3aa2ba053beec65c9032f42726e4dd4f1866820bb5b7b96f7c3d34cd132fcdbdb91af
+DIST Normaliz3.0.0.zip 8607387 SHA256 4dbc315de34a1f115a911194b22628948a32a993c486bda03623e6786172857b SHA512 b4ce7b5ab849982ee986e3b1cbef1ed620ddf57c8d89ef3d5973509ead52d49c2a59a2924357fb70838963ec1490f68cfe0c5c294b05c571402f8445234bdbf5 WHIRLPOOL f90b81eb7ea426a393cd515932765ad9e48b888e47c07a709ab085f15960c4cda4c70f90ba61bf590bbe9a2ee2ca125a46bd9a24bb0940c1e2b09203b0f16452

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
new file mode 100644
index 0000000..cfd91d2
--- /dev/null
+++ b/sci-mathematics/normaliz/files/normaliz-3.0.0-respect-flags.patch
@@ -0,0 +1,47 @@
+diff -U 3 -dHrN Normaliz3.0.orig/source/Makefile Normaliz3.0/source/Makefile
+--- Normaliz3.0.orig/source/Makefile	2015-09-29 14:05:44.960631514 +0200
++++ Normaliz3.0/source/Makefile	2015-09-29 14:06:06.510346764 +0200
+@@ -19,16 +19,16 @@
+ 	@$(MAKE) normaliz
+ 
+ normaliz.o: $(SOURCES) $(HEADERS) $(LIBHEADERS)
+-	$(CXX) $(CXXFLAGS) $(NORMFLAGS) -c Normaliz.cpp -o normaliz.o
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) -c Normaliz.cpp -o normaliz.o
+ 
+ normaliz: $(SOURCES) $(HEADERS) normaliz.o libnormaliz/libnormaliz.a
+-	$(CXX) $(CXXFLAGS) $(NORMFLAGS) normaliz.o libnormaliz/libnormaliz.a $(LINKFLAGS) -o normaliz
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) normaliz.o libnormaliz/libnormaliz.a $(LINKFLAGS) -o normaliz
+ 
+ normaliz1: $(SOURCES) $(HEADERS) $(LIBHEADERS) $(LIBSOURCES)
+-	$(CXX) $(CXXFLAGS) $(NORMFLAGS) Normaliz-impl.cpp $(LINKFLAGS) -o normaliz1
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) Normaliz-impl.cpp $(LINKFLAGS) -o normaliz1
+ 
+ normaliz-pg: $(SOURCES) $(HEADERS) $(LIBHEADERS) $(LIBSOURCES)
+-	$(CXX) $(CXXFLAGS) $(NORMFLAGS) -pg Normaliz-impl.cpp $(LINKFLAGS) -o normaliz-pg
++	$(CXX) $(CXXFLAGS) $(LDFLAGS) -pg Normaliz-impl.cpp $(LINKFLAGS) -o normaliz-pg
+ 
+ 
+ #always go down the directory and let the make there check what has to be done
+diff -U 3 -dHrN Normaliz3.0.orig/source/Makefile.configuration Normaliz3.0/source/Makefile.configuration
+--- Normaliz3.0.orig/source/Makefile.configuration	2015-09-29 14:05:44.960631514 +0200
++++ Normaliz3.0/source/Makefile.configuration	2015-09-29 14:07:16.419426513 +0200
+@@ -1,11 +1,9 @@
+ ##
+ ## Makefile configuration for normaliz
+ ##
+-CXX = g++ 
+ #CXX = linux32 g++ -m32 -march=i686  #compile it for linux32
+ CXXFLAGS += -std=c++0x
+ CXXFLAGS += -Wall -pedantic
+-CXXFLAGS += -O3 -funroll-loops
+ #CXXFLAGS += -I /usr/local/boost_1_45_0
+ #CXXFLAGS += -g       ## debugging
+ #CXXFLAGS += -pg      ## profiling
+@@ -21,7 +19,6 @@
+ endif
+ 
+ ## for distributing the executables link static (does not work for mac)
+-CXXFLAGS += -static
+ ## for almost static compilation on Mac use
+ #CXXFLAGS += -static-libgcc
+ ## make it compatible with older Mac versions

diff --git a/sci-mathematics/normaliz/normaliz-3.0.0.ebuild b/sci-mathematics/normaliz/normaliz-3.0.0.ebuild
new file mode 100644
index 0000000..749e006
--- /dev/null
+++ b/sci-mathematics/normaliz/normaliz-3.0.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs versionator
+
+MYPV=$(get_version_component_range 1-2)
+MYP="Normaliz${MYPV}"
+
+DESCRIPTION="Tool for computations in affine monoids and more"
+HOMEPAGE="http://www.mathematik.uni-osnabrueck.de/normaliz/"
+SRC_URI="http://www.mathematik.uni-osnabrueck.de/${PN}/${MYP}/Normaliz${PV}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc extras openmp"
+
+RDEPEND="dev-libs/gmp[cxx]"
+DEPEND="${RDEPEND}
+	app-arch/unzip
+	dev-libs/boost"
+# Only a boost header is needed -> not RDEPEND
+
+S=${WORKDIR}/${MYP}
+
+src_prepare () {
+	epatch "${FILESDIR}/${P}-respect-flags.patch"
+	epatch "${FILESDIR}/${PN}-2.12.2-gcc49.patch"
+
+	# Respect users AR tool (Bug 474532)
+	sed -e "s:ar -cr:$(tc-getAR) -cr:" -i source/libnormaliz/Makefile || die
+
+	if use openmp && tc-has-openmp; then
+		export OPENMP=yes
+	else
+		export OPENMP=no
+	fi
+}
+
+src_compile(){
+	emake CXX="$(tc-getCXX)" OPENMP="${OPENMP}" -C source
+}
+
+src_install() {
+	dobin source/normaliz
+	if use doc ; then
+		dodoc doc/"Normaliz.pdf"
+		dodoc doc/"NmzIntegrate.pdf"
+	fi
+	if use extras; then
+		elog "You have selected to install extras which consist of Macaulay2"
+		elog "and Singular packages. These have been installed into "
+		elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
+		elog "to the homepages of the respective projects for additional information."
+		elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
+		elog "copies of these interface packages. Usually you don't need normaliz's versions."
+		insinto "/usr/share/${PN}"
+		doins Singular/normaliz.lib
+		doins Macaulay2/Normaliz.m2
+	fi
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/normaliz/files/, sci-mathematics/normaliz/
@ 2015-11-13 15:59 Thomas Kahle
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Kahle @ 2015-11-13 15:59 UTC (permalink / raw
  To: gentoo-commits

commit:     58275ce7ddf2287f6b1457d0b7912fcd722eb4c3
Author:     Thomas Kahle <tomka <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 13 15:58:50 2015 +0000
Commit:     Thomas Kahle <tomka <AT> gentoo <DOT> org>
CommitDate: Fri Nov 13 15:59:04 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58275ce7

sci-mathematics/normaliz: add gmp-6.1 compatibility

Fixes bug 565366.

Package-Manager: portage-2.2.20.1

 .../files/normaliz-3.0.0-gmp61-compat.patch        | 70 ++++++++++++++++++++++
 sci-mathematics/normaliz/normaliz-3.0.0.ebuild     |  1 +
 2 files changed, 71 insertions(+)

diff --git a/sci-mathematics/normaliz/files/normaliz-3.0.0-gmp61-compat.patch b/sci-mathematics/normaliz/files/normaliz-3.0.0-gmp61-compat.patch
new file mode 100644
index 0000000..cf6f81f
--- /dev/null
+++ b/sci-mathematics/normaliz/files/normaliz-3.0.0-gmp61-compat.patch
@@ -0,0 +1,70 @@
+diff --git a/source/libnormaliz/HilbertSeries.cpp b/source/libnormaliz/HilbertSeries.cpp
+index 311b839..47a84cd 100644
+--- a/source/libnormaliz/HilbertSeries.cpp
++++ b/source/libnormaliz/HilbertSeries.cpp
+@@ -399,7 +399,7 @@ void HilbertSeries::computeHilbertQuasiPolynomial() const {
+     //divide by gcd //TODO operate directly on vector
+     Matrix<mpz_class> QP(quasi_poly);
+     mpz_class g = QP.matrix_gcd();
+-    g = gcd(g,quasi_denom);
++    g = libnormaliz::gcd(g,quasi_denom);
+     quasi_denom /= g;
+     QP.scalar_division(g);
+     //we use a normed shift, so that the cylcic shift % period always yields a non-negative integer
+diff --git a/source/libnormaliz/matrix.cpp b/source/libnormaliz/matrix.cpp
+index d643eca..ae7684c 100644
+--- a/source/libnormaliz/matrix.cpp
++++ b/source/libnormaliz/matrix.cpp
+@@ -735,7 +735,7 @@ Integer Matrix<Integer>::matrix_gcd() const{
+     Integer g=0,h;
+     for (size_t i = 0; i <nr; i++) {
+         h = v_gcd(elem[i]);
+-        g = gcd<Integer>(g, h);
++        g = libnormaliz::gcd<Integer>(g, h);
+         if (g==1) return g;
+     }
+     return g;
+@@ -1766,7 +1766,7 @@ vector<Integer> Matrix<Integer>::solve_rectangular(const vector<Integer>& v, Int
+             return vector<Integer>();
+         }
+     }
+-    Integer total_gcd =gcd(denom,v_gcd(Linear_Form)); // extract the gcd of denom and solution
++    Integer total_gcd = libnormaliz::gcd(denom,v_gcd(Linear_Form)); // extract the gcd of denom and solution
+     denom/=total_gcd;
+     v_scalar_division(Linear_Form,total_gcd);
+     return Linear_Form;
+diff --git a/source/libnormaliz/sublattice_representation.cpp b/source/libnormaliz/sublattice_representation.cpp
+index e3a7c9d..f5bba3e 100644
+--- a/source/libnormaliz/sublattice_representation.cpp
++++ b/source/libnormaliz/sublattice_representation.cpp
+@@ -213,7 +213,7 @@ void Sublattice_Representation<Integer>::compose(const Sublattice_Representation
+     
+     //check if a factor can be extraced from B  //TODO necessary?
+     Integer g = B.matrix_gcd();
+-    g = gcd(g,c);  //TODO necessary??
++    g = libnormaliz::gcd(g,c);  //TODO necessary??
+     if (g > 1) {
+         c /= g;
+         B.scalar_division(g);
+diff --git a/source/libnormaliz/vector_operations.cpp b/source/libnormaliz/vector_operations.cpp
+index 7c676e9..7103775 100644
+--- a/source/libnormaliz/vector_operations.cpp
++++ b/source/libnormaliz/vector_operations.cpp
+@@ -240,7 +240,7 @@ Integer v_gcd(const vector<Integer>& v){
+     size_t i, size=v.size();
+     Integer g=0;
+     for (i = 0; i < size; i++) {
+-        g=gcd(g,v[i]);
++        g = libnormaliz::gcd(g,v[i]);
+         if (g==1) {
+             return 1;
+         }
+@@ -255,7 +255,7 @@ Integer v_lcm(const vector<Integer>& v){
+     size_t i,size=v.size();
+     Integer g=1;
+     for (i = 0; i < size; i++) {
+-        g=lcm(g,v[i]);
++        g = libnormaliz::lcm(g,v[i]);
+         if (g==0) {
+             return 0;
+         }

diff --git a/sci-mathematics/normaliz/normaliz-3.0.0.ebuild b/sci-mathematics/normaliz/normaliz-3.0.0.ebuild
index 749e006..834f990 100644
--- a/sci-mathematics/normaliz/normaliz-3.0.0.ebuild
+++ b/sci-mathematics/normaliz/normaliz-3.0.0.ebuild
@@ -27,6 +27,7 @@ DEPEND="${RDEPEND}
 S=${WORKDIR}/${MYP}
 
 src_prepare () {
+	epatch "${FILESDIR}/${P}-gmp61-compat.patch"
 	epatch "${FILESDIR}/${P}-respect-flags.patch"
 	epatch "${FILESDIR}/${PN}-2.12.2-gcc49.patch"
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-13 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 12:16 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/normaliz/files/, sci-mathematics/normaliz/ Thomas Kahle
  -- strict thread matches above, loose matches on Subject: below --
2015-11-13 15:59 Thomas Kahle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox