[qhull] fix UWP building (#7370)

This commit is contained in:
contre 2019-08-07 09:43:13 -07:00 committed by Curtis J Bezault
parent ad187df6de
commit 2bf8b26aa4
3 changed files with 28 additions and 1 deletions

View File

@ -1,4 +1,4 @@
Source: qhull
Version: 7.3.2
Version: 7.3.2-1
Homepage: https://github.com/qhull/qhull
Description: computes the convex hull, Delaunay triangulation, Voronoi diagram

View File

@ -6,6 +6,7 @@ vcpkg_from_github(
REF v7.3.2 # Qhull 2019.1
SHA512 aea2c70179de10f648aba960129a3b9a3fe309a0eb085bdb86f697e3d4b214570c241e88d4f0b4d2974137759ee7086452d0a3957c4b2a256708402fb3c9eb3d
HEAD_REF master
PATCHES uwp.patch
)
if(${TARGET_TRIPLET} STREQUAL "x64-windows-static")
# workaround for visual studio toolset regression LNK1201 (remove if solved)

26
ports/qhull/uwp.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/src/libqhull/global.c b/src/libqhull/global.c
index e7de8e6..81be9df 100644
--- a/src/libqhull/global.c
+++ b/src/libqhull/global.c
@@ -636,7 +636,7 @@ void qh_init_qhull_command(int argc, char *argv[]) {
*/
void qh_initflags(char *command) {
int k, i, lastproject;
- char *s= command, *t, *prev_s, *start, key, *lastwarning= NULL;
+ char *s= command, *t = NULL, *prev_s, *start, key, *lastwarning= NULL;
boolT isgeom= False, wasproject;
realT r;
diff --git a/src/libqhull_r/global_r.c b/src/libqhull_r/global_r.c
index 3e6919f..8d13e47 100644
--- a/src/libqhull_r/global_r.c
+++ b/src/libqhull_r/global_r.c
@@ -610,7 +610,7 @@ void qh_init_qhull_command(qhT *qh, int argc, char *argv[]) {
*/
void qh_initflags(qhT *qh, char *command) {
int k, i, lastproject;
- char *s= command, *t, *prev_s, *start, key, *lastwarning= NULL;
+ char *s= command, *t = NULL, *prev_s, *start, key, *lastwarning= NULL;
boolT isgeom= False, wasproject;
realT r;