Update to 1.2.12
This commit is contained in:
parent
103a7100e6
commit
4d22a21617
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ zlib-1.2.3.tar.gz
|
||||
/zlib-1.2.7.tar.gz
|
||||
/zlib-1.2.8.tar.gz
|
||||
/zlib-1.2.11.tar.xz
|
||||
/zlib-1.2.12.tar.xz
|
||||
|
21
mingw-zlib-cmake.patch
Normal file
21
mingw-zlib-cmake.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -rupN --no-dereference zlib-1.2.12/CMakeLists.txt zlib-1.2.12-new/CMakeLists.txt
|
||||
--- zlib-1.2.12/CMakeLists.txt 2022-03-28 01:39:42.000000000 +0200
|
||||
+++ zlib-1.2.12-new/CMakeLists.txt 2022-06-30 09:45:57.294026936 +0200
|
||||
@@ -199,12 +199,16 @@ if(NOT CYGWIN)
|
||||
set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
|
||||
endif()
|
||||
|
||||
-if(UNIX)
|
||||
+if(UNIX OR MINGW)
|
||||
# On unix-like platforms the library is almost always called libz
|
||||
set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
|
||||
if(NOT APPLE)
|
||||
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
|
||||
endif()
|
||||
+ if(MINGW)
|
||||
+ set_target_properties(zlib PROPERTIES PREFIX "")
|
||||
+ set_target_properties(zlib PROPERTIES RUNTIME_OUTPUT_NAME "zlib1")
|
||||
+ endif()
|
||||
elseif(BUILD_SHARED_LIBS AND WIN32)
|
||||
# Creates zlib1.dll when building shared library version
|
||||
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
|
@ -1,36 +1,26 @@
|
||||
%{?mingw_package_header}
|
||||
|
||||
Name: mingw-zlib
|
||||
Version: 1.2.11
|
||||
Release: 8%{?dist}
|
||||
Version: 1.2.12
|
||||
Release: 1%{?dist}
|
||||
Summary: MinGW Windows zlib compression library
|
||||
|
||||
License: zlib
|
||||
URL: http://www.zlib.net/
|
||||
Source0: http://www.zlib.net/zlib-%{version}.tar.xz
|
||||
# Replace the zlib build system with an autotools based one
|
||||
Patch3: mingw32-zlib-1.2.7-autotools.patch
|
||||
# The .def file contains an empty LIBRARY line which isn't valid
|
||||
Patch5: zlib-1.2.7-use-correct-def-file.patch
|
||||
# Libtool tries to make a libz-1.dll while we expect zlib1.dll
|
||||
# Force this by hacking the ltmain.sh
|
||||
Patch6: mingw32-zlib-create-zlib1-dll.patch
|
||||
# Use UNIX naming convention for libraries
|
||||
Patch0: mingw-zlib-cmake.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: make
|
||||
|
||||
BuildRequires: mingw32-filesystem >= 95
|
||||
BuildRequires: mingw32-gcc
|
||||
BuildRequires: mingw32-binutils
|
||||
|
||||
BuildRequires: mingw64-filesystem >= 95
|
||||
BuildRequires: mingw64-gcc
|
||||
BuildRequires: mingw64-binutils
|
||||
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
|
||||
|
||||
%description
|
||||
@ -72,45 +62,20 @@ The mingw64-zlib-static package contains static library for mingw64-zlib develop
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n zlib-%{version}
|
||||
%patch3 -p1 -b .atools
|
||||
%patch5 -p1 -b .def
|
||||
# patch cannot create an empty dir
|
||||
mkdir m4
|
||||
iconv -f windows-1252 -t utf-8 <ChangeLog >ChangeLog.tmp
|
||||
|
||||
autoreconf --install --force
|
||||
|
||||
%patch6 -p0 -b .libtool
|
||||
%autosetup -p1 -n zlib-%{version}
|
||||
|
||||
|
||||
%build
|
||||
%mingw_configure
|
||||
MINGW32_CMAKE_ARGS=-DINSTALL_PKGCONFIG_DIR=%{mingw32_libdir}/pkgconfig \
|
||||
MINGW64_CMAKE_ARGS=-DINSTALL_PKGCONFIG_DIR=%{mingw64_libdir}/pkgconfig \
|
||||
%mingw_cmake
|
||||
%mingw_make_build
|
||||
%mingw_make_build
|
||||
|
||||
|
||||
%install
|
||||
# Libtool tries to install a file called libz-1.dll
|
||||
# but this isn't created anymore due to patch #6
|
||||
# Fool libtool until a proper fix has been found
|
||||
touch build_win32/.libs/libz-1.dll build_win64/.libs/libz-1.dll
|
||||
%mingw_make_install
|
||||
|
||||
# Manually install the correct zlib.dll
|
||||
install -m 0644 build_win32/.libs/zlib1.dll %{buildroot}%{mingw32_bindir}/
|
||||
install -m 0644 build_win64/.libs/zlib1.dll %{buildroot}%{mingw64_bindir}/
|
||||
|
||||
# Install the pkgconfig file
|
||||
install -Dm 0644 build_win32/zlib.pc %{buildroot}%{mingw32_libdir}/pkgconfig/zlib.pc
|
||||
install -Dm 0644 build_win64/zlib.pc %{buildroot}%{mingw64_libdir}/pkgconfig/zlib.pc
|
||||
|
||||
# Drop the fake libz-1.dll
|
||||
rm -f %{buildroot}%{mingw32_bindir}/libz-1.dll
|
||||
rm -f %{buildroot}%{mingw64_bindir}/libz-1.dll
|
||||
|
||||
# Drop all .la files
|
||||
find %{buildroot} -name "*.la" -delete
|
||||
|
||||
# Drop the man pages
|
||||
rm -rf %{buildroot}%{mingw32_mandir}
|
||||
rm -rf %{buildroot}%{mingw64_mandir}
|
||||
@ -140,6 +105,9 @@ rm -rf %{buildroot}%{mingw64_mandir}
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jun 30 2022 Sandro Mani <manisandro@gmail.com> - 1.2.12-1
|
||||
- Update to 1.2.12
|
||||
|
||||
* Fri Mar 25 2022 Sandro Mani <manisandro@gmail.com> - 1.2.11-8
|
||||
- Rebuild with mingw-gcc-12
|
||||
|
||||
|
@ -1,76 +0,0 @@
|
||||
diff -rupN --no-dereference zlib-1.2.11/configure.ac zlib-1.2.11-new/configure.ac
|
||||
--- zlib-1.2.11/configure.ac 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ zlib-1.2.11-new/configure.ac 2020-11-12 22:09:58.320508742 +0100
|
||||
@@ -0,0 +1,13 @@
|
||||
+# -*- Autoconf -*-
|
||||
+# Process this file with autoconf to produce a configure script.
|
||||
+
|
||||
+AC_INIT([zlib], [1.2.11], [bugzilla.redhat.com])
|
||||
+AC_CONFIG_SRCDIR([gzlib.c])
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
+AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
+LT_INIT
|
||||
+
|
||||
+AC_SUBST([HAVE_UNISTD_H], [0])
|
||||
+AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
|
||||
+AC_CONFIG_FILES([Makefile zlib.pc zconf.h:zconf.h.in])
|
||||
+AC_OUTPUT
|
||||
diff -rupN --no-dereference zlib-1.2.11/Makefile.am zlib-1.2.11-new/Makefile.am
|
||||
--- zlib-1.2.11/Makefile.am 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ zlib-1.2.11-new/Makefile.am 2020-11-12 22:09:58.320508742 +0100
|
||||
@@ -0,0 +1,37 @@
|
||||
+ACLOCAL_AMFLAGS = -I m4 --install
|
||||
+
|
||||
+lib_LTLIBRARIES = libz.la
|
||||
+
|
||||
+libz_la_SOURCES = \
|
||||
+ adler32.c \
|
||||
+ compress.c \
|
||||
+ crc32.c \
|
||||
+ crc32.h \
|
||||
+ gzclose.c \
|
||||
+ gzlib.c \
|
||||
+ gzread.c \
|
||||
+ gzwrite.c \
|
||||
+ uncompr.c \
|
||||
+ deflate.c \
|
||||
+ deflate.h \
|
||||
+ trees.c \
|
||||
+ trees.h \
|
||||
+ zutil.c \
|
||||
+ zutil.h \
|
||||
+ inflate.c \
|
||||
+ inflate.h \
|
||||
+ infback.c \
|
||||
+ inftrees.c \
|
||||
+ inftrees.h \
|
||||
+ inffast.c \
|
||||
+ inffast.h \
|
||||
+ infflate.h
|
||||
+
|
||||
+# Use -version-number to match the file name used before autoconfiscation.
|
||||
+libz_la_LDFLAGS = -version-number 1:2:11 -no-undefined
|
||||
+
|
||||
+include_HEADERS = zlib.h
|
||||
+nodist_include_HEADERS = zconf.h
|
||||
+
|
||||
+dist_man_MANS = zlib.3
|
||||
+
|
||||
diff -rupN --no-dereference zlib-1.2.11/zlib.pc.in zlib-1.2.11-new/zlib.pc.in
|
||||
--- zlib-1.2.11/zlib.pc.in 2010-04-18 08:48:15.000000000 +0200
|
||||
+++ zlib-1.2.11-new/zlib.pc.in 2020-11-12 22:09:58.320508742 +0100
|
||||
@@ -1,7 +1,6 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
-sharedlibdir=@sharedlibdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: zlib
|
||||
@@ -9,5 +8,5 @@ Description: zlib compression library
|
||||
Version: @VERSION@
|
||||
|
||||
Requires:
|
||||
-Libs: -L${libdir} -L${sharedlibdir} -lz
|
||||
+Libs: -L${libdir} -lz
|
||||
Cflags: -I${includedir}
|
@ -1,10 +0,0 @@
|
||||
--- ltmain.sh.orig 2010-10-13 23:11:05.164935359 +0200
|
||||
+++ ltmain.sh 2010-10-13 23:33:31.572557755 +0200
|
||||
@@ -7431,6 +7431,7 @@
|
||||
eval test_cmds=\"$archive_expsym_cmds\"
|
||||
cmds=$archive_expsym_cmds
|
||||
else
|
||||
+ if test "$soname" = "libz-1.dll" ; then soname=zlib1.dll; fi
|
||||
eval test_cmds=\"$archive_cmds\"
|
||||
cmds=$archive_cmds
|
||||
fi
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (zlib-1.2.11.tar.xz) = b7f50ada138c7f93eb7eb1631efccd1d9f03a5e77b6c13c8b757017b2d462e19d2d3e01c50fad60a4ae1bc86d431f6f94c72c11ff410c25121e571953017cb67
|
||||
SHA512 (zlib-1.2.12.tar.xz) = 12940e81e988f7661da52fa20bdc333314ae86a621fdb748804a20840b065a1d6d984430f2d41f3a057de0effc6ff9bcf42f9ee9510b88219085f59cbbd082bd
|
||||
|
@ -1,8 +0,0 @@
|
||||
diff -rupN --no-dereference zlib-1.2.11/win32/zlib.def zlib-1.2.11-new/win32/zlib.def
|
||||
--- zlib-1.2.11/win32/zlib.def 2017-01-01 08:37:10.000000000 +0100
|
||||
+++ zlib-1.2.11-new/win32/zlib.def 2020-11-12 22:09:58.338508692 +0100
|
||||
@@ -1,3 +1,4 @@
|
||||
+LIBRARY zlib1.dll
|
||||
; zlib data compression library
|
||||
EXPORTS
|
||||
; basic functions
|
Loading…
Reference in New Issue
Block a user