forked from pool/normaliz
Accepting request 726122 from science
- Add headerfile.patch to provide normaliz/output.h. - Update to new upstream release 3.7.4 OBS-URL: https://build.opensuse.org/request/show/726122 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/normaliz?expand=0&rev=8
This commit is contained in:
commit
0343f0d206
126
0001-Fix-a-bunch-of-compiler-warnings-and-two-actual-bugs.patch
Normal file
126
0001-Fix-a-bunch-of-compiler-warnings-and-two-actual-bugs.patch
Normal file
@ -0,0 +1,126 @@
|
||||
From dc50d2e97e108011231fe82d5939d19b79408911 Mon Sep 17 00:00:00 2001
|
||||
From: Max Horn <max@quendi.de>
|
||||
Date: Sun, 11 Aug 2019 21:38:40 +0200
|
||||
Subject: [PATCH] Fix a bunch of compiler warnings, and two actual bugs
|
||||
|
||||
Bugs:
|
||||
- Matrix<mpq_class>::VxM was not returning anything
|
||||
- handling of automorphisms had a misplaces parenthesis
|
||||
---
|
||||
source/libnormaliz/cone.cpp | 6 ++++--
|
||||
source/libnormaliz/input_type.cpp | 1 +
|
||||
source/libnormaliz/integer.cpp | 7 +++----
|
||||
source/libnormaliz/matrix.cpp | 1 +
|
||||
source/libnormaliz/output.cpp | 6 +++---
|
||||
source/libnormaliz/vector_operations.cpp | 3 ---
|
||||
6 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/source/libnormaliz/cone.cpp b/source/libnormaliz/cone.cpp
|
||||
index 0287223e..ada7cd1a 100644
|
||||
--- a/source/libnormaliz/cone.cpp
|
||||
+++ b/source/libnormaliz/cone.cpp
|
||||
@@ -6970,8 +6970,10 @@ void Cone<Integer>::make_face_lattice(const ConeProperties& ToCompute){
|
||||
if(skip_remaining)
|
||||
continue;
|
||||
|
||||
- for(; kkk > Fpos; ++Fpos, ++F);
|
||||
- for(; kkk < Fpos; --Fpos, --F) ;
|
||||
+ for(; kkk > Fpos; ++Fpos, ++F)
|
||||
+ ;
|
||||
+ for(; kkk < Fpos; --Fpos, --F)
|
||||
+ ;
|
||||
|
||||
if(verbose && nr_faces>=RepBound){
|
||||
#pragma omp critical(VERBOSE)
|
||||
diff --git a/source/libnormaliz/input_type.cpp b/source/libnormaliz/input_type.cpp
|
||||
index 58e8ae73..816311a3 100644
|
||||
--- a/source/libnormaliz/input_type.cpp
|
||||
+++ b/source/libnormaliz/input_type.cpp
|
||||
@@ -210,6 +210,7 @@ std::string numpar_to_string(const NumParam::Param& numpar){
|
||||
return "autom_codim_bound_vectors";
|
||||
if(numpar==NumParam::not_a_num_param)
|
||||
return "not_a_num_param";
|
||||
+ assert(false);
|
||||
}
|
||||
|
||||
bool isNumParam(NumParam::Param& numpar, const std::string& type_string){
|
||||
diff --git a/source/libnormaliz/integer.cpp b/source/libnormaliz/integer.cpp
|
||||
index 1f3a2f9f..886de3b0 100644
|
||||
--- a/source/libnormaliz/integer.cpp
|
||||
+++ b/source/libnormaliz/integer.cpp
|
||||
@@ -211,8 +211,8 @@ nmz_float gcd(const nmz_float& a, const nmz_float& b){
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
-template<>
|
||||
-mpz_class gcd<mpz_class>(const mpz_class& a, const mpz_class& b) {
|
||||
+template <>
|
||||
+mpz_class gcd(const mpz_class& a, const mpz_class& b) {
|
||||
mpz_class g;
|
||||
mpz_gcd (g.get_mpz_t(), a.get_mpz_t(), b.get_mpz_t());
|
||||
return g;
|
||||
@@ -229,8 +229,7 @@ renf_elem_class gcd(const renf_elem_class& a, const renf_elem_class& b){
|
||||
|
||||
|
||||
template long gcd<long>(const long& a, const long& b);
|
||||
-template nmz_float gcd<nmz_float>(const nmz_float& a, const nmz_float& b);
|
||||
-template long long gcd<long long>(const long long& a, const long long& b);
|
||||
+template long long gcd(const long long& a, const long long& b);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
diff --git a/source/libnormaliz/matrix.cpp b/source/libnormaliz/matrix.cpp
|
||||
index b0a57556..fa6d023b 100644
|
||||
--- a/source/libnormaliz/matrix.cpp
|
||||
+++ b/source/libnormaliz/matrix.cpp
|
||||
@@ -1307,6 +1307,7 @@ vector<mpq_class> Matrix<mpq_class>::VxM(const vector<mpq_class>& v) const{
|
||||
w[i] += v[j]*elem[j][i];
|
||||
}
|
||||
}
|
||||
+ return w;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
diff --git a/source/libnormaliz/output.cpp b/source/libnormaliz/output.cpp
|
||||
index 4bf767d3..4eee5591 100644
|
||||
--- a/source/libnormaliz/output.cpp
|
||||
+++ b/source/libnormaliz/output.cpp
|
||||
@@ -1262,11 +1262,11 @@ void Output<Integer>::write_files() const {
|
||||
out << endl;
|
||||
}
|
||||
|
||||
- if (aut && (Result->isComputed(ConeProperty::Automorphisms)
|
||||
- || Result->isComputed(ConeProperty::AmbientAutomorphisms))
|
||||
+ if (aut && (Result->isComputed(ConeProperty::Automorphisms)
|
||||
+ || Result->isComputed(ConeProperty::AmbientAutomorphisms)
|
||||
|| Result->isComputed(ConeProperty::CombinatorialAutomorphisms)
|
||||
|| Result->isComputed(ConeProperty::RationalAutomorphisms)
|
||||
- || Result->isComputed(ConeProperty::EuclideanAutomorphisms)
|
||||
+ || Result->isComputed(ConeProperty::EuclideanAutomorphisms))
|
||||
) {
|
||||
write_aut();
|
||||
out << Result->getAutomorphismGroup().getQualitiesString() << "automorphism group has order " << Result->getAutomorphismGroup().getOrder()
|
||||
diff --git a/source/libnormaliz/vector_operations.cpp b/source/libnormaliz/vector_operations.cpp
|
||||
index 4f13963f..fa8e1002 100644
|
||||
--- a/source/libnormaliz/vector_operations.cpp
|
||||
+++ b/source/libnormaliz/vector_operations.cpp
|
||||
@@ -671,7 +671,6 @@ mpq_class v_standardize(vector<mpq_class>& v, const vector<mpq_class>& LF){
|
||||
template void v_scalar_division(vector<long>& v, const long scalar);
|
||||
template void v_scalar_division(vector<long long>& v, const long long scalar);
|
||||
template void v_scalar_division(vector<mpz_class>& v, const mpz_class scalar);
|
||||
-template void v_scalar_division(vector<nmz_float>& v, const nmz_float scalar);
|
||||
|
||||
template long v_make_prime(vector<long >&);
|
||||
template long long v_make_prime(vector<long long>&);
|
||||
@@ -680,8 +679,6 @@ template mpz_class v_make_prime(vector<mpz_class>&);
|
||||
template long v_scalar_product(const vector<long>& a,const vector<long>& b);
|
||||
template long long v_scalar_product(const vector<long long>& a,const vector<long long>& b);
|
||||
template mpz_class v_scalar_product(const vector<mpz_class>& a,const vector<mpz_class>& b);
|
||||
-template mpq_class v_scalar_product(const vector<mpq_class>& a,const vector<mpq_class>& b);
|
||||
-template nmz_float v_scalar_product(const vector<nmz_float>& a,const vector<nmz_float>& b);
|
||||
|
||||
vector<bool> bitset_to_bool(const boost::dynamic_bitset<>& val){
|
||||
vector<bool> ret(val.size());
|
||||
--
|
||||
2.22.1
|
||||
|
22
headerfile.patch
Normal file
22
headerfile.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2019-08-26 07:07:20.601082790 +0200
|
||||
Related upstream commit: 0b5df92a7b660d3712dfc73ae083e5b7d9831e9f
|
||||
|
||||
Fix poor installation testing.
|
||||
|
||||
---
|
||||
source/Makefile.am | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: normaliz-3.7.4/source/Makefile.am
|
||||
===================================================================
|
||||
--- normaliz-3.7.4.orig/source/Makefile.am
|
||||
+++ normaliz-3.7.4/source/Makefile.am
|
||||
@@ -34,6 +34,7 @@ lib_LTLIBRARIES = libnormaliz.la
|
||||
|
||||
# Installed headers
|
||||
nobase_include_HEADERS = libnormaliz/cone.h libnormaliz/cone_property.h libnormaliz/convert.h libnormaliz/general.h libnormaliz/HilbertSeries.h libnormaliz/integer.h libnormaliz/input_type.h libnormaliz/matrix.h libnormaliz/my_omp.h libnormaliz/normaliz_exception.h libnormaliz/sublattice_representation.h libnormaliz/vector_operations.h libnormaliz/version.h libnormaliz/nmz_integrate.h libnormaliz/automorph.h libnormaliz/libnormaliz.h libnormaliz/map_operations.h libnormaliz/nmz_config.h
|
||||
+nobase_include_HEADERS += libnormaliz/output.h
|
||||
# Sources
|
||||
libnormaliz_la_SOURCES = libnormaliz/enumeration.cpp libnormaliz/other_algorithms.cpp libnormaliz/linear_algebra.cpp libnormaliz/offload_handler.cpp libnormaliz/cone_and_control.cpp libnormaliz/primal.cpp libnormaliz/nmz_nauty.cpp libnormaliz/output.cpp
|
||||
# Other headers (not installed)
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:701b39189758eb9a13e189ea1a43218e1c001f19c228e761a80949d610fe3900
|
||||
size 4328352
|
3
normaliz-3.7.4.tar.gz
Normal file
3
normaliz-3.7.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1b94ff9baa0ebbc682229e8cfad086245d67754958ae3ddb1cc0a563a16ceb89
|
||||
size 4232335
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 26 05:13:03 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add headerfile.patch to provide normaliz/output.h.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 24 18:18:50 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Update to new upstream release 3.7.4
|
||||
* Algebraic polyhedra: these can now be computed directly in
|
||||
Normaliz so that QNormaliz has become obsolete.
|
||||
* Face lattice and f-vector can now be computed by Normaliz.
|
||||
* NumberLatticePoints is a new computation goal that lets
|
||||
Normaliz count lattice points in polytopes without storing
|
||||
them.
|
||||
* Added the computation goals Dynamic and Static and the
|
||||
libnormaliz function modifyCone.
|
||||
- Add 0001-Fix-a-bunch-of-compiler-warnings-and-two-actual-bugs.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 22 13:56:08 UTC 2018 - badshah400@gmail.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package normaliz
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -12,26 +12,28 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: normaliz
|
||||
Version: 3.6.3
|
||||
%define lname libnormaliz3
|
||||
Version: 3.7.4
|
||||
Release: 0
|
||||
Summary: Tools for computations in affine monoids and rational cones
|
||||
License: GPL-3.0-or-later
|
||||
Group: Productivity/Scientific/Math
|
||||
Url: https://www.normaliz.uni-osnabrueck.de/
|
||||
URL: https://www.normaliz.uni-osnabrueck.de/
|
||||
|
||||
Source: https://github.com/Normaliz/Normaliz/releases/download/v%version/%name-%version.tar.gz
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: cmake >= 2.6
|
||||
Patch1: 0001-Fix-a-bunch-of-compiler-warnings-and-two-actual-bugs.patch
|
||||
Patch2: headerfile.patch
|
||||
#maybe with flint-devel later on
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: mpfr-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Normaliz is an open source tool for computations in affine monoids,
|
||||
@ -50,11 +52,11 @@ Computation goals
|
||||
* generalized (or weighted) Ehrhart series and Lebesgue integrals of
|
||||
polynomials over rational polytopes via NmzIntegrate
|
||||
|
||||
%package -n libnormaliz0
|
||||
%package -n %lname
|
||||
Summary: C++ API for Normaliz, a tool for computation of rotational cones
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libnormaliz0
|
||||
%description -n %lname
|
||||
Normaliz is an open source tool for computations in affine monoids,
|
||||
vector configurations, lattice polytopes, and rational cones.
|
||||
|
||||
@ -64,9 +66,9 @@ the Normaliz computations from any C++ program.
|
||||
%package devel
|
||||
Summary: Development files for Normaliz, a tool for computation of rotational cones
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %lname = %version
|
||||
Requires: boost-devel
|
||||
Requires: gmp-devel
|
||||
Requires: libnormaliz0 = %version
|
||||
|
||||
%description devel
|
||||
Normaliz is an open source tool for computations in affine monoids,
|
||||
@ -76,33 +78,28 @@ Normaliz offers an API - libnormaliz - that allows the user to access
|
||||
the Normaliz computations from any C++ program.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
pushd source/
|
||||
%cmake
|
||||
autoreconf -fi
|
||||
%configure --disable-static
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
|
||||
%install
|
||||
pushd source/
|
||||
%cmake_install
|
||||
popd
|
||||
%make_install
|
||||
rm -f "%buildroot/%_libdir"/*.la
|
||||
|
||||
%post -n libnormaliz0 -p /sbin/ldconfig
|
||||
%postun -n libnormaliz0 -p /sbin/ldconfig
|
||||
%post -n %lname -p /sbin/ldconfig
|
||||
%postun -n %lname -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%_bindir/normaliz
|
||||
%license COPYING
|
||||
|
||||
%files -n libnormaliz0
|
||||
%defattr(-,root,root)
|
||||
%_libdir/libnormaliz.so.*
|
||||
%files -n %lname
|
||||
%_libdir/libnormaliz.so.3*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%_includedir/libnormaliz/
|
||||
%_libdir/libnormaliz.so
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user