aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodor Prokopov <koprok@users.noreply.github.com>2020-07-31 08:37:02 +0300
committerGitHub <noreply@github.com>2020-07-30 22:37:02 -0700
commitfe19c5e41167336d8b9d52f3dff44caa72fd6bfa (patch)
tree04a57599756686520b0f501ed6079737a15fb039
parent5cdb92f010d8251e8e6ec62ccaed867547a6373a (diff)
downloadvcpkg-fe19c5e41167336d8b9d52f3dff44caa72fd6bfa.tar.gz
vcpkg-fe19c5e41167336d8b9d52f3dff44caa72fd6bfa.zip
Mingw port fixes (#12103)
* [openal-soft] MinGW build fixes * [glew] MinGW build fixes * [protobuf] MinGW build fixes * [protobuf] Update to 3.12.3 * [protobuf] Preserve existing cross-compilation behavior (e.g. android) Co-authored-by: Robert Schumacher <roschuma@microsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
-rw-r--r--ports/glew/CONTROL2
-rw-r--r--ports/glew/portfile.cmake2
-rw-r--r--ports/openal-soft/CONTROL2
-rw-r--r--ports/openal-soft/fix-mingw-build.patch14
-rw-r--r--ports/openal-soft/portfile.cmake1
-rw-r--r--ports/protobuf/portfile.cmake2
6 files changed, 19 insertions, 4 deletions
diff --git a/ports/glew/CONTROL b/ports/glew/CONTROL
index 9a7fd7e9c..6409f87e7 100644
--- a/ports/glew/CONTROL
+++ b/ports/glew/CONTROL
@@ -1,4 +1,4 @@
Source: glew
-Version: 2.1.0-7
+Version: 2.1.0-8
Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.
Homepage: https://github.com/nigels-com/glew
diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake
index 504a91dcf..de436818c 100644
--- a/ports/glew/portfile.cmake
+++ b/ports/glew/portfile.cmake
@@ -26,7 +26,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glew)
-if(VCPKG_TARGET_IS_WINDOWS)
+if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
set(_targets_cmake_files)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake")
diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL
index 6b84e63ff..a139fb9e8 100644
--- a/ports/openal-soft/CONTROL
+++ b/ports/openal-soft/CONTROL
@@ -1,6 +1,6 @@
Source: openal-soft
Version: 1.20.1
-Port-Version: 4
+Port-Version: 5
Homepage: https://github.com/kcat/openal-soft
Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API.
Supports: !uwp
diff --git a/ports/openal-soft/fix-mingw-build.patch b/ports/openal-soft/fix-mingw-build.patch
new file mode 100644
index 000000000..ffb2db303
--- /dev/null
+++ b/ports/openal-soft/fix-mingw-build.patch
@@ -0,0 +1,14 @@
+diff --git a/common/alstring.h b/common/alstring.h
+index 194e54a1..5a5f87ed 100644
+--- a/common/alstring.h
++++ b/common/alstring.h
+@@ -4,6 +4,9 @@
+ #include <cstddef>
+ #include <string>
+
++// This fixes MinGW link errors. It defines strcasecmp and strncasecmp in string.h.
++#include <string.h>
++
+ #include "almalloc.h"
+
+
diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake
index 5b6c8067c..31ebc6bae 100644
--- a/ports/openal-soft/portfile.cmake
+++ b/ports/openal-soft/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
PATCHES
dont-export-symbols-in-static-build.patch
fix-arm-builds.patch
+ fix-mingw-build.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake
index 2c4497fe0..4bfc11644 100644
--- a/ports/protobuf/portfile.cmake
+++ b/ports/protobuf/portfile.cmake
@@ -12,7 +12,7 @@ vcpkg_from_github(
if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
set(protobuf_BUILD_PROTOC_BINARIES OFF)
-elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME)
+elseif(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_IS_MINGW AND NOT (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP))
set(protobuf_BUILD_PROTOC_BINARIES OFF)
else()
set(protobuf_BUILD_PROTOC_BINARIES ON)