summaryrefslogtreecommitdiffstats
path: root/src/wt-1-fixes.patch
blob: 4bb3687a2b69ea0096703448443a01bda258b27a (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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
This file is part of MXE.
See index.html for further information.

From 29e0f572f1c1875089601cb0dcae3bd1c3ea7118 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 18 Jun 2012 13:02:03 +0200
Subject: [PATCH 1/2] fix case of winsock2.h which matters when cross-building

taken from
http://sourceforge.net/mailarchive/message.php?msg_id=29421539
---
 src/Wt/Auth/HashFunction.C |    2 +-
 src/Wt/Utils.C             |    2 +-
 src/http/Configuration.C   |    4 ++--
 src/web/TimeUtil.C         |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Wt/Auth/HashFunction.C b/src/Wt/Auth/HashFunction.C
index 6d764fa..34615e0 100644
--- a/src/Wt/Auth/HashFunction.C
+++ b/src/Wt/Auth/HashFunction.C
@@ -15,7 +15,7 @@
 #ifndef WIN32
 #include <arpa/inet.h>
 #else
-#include <Winsock2.h>
+#include <winsock2.h>
 #endif
 #endif
 
diff --git a/src/Wt/Utils.C b/src/Wt/Utils.C
index 02cdf7d..75fca49 100644
--- a/src/Wt/Utils.C
+++ b/src/Wt/Utils.C
@@ -13,7 +13,7 @@
 #ifndef WIN32
 #include <arpa/inet.h>
 #else
-#include <Winsock2.h>
+#include <winsock2.h>
 #endif
 
 #include "Wt/WLogger"
diff --git a/src/http/Configuration.C b/src/http/Configuration.C
index 6312ae6..3ebf772 100644
--- a/src/http/Configuration.C
+++ b/src/http/Configuration.C
@@ -18,13 +18,13 @@
 #endif
 #ifdef WIN32
 #include <process.h> // for getpid()
-#include <Winsock2.h> // for gethostname()
+#include <winsock2.h> // for gethostname()
 #endif
 #include <iostream>
 #include <fstream>
 
 #ifdef __CYGWIN__
-#include <Winsock2.h> // for gethostname()
+#include <winsock2.h> // for gethostname()
 #endif
 
 namespace Wt {
diff --git a/src/web/TimeUtil.C b/src/web/TimeUtil.C
index fbada4a..94c2423 100644
--- a/src/web/TimeUtil.C
+++ b/src/web/TimeUtil.C
@@ -1,7 +1,7 @@
 #include "TimeUtil.h"
 
 #ifdef _MSC_VER
-#include "Winsock2.h"
+#include "winsock2.h"
 #pragma comment (lib, "winmm.lib")
 namespace {
 #include <windows.h>
-- 
1.7.10.4


From f64c3140b11fe2a6d353950229b4edae6ec306a1 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 18 Jun 2012 13:23:21 +0200
Subject: [PATCH 2/2] fixes for mxe

---
 cmake/WtFindBoost-vintage.txt |    1 +
 cmake/WtFindGm.txt            |    6 ++++++
 cmake/WtFindHaru.txt          |   12 ++++++++++++
 cmake/WtFindPangoFt2.txt      |   14 +++++++++-----
 cmake/WtFindSsl.txt           |    5 +++++
 src/Wt/WRasterImage.C         |    9 ---------
 6 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/cmake/WtFindBoost-vintage.txt b/cmake/WtFindBoost-vintage.txt
index e48b21e..1198139 100644
--- a/cmake/WtFindBoost-vintage.txt
+++ b/cmake/WtFindBoost-vintage.txt
@@ -70,6 +70,7 @@ ELSE(MSVC)
       boost_thread-${BOOST_COMPILER}-mt-${BOOST_FLAGS}-${BOOST_VERSION}
       boost_thread-${BOOST_COMPILER}-mt-${BOOST_VERSION}
       boost_thread-${BOOST_COMPILER}-mt
+      boost_thread${BOOST_COMPILER}-mt
       boost_thread-mt-${BOOST_VERSION}
       boost_thread-mt
       boost_thread-${BOOST_COMPILER}-${BOOST_VERSION}
diff --git a/cmake/WtFindGm.txt b/cmake/WtFindGm.txt
index 76697fc..9bc0fa1 100644
--- a/cmake/WtFindGm.txt
+++ b/cmake/WtFindGm.txt
@@ -59,6 +59,12 @@ IF(WIN32)
   ELSE(GM_LIB AND GMPP_LIB AND GM_LIB_DEBUG AND GMPP_LIB_DEBUG AND GM_INCLUDE_DIR)
     SET(GM_FOUND FALSE)
   ENDIF(GM_LIB AND GMPP_LIB AND GM_LIB_DEBUG AND GMPP_LIB_DEBUG AND GM_INCLUDE_DIR)
+
+  IF(GM_INCLUDE_DIR AND GM_LIBS)
+    SET(GM_FOUND TRUE)
+    SET(GM_INCLUDE_DIRS ${GM_INCLUDE_DIR})
+    SET(GM_LIBRARIES optimized ${GM_LIBS})
+  ENDIF(GM_INCLUDE_DIR AND GM_LIBS)
 ELSE(WIN32)
   FIND_LIBRARY(GM_LIB
     NAMES
diff --git a/cmake/WtFindHaru.txt b/cmake/WtFindHaru.txt
index 4dba35f..642bd58 100644
--- a/cmake/WtFindHaru.txt
+++ b/cmake/WtFindHaru.txt
@@ -44,6 +44,7 @@ IF(WIN32)
   FIND_LIBRARY(Z_LIB
     NAMES
       zlib
+      libz
     PATHS
       ${HARU_PREFIX}/lib
       ${USERLIB_PREFIX}/lib
@@ -58,6 +59,17 @@ IF(WIN32)
       SET(HARU_SUPPORT_LIBS ${HARU_SUPPORT_LIBS} ${Z_LIB})
     ENDIF(Z_LIB)
   ENDIF(HARU_LIB_RELEASE AND HARU_LIB_DEBUG)
+
+  IF(HARU_LIB_RELEASE)
+    SET(HARU_LIB optimized ${HARU_LIB_RELEASE})
+    IF(PNG_LIB_RELEASE)
+      SET(HARU_SUPPORT_LIBS ${HARU_SUPPORT_LIBS} optimized ${PNG_LIB_RELEASE})
+    ENDIF(PNG_LIB_RELEASE)
+    IF(Z_LIB)
+      SET(HARU_SUPPORT_LIBS ${HARU_SUPPORT_LIBS} optimized ${Z_LIB})
+    ENDIF(Z_LIB)
+  ENDIF(HARU_LIB_RELEASE)  
+
   SET(HARU_SUPPORT_LIBS_FOUND TRUE)
 ELSE(WIN32)
   FIND_LIBRARY(HARU_LIB
diff --git a/cmake/WtFindPangoFt2.txt b/cmake/WtFindPangoFt2.txt
index cd1e640..b1bbe3d 100644
--- a/cmake/WtFindPangoFt2.txt
+++ b/cmake/WtFindPangoFt2.txt
@@ -36,11 +36,15 @@ SET(PANGO_FT2_INCLUDE_DIRS
     ${GLIB2_INCLUDE_DIR}
     ${GLIB2_CONFIG_INCLUDE_DIR})
 
-SET(PANGO_FT2_LIBRARIES
-    ${PANGO_FT2_LIBRARY}
-    ${PANGO_LIBRARY}
-    ${GOBJECT2_LIBRARY}
-    ${GLIB2_LIBRARY})
+IF(PANGO_FT2_LIBS)
+    SET(PANGO_FT2_LIBRARIES optimized ${PANGO_FT2_LIBS})
+ELSE(PANGO_FT2_LIBS)
+    SET(PANGO_FT2_LIBRARIES
+        ${PANGO_FT2_LIBRARY}
+        ${PANGO_LIBRARY}
+        ${GOBJECT2_LIBRARY}
+        ${GLIB2_LIBRARY})
+ENDIF(PANGO_FT2_LIBS)
 
 IF (PANGO_INCLUDE_DIR
     AND FT2_INCLUDE_DIR
diff --git a/cmake/WtFindSsl.txt b/cmake/WtFindSsl.txt
index fdbcb5f..578baf1 100644
--- a/cmake/WtFindSsl.txt
+++ b/cmake/WtFindSsl.txt
@@ -81,6 +81,11 @@ IF(WIN32)
       AND SSL_LIB_DEBUG
       AND SSL_TOO_LIB_RELEASE
       AND SSL_TOO_LIB_DEBUG)
+
+  IF(SSL_INCLUDE_DIRS AND OPENSSL_LIBS)
+      SET(SSL_FOUND true)
+      SET(SSL_LIBRARIES optimized ${OPENSSL_LIBS})
+  ENDIF(SSL_INCLUDE_DIRS AND OPENSSL_LIBS)
 ELSE (WIN32)
   FIND_LIBRARY(SSL_LIB
     NAMES
diff --git a/src/Wt/WRasterImage.C b/src/Wt/WRasterImage.C
index 4c52f39..e948691 100644
--- a/src/Wt/WRasterImage.C
+++ b/src/Wt/WRasterImage.C
@@ -38,15 +38,6 @@
 #define M_PI 3.14159265358979323846
 #endif
 
-#ifdef WIN32
-namespace {
-  double round(double x)
-  {
-    return floor(x + 0.5);
-  }
-}
-#endif
-
 namespace {
   static const double EPSILON = 1E-5;
 
-- 
1.7.10.4