diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..15fbfa9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +4ti2-*.tar.gz diff --git a/4ti2.module.in b/4ti2.module.in new file mode 100644 index 0000000..c42ec18 --- /dev/null +++ b/4ti2.module.in @@ -0,0 +1,5 @@ +#%Module 1.0 +# +# 4ti2 module for use with 'environment-modules' package: +# +prepend-path PATH @LIBDIR@/bin diff --git a/4ti2.spec b/4ti2.spec new file mode 100644 index 0000000..c0f00eb --- /dev/null +++ b/4ti2.spec @@ -0,0 +1,154 @@ +%global giturl https://github.com/4ti2/4ti2 + +Name: 4ti2 +Version: 1.6.14 +Release: %autorelease +Summary: Algebraic, geometric and combinatorial problems on linear spaces + +%global relver %(tr . _ <<< %{version}) + +# The content is GPL-2.0-or-later. The remaining licenses cover the various +# fonts embedded in the PDF manual. +# AMS: OFL-1.1-RFN +# CM: Knuth-CTAN +# CM-Super: GPL-1.0-or-later +License: GPL-2.0-or-later AND OFL-1.1-RFN AND Knuth-CTAN AND GPL-1.0-or-later +# Source files under licenses other than GPL-2.0-or-later: +# GPL-2.0-or-later WITH Autoconf-exception-macro: compile, +# m4/ax_cflags_warn_all.m4 +# GPL-2.0-or-later WITH Libtool-exception: configure, ltmain.sh +# GPL-2.0-or-later OR MIT: ltmain.sh +# GPL-3.0-or-later: lib/*.{c,h} (not compiled into the binary) +# GPL-3.0-or-later WITH Autoconf-exception-generic: lib/Makefile.am, +# m4/onceonly.m4 +# GPL-3.0-or-later WITH Autoconf-exception-macro: config.guess, +# m4/ax_check_compile_flag.m4 +# FSFUL: configure, m4/libtool.m4 +# FSFULLR: aclocal.m4, m4/00gnulib.m4, m4/libtool.m4 +# FSFULLRWD: aclocal.m4, Makefile.in +# X11: install-sh +# LicenseRef-Fedora-Public-Domain: install-sh +SourceLicense: GPL-2.0-or-later AND GPL-2.0-or-later WITH Autoconf-exception-macro AND GPL-2.0-or-later WITH Libtool-exception AND (GPL-2.0-or-later OR MIT) AND GPL-3.0-or-later AND GPL-3.0-or-later WITH Autoconf-exception-generic AND GPL-3.0-or-later WITH Autoconf-exception-macro AND FSFUL AND FSFULLR AND FSFULLRWD AND X11 AND LicenseRef-Fedora-Public-Domain +URL: https://4ti2.github.io/ +VCS: git:%{giturl}.git +Source0: %{giturl}/releases/download/Release_%{relver}/%{name}-%{version}.tar.gz +Source1: 4ti2.module.in +# Do not discard const qualifiers +Patch: %{giturl}/pull/58.patch + +# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: environment(modules) +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: glpk-devel +BuildRequires: gmp-devel +BuildRequires: make +BuildRequires: tex(latex) +BuildRequires: tex(epic.sty) + +# 4ti2 contains a copy of gnulib, which has been granted a bundling exception: +# https://fedoraproject.org/wiki/Bundled_Libraries_Virtual_Provides +Provides: bundled(gnulib) + +Requires: 4ti2-libs%{?_isa} = %{version}-%{release} +Requires: environment(modules) + +%description +A software package for algebraic, geometric and combinatorial problems on +linear spaces. + +This package uses Environment Modules. Prior to invoking the binaries, you +must run "module load 4ti2-%{_arch}" to modify your PATH. + +%package devel +Summary: Headers needed to develop software that uses 4ti2 +License: GPL-2.0-or-later +Requires: 4ti2-libs%{?_isa} = %{version}-%{release} +Requires: gmp-devel%{?_isa} + +%description devel +Headers and library files needed to develop software that uses 4ti2. + +%package libs +Summary: Library for problems on linear spaces +License: GPL-2.0-or-later + +%description libs +A library for algebraic, geometric and combinatorial problems on linear +spaces. + +%prep +%autosetup -p1 + +%conf +# Fix encodings +iconv -f ISO8859-1 -t UTF-8 NEWS > NEWS.utf8 +touch -r NEWS NEWS.utf8 +mv -f NEWS.utf8 NEWS + +%configure --enable-shared --disable-static + +# Get rid of undesirable hardcoded rpaths; workaround libtool reordering +# -Wl,--as-needed after all the libraries. +sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ + -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ + -e 's|CC="\(.*g..\)"|CC="\1 -Wl,--as-needed"|' \ + -i libtool + +%build +%make_build + +# Build the manual +export LD_LIBRARY_PATH=$PWD/src/4ti2/.libs:$PWD/src/fiber/.libs:$PWD/src/groebner/.libs:$PWD/src/ppi/.libs:$PWD/src/util/.libs:$PWD/src/zsolve/.libs +cd doc +make update-manual +bibtex 4ti2_manual +pdflatex 4ti2_manual +pdflatex 4ti2_manual +cd - + +%install +%make_install + +# Move the include files into a private directory +mkdir -p %{buildroot}%{_includedir}/tmp +mv %{buildroot}%{_includedir}/{4ti2,groebner,util,zsolve} \ + %{buildroot}%{_includedir}/tmp +mv %{buildroot}%{_includedir}/tmp %{buildroot}%{_includedir}/4ti2 + +# Move the 4ti2 binaries +mkdir -p %{buildroot}%{_libdir}/4ti2 +mv %{buildroot}%{_bindir} %{buildroot}%{_libdir}/4ti2 + +# Make the environment-modules file +mkdir -p %{buildroot}%{_modulesdir} +# Since we're doing our own substitution here, use our own definitions. +sed 's#@LIBDIR@#'%{_libdir}/4ti2'#g;' < %SOURCE1 >%{buildroot}%{_modulesdir}/4ti2-%{_arch} + +# We don't want documentation in _datadir +rm -fr %{buildroot}%{_datadir}/4ti2/doc + +%check +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +make check + +%files +%doc doc/4ti2_manual.pdf +%{_libdir}/4ti2/ +%{_modulesdir}/4ti2-%{_arch} + +%files devel +%{_includedir}/4ti2/ +%{_libdir}/lib4ti2*.so +%{_libdir}/libzsolve.so + +%files libs +%doc AUTHORS NEWS README.md THANKS +%license COPYING +%{_libdir}/lib4ti2*.so.0{,.*} +%{_libdir}/libzsolve.so.0{,.*} + +%changelog +%autochangelog diff --git a/58.patch b/58.patch new file mode 100644 index 0000000..214164b --- /dev/null +++ b/58.patch @@ -0,0 +1,238 @@ +From c64563088b224a778a236c1e1495f0a4edd2c9df Mon Sep 17 00:00:00 2001 +From: Jerry James +Date: Wed, 26 Nov 2025 11:02:23 -0700 +Subject: [PATCH] Do not discard const qualifiers + +--- + src/util/output.c | 2 +- + src/util/output.h | 2 +- + src/util/print.c | 40 ++++++++++++++++++++++------------------ + src/util/print.h | 36 ++++++++++++++++++++---------------- + 4 files changed, 44 insertions(+), 36 deletions(-) + +diff --git a/src/util/output.c b/src/util/output.c +index 8623d01..a0f4f62 100644 +--- a/src/util/output.c ++++ b/src/util/output.c +@@ -37,7 +37,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + #include "banner.h" + + /* ----------------------------------------------------------------- */ +-listVector* readListVector(int *numOfVars, char *fileName) { ++listVector* readListVector(int *numOfVars, const char *fileName) { + int numOfVectors; + listVector *basis, *endBasis; + vector b; +diff --git a/src/util/output.h b/src/util/output.h +index 93bece5..bbcff84 100644 +--- a/src/util/output.h ++++ b/src/util/output.h +@@ -1,3 +1,3 @@ + int output_main(int, char**); +-listVector* readListVector(int*, char*); ++listVector* readListVector(int*, const char*); + listVector* extractNonDominatedVectors(listVector*, listVector*, int); +diff --git a/src/util/print.c b/src/util/print.c +index 157200a..eca5b82 100644 +--- a/src/util/print.c ++++ b/src/util/print.c +@@ -82,7 +82,8 @@ void printVectorToFile(FILE *out, vector v, int numOfVars) { + return ; + } + /* ----------------------------------------------------------------- */ +-void printListVectorToFile(char* fileName, listVector* basis, int numOfVars) { ++void printListVectorToFile(const char* fileName, listVector* basis, ++ int numOfVars) { + int len; + FILE* out; + +@@ -106,8 +107,8 @@ void printListVectorToFile(char* fileName, listVector* basis, int numOfVars) { + fclose(out); + return ; + } +-/* ----------------------------------------------------------------- */ +-void printSubsetOfListVectorToFile(char* fileName, listVector* basis, ++/* ------------------------------------------------------------------------ */ ++void printSubsetOfListVectorToFile(const char* fileName, listVector* basis, + vector ind, int numOfVars) { + int len,len2,j; + FILE* out; +@@ -147,7 +148,8 @@ void printVectorWithoutColumnToFile(FILE *out, vector v, int ind, + return ; + } + /* ----------------------------------------------------------------- */ +-void printListVectorWithoutColumnToFile(char* fileName, listVector* basis, ++void printListVectorWithoutColumnToFile(const char* fileName, ++ listVector* basis, + int ind, int numOfVars) { + int len; + FILE* out; +@@ -185,7 +187,7 @@ void printVectorWithAddtionalColumnToFile(FILE *out, vector v, int ind, + return ; + } + /* ----------------------------------------------------------------- */ +-void printListVectorWithAdditionalColumnToFile(char* fileName, ++void printListVectorWithAdditionalColumnToFile(const char* fileName, + listVector* basis, + int ind, int val, + int numOfVars) { +@@ -214,7 +216,7 @@ void printListVectorWithAdditionalColumnToFile(char* fileName, + return ; + } + /* ----------------------------------------------------------------- */ +-void printTransposedListVectorToFile(char* fileName, listVector* basis, ++void printTransposedListVectorToFile(const char* fileName, listVector* basis, + int numOfVars) { + int i,len; + listVector *tmp; +@@ -318,7 +320,7 @@ void printBinomialToFile(FILE *out, vector v, int numOfVars, char** labels) { + return ; + } + /* ----------------------------------------------------------------- */ +-void printListBinomialsToFile(char* fileName, listVector* basis, ++void printListBinomialsToFile(const char* fileName, listVector* basis, + int numOfVars, char** labels) { + FILE* out; + +@@ -377,7 +379,8 @@ void printMonomialToFile(FILE *out, vector v, int numOfVars, char** labels) { + return ; + } + /* ----------------------------------------------------------------- */ +-void printListMonomialsAndBinomialsToFile(char* fileName, listVector* basis, ++void printListMonomialsAndBinomialsToFile(const char* fileName, ++ listVector* basis, + int numOfVars, char** labels) { + FILE* out; + +@@ -455,7 +458,8 @@ void printVectorToFileMacaulay2(FILE *out, vector v, int numOfVars) { + return ; + } + /* ----------------------------------------------------------------- */ +-void printListVectorMaple(char* fileName, listVector* basis, int numOfVars) { ++void printListVectorMaple(const char* fileName, listVector* basis, ++ int numOfVars) { + FILE* out; + + if (!(out = fopen(fileName,"w"))) { +@@ -480,7 +484,7 @@ void printListVectorMaple(char* fileName, listVector* basis, int numOfVars) { + return ; + } + /* ----------------------------------------------------------------- */ +-void printListVectorMacaulay2(char* fileName, listVector* basis, ++void printListVectorMacaulay2(const char* fileName, listVector* basis, + int numOfVars) { + FILE* out; + +@@ -506,8 +510,8 @@ void printListVectorMacaulay2(char* fileName, listVector* basis, + return ; + } + /* ----------------------------------------------------------------- */ +-void print3wayTables(char* fileName, listVector* basis, int x, int y, +- int z, int numOfVars) { ++void print3wayTables(const char* fileName, listVector* basis, int x, ++ int y, int z, int numOfVars) { + int i,j,k; + vector v; + FILE* out; +@@ -583,7 +587,7 @@ void printL1NormOfListVector(listVector *basis, int numOfVars) { + return; + } + /* ----------------------------------------------------------------- */ +-void printListVectorWithGivenDegreesToFile(char *outFileName, ++void printListVectorWithGivenDegreesToFile(const char *outFileName, + listVector *basis, int numOfVars, + int lowdegree, int highdegree){ + int i,s,len; +@@ -647,7 +651,7 @@ void printSupportsOfListVector(listVector *basis, int numOfVars) { + return; + } + /* ----------------------------------------------------------------- */ +-void printListVectorWithGivenSupportsToFile(char *outFileName, ++void printListVectorWithGivenSupportsToFile(const char *outFileName, + listVector *basis, int numOfVars, + int lowdegree, int highdegree){ + int i,s,len; +@@ -724,7 +728,7 @@ void printTypesOfListVector(listVector *basis, int sizeOfLayer, + return; + } + /* ----------------------------------------------------------------- */ +-void printListVectorWithGivenNonzeroEntryToFile(char *outFileName, ++void printListVectorWithGivenNonzeroEntryToFile(const char *outFileName, + listVector *basis, + int numOfVars, + int coord){ +@@ -760,8 +764,8 @@ void printListVectorWithGivenNonzeroEntryToFile(char *outFileName, + return; + } + /* ----------------------------------------------------------------- */ +-void writeResult(listVector *basis, int numOfVars, char *fileName, +- char *basisType, int infoLevel) { ++void writeResult(listVector *basis, int numOfVars, const char *fileName, ++ const char *basisType, int infoLevel) { + const char *infoMessage="undefined"; + const char *outExtension=""; + char *outFileName=NULL; +@@ -803,7 +807,7 @@ void writeResult(listVector *basis, int numOfVars, char *fileName, + return; + } + /* ----------------------------------------------------------------- */ +-void printListRepresentativesToFile(char* fileName, listOrbit* basis, ++void printListRepresentativesToFile(const char* fileName, listOrbit* basis, + int numOfVars) { + int len; + FILE* out; +diff --git a/src/util/print.h b/src/util/print.h +index 3789562..2d07334 100644 +--- a/src/util/print.h ++++ b/src/util/print.h +@@ -24,30 +24,34 @@ void printVersionInfo(); + void printVector(vector, int); + void printListVector(listVector*, int); + void printVectorToFile(FILE*, vector, int); +-void printListVectorToFile(char*, listVector*, int); +-void printSubsetOfListVectorToFile(char*, listVector*, vector, int); +-void printListVectorWithoutColumnToFile(char*, listVector*, int, int); +-void printListVectorWithAdditionalColumnToFile(char*, listVector*, int, int, +- int); +-void printTransposedListVectorToFile(char*, listVector*, int); ++void printListVectorToFile(const char*, listVector*, int); ++void printSubsetOfListVectorToFile(const char*, listVector*, vector, int); ++void printListVectorWithoutColumnToFile(const char*, listVector*, int, int); ++void printListVectorWithAdditionalColumnToFile(const char*, listVector*, int, ++ int, int); ++void printTransposedListVectorToFile(const char*, listVector*, int); + void printVectorToFileWithBrackets(FILE*, vector, int); + void printBinomialToFile(FILE*, vector, int, char**); +-void printListBinomialsToFile(char*, listVector*, int, char**); ++void printListBinomialsToFile(const char*, listVector*, int, char**); + void printMonomialToFile(FILE*, vector, int, char**); +-void printListMonomialsAndBinomialsToFile(char*, listVector*, int, char**); ++void printListMonomialsAndBinomialsToFile(const char*, listVector*, int, ++ char**); + void printMatrix(vector, int, int); + void printVectorToFileMaple(FILE*, vector, int); +-void printListVectorMaple(char*, listVector*, int); +-void printListVectorMacaulay2(char*, listVector*, int); +-void print3wayTables(char*, listVector*, int, int, int, int); ++void printListVectorMaple(const char*, listVector*, int); ++void printListVectorMacaulay2(const char*, listVector*, int); ++void print3wayTables(const char*, listVector*, int, int, int, int); + void printL1NormOfListVector(listVector*, int); +-void printListVectorWithGivenDegreesToFile(char*, listVector*, int, int, int); ++void printListVectorWithGivenDegreesToFile(const char*, listVector*, int, ++ int, int); + void printSupportsOfListVector(listVector*, int); + void printTypesOfListVector(listVector*, int, int); +-void printListVectorWithGivenSupportsToFile(char*, listVector*, int, int, int); +-void printListVectorWithGivenNonzeroEntryToFile(char*, listVector*, int, int); +-void writeResult(listVector*, int, char*, char*, int); +-void printListRepresentativesToFile(char*, listOrbit*, int); ++void printListVectorWithGivenSupportsToFile(const char*, listVector*, int, ++ int, int); ++void printListVectorWithGivenNonzeroEntryToFile(const char*, listVector*, int, ++ int); ++void writeResult(listVector*, int, const char*, const char*, int); ++void printListRepresentativesToFile(const char*, listOrbit*, int); + void printRationalVector(rationalVector*, int); + void printRationalVectorToFileWithoutBrackets(FILE*, rationalVector*, int); + diff --git a/Makefile b/Makefile deleted file mode 100644 index a0100a6..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: 4ti2 -# $Id$ -NAME := 4ti2 -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md new file mode 100644 index 0000000..0d1eaae --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# 4ti2 + +[4ti2](https://4ti2.github.io/) is a software package for algebraic, geometric +and combinatorial problems on linear spaces. diff --git a/changelog b/changelog new file mode 100644 index 0000000..1e29ac6 --- /dev/null +++ b/changelog @@ -0,0 +1,72 @@ +* Mon Jan 29 2024 Fedora Release Engineering - 1.6.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 1.6.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.6.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jan 18 2024 Fedora Release Engineering - 1.6.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 1.6.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 14 2023 Jerry James - 1.6.10-1 +- Drop unneeded "egrep is obsolescent" fix (fixed in 1.6.10) + +* Sat Apr 29 2023 Jerry James - 1.6.10-1 +- Version 1.6.10 +- Drop upstreamed memleak & missing-include patches + +* Wed Jan 18 2023 Fedora Release Engineering - 1.6.9-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Jan 10 2023 Jerry James - 1.6.9-14 +- Add patch to fix a memory leak + +* Thu Dec 29 2022 Jeff Law - 1.6.9-13 +- Add missing #include for gcc-13 + +* Wed Nov 16 2022 Jerry James - 1.6.9-12 +- Silence "egrep is obsolescent" warnings from the scripts +- Update license to reflect embedded fonts in the PDF manual + +* Thu Aug 11 2022 Jerry James - 1.6.9-11 +- Convert License tag to SPDX + +* Wed Jul 20 2022 Fedora Release Engineering - 1.6.9-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 1.6.9-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 1.6.9-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jan 25 2021 Fedora Release Engineering - 1.6.9-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 1.6.9-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 13 2020 Tom Stellard - 1.6.9-6 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Tue Jan 28 2020 Fedora Release Engineering - 1.6.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Dec 9 2019 Jerry James - 1.6.9-4 +- Fix the location of the module file (bz 1773348) +- Do not build the empty fiber library + +* Wed Jul 24 2019 Fedora Release Engineering - 1.6.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 1.6.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Sep 29 2018 Jerry James - 1.6.9-1 +- Split back out of latte-integrale diff --git a/sources b/sources index e69de29..399568c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (4ti2-1.6.14.tar.gz) = 87b990de9c6dbe564bd700c6548c422ada52e0e3a0b3457f84c103124bee4fce05c49d7ee3c6ead145bbbd51e11969639dc75fe8f5b337457a3f3590af5315c3