libzip: update and switch to github/cmake

This commit is contained in:
Tony Theodore 2018-08-15 20:34:45 +10:00
parent 222c56bcbc
commit 8a8b14070c
2 changed files with 15 additions and 62 deletions

View File

@ -1,46 +0,0 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sylvain Beucler <beuc@beuc.net>
Date: Sun, 15 Jan 2017 17:25:49 +0100
Subject: [PATCH 1/2] static build fixes
diff --git a/lib/zip.h b/lib/zip.h
index 1111111..2222222 100644
--- a/lib/zip.h
+++ b/lib/zip.h
@@ -37,9 +37,9 @@
#ifndef ZIP_EXTERN
# ifndef ZIP_STATIC
-# ifdef _WIN32
+# ifdef _MSC_VER
# define ZIP_EXTERN __declspec(dllimport)
-# elif defined(__GNUC__) && __GNUC__ >= 4
+# elif (defined(__GNUC__) && __GNUC__ >= 4) && !defined(_WIN32)
# define ZIP_EXTERN __attribute__ ((visibility ("default")))
# else
# define ZIP_EXTERN
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sylvain Beucler <beuc@beuc.net>
Date: Sun, 15 Jan 2017 17:28:42 +0100
Subject: [PATCH 2/2] pkgconfig private
diff --git a/libzip.pc.in b/libzip.pc.in
index 1111111..2222222 100644
--- a/libzip.pc.in
+++ b/libzip.pc.in
@@ -9,6 +9,7 @@ zipcmp=@prefix@/bin/zipcmp
Name: libzip
Description: library for handling zip archives
Version: @VERSION@
-Libs: @PKG_CONFIG_RPATH@ -L${libdir} -lzip @LIBS@
+Libs: @PKG_CONFIG_RPATH@ -L${libdir} -lzip
Cflags: -I${includedir} -I${libincludedir}
+Requires.private: zlib

View File

@ -1,25 +1,24 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := libzip
$(PKG)_WEBSITE := https://www.nih.at/libzip/
$(PKG)_WEBSITE := https://libzip.org/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.1.3
$(PKG)_CHECKSUM := 729a295a59a9fd6e5b9fe9fd291d36ae391a9d2be0b0824510a214cfaa05ceee
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://www.nih.at/libzip/$($(PKG)_FILE)
$(PKG)_DEPS := cc zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://www.nih.at/libzip/' | \
$(SED) -n 's,.*libzip-\([0-9][^>]*\)\.tar.*,\1,p' | \
head -1
endef
$(PKG)_VERSION := 1.5.1
$(PKG)_CHECKSUM := 3ca79ff6b9a02b3e3bcf0b45f30a8159c3146658f57c8b6be0a370eabd3db071
$(PKG)_GH_CONF := nih-at/libzip/releases,rel-,,,-
$(PKG)_DEPS := cc bzip2 zlib
define $(PKG)_BUILD
cd '$(1)' && ./configure \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT) SUBDIRS=lib
# build and install the library
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
-DENABLE_GNUTLS=OFF \
-DENABLE_OPENSSL=OFF \
-DENABLE_COMMONCRYPTO=OFF
$(MAKE) -C '$(BUILD_DIR)/lib' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)/lib' -j 1 install
$(INSTALL) -m644 '$(BUILD_DIR)/zipconf.h' '$(PREFIX)/$(TARGET)/include'
$(INSTALL) -m644 '$(BUILD_DIR)/libzip.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig'
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \