Version 3.6.2

- Use zlib-ng directly instead of via the compatibility interface
- Temporarily disable one failing test on ppc64le
This commit is contained in:
Jerry James 2024-09-23 11:25:07 -06:00
commit 985db2826a
4 changed files with 90 additions and 11 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/scipoptsuite-*.tgz
/zimpl-*.tar.gz

View file

@ -1 +1 @@
SHA512 (scipoptsuite-9.1.0.tgz) = 03c1c49dd5e4dbc5bfd4f07305937079773f6912c87b0ba86166fc02996928e8d23332137a944f16f2488a88dc12a4a2c6ebde216eb4532135ed282a182bfdaf
SHA512 (zimpl-3.6.2.tar.gz) = 78cb6d3c06f3a8f42005eda8b04b56f414f6327e5cd3ffbd6a5eadf1a93295b3aa4ec57deb2ed6281f038565a457b0dc9817d2e0c85cf18e86312e95d2c157a0

77
zimpl-zlib-ng.patch Normal file
View file

@ -0,0 +1,77 @@
--- zimpl-362/CMakeLists.txt.orig 2024-09-17 19:44:17.589497126 -0600
+++ zimpl-362/CMakeLists.txt 2024-09-17 19:55:30.619340046 -0600
@@ -125,11 +125,11 @@ include_directories(${GMP_INCLUDE_DIRS})
set(libs ${libs} ${GMP_LIBRARIES})
if(ZLIB)
- find_package(ZLIB)
+ find_package(ZLIB-NG)
endif()
-if(ZLIB_FOUND)
- set(libs ${libs} ${ZLIB_LIBRARIES})
- include_directories(${ZLIB_INCLUDE_DIRS})
+if(ZLIB-NG_FOUND)
+ set(libs ${libs} -lz-ng)
+ include_directories(/usr/include)
else()
add_definitions(-DWITHOUT_ZLIB)
endif()
--- zimpl-362/src/zimpl/iread.c.orig 2024-09-17 19:44:29.886348077 -0600
+++ zimpl-362/src/zimpl/iread.c 2024-09-17 19:50:15.407160377 -0600
@@ -38,7 +38,7 @@
#endif
#ifndef WITHOUT_ZLIB
-#include <zlib.h>
+#include <zlib-ng.h>
#endif
#include "zimpl/lint.h"
--- zimpl-362/src/zimpl/metaio.c.orig 2024-09-12 23:08:28.000000000 -0600
+++ zimpl-362/src/zimpl/metaio.c 2024-09-17 19:49:03.368033502 -0600
@@ -34,7 +34,8 @@
#include <assert.h>
#ifndef WITHOUT_ZLIB
-#include <zlib.h>
+#define WITH_GZFILEOP
+#include <zlib-ng.h>
#endif
#include "zimpl/lint.h"
@@ -248,7 +249,7 @@ MFP* mio_open(char const* name, char con
{
mfp->type = MFP_ZLIB;
- if (NULL == (mfp->fp.zlib = gzopen(filename, "r")))
+ if (NULL == (mfp->fp.zlib = zng_gzopen(filename, "r")))
{
perror(filename);
free(mfp);
@@ -300,7 +301,7 @@ void mio_close(MFP* mfp)
break;
#ifndef WITHOUT_ZLIB
case MFP_ZLIB :
- gzclose(mfp->fp.zlib);
+ zng_gzclose(mfp->fp.zlib);
break;
#endif /* ! WITHOUT_ZLIB */
default :
@@ -328,7 +329,7 @@ int mio_getc(MFP const* mfp)
break;
#ifndef WITHOUT_ZLIB
case MFP_ZLIB :
- c = gzgetc(mfp->fp.zlib);
+ c = zng_gzgetc(mfp->fp.zlib);
break;
#endif /* ! WITHOUT_ZLIB */
default :
@@ -354,7 +355,7 @@ char* mio_gets(MFP const* mfp, char* buf
break;
#ifndef WITHOUT_ZLIB
case MFP_ZLIB :
- s = gzgets(mfp->fp.zlib, buf, len);
+ s = zng_gzgets(mfp->fp.zlib, buf, len);
break;
#endif /* ! WITHOUT_ZLIB */
default :

View file

@ -1,11 +1,7 @@
# ZIMPL is only available in the scipoptsuite tarball, which is a collection of
# packages. Most of them can be downloaded separately, so we do not build the
# entire suite here. See https://github.com/scipopt/scip/issues/37.
# There is now a zimpl repository, but upstream has not tagged any releases yet.
%global scipoptsuitever 9.1.0
%global giturl https://github.com/scipopt/zimpl
Name: zimpl
Version: 3.6.1
Version: 3.6.2
Release: %autorelease
Summary: Zuse Institut Mathematical Programming Language
@ -18,8 +14,8 @@ Summary: Zuse Institut Mathematical Programming Language
# GPL-1.0-or-later: CM-Super
License: LGPL-3.0-or-later AND OFL-1.1-RFN AND Knuth-CTAN AND GPL-1.0-or-later
URL: https://zimpl.zib.de/
VCS: git:https://github.com/scipopt/zimpl.git
Source: https://scipopt.org/download/release/scipoptsuite-%{scipoptsuitever}.tgz
VCS: git:%{giturl}.git
Source: %{giturl}/archive/v%{upver}/%{name}-%{version}.tar.gz
# Build a shared library instead of a static library. ZIMPL leaves some symbols
# undefined, namely those listed in src/zimpl/xlpglue.h. They take advantage of
# the fact that linking with a static library only pulls in the referenced
@ -31,6 +27,8 @@ Patch: %{name}-shared.patch
# This is a problem for polymake, which links both libraries. Rename the
# zimpl functions to set_copy_zimpl and set_free_zimpl.
Patch: %{name}-cddlib-set-clash.patch
# Use zlib-ng directly, rather than via the compatibility interface
Patch: %{name}-zlib-ng.patch
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
@ -40,7 +38,7 @@ BuildRequires: cmake
BuildRequires: flex
BuildRequires: gcc
BuildRequires: pkgconfig(gmp)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(zlib-ng)
Requires: libzimpl%{?_isa} = %{version}-%{release}
@ -79,7 +77,7 @@ This package contains headers and library links for developing
applications that use libzimpl.
%prep
%autosetup -n scipoptsuite-%{scipoptsuitever}/%{name} -p1
%autosetup -n %{name}-%{upver} -p1
# Fix installation directories
if [ "%{_lib}" != "lib" ]; then
@ -100,11 +98,14 @@ export CXXFLAGS='%{build_cxxflags} -DFREEMEM -DNO_MSHELL'
mkdir -p %{buildroot}%{_mandir}/man1
cp -p doc/zimpl.man %{buildroot}%{_mandir}/man1/zimpl.1
# FIXME: Test qubo.zpl (qbo: lp) fails on ppc64le
%ifnarch ppc64le
%check
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
cd check
sh check.sh ../%{_vpath_builddir}/bin/zimpl
cd -
%endif
%files
%doc doc/zimpl.pdf