summaryrefslogtreecommitdiffstats
path: root/src/libzip-1-fixes.patch
blob: 03ff845749266b236d7e9928cab2712d93103e3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
This file is part of MXE. See LICENSE.md for licensing information.

From 8aa28e38f7b753c40fa1d107d88a5e1281a09dec 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 27141b3..8d85e61 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
-- 
2.9.3


From d7b8bf5ccfbedfc10bddaa46f19c08635f1fa17f 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 ef8af2d..f053510 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
 
-- 
2.9.3