aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Rickert <rickertm@users.noreply.github.com>2020-05-18 20:20:37 +0200
committerGitHub <noreply@github.com>2020-05-18 11:20:37 -0700
commit87b2ae5500de635cc62b0ad652217d4819e7cffa (patch)
tree8b801db5f0681b593be7b47c380da4980220e2ec
parentd2c3dbf6ece871dbad02f8b79ca99abf9f786523 (diff)
downloadvcpkg-87b2ae5500de635cc62b0ad652217d4819e7cffa.tar.gz
vcpkg-87b2ae5500de635cc62b0ad652217d4819e7cffa.zip
[nlopt] Enable UWP support (#11398)
-rw-r--r--ports/nlopt/0001-suppress-MS-compiler-complaint-about-negating-unsign.patch31
-rw-r--r--ports/nlopt/CONTROL3
-rw-r--r--ports/nlopt/portfile.cmake4
-rw-r--r--scripts/ci.baseline.txt2
4 files changed, 34 insertions, 6 deletions
diff --git a/ports/nlopt/0001-suppress-MS-compiler-complaint-about-negating-unsign.patch b/ports/nlopt/0001-suppress-MS-compiler-complaint-about-negating-unsign.patch
new file mode 100644
index 000000000..cd5fed49a
--- /dev/null
+++ b/ports/nlopt/0001-suppress-MS-compiler-complaint-about-negating-unsign.patch
@@ -0,0 +1,31 @@
+From 004f415c5d04dd1f616a953eb8ad078a20b72c58 Mon Sep 17 00:00:00 2001
+From: "Steven G. Johnson" <stevenj@mit.edu>
+Date: Sat, 9 May 2020 13:56:40 -0400
+Subject: [PATCH] suppress MS compiler complaint about negating unsigned
+ (closes #330)
+
+---
+ src/util/sobolseq.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/util/sobolseq.c b/src/util/sobolseq.c
+index 6626f51..848ff68 100644
+--- a/src/util/sobolseq.c
++++ b/src/util/sobolseq.c
+@@ -93,7 +93,12 @@ static unsigned rightzero32(uint32_t n)
+ const uint32_t a = 0x05f66a47; /* magic number, found by brute force */
+ static const unsigned decode[32] = { 0, 1, 2, 26, 23, 3, 15, 27, 24, 21, 19, 4, 12, 16, 28, 6, 31, 25, 22, 14, 20, 18, 11, 5, 30, 13, 17, 10, 29, 9, 8, 7 };
+ n = ~n; /* change to rightmost-one problem */
+- n = a * (n & (-n)); /* store in n to make sure mult. is 32 bits */
++#ifdef _MSC_VER
++#pragma warning(suppress:4146)
++ n = a * (n & (-n)); /* same as below, but suppress spurious warning/error with MS compiler about negating unsigned int */
++#else
++ n = a * (n & (-n)); /* store in n to make sure mult. is 32 bits */
++#endif
+ return decode[n >> 27];
+ #endif
+ }
+--
+2.26.2.windows.1
+
diff --git a/ports/nlopt/CONTROL b/ports/nlopt/CONTROL
index 7aca60e2b..8d1344934 100644
--- a/ports/nlopt/CONTROL
+++ b/ports/nlopt/CONTROL
@@ -1,5 +1,4 @@
Source: nlopt
-Version: 2.6.2
+Version: 2.6.2-1
Homepage: https://github.com/stevengj/nlopt
Description: a library for nonlinear local and global optimization, for functions with and without gradient information.
-Supports: !uwp
diff --git a/ports/nlopt/portfile.cmake b/ports/nlopt/portfile.cmake
index 1c96c1ffe..157a3ccac 100644
--- a/ports/nlopt/portfile.cmake
+++ b/ports/nlopt/portfile.cmake
@@ -1,11 +1,11 @@
-vcpkg_fail_port_install(ON_TARGET "UWP")
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO stevengj/nlopt
REF v2.6.2
SHA512 61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b
HEAD_REF master
+ PATCHES
+ 0001-suppress-MS-compiler-complaint-about-negating-unsign.patch
)
vcpkg_configure_cmake(
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index 3a69a2a78..2964e8bf6 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -1213,8 +1213,6 @@ networkdirect-sdk:x64-linux=fail
networkdirect-sdk:x64-osx=fail
networkdirect-sdk:x64-uwp=fail
networkdirect-sdk:x86-windows=fail
-nlopt:arm-uwp=fail
-nlopt:x64-uwp=fail
nmslib:arm64-windows=fail
nmslib:arm-uwp=fail
nmslib:x64-uwp=fail