diff --git a/glpk-4.53-unbundle-zlib.diff b/glpk-4.53-unbundle-zlib.diff new file mode 100644 index 0000000..f4684de --- /dev/null +++ b/glpk-4.53-unbundle-zlib.diff @@ -0,0 +1,102 @@ +diff -urN glpk-4.53.orig/doc/glpk11.tex glpk-4.53/doc/glpk11.tex +--- glpk-4.53.orig/doc/glpk11.tex 2014-02-13 04:00:00.000000000 -0500 ++++ glpk-4.53/doc/glpk11.tex 2014-05-29 14:11:17.267644446 -0400 +@@ -154,50 +154,4 @@ + \noindent + \url{http://www.cs.chalmers.se/Cs/Research/FormalMethods/MiniSat} + +-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +- +-\section{zlib} +- +-\noindent +-zlib version 1.2.5, Copyright {\copyright} 1995--2010 Jean-loup Gailly +-and Mark Adler. +- +-\para{Description} +- +-zlib is a general purpose data compression library. All the code is +-thread safe. The data format used by the zlib library is described by +-RFCs (Request for Comments) 1950 to 1952 in the files +-\verb|rfc1950.txt| (zlib format), \verb|rfc1951.txt| (deflate format) +-and \verb|rfc1952.txt| (gzip format). +- +-\para{License} +- +-This software is provided 'as-is', without any express or implied +-warranty. In no event will the authors be held liable for any damages +-arising from the use of this software. +- +-Permission is granted to anyone to use this software for any purpose, +-including commercial applications, and to alter it and redistribute it +-freely, subject to the following restrictions: +- +-1. The origin of this software must not be misrepresented; you must not +- claim that you wrote the original software. If you use this software +- in a product, an acknowledgment in the product documentation would +- be appreciated but is not required. +- +-2. Altered source versions must be plainly marked as such, and must not +- be misrepresented as being the original software. +- +-3. This notice may not be removed or altered from any source +- distribution. +- +-\hfill Jean-loup Gailly +- +-\hfill Mark Adler +- +-\para{Availability} +- +-\noindent +-\url{http://www.zlib.net/} +- + %* eof *% +diff -urN glpk-4.53.orig/src/Makefile.am glpk-4.53/src/Makefile.am +--- glpk-4.53.orig/src/Makefile.am 2014-02-13 04:00:00.000000000 -0500 ++++ glpk-4.53/src/Makefile.am 2014-05-29 14:10:00.882564303 -0400 +@@ -13,8 +13,7 @@ + -I$(srcdir)/env \ + -I$(srcdir)/minisat \ + -I$(srcdir)/misc \ +--I$(srcdir)/proxy \ +--I$(srcdir)/zlib ++-I$(srcdir)/proxy + + libglpk_la_LDFLAGS = \ + -version-info 37:0:1 \ +@@ -147,21 +146,6 @@ + misc/wclique.c \ + misc/wclique1.c \ + proxy/proxy.c \ +-proxy/proxy1.c \ +-zlib/adler32.c \ +-zlib/compress.c \ +-zlib/crc32.c \ +-zlib/deflate.c \ +-zlib/gzclose.c \ +-zlib/gzlib.c \ +-zlib/gzread.c \ +-zlib/gzwrite.c \ +-zlib/inffast.c \ +-zlib/inflate.c \ +-zlib/inftrees.c \ +-zlib/trees.c \ +-zlib/uncompr.c \ +-zlib/zio.c \ +-zlib/zutil.c ++proxy/proxy1.c + + ## eof ## +diff -urN glpk-4.53.orig/examples/Makefile.am glpk-4.53/examples/Makefile.am +--- glpk-4.53.orig/examples/Makefile.am 2014-02-13 04:00:00.000000000 -0500 ++++ glpk-4.53/examples/Makefile.am 2014-05-29 14:29:09.113874836 -0400 +@@ -2,7 +2,7 @@ + + AM_CPPFLAGS = -I$(srcdir)/../src + +-LDADD = ../src/libglpk.la ++LDADD = ../src/libglpk.la -lz + + bin_PROGRAMS = glpsol + diff --git a/glpk.spec b/glpk.spec index 231446b..cf3ecc9 100644 --- a/glpk.spec +++ b/glpk.spec @@ -1,14 +1,19 @@ Name: glpk Version: 4.53 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GNU Linear Programming Kit Group: System Environment/Libraries License: GPLv3 URL: http://www.gnu.org/software/glpk/glpk.html Source0: ftp://ftp.gnu.org/gnu/glpk/glpk-%{version}.tar.gz +# Un-bundle zlib (#1102855). Upstream won't accept; they want to be +# ANSI-compatible, and zlib makes POSIX assumptions. +Patch0: glpk-4.53-unbundle-zlib.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: autoconf + %description The GLPK (GNU Linear Programming Kit) package is intended for solving large-scale linear programming (LP), mixed integer programming (MIP), @@ -67,9 +72,15 @@ the GLPK (GNU Linear Programming Kit) libraries. %prep %setup -q +%patch0 -p1 +rm -rf src/zlib %build export LIBS=-ldl + +# Need to rebuild src/Makefile.in from src/Makefile.am +autoreconf -ifs + %configure # Die die die, rpath. sed -i -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|' libtool @@ -120,7 +131,10 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Fri Feb 14 2014 Conrad Meyer - 4.53 +* Thu May 29 2014 Cornad Meyer - 4.53-2 +- Un-bundle zlib (rh #1102855) + +* Fri Feb 14 2014 Conrad Meyer - 4.53-1 - Bump to latest upstream 4.53 - Drop glp_get_it_cnt() patch; now present in glpk.h, glpapi06.c - Kill rpath