From f83bcac7c8c8d30dd1a8f9aeb3e4cc3bbd14c67d Mon Sep 17 00:00:00 2001 From: Andrew Sun Date: Wed, 2 May 2018 13:39:45 -0400 Subject: [PATCH] zziplib: update to 0.13.69 (#3670) This updates zziplib to 0.13.69 and removes failing check function. --- mingw-w64-zziplib/PKGBUILD | 23 ++---- mingw-w64-zziplib/configure.patch | 78 ++++--------------- mingw-w64-zziplib/mingw-mmap-workaround.patch | 34 -------- 3 files changed, 24 insertions(+), 111 deletions(-) delete mode 100644 mingw-w64-zziplib/mingw-mmap-workaround.patch diff --git a/mingw-w64-zziplib/PKGBUILD b/mingw-w64-zziplib/PKGBUILD index da82dc930d..a20d0ecc34 100644 --- a/mingw-w64-zziplib/PKGBUILD +++ b/mingw-w64-zziplib/PKGBUILD @@ -3,8 +3,8 @@ _realname=zziplib pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=0.13.62 -pkgrel=5 +pkgver=0.13.69 +pkgrel=1 pkgdesc="A lightweight library that offers the ability to easily extract data from files archived in a single zip file (mingw-w64)" arch=('any') url="https://zziplib.sourceforge.io/" @@ -16,17 +16,15 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" depends=("${MINGW_PACKAGE_PREFIX}-zlib") optdepends=("${MINGW_PACKAGE_PREFIX}-SDL: SDL_rwops for ZZipLib") options=('staticlibs' 'strip') -source=("https://downloads.sourceforge.net/zziplib/${_realname}-${pkgver}.tar.bz2" - "configure.patch" - "mingw-mmap-workaround.patch") -sha256sums=('a1b8033f1a1fd6385f4820b01ee32d8eca818409235d22caf5119e0078c7525b' - '3ba2ef5b7330437f0662726358b8d5d8cb39c521115eead69cd3b42be5e1e889' - 'c727f337eba65fb8cff95680c08daa6a74aafa6bd73b2fe945885f86dc265583') +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/gdraheim/zziplib/archive/v${pkgver}.tar.gz" + "configure.patch") +sha256sums=('846246d7cdeee405d8d21e2922c6e97f55f24ecbe3b6dcf5778073a88f120544' + '892162a8535575891663607b8fb5e3be518e8293e9b0f22cf437b1d83a58b008') prepare() { cd "${srcdir}/${_realname}-${pkgver}" - patch -Np1 -i $srcdir/configure.patch - patch -Np1 -i $srcdir/mingw-mmap-workaround.patch + patch -Np1 -i ${srcdir}/configure.patch + autoreconf -fiv } build() { @@ -44,11 +42,6 @@ build() { make } -check() { - cd "${srcdir}/build-${MINGW_CHOST}" - make check -} - package() { cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install diff --git a/mingw-w64-zziplib/configure.patch b/mingw-w64-zziplib/configure.patch index 9ee464577e..ae16f1797d 100644 --- a/mingw-w64-zziplib/configure.patch +++ b/mingw-w64-zziplib/configure.patch @@ -1,7 +1,19 @@ -diff -ru zziplib-0.13.62/configure patched/configure ---- zziplib-0.13.62/configure 2012-03-11 21:28:52.000000000 +0100 -+++ patched/configure 2013-08-02 23:28:48.122420796 +0200 -@@ -5908,11 +5908,13 @@ +diff -Naur zziplib-0.13.69.orig/configure.ac zziplib-0.13.69/configure.ac +--- zziplib-0.13.69.orig/configure.ac 2018-05-01 19:44:36.387886000 -0400 ++++ zziplib-0.13.69/configure.ac 2018-05-01 19:46:24.715029400 -0400 +@@ -317,7 +317,7 @@ + ZZIPLIB_LDFLAGS="" + case "$host_os" in mingw*) + # we may assume that the backend is gnu-ld but DLLs need full resolution +- ZZIPLIB_LDFLAGS="${wl}-no-undefined ${wl}-export-all-symbols -mconsole" ++ ZZIPLIB_LDFLAGS="-no-undefined ${wl}-no-undefined ${wl}-export-all-symbols -mconsole" + RESOLVES=' ' + ;; darwin*) + # darwin never uses gnu-ld but the linker can do it anyway +diff -Naur zziplib-0.13.69.orig/m4/libtool.m4 zziplib-0.13.69/m4/libtool.m4 +--- zziplib-0.13.69.orig/m4/libtool.m4 2018-05-01 19:44:36.325386000 -0400 ++++ zziplib-0.13.69/m4/libtool.m4 2018-05-01 19:45:41.528967100 -0400 +@@ -3467,7 +3467,8 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. @@ -11,61 +23,3 @@ diff -ru zziplib-0.13.62/configure patched/configure lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -@@ -13724,7 +13726,7 @@ - ZZIPLIB_LDFLAGS="" - case "$host_os" in mingw*) - # we may assume that the backend is gnu-ld but DLLs need full resolution -- ZZIPLIB_LDFLAGS="${wl}-no-undefined ${wl}-export-all-symbols -mconsole" -+ ZZIPLIB_LDFLAGS="-no-undefined ${wl}-no-undefined ${wl}-export-all-symbols -mconsole" - RESOLVES=' ' - ;; darwin*) - # darwin never uses gnu-ld but the linker can do it anyway -diff -ru zziplib-0.13.62/configure.ac patched/configure.ac ---- zziplib-0.13.62/configure.ac 2012-03-11 21:28:35.000000000 +0100 -+++ patched/configure.ac 2013-08-03 00:25:42.305761319 +0200 -@@ -294,7 +294,7 @@ - ZZIPLIB_LDFLAGS="" - case "$host_os" in mingw*) - # we may assume that the backend is gnu-ld but DLLs need full resolution -- ZZIPLIB_LDFLAGS="${wl}-no-undefined ${wl}-export-all-symbols -mconsole" -+ ZZIPLIB_LDFLAGS="-no-undefined ${wl}-no-undefined ${wl}-export-all-symbols -mconsole" - RESOLVES=' ' - ;; darwin*) - # darwin never uses gnu-ld but the linker can do it anyway -diff -ru zziplib-0.13.62/m4/libtool.m4 patched/m4/libtool.m4 ---- zziplib-0.13.62/m4/libtool.m4 2009-08-23 13:38:19.000000000 +0200 -+++ patched/m4/libtool.m4 2013-08-02 22:57:24.381209038 +0200 -@@ -2999,11 +2999,13 @@ - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. -- if ( file / ) >/dev/null 2>&1; then -+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. -+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' -+ # Keep this pattern in sync with the one in func_win32_libid. -+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; -diff -ru zziplib-0.13.62/uses/ltmain.sh patched/uses/ltmain.sh ---- zziplib-0.13.62/uses/ltmain.sh 2009-08-23 13:38:18.000000000 +0200 -+++ patched/uses/ltmain.sh 2013-08-02 23:36:33.609957248 +0200 -@@ -2560,7 +2560,7 @@ - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | -- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then -+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ \ No newline at end of file diff --git a/mingw-w64-zziplib/mingw-mmap-workaround.patch b/mingw-w64-zziplib/mingw-mmap-workaround.patch deleted file mode 100644 index 1c85629b1b..0000000000 --- a/mingw-w64-zziplib/mingw-mmap-workaround.patch +++ /dev/null @@ -1,34 +0,0 @@ -This patch has been taken from: -http://sourceforge.net/tracker/?func=detail&aid=2995373&group_id=6389&atid=306389 - ---- zziplib-0.13.59/zzip/__mmap.h 2013-10-03 22:23:32.467619238 -0400 -+++ zzip-patched/zzip/__mmap.h 2013-10-04 21:44:16.412881609 -0400 -@@ -63,14 +63,15 @@ - return 0; - { - HANDLE hFile = (HANDLE)_get_osfhandle(fd); -+ HANDLE fileMapping = NULL; - if (hFile) -- *user = (int) CreateFileMapping (hFile, 0, PAGE_READONLY, 0, 0, NULL); -- if (*user) -+ fileMapping = CreateFileMapping(hFile, 0, PAGE_READONLY, 0, 0, NULL); -+ if (fileMapping != NULL) - { - char* p = 0; -- p = MapViewOfFile(*(HANDLE*)user, FILE_MAP_READ, 0, offs, len); -- if (p) return p + offs; -- CloseHandle (*(HANDLE*)user); *user = 1; -+ p = MapViewOfFile(fileMapping, FILE_MAP_READ, 0, offs, len); -+ CloseHandle (fileMapping); -+ if (p) return p; - } - return MAP_FAILED; - } -@@ -78,7 +79,6 @@ - static void win32_munmap (long* user, char* fd_map, size_t len) - { - UnmapViewOfFile (fd_map); -- CloseHandle (*(HANDLE*)user); *user = 1; - } - - #define _zzip_mmap(user, fd, offs, len) \