summaryrefslogtreecommitdiffstats
path: root/src/libzip-1-fixes.patch
blob: 47484b84fe3e1fda953da78ae261af4d8d63339c (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
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