diff --git a/.gitignore b/.gitignore index e786eb6..adfd1e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /Normaliz2.12.1.zip /Normaliz2.12.2.zip +/normaliz-3.1.4.tar.gz diff --git a/normaliz-initlist.patch b/normaliz-initlist.patch deleted file mode 100644 index 81fc92a..0000000 --- a/normaliz-initlist.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- source/libnormaliz/reduction.cpp.orig 2017-01-30 16:08:23.579247300 +0000 -+++ source/libnormaliz/reduction.cpp 2017-01-30 16:09:04.403144952 +0000 -@@ -31,14 +31,13 @@ - //--------------------------------------------------------------------------- - - template --Candidate::Candidate(const vector& v, const vector& val, long sd){ -- cand(v); -- values(val); -- sort_deg(sd); -- reducible(true); -- original_generator(false); -- // in_HB(false); --} -+Candidate::Candidate(const vector& v, const vector& val, long sd) -+: cand(v), -+ values(val), -+ sort_deg(sd), -+ reducible(true), -+ original_generator(false) -+{ } - - //--------------------------------------------------------------------------- - diff --git a/normaliz-scope.patch b/normaliz-scope.patch deleted file mode 100644 index ab99c9f..0000000 --- a/normaliz-scope.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- source/libnormaliz/HilbertSeries.cpp.orig 2015-01-22 15:22:34.000000000 -0700 -+++ source/libnormaliz/HilbertSeries.cpp 2016-02-05 12:40:21.607850883 -0700 -@@ -355,7 +355,7 @@ void HilbertSeries::computeHilbertQuasiP - //divide by gcd //TODO operate directly on vector - Matrix 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); - quasi_poly = QP.get_elements(); ---- source/libnormaliz/matrix.cpp.orig 2015-01-22 15:22:34.000000000 -0700 -+++ source/libnormaliz/matrix.cpp 2016-02-05 12:42:19.281313552 -0700 -@@ -638,7 +638,7 @@ Integer Matrix::matrix_gcd() co - Integer g=0,h; - for (size_t i = 0; i (g, h); -+ g = libnormaliz::gcd(g, h); - if (g==1) return g; - } - return g; -@@ -1210,7 +1210,7 @@ vector Matrix::solve(c - return vector(); - } - } -- 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; ---- source/libnormaliz/sublattice_representation.cpp.orig 2015-01-22 15:22:34.000000000 -0700 -+++ source/libnormaliz/sublattice_representation.cpp 2016-02-05 12:51:56.882519262 -0700 -@@ -158,7 +158,7 @@ void 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); -@@ -303,7 +303,7 @@ Matrix Sublattice_Representatio - //new_row cannot be divisible by a factor of m - //so make_prime divides by an invertible element - rowgcd = v_make_prime(new_row); -- assert(gcd(m,rowgcd) == 1); -+ assert(libnormaliz::gcd(m,rowgcd) == 1); - new_row[dim] = m; - Cong2.append(new_row); - } ---- source/libnormaliz/vector_operations.cpp.orig 2015-01-22 15:22:34.000000000 -0700 -+++ source/libnormaliz/vector_operations.cpp 2016-02-05 12:52:30.111828674 -0700 -@@ -211,7 +211,7 @@ Integer v_gcd(const vector& 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; - } -@@ -226,7 +226,7 @@ Integer v_lcm(const vector& 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/normaliz.spec b/normaliz.spec index 79a4a2d..e3564f8 100644 --- a/normaliz.spec +++ b/normaliz.spec @@ -1,32 +1,25 @@ Name: normaliz -Version: 2.12.2 -Release: 10%{?dist} +Version: 3.1.4 +Release: 1%{?dist} Summary: A tool for mathematical computations License: GPLv3+ -URL: http://www.mathematik.uni-osnabrueck.de/normaliz/ -# Warning: This zip-ball contains .jar binaries, source only zip-ball not -# available -Source0: http://www.mathematik.uni-osnabrueck.de/normaliz/Normaliz%{version}/Normaliz%{version}.zip -# Fix ambiguous references -Patch0: %{name}-scope.patch -Patch1: %{name}-initlist.patch - -BuildRequires: ant -BuildRequires: apache-commons-exec -BuildRequires: apache-commons-exec-javadoc -BuildRequires: appframework +URL: https://www.normaliz.uni-osnabrueck.de/ +Source0: https://github.com/Normaliz/Normaliz/releases/download/v%{version}/%{name}-%{version}.tar.gz + BuildRequires: boost-devel BuildRequires: chrpath BuildRequires: cmake +BuildRequires: gcc-c++ BuildRequires: gmp-devel -BuildRequires: java-devel >= 1:1.6.0 -BuildRequires: javasysmon -BuildRequires: jpackage-utils Requires: lib%{name}%{?_isa} = %{version}-%{release} -%global nopatchver %(cut -d. -f1-2 <<< %{version}) +# This can be removed once Fedora 25 reaches EOL or somebody packages jnormaliz +Provides: jnormaliz = %{version}-%{release} +Obsoletes: jnormaliz < 3.0.0-1%{?dist} +Provides: jnormaliz-javadoc = %{version}-%{release} +Obsoletes: jnormaliz-javadoc < 3.0.0-1%{?dist} %description Normaliz is a tool for computations in affine monoids, vector @@ -50,82 +43,31 @@ Requires: lib%{name}%{?_isa} = %{version}-%{release} Header files and library links to develop applications that use the Normaliz internals as a library (libnormaliz). -%package -n jnormaliz -Summary: Graphical interface for Normaliz -Requires: %{name} = %{version}-%{release} -Requires: apache-commons-exec -Requires: appframework -Requires: java >= 1:1.6.0 -Requires: javasysmon -Requires: jpackage-utils -BuildArch: noarch - -%description -n jnormaliz -JNormaliz is a graphic interface for Normaliz, written in Java. - -%package -n jnormaliz-javadoc -Summary: Javadoc documentation for jNormaliz -Requires: jnormaliz = %{version}-%{release} -Requires: apache-commons-exec-javadoc -Requires: jpackage-utils -BuildArch: noarch - -%description -n jnormaliz-javadoc -Javadoc documentation for jNormaliz - %prep -%setup -q -n Normaliz%{nopatchver} -%patch0 -%patch1 - -# Remove prebuilt class files, jars, and javadocs, except for one netbeans jar -# used for building only (no runtime dependencies). -find . -name \*.jar -a \! -name \*copylibstask.jar | xargs rm -f -rm -fr source/jNormaliz/build - -# Use system jars instead of bundled jars -ln -s %{_javadir}/appframework.jar lib/appframework-1.0.3.jar -ln -s %{_javadir}/commons-exec.jar lib/commons-exec-1.0.1.jar -ln -s %{_javadir}/javasysmon.jar lib/javasysmon.jar - -pushd source/jNormaliz/lib -ln -s %{_javadir}/commons-exec.jar commons-exec-1.0.1/commons-exec-1.0.1.jar -ln -s %{_javadocdir}/apache-commons-exec commons-exec-1.0.1/apidocs -ln -s %{_javadir}/javasysmon.jar javasysmon.jar -ln -s %{_javadir}/junit.jar junit_4/junit-4.5.jar -ln -s %{_javadir}/appframework.jar swing-app-framework/appframework-1.0.3.jar -popd - -# Don't add a Class-Path to the jar -sed -i '/Class-Path/d' source/jNormaliz/nbproject/build-impl.xml +%setup -q # Use our compiler flags -sed -i '/funroll-loops/d' source/CMakeLists.txt +sed -i 's|-O3|%{optflags}|' source/CMakeLists.txt -# Fix the library path -if [ "%{_libdir}" = "%{_prefix}/lib64" ]; then - sed -i "s,/lib,/lib64," source/CMakeLists.txt +%build +if [ "%{_libdir}" = "/usr/lib64" ]; then + LIBDEF="-DLIB_SUFFIX=64" +else + LIBDEF= fi -%build # Build the C library and the binaries mkdir build pushd build export LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS" -%cmake ../source +%cmake ../source $LIBDEF make %{?_smp_mflags} VERBOSE=1 - -# Build the Java interface and documentation -cd ../source/jNormaliz -ant jar -ant javadoc popd - mkdir -p docs/example # Correct the end of line encodings for use on Linux pushd example -for file in *.out *.in +for file in *.in do sed 's/\r//' "$file" > "../docs/example/$file" touch -r "$file" "../docs/example/$file" @@ -142,21 +84,12 @@ popd chrpath -d %{buildroot}%{_libdir}/libnormaliz.so.%{version} chrpath -d %{buildroot}%{_bindir}/normaliz -# Install the jar -mkdir -p %{buildroot}%{_javadir} -cp -p source/jNormaliz/dist/jNormaliz.jar %{buildroot}%{_javadir} - -# Install the javadoc -mkdir -p %{buildroot}%{_javadocdir} -cp -a source/jNormaliz/dist/javadoc %{buildroot}%{_javadocdir}/jnormaliz - %post -n libnormaliz -p /sbin/ldconfig %postun -n libnormaliz -p /sbin/ldconfig %files -%doc docs/* doc/Algorithms*.pdf doc/Challenging*.pdf doc/Computing*.pdf -%doc doc/Normaliz.pdf doc/The*.pdf +%doc docs/* doc/NmzIntegrate.pdf doc/Normaliz.pdf %{_bindir}/normaliz %files -n libnormaliz @@ -168,14 +101,11 @@ cp -a source/jNormaliz/dist/javadoc %{buildroot}%{_javadocdir}/jnormaliz %{_libdir}/libnormaliz.so %{_includedir}/libnormaliz/ -%files -n jnormaliz -%doc doc/jNormaliz_*.pdf -%{_javadir}/jNormaliz.jar - -%files -n jnormaliz-javadoc -%{_javadocdir}/jnormaliz - %changelog +* Wed Apr 5 2017 Jerry James - 3.1.4-1 +- New upstream release +- jnormaliz is now a separate project + * Sat Feb 11 2017 Fedora Release Engineering - 2.12.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 280b7f5..4ba66fd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4aa50bad86589ac6dfcb5ce27b2a33b9 Normaliz2.12.2.zip +SHA512 (normaliz-3.1.4.tar.gz) = 10f4010cab7bb0a52d53a237784f884e4d0a5f4369ce6f8870a52ad4cc2f8571212b3a1389d85edc1e012702f2393c86997bcaf690b9172bde26148df3d978fd