poco: build fixes

pull/2208/head
Mark Brand 6 years ago
parent 89ff5313c1
commit 9d1facaf09

@ -5,7 +5,7 @@ Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Mon, 8 Sep 2014 16:52:55 -0700
Subject: [PATCH 1/3] configure: Define POCO_STATIC when --static is requested
Subject: [PATCH 1/6] configure: Define POCO_STATIC when --static is requested
diff --git a/configure b/configure
@ -24,7 +24,7 @@ index 1111111..2222222 100755
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Mon, 8 Sep 2014 17:09:19 -0700
Subject: [PATCH 2/3] Config.h: Add prototype for POCO_STATIC
Subject: [PATCH 2/6] Config.h: Add prototype for POCO_STATIC
diff --git a/Foundation/include/Poco/Config.h b/Foundation/include/Poco/Config.h
@ -46,7 +46,7 @@ index 1111111..2222222 100644
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Mon, 8 Sep 2014 16:27:42 -0700
Subject: [PATCH 3/3] Types.h: Fix Win64 on MinGW
Subject: [PATCH 3/6] Types.h: Fix Win64 on MinGW
diff --git a/Foundation/include/Poco/Types.h b/Foundation/include/Poco/Types.h
@ -85,3 +85,97 @@ index 1111111..2222222 100644
#endif
#define POCO_HAVE_INT64 1
#elif defined(__DECCXX)
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sun, 16 Nov 2014 09:14:22 -0800
Subject: [PATCH 4/6] Environment: Fix winsock2.h include
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
diff --git a/Foundation/src/Environment_WIN32.cpp b/Foundation/src/Environment_WIN32.cpp
index 1111111..2222222 100644
--- a/Foundation/src/Environment_WIN32.cpp
+++ b/Foundation/src/Environment_WIN32.cpp
@@ -39,6 +39,7 @@
#include <sstream>
#include <cstring>
#include "Poco/UnWindows.h"
+#include <winsock2.h>
#include <iphlpapi.h>
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 17 Sep 2018 16:56:11 +0200
Subject: [PATCH 5/6] build fix related to pcre
diff --git a/Foundation/include/Poco/RegularExpression.h b/Foundation/include/Poco/RegularExpression.h
index 1111111..2222222 100644
--- a/Foundation/include/Poco/RegularExpression.h
+++ b/Foundation/include/Poco/RegularExpression.h
@@ -47,6 +47,9 @@
#include <vector>
+#if defined(POCO_UNBUNDLED)
+#include <pcre.h>
+#else
//
// Copy these definitions from pcre.h
// to avoid pulling in the entire header file
@@ -57,7 +60,7 @@ extern "C"
typedef struct real_pcre pcre;
struct pcre_extra;
}
-
+#endif
namespace Poco {
diff --git a/Foundation/src/RegularExpression.cpp b/Foundation/src/RegularExpression.cpp
index 1111111..2222222 100644
--- a/Foundation/src/RegularExpression.cpp
+++ b/Foundation/src/RegularExpression.cpp
@@ -37,9 +37,7 @@
#include "Poco/RegularExpression.h"
#include "Poco/Exception.h"
#include <sstream>
-#if defined(POCO_UNBUNDLED)
-#include <pcre.h>
-#else
+#ifndef POCO_UNBUNDLED
#include "pcre.h"
#endif
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 17 Sep 2018 17:05:03 +0200
Subject: [PATCH 6/6] drop obsolete -mno-cygwin
diff --git a/build/config/MinGW-CrossEnv b/build/config/MinGW-CrossEnv
index 1111111..2222222 100644
--- a/build/config/MinGW-CrossEnv
+++ b/build/config/MinGW-CrossEnv
@@ -23,7 +23,7 @@ CXX = $(CROSSENV)-g++
LINK = $(CXX)
LIB = $(CROSSENV)-ar -cr
RANLIB = $(CROSSENV)-ranlib
-SHLIB = $(CXX) -shared -mno-cygwin -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(basename $(notdir $@))).a
+SHLIB = $(CXX) -shared -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(basename $(notdir $@))).a
SHLIBLN = $(POCO_BASE)/build/script/shlibln
STRIP =
DEP = $(POCO_BASE)/build/script/makedepend.gcc
@@ -68,7 +68,7 @@ RELEASEOPT_LINK = -O2
#
# System Specific Flags
#
-SYSFLAGS = -mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED
+SYSFLAGS = -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED
#
# System Specific Libraries

@ -1,22 +0,0 @@
This file is part of MXE. See LICENSE.md for licensing information.
--- a/build/config/MinGW-CrossEnv
+++ b/build/config/MinGW-CrossEnv
@@ -23,7 +23,7 @@ CXX = $(CROSSENV)-g++
LINK = $(CXX)
LIB = $(CROSSENV)-ar -cr
RANLIB = $(CROSSENV)-ranlib
-SHLIB = $(CXX) -shared -mno-cygwin -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(basename $(notdir $@))).a
+SHLIB = $(CXX) -shared -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(basename $(notdir $@))).a
SHLIBLN = $(POCO_BASE)/build/script/shlibln
STRIP =
DEP = $(POCO_BASE)/build/script/makedepend.gcc
@@ -68,7 +68,7 @@ RELEASEOPT_LINK = -O2
#
# System Specific Flags
#
-SYSFLAGS = -mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED
+SYSFLAGS = -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED
#
# System Specific Libraries

@ -1,24 +0,0 @@
This file is part of MXE. See LICENSE.md for licensing information.
From 25b2fc9af331fe6add75fb108bec590f8d467b20 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sun, 16 Nov 2014 09:14:22 -0800
Subject: [PATCH] Environment: Fix winsock2.h include
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
diff --git a/Foundation/src/Environment_WIN32.cpp b/Foundation/src/Environment_WIN32.cpp
index 9443c32..e251da1 100644
--- a/Foundation/src/Environment_WIN32.cpp
+++ b/Foundation/src/Environment_WIN32.cpp
@@ -39,6 +39,7 @@
#include <sstream>
#include <cstring>
#include "Poco/UnWindows.h"
+#include <winsock2.h>
#include <iphlpapi.h>
--
1.9.1
Loading…
Cancel
Save