summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD19
-rw-r--r--fix-headers.patch15
-rw-r--r--libzip_cmake-fixes.patch41
4 files changed, 59 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 179495583886..ad47806842b5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,22 @@
+# Generated by mksrcinfo v8
+# Fri Jan 15 21:26:00 UTC 2016
pkgbase = mingw-w64-libzip
pkgdesc = A C library for reading, creating, and modifying zip archives (mingw-w64)
- pkgver = 0.11.1
- pkgrel = 4
+ pkgver = 1.0.1
+ pkgrel = 1
url = http://www.nih.at/libzip/index.html
arch = any
license = BSD
- makedepends = mingw-w64-configure
+ makedepends = mingw-w64-cmake
depends = mingw-w64-crt
depends = mingw-w64-zlib
options = staticlibs
options = !buildflags
options = !strip
- source = http://www.nih.at/libzip/libzip-0.11.1.tar.xz
- source = fix-headers.patch
- md5sums = 87d5ec3629f6ad2a4b01ad961e7f0c19
- md5sums = 249395bd3a426c4c4e993e9d4753e1dd
+ source = http://www.nih.at/libzip/libzip-1.0.1.tar.xz
+ source = libzip_cmake-fixes.patch
+ md5sums = e2371fc6f04a46efdaf8cbf4118ffafd
+ md5sums = SKIP
pkgname = mingw-w64-libzip
diff --git a/PKGBUILD b/PKGBUILD
index 1fa9b19f10a9..fa81c91ca70b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,30 @@
pkgname=mingw-w64-libzip
-pkgver=0.11.1
-pkgrel=4
+pkgver=1.0.1
+pkgrel=1
pkgdesc="A C library for reading, creating, and modifying zip archives (mingw-w64)"
url="http://www.nih.at/libzip/index.html"
license=('BSD')
arch=(any)
depends=('mingw-w64-crt' 'mingw-w64-zlib')
-makedepends=('mingw-w64-configure')
+makedepends=('mingw-w64-cmake')
options=('staticlibs' '!buildflags' '!strip')
source=("http://www.nih.at/libzip/libzip-${pkgver}.tar.xz"
- 'fix-headers.patch')
-md5sums=('87d5ec3629f6ad2a4b01ad961e7f0c19'
- '249395bd3a426c4c4e993e9d4753e1dd')
-
+ 'libzip_cmake-fixes.patch')
+md5sums=('e2371fc6f04a46efdaf8cbf4118ffafd'
+ 'SKIP')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cd "$srcdir/libzip-${pkgver}"
- patch -p1 -i "$srcdir/fix-headers.patch"
- autoreconf -vfi
+ patch -p1 -i "$srcdir/libzip_cmake-fixes.patch"
}
build() {
cd "$srcdir/libzip-${pkgver}"
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
- ${_arch}-configure
+ ${_arch}-cmake ..
make
popd
done
@@ -36,6 +34,7 @@ package() {
for _arch in ${_architectures}; do
cd "$srcdir/libzip-${pkgver}/build-$_arch"
make DESTDIR="${pkgdir}" install
+ ln -s /usr/${_arch}/lib/libzip/include/zipconf.h "$pkgdir"/usr/${_arch}/include/zipconf.h
rm -r "$pkgdir"/usr/${_arch}/share/
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
${_arch}-strip --strip-all "$pkgdir"/usr/${_arch}/bin/*.exe
diff --git a/fix-headers.patch b/fix-headers.patch
deleted file mode 100644
index 75917107025c..000000000000
--- a/fix-headers.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -urN libzip-0.10rc1.old/lib/Makefile.am libzip-0.10rc1/lib/Makefile.am
---- libzip-0.10rc1.old/lib/Makefile.am 2011-03-05 01:07:33.921722002 +0100
-+++ libzip-0.10rc1/lib/Makefile.am 2011-03-05 20:29:30.349388003 +0100
-@@ -2,8 +2,9 @@
-
- lib_LTLIBRARIES = libzip.la
- noinst_HEADERS = zipint.h
--include_HEADERS = zip.h
--libinclude_HEADERS = zipconf.h
-+include_HEADERS = \
-+ zip.h \
-+ zipconf.h
-
- # also update CMakeLists.txt when changing version
- libzip_la_LDFLAGS=-no-undefined -version-info 2:0
diff --git a/libzip_cmake-fixes.patch b/libzip_cmake-fixes.patch
new file mode 100644
index 000000000000..0f7d76a102d4
--- /dev/null
+++ b/libzip_cmake-fixes.patch
@@ -0,0 +1,41 @@
+diff -rupN libzip-1.0.1/CMakeLists.txt libzip-1.0.1-new/CMakeLists.txt
+--- libzip-1.0.1/CMakeLists.txt 2015-05-04 22:49:38.000000000 +0200
++++ libzip-1.0.1-new/CMakeLists.txt 2015-11-09 21:12:27.926634684 +0100
+@@ -106,3 +106,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DI
+ # installation
+
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zipconf.h DESTINATION lib/libzip/include)
++
++SET(LIBS -lz)
++CONFIGURE_FILE(libzip.pc.in libzip.pc @ONLY)
++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzip.pc DESTINATION lib/pkgconfig)
+diff -rupN libzip-1.0.1/lib/CMakeLists.txt libzip-1.0.1-new/lib/CMakeLists.txt
+--- libzip-1.0.1/lib/CMakeLists.txt 2015-04-29 22:46:14.000000000 +0200
++++ libzip-1.0.1-new/lib/CMakeLists.txt 2015-11-09 20:53:15.992812515 +0100
+@@ -183,7 +183,13 @@ IF(NOT HAVE_MKSTEMP)
+ ENDIF(NOT HAVE_MKSTEMP)
+
+ ADD_LIBRARY(zip SHARED ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES})
+-SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 3.0 SOVERSION 3 )
++SET(SOVERSION_MAJ 4)
++SET(SOVERSION_MIN 0)
++SET_TARGET_PROPERTIES(zip PROPERTIES VERSION ${SOVERSION_MAJ}.${SOVERSION_MIN} SOVERSION ${SOVERSION_MAJ})
++IF(WIN32)
++ SET_TARGET_PROPERTIES(zip PROPERTIES SUFFIX "-${SOVERSION_MAJ}${CMAKE_SHARED_LIBRARY_SUFFIX}")
++ENDIF(WIN32)
++
+ TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY})
+ INSTALL(TARGETS zip
+ RUNTIME DESTINATION bin
+diff -rupN libzip-1.0.1/man/CMakeLists.txt libzip-1.0.1-new/man/CMakeLists.txt
+--- libzip-1.0.1/man/CMakeLists.txt 2015-04-29 17:43:29.000000000 +0200
++++ libzip-1.0.1-new/man/CMakeLists.txt 2015-11-09 21:14:45.138242668 +0100
+@@ -99,7 +99,7 @@ ENDif(CMAKE_SYSTEM_NAME MATCHES BSD)
+
+ # installation
+
+-SET(MAN_PATH man)
++SET(MAN_PATH share/man)
+
+ FOREACH(MAN_PAGE ${MAN1_PAGES})
+ INSTALL(FILES ${MAN_PAGE}.${MANFMT} DESTINATION ${MAN_PATH}/man1