mxe/src/libzip-1-fixes.patch

47 lines
1.3 KiB
Diff

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