aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-03-26 04:45:20 +0800
committerPhil Christensen <philc@microsoft.com>2019-03-25 13:45:20 -0700
commit7f364076bb708cf2142715ff9e0829dfcbc92b4e (patch)
tree1e35cbd6318d782d7db573e4d9d79a15e9d7dea6
parent6798bc3234653de2c1195ce846efad9604fc3b67 (diff)
downloadvcpkg-7f364076bb708cf2142715ff9e0829dfcbc92b4e.tar.gz
vcpkg-7f364076bb708cf2142715ff9e0829dfcbc92b4e.zip
[libnice]Fix build error in windows. (#5799)
* [libnice]Fix build error in windows. * [libnice] switched to vcpkg_extract_source_archive_ex
-rw-r--r--ports/libnice/CONTROL2
-rw-r--r--ports/libnice/fix-build_in_windows.patch13
-rw-r--r--ports/libnice/portfile.cmake12
3 files changed, 22 insertions, 5 deletions
diff --git a/ports/libnice/CONTROL b/ports/libnice/CONTROL
index de7b0b67e..fc96705c7 100644
--- a/ports/libnice/CONTROL
+++ b/ports/libnice/CONTROL
@@ -1,4 +1,4 @@
Source: libnice
-Version: 0.1.13-1
+Version: 0.1.13-2
Description: Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389).
Build-Depends: glib
diff --git a/ports/libnice/fix-build_in_windows.patch b/ports/libnice/fix-build_in_windows.patch
new file mode 100644
index 000000000..9eb341423
--- /dev/null
+++ b/ports/libnice/fix-build_in_windows.patch
@@ -0,0 +1,13 @@
+diff --git a/stun/usages/bind.c b/stun/usages/bind.c
+index c5b09ab..58ef882 100644
+--- a/stun/usages/bind.c
++++ b/stun/usages/bind.c
+@@ -340,7 +340,7 @@ static void stun_trans_deinit (StunTransport *tr)
+
+ static int stun_err_dequeue (int fd)
+ {
+-#ifdef MSG_ERRQUEUE
++#if (defined(MSG_ERRQUEUE) && !defined(_WIN32))
+ struct msghdr hdr;
+ int saved_errno = errno, ret;
+
diff --git a/ports/libnice/portfile.cmake b/ports/libnice/portfile.cmake
index 4d4a97bae..d641f409d 100644
--- a/ports/libnice/portfile.cmake
+++ b/ports/libnice/portfile.cmake
@@ -1,13 +1,17 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libnice-0.1.13)
-
-vcpkg_download_distfile(ARCHIVE
+vcpkg_download_distfile(
+ ARCHIVE
URLS "https://nice.freedesktop.org/releases/libnice-0.1.13.tar.gz"
FILENAME "libnice-0.1.13.tar.gz"
SHA512 c9bb81e8cd0b4e3673dba07ce08a16dd8821831339b44f1006510cdc09f9ae4c6eb7d43230711a2509867acb8d7df71821c411830dbf71c5a5d7e802f14a32c1
)
-vcpkg_extract_source_archive(${ARCHIVE})
+vcpkg_extract_source_archive_ex(
+ ARCHIVE ${ARCHIVE}
+ OUT_SOURCE_PATH SOURCE_PATH
+ PATCHES
+ fix-build_in_windows.patch
+ )
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})