From c4333909a394704516cd9bbb9fd61dd1f2faf6c8 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Tue, 31 Jan 2017 15:49:58 +0300 Subject: [PATCH] qhull-git: Update to r157.f0bd8ce --- ...0001-MSYS2-Adopt-FHS-layout-in-cmake.patch | 40 +- .../0002-MinGW-w64-64-bit-ptr_intT-fix.patch | 28 -- .../0002-resolve-conflict-system-io_h.patch | 346 ++++++++++++++++++ mingw-w64-qhull-git/PKGBUILD | 11 +- mingw-w64-qhull-git/qhull-r151.5bbc756.patch | 62 ---- 5 files changed, 374 insertions(+), 113 deletions(-) delete mode 100644 mingw-w64-qhull-git/0002-MinGW-w64-64-bit-ptr_intT-fix.patch create mode 100644 mingw-w64-qhull-git/0002-resolve-conflict-system-io_h.patch delete mode 100644 mingw-w64-qhull-git/qhull-r151.5bbc756.patch diff --git a/mingw-w64-qhull-git/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch b/mingw-w64-qhull-git/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch index d82047fc89..c136979592 100644 --- a/mingw-w64-qhull-git/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch +++ b/mingw-w64-qhull-git/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch @@ -1,17 +1,6 @@ -From d9d43d26305f28e40b4b292edbe53c678f38c149 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Mon, 26 Jan 2015 10:24:48 +0000 -Subject: [PATCH 1/2] MSYS2: Adopt FHS layout in cmake - ---- - CMakeLists.txt | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 98dbc70..7ec7e5b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -58,7 +58,7 @@ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) +--- qhull/CMakeLists.txt.orig 2017-01-31 14:51:15.342375900 +0300 ++++ qhull/CMakeLists.txt 2017-01-31 15:00:18.706454500 +0300 +@@ -88,7 +88,7 @@ endif() if(MAN_INSTALL_DIR) else() @@ -20,7 +9,7 @@ index 98dbc70..7ec7e5b 100644 set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/man/man1) else() set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/man/man1) -@@ -66,7 +66,7 @@ else() +@@ -96,7 +96,7 @@ endif() if(DOC_INSTALL_DIR) else() @@ -29,19 +18,32 @@ index 98dbc70..7ec7e5b 100644 set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/doc) else() set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/qhull) -@@ -423,9 +423,9 @@ install(TARGETS ${qhull_TARGETS_INSTALL} +@@ -405,6 +405,11 @@ + add_executable(qhalf ${qhalf_SOURCES}) + target_link_libraries(qhalf ${qhull_STATIC}) + ++set( ++ qhull_TARGETS_INSTALL ++ ${qhull_CPP} ${qhull_STATIC} ${qhull_STATICR} ++ qhull rbox qconvex qdelaunay qvoronoi qhalf ++) + + # --------------------------------------- + # Define install +@@ -415,11 +421,11 @@ LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) -install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) -install(FILES ${libqhull_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull) +-install(FILES ${libqhullr_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) +-install(FILES ${libqhullr_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r) -install(FILES ${libqhullcpp_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhullcpp) +install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/qhull) +install(FILES ${libqhull_DOC} DESTINATION ${DOC_INSTALL_DIR}/qhull) ++install(FILES ${libqhullr_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/qhull_r) ++install(FILES ${libqhullr_DOC} DESTINATION ${DOC_INSTALL_DIR}/qhull_r) +install(FILES ${libqhullcpp_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/qhullcpp) install(FILES html/qhull.man DESTINATION ${MAN_INSTALL_DIR} RENAME qhull.1) install(FILES html/rbox.man DESTINATION ${MAN_INSTALL_DIR} RENAME rbox.1) install(FILES ${doc_FILES} DESTINATION ${DOC_INSTALL_DIR}) --- -2.2.2 - diff --git a/mingw-w64-qhull-git/0002-MinGW-w64-64-bit-ptr_intT-fix.patch b/mingw-w64-qhull-git/0002-MinGW-w64-64-bit-ptr_intT-fix.patch deleted file mode 100644 index d366c1b9ef..0000000000 --- a/mingw-w64-qhull-git/0002-MinGW-w64-64-bit-ptr_intT-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 77ffc8ce76b0de8ef36e51b3b0e5ffc3a9bb7a88 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Mon, 26 Jan 2015 10:24:31 +0000 -Subject: [PATCH 2/2] MinGW-w64: 64-bit ptr_intT fix - -Change #if _MSC_VER to #if defined(_WIN32) since -the former works for Visual Studio only whereas -the latter also works for GCC and Clang. ---- - src/libqhull/mem.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libqhull/mem.h b/src/libqhull/mem.h -index ad89de8..857aa5f 100644 ---- a/src/libqhull/mem.h -+++ b/src/libqhull/mem.h -@@ -78,7 +78,7 @@ Trace short and quick memory allocations at T5 - Qhull uses int instead of size_t except for system calls such as malloc, qsort, qh_malloc, etc. - This matches Qt convention and is easier to work with. - */ --#if _MSC_VER && defined(_WIN64) -+#if defined(_WIN32) && defined(_WIN64) - typedef long long ptr_intT; - #else - typedef long ptr_intT; --- -2.2.2 - diff --git a/mingw-w64-qhull-git/0002-resolve-conflict-system-io_h.patch b/mingw-w64-qhull-git/0002-resolve-conflict-system-io_h.patch new file mode 100644 index 0000000000..d1507419c2 --- /dev/null +++ b/mingw-w64-qhull-git/0002-resolve-conflict-system-io_h.patch @@ -0,0 +1,346 @@ +--- qhull/CMakeLists.txt.orig 2017-01-31 15:38:41.301155400 +0300 ++++ qhull/CMakeLists.txt 2017-01-31 15:38:46.555455900 +0300 +@@ -133,7 +133,7 @@ + libqhull_HEADERS + src/libqhull/libqhull.h + src/libqhull/geom.h +- src/libqhull/io.h ++ src/libqhull/qh-io.h + src/libqhull/mem.h + src/libqhull/merge.h + src/libqhull/poly.h +--- qhull/src/libqhull/qhull_a.h.orig 2017-01-31 15:38:41.301155400 +0300 ++++ qhull/src/libqhull/qhull_a.h 2017-01-31 15:38:46.555455900 +0300 +@@ -34,7 +34,7 @@ + #include "geom.h" + #include "merge.h" + #include "poly.h" +-#include "io.h" ++#include "qh-io.h" + + #include + #include +--- qhull/src/libqhull/io.h 2017-01-31 15:24:48.616528500 +0300 ++++ /dev/null 2017-01-31 15:40:24.000000000 +0300 +@@ -1,159 +0,0 @@ +-/*
  ---------------------------------
+-
+-   io.h
+-   declarations of Input/Output functions
+-
+-   see README, libqhull.h and io.c
+-
+-   Copyright (c) 1993-2015 The Geometry Center.
+-   $Id: //main/2015/qhull/src/libqhull/io.h#1 $$Change: 1981 $
+-   $DateTime: 2015/09/28 20:26:32 $$Author: bbarber $
+-*/
+-
+-#ifndef qhDEFio
+-#define qhDEFio 1
+-
+-#include "libqhull.h"
+-
+-/*============ constants and flags ==================*/
+-
+-/*----------------------------------
+-
+-  qh_MAXfirst
+-    maximum length of first two lines of stdin
+-*/
+-#define qh_MAXfirst  200
+-
+-/*----------------------------------
+-
+-  qh_MINradius
+-    min radius for Gp and Gv, fraction of maxcoord
+-*/
+-#define qh_MINradius 0.02
+-
+-/*----------------------------------
+-
+-  qh_GEOMepsilon
+-    adjust outer planes for 'lines closer' and geomview roundoff.
+-    This prevents bleed through.
+-*/
+-#define qh_GEOMepsilon 2e-3
+-
+-/*----------------------------------
+-
+-  qh_WHITESPACE
+-    possible values of white space
+-*/
+-#define qh_WHITESPACE " \n\t\v\r\f"
+-
+-
+-/*----------------------------------
+-
+-  qh_RIDGE
+-    to select which ridges to print in qh_eachvoronoi
+-*/
+-typedef enum
+-{
+-    qh_RIDGEall = 0, qh_RIDGEinner, qh_RIDGEouter
+-}
+-qh_RIDGE;
+-
+-/*----------------------------------
+-
+-  printvridgeT
+-    prints results of qh_printvdiagram
+-
+-  see:
+-    qh_printvridge for an example
+-*/
+-typedef void (*printvridgeT)(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
+-
+-/*============== -prototypes in alphabetical order =========*/
+-
+-void    qh_dfacet(unsigned id);
+-void    qh_dvertex(unsigned id);
+-int     qh_compare_facetarea(const void *p1, const void *p2);
+-int     qh_compare_facetmerge(const void *p1, const void *p2);
+-int     qh_compare_facetvisit(const void *p1, const void *p2);
+-int     qh_compare_vertexpoint(const void *p1, const void *p2); /* not used, not in libqhull_r.h */
+-void    qh_copyfilename(char *filename, int size, const char* source, int length);
+-void    qh_countfacets(facetT *facetlist, setT *facets, boolT printall,
+-              int *numfacetsp, int *numsimplicialp, int *totneighborsp,
+-              int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp);
+-pointT *qh_detvnorm(vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp);
+-setT   *qh_detvridge(vertexT *vertex);
+-setT   *qh_detvridge3(vertexT *atvertex, vertexT *vertex);
+-int     qh_eachvoronoi(FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder);
+-int     qh_eachvoronoi_all(FILE *fp, printvridgeT printvridge, boolT isUpper, qh_RIDGE innerouter, boolT inorder);
+-void    qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist);
+-setT   *qh_facetvertices(facetT *facetlist, setT *facets, boolT allfacets);
+-void    qh_geomplanes(facetT *facet, realT *outerplane, realT *innerplane);
+-void    qh_markkeep(facetT *facetlist);
+-setT   *qh_markvoronoi(facetT *facetlist, setT *facets, boolT printall, boolT *isLowerp, int *numcentersp);
+-void    qh_order_vertexneighbors(vertexT *vertex);
+-void    qh_prepare_output(void);
+-void    qh_printafacet(FILE *fp, qh_PRINT format, facetT *facet, boolT printall);
+-void    qh_printbegin(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
+-void    qh_printcenter(FILE *fp, qh_PRINT format, const char *string, facetT *facet);
+-void    qh_printcentrum(FILE *fp, facetT *facet, realT radius);
+-void    qh_printend(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
+-void    qh_printend4geom(FILE *fp, facetT *facet, int *num, boolT printall);
+-void    qh_printextremes(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
+-void    qh_printextremes_2d(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
+-void    qh_printextremes_d(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
+-void    qh_printfacet(FILE *fp, facetT *facet);
+-void    qh_printfacet2math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst);
+-void    qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]);
+-void    qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
+-                               facetT *facet, realT offset, realT color[3]);
+-void    qh_printfacet3math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst);
+-void    qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
+-void    qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]);
+-void    qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
+-void    qh_printfacet3vertex(FILE *fp, facetT *facet, qh_PRINT format);
+-void    qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
+-void    qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
+-void    qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, qh_PRINT format);
+-void    qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, qh_PRINT format);
+-void    qh_printfacetheader(FILE *fp, facetT *facet);
+-void    qh_printfacetridges(FILE *fp, facetT *facet);
+-void    qh_printfacets(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
+-void    qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
+-                   setT *vertices, realT color[3]);
+-void    qh_printneighborhood(FILE *fp, qh_PRINT format, facetT *facetA, facetT *facetB, boolT printall);
+-void    qh_printline3geom(FILE *fp, pointT *pointA, pointT *pointB, realT color[3]);
+-void    qh_printpoint(FILE *fp, const char *string, pointT *point);
+-void    qh_printpointid(FILE *fp, const char *string, int dim, pointT *point, int id);
+-void    qh_printpoint3(FILE *fp, pointT *point);
+-void    qh_printpoints_out(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
+-void    qh_printpointvect(FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]);
+-void    qh_printpointvect2(FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius);
+-void    qh_printridge(FILE *fp, ridgeT *ridge);
+-void    qh_printspheres(FILE *fp, setT *vertices, realT radius);
+-void    qh_printvdiagram(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
+-int     qh_printvdiagram2(FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder);
+-void    qh_printvertex(FILE *fp, vertexT *vertex);
+-void    qh_printvertexlist(FILE *fp, const char* string, facetT *facetlist,
+-                         setT *facets, boolT printall);
+-void    qh_printvertices(FILE *fp, const char* string, setT *vertices);
+-void    qh_printvneighbors(FILE *fp, facetT* facetlist, setT *facets, boolT printall);
+-void    qh_printvoronoi(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
+-void    qh_printvnorm(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
+-void    qh_printvridge(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
+-void    qh_produce_output(void);
+-void    qh_produce_output2(void);
+-void    qh_projectdim3(pointT *source, pointT *destination);
+-int     qh_readfeasible(int dim, const char *curline);
+-coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
+-void    qh_setfeasible(int dim);
+-boolT   qh_skipfacet(facetT *facet);
+-char   *qh_skipfilename(char *filename);
+-
+-#endif /* qhDEFio */
+--- /dev/null	2017-01-31 15:41:21.000000000 +0300
++++ qhull/src/libqhull/qh-io.h	2017-01-31 15:24:48.616528500 +0300
+@@ -0,0 +1,159 @@
++/*
  ---------------------------------
++
++   io.h
++   declarations of Input/Output functions
++
++   see README, libqhull.h and io.c
++
++   Copyright (c) 1993-2015 The Geometry Center.
++   $Id: //main/2015/qhull/src/libqhull/io.h#1 $$Change: 1981 $
++   $DateTime: 2015/09/28 20:26:32 $$Author: bbarber $
++*/
++
++#ifndef qhDEFio
++#define qhDEFio 1
++
++#include "libqhull.h"
++
++/*============ constants and flags ==================*/
++
++/*----------------------------------
++
++  qh_MAXfirst
++    maximum length of first two lines of stdin
++*/
++#define qh_MAXfirst  200
++
++/*----------------------------------
++
++  qh_MINradius
++    min radius for Gp and Gv, fraction of maxcoord
++*/
++#define qh_MINradius 0.02
++
++/*----------------------------------
++
++  qh_GEOMepsilon
++    adjust outer planes for 'lines closer' and geomview roundoff.
++    This prevents bleed through.
++*/
++#define qh_GEOMepsilon 2e-3
++
++/*----------------------------------
++
++  qh_WHITESPACE
++    possible values of white space
++*/
++#define qh_WHITESPACE " \n\t\v\r\f"
++
++
++/*----------------------------------
++
++  qh_RIDGE
++    to select which ridges to print in qh_eachvoronoi
++*/
++typedef enum
++{
++    qh_RIDGEall = 0, qh_RIDGEinner, qh_RIDGEouter
++}
++qh_RIDGE;
++
++/*----------------------------------
++
++  printvridgeT
++    prints results of qh_printvdiagram
++
++  see:
++    qh_printvridge for an example
++*/
++typedef void (*printvridgeT)(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
++
++/*============== -prototypes in alphabetical order =========*/
++
++void    qh_dfacet(unsigned id);
++void    qh_dvertex(unsigned id);
++int     qh_compare_facetarea(const void *p1, const void *p2);
++int     qh_compare_facetmerge(const void *p1, const void *p2);
++int     qh_compare_facetvisit(const void *p1, const void *p2);
++int     qh_compare_vertexpoint(const void *p1, const void *p2); /* not used, not in libqhull_r.h */
++void    qh_copyfilename(char *filename, int size, const char* source, int length);
++void    qh_countfacets(facetT *facetlist, setT *facets, boolT printall,
++              int *numfacetsp, int *numsimplicialp, int *totneighborsp,
++              int *numridgesp, int *numcoplanarsp, int *numnumtricoplanarsp);
++pointT *qh_detvnorm(vertexT *vertex, vertexT *vertexA, setT *centers, realT *offsetp);
++setT   *qh_detvridge(vertexT *vertex);
++setT   *qh_detvridge3(vertexT *atvertex, vertexT *vertex);
++int     qh_eachvoronoi(FILE *fp, printvridgeT printvridge, vertexT *atvertex, boolT visitall, qh_RIDGE innerouter, boolT inorder);
++int     qh_eachvoronoi_all(FILE *fp, printvridgeT printvridge, boolT isUpper, qh_RIDGE innerouter, boolT inorder);
++void    qh_facet2point(facetT *facet, pointT **point0, pointT **point1, realT *mindist);
++setT   *qh_facetvertices(facetT *facetlist, setT *facets, boolT allfacets);
++void    qh_geomplanes(facetT *facet, realT *outerplane, realT *innerplane);
++void    qh_markkeep(facetT *facetlist);
++setT   *qh_markvoronoi(facetT *facetlist, setT *facets, boolT printall, boolT *isLowerp, int *numcentersp);
++void    qh_order_vertexneighbors(vertexT *vertex);
++void    qh_prepare_output(void);
++void    qh_printafacet(FILE *fp, qh_PRINT format, facetT *facet, boolT printall);
++void    qh_printbegin(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
++void    qh_printcenter(FILE *fp, qh_PRINT format, const char *string, facetT *facet);
++void    qh_printcentrum(FILE *fp, facetT *facet, realT radius);
++void    qh_printend(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
++void    qh_printend4geom(FILE *fp, facetT *facet, int *num, boolT printall);
++void    qh_printextremes(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
++void    qh_printextremes_2d(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
++void    qh_printextremes_d(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
++void    qh_printfacet(FILE *fp, facetT *facet);
++void    qh_printfacet2math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst);
++void    qh_printfacet2geom(FILE *fp, facetT *facet, realT color[3]);
++void    qh_printfacet2geom_points(FILE *fp, pointT *point1, pointT *point2,
++                               facetT *facet, realT offset, realT color[3]);
++void    qh_printfacet3math(FILE *fp, facetT *facet, qh_PRINT format, int notfirst);
++void    qh_printfacet3geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
++void    qh_printfacet3geom_points(FILE *fp, setT *points, facetT *facet, realT offset, realT color[3]);
++void    qh_printfacet3geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
++void    qh_printfacet3vertex(FILE *fp, facetT *facet, qh_PRINT format);
++void    qh_printfacet4geom_nonsimplicial(FILE *fp, facetT *facet, realT color[3]);
++void    qh_printfacet4geom_simplicial(FILE *fp, facetT *facet, realT color[3]);
++void    qh_printfacetNvertex_nonsimplicial(FILE *fp, facetT *facet, int id, qh_PRINT format);
++void    qh_printfacetNvertex_simplicial(FILE *fp, facetT *facet, qh_PRINT format);
++void    qh_printfacetheader(FILE *fp, facetT *facet);
++void    qh_printfacetridges(FILE *fp, facetT *facet);
++void    qh_printfacets(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
++void    qh_printhyperplaneintersection(FILE *fp, facetT *facet1, facetT *facet2,
++                   setT *vertices, realT color[3]);
++void    qh_printneighborhood(FILE *fp, qh_PRINT format, facetT *facetA, facetT *facetB, boolT printall);
++void    qh_printline3geom(FILE *fp, pointT *pointA, pointT *pointB, realT color[3]);
++void    qh_printpoint(FILE *fp, const char *string, pointT *point);
++void    qh_printpointid(FILE *fp, const char *string, int dim, pointT *point, int id);
++void    qh_printpoint3(FILE *fp, pointT *point);
++void    qh_printpoints_out(FILE *fp, facetT *facetlist, setT *facets, boolT printall);
++void    qh_printpointvect(FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius, realT color[3]);
++void    qh_printpointvect2(FILE *fp, pointT *point, coordT *normal, pointT *center, realT radius);
++void    qh_printridge(FILE *fp, ridgeT *ridge);
++void    qh_printspheres(FILE *fp, setT *vertices, realT radius);
++void    qh_printvdiagram(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
++int     qh_printvdiagram2(FILE *fp, printvridgeT printvridge, setT *vertices, qh_RIDGE innerouter, boolT inorder);
++void    qh_printvertex(FILE *fp, vertexT *vertex);
++void    qh_printvertexlist(FILE *fp, const char* string, facetT *facetlist,
++                         setT *facets, boolT printall);
++void    qh_printvertices(FILE *fp, const char* string, setT *vertices);
++void    qh_printvneighbors(FILE *fp, facetT* facetlist, setT *facets, boolT printall);
++void    qh_printvoronoi(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall);
++void    qh_printvnorm(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
++void    qh_printvridge(FILE *fp, vertexT *vertex, vertexT *vertexA, setT *centers, boolT unbounded);
++void    qh_produce_output(void);
++void    qh_produce_output2(void);
++void    qh_projectdim3(pointT *source, pointT *destination);
++int     qh_readfeasible(int dim, const char *curline);
++coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc);
++void    qh_setfeasible(int dim);
++boolT   qh_skipfacet(facetT *facet);
++char   *qh_skipfilename(char *filename);
++
++#endif /* qhDEFio */
diff --git a/mingw-w64-qhull-git/PKGBUILD b/mingw-w64-qhull-git/PKGBUILD
index daf5875644..11706f379c 100644
--- a/mingw-w64-qhull-git/PKGBUILD
+++ b/mingw-w64-qhull-git/PKGBUILD
@@ -6,7 +6,7 @@
 _realname=qhull
 pkgbase=mingw-w64-${_realname}-git
 pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
-pkgver=r151.5bbc756
+pkgver=r157.f0bd8ce
 pkgrel=1
 provides=("${MINGW_PACKAGE_PREFIX}-${_realname}")
 conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}")
@@ -20,9 +20,11 @@ makedepends=("git"
              "${MINGW_PACKAGE_PREFIX}-gcc"
              "${MINGW_PACKAGE_PREFIX}-cmake")
 source=("${_realname}"::"git://github.com/qhull/qhull.git"
-        "${_realname}-${pkgver}.patch")
+        "0001-MSYS2-Adopt-FHS-layout-in-cmake.patch"
+        "0002-resolve-conflict-system-io_h.patch")
 sha256sums=('SKIP'
-            '5a0fa78f7b70985546e7647ad643f0cc5643e2d60a75c12f2eb9d91f216b1e3c')
+            'd14cc348b33c003dccdfbd95801a26b5ac0831f069cabc07da0c172f3823c8b3'
+            'b1eb1b2b02e806bd3c8adddd158db7c57bcbea103653120e9326d7db60391f29')
 
 pkgver() {
   cd "${srcdir}"/${_realname}
@@ -31,7 +33,8 @@ pkgver() {
 
 prepare() {
   cd "${srcdir}/${_realname}"
-  patch -Np1 -i "../${_realname}-${pkgver}.patch"
+  patch -Np1 -i "${srcdir}/0001-MSYS2-Adopt-FHS-layout-in-cmake.patch"
+  patch -Np1 -i "${srcdir}/0002-resolve-conflict-system-io_h.patch"
 }
 
 build() {
diff --git a/mingw-w64-qhull-git/qhull-r151.5bbc756.patch b/mingw-w64-qhull-git/qhull-r151.5bbc756.patch
deleted file mode 100644
index 12745776e8..0000000000
--- a/mingw-w64-qhull-git/qhull-r151.5bbc756.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff -c -r qhull-5bbc75608c817b50383a0c24c3977cc09d0bbfde.orig/CMakeLists.txt qhull-5bbc75608c817b50383a0c24c3977cc09d0bbfde/CMakeLists.txt
-*** qhull-5bbc75608c817b50383a0c24c3977cc09d0bbfde.orig/CMakeLists.txt	2016-02-07 20:45:58.000000000 -0200
---- qhull-5bbc75608c817b50383a0c24c3977cc09d0bbfde/CMakeLists.txt	2016-03-14 02:28:21.593358000 -0300
-***************
-*** 88,94 ****
-  endif()
-  if(MAN_INSTALL_DIR)
-  else()
-!     if(WIN32)
-          set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/man/man1)
-      else()
-          set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/man/man1)
---- 88,94 ----
-  endif()
-  if(MAN_INSTALL_DIR)
-  else()
-!     if(WIN32 AND NOT MINGW)
-          set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/man/man1)
-      else()
-          set(MAN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/man/man1)
-***************
-*** 96,102 ****
-  endif()
-  if(DOC_INSTALL_DIR)
-  else()
-!     if(WIN32)
-          set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/doc)
-      else()
-          set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/qhull)
---- 96,102 ----
-  endif()
-  if(DOC_INSTALL_DIR)
-  else()
-!     if(WIN32 AND NOT MINGW)
-          set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/doc)
-      else()
-          set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/qhull)
-***************
-*** 615,625 ****
-          LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-          ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
-  
-! install(FILES ${libqhull_HEADERS}    DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull)
-! install(FILES ${libqhull_DOC}        DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull)
-! install(FILES ${libqhullr_HEADERS}    DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r)
-! install(FILES ${libqhullr_DOC}        DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull_r)
-! install(FILES ${libqhullcpp_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhullcpp)
-  install(FILES html/qhull.man         DESTINATION ${MAN_INSTALL_DIR} RENAME qhull.1)
-  install(FILES html/rbox.man          DESTINATION ${MAN_INSTALL_DIR} RENAME rbox.1)
-  install(FILES ${doc_FILES}           DESTINATION ${DOC_INSTALL_DIR})
---- 615,625 ----
-          LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-          ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
-  
-! install(FILES ${libqhull_HEADERS}    DESTINATION ${INCLUDE_INSTALL_DIR}/qhull)
-! install(FILES ${libqhull_DOC}        DESTINATION ${INCLUDE_INSTALL_DIR}/qhull)
-! install(FILES ${libqhullr_HEADERS}    DESTINATION ${INCLUDE_INSTALL_DIR}/qhull_r)
-! install(FILES ${libqhullr_DOC}        DESTINATION ${INCLUDE_INSTALL_DIR}/qhull_r)
-! install(FILES ${libqhullcpp_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/qhullcpp)
-  install(FILES html/qhull.man         DESTINATION ${MAN_INSTALL_DIR} RENAME qhull.1)
-  install(FILES html/rbox.man          DESTINATION ${MAN_INSTALL_DIR} RENAME rbox.1)
-  install(FILES ${doc_FILES}           DESTINATION ${DOC_INSTALL_DIR})