summaryrefslogtreecommitdiffstats
path: root/src/quazip-1-fixes.patch
blob: 6359d1b7f249504e11174cd6ff78feee159eb2d4 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
Date: Sun, 4 Jun 2017 03:19:59 +0200
Subject: [PATCH 1/3] add pkg-config generation to qmake build

Sent to upstream: https://sourceforge.net/p/quazip/patches/31/

Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>

diff --git a/quazip/quazip.pro b/quazip/quazip.pro
index 1111111..2222222 100644
--- a/quazip/quazip.pro
+++ b/quazip/quazip.pro
@@ -2,6 +2,13 @@ TEMPLATE = lib
 CONFIG += qt warn_on
 QT -= gui
 
+# Creating pkgconfig .pc file
+CONFIG += create_prl no_install_prl create_pc
+
+QMAKE_PKGCONFIG_PREFIX = $$PREFIX
+QMAKE_PKGCONFIG_INCDIR = $$headers.path
+QMAKE_PKGCONFIG_REQUIRES = Qt5Core
+
 # The ABI version.
 
 !win32:VERSION = 1.0.0
@@ -43,6 +50,7 @@ unix:!symbian {
     headers.path=$$PREFIX/include/quazip
     headers.files=$$HEADERS
     target.path=$$PREFIX/lib/$${LIB_ARCH}
+    QMAKE_PKGCONFIG_DESTDIR = pkgconfig
     INSTALLS += headers target
 
 	OBJECTS_DIR=.obj
@@ -53,8 +61,21 @@ unix:!symbian {
 win32 {
     headers.path=$$PREFIX/include/quazip
     headers.files=$$HEADERS
-    target.path=$$PREFIX/lib
     INSTALLS += headers target
+    CONFIG(staticlib){
+        target.path=$$PREFIX/lib
+        QMAKE_PKGCONFIG_LIBDIR = $$PREFIX/lib/
+    } else {
+        target.path=$$PREFIX/bin
+        QMAKE_PKGCONFIG_LIBDIR = $$PREFIX/bin/
+    }
+
+    ## odd, this path seems to be relative to the
+    ## target.path, so if we install the .dll into
+    ## the 'bin' dir, the .pc will go there as well,
+    ## unless have hack the needed path...
+    ## TODO any nicer solution?
+    QMAKE_PKGCONFIG_DESTDIR = ../lib/pkgconfig
     # workaround for qdatetime.h macro bug
     DEFINES += NOMINMAX
 }

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
Date: Sun, 4 Jun 2017 03:22:13 +0200
Subject: [PATCH 2/3] add -lz dir for win build

Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>

diff --git a/quazip/quazip.pro b/quazip/quazip.pro
index 1111111..2222222 100644
--- a/quazip/quazip.pro
+++ b/quazip/quazip.pro
@@ -78,6 +78,8 @@ win32 {
     QMAKE_PKGCONFIG_DESTDIR = ../lib/pkgconfig
     # workaround for qdatetime.h macro bug
     DEFINES += NOMINMAX
+
+    LIBS += -lz
 }
 
 
diff --git a/qztest/qztest.pro b/qztest/qztest.pro
index 1111111..2222222 100644
--- a/qztest/qztest.pro
+++ b/qztest/qztest.pro
@@ -40,8 +40,8 @@ testquazipfile.cpp \
 OBJECTS_DIR = .obj
 MOC_DIR = .moc
 
-win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../quazip/release/ -lquazip
-else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../quazip/debug/ -lquazipd
+win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../quazip/release/ -lquazip -lz
+else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../quazip/debug/ -lquazipd -lz
 else:mac:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../quazip/debug/ -lquazip_debug
 else:unix: LIBS += -L$$OUT_PWD/../quazip/ -lquazip
 

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
Date: Sat, 3 Jun 2017 11:24:17 +0200
Subject: [PATCH 3/3] use lowercase windows.h

Sent to upstream: https://sourceforge.net/p/quazip/patches/30/

Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>

diff --git a/qztest/testjlcompress.cpp b/qztest/testjlcompress.cpp
index 1111111..2222222 100644
--- a/qztest/testjlcompress.cpp
+++ b/qztest/testjlcompress.cpp
@@ -34,7 +34,7 @@ see quazip/(un)zip.h files for details. Basically it's the zlib license.
 #include <quazip/JlCompress.h>
 
 #ifdef Q_OS_WIN
-#include <Windows.h>
+#include <windows.h>
 #endif
 
 void TestJlCompress::compressFile_data()