aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/solid3
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/solid3')
-rw-r--r--vcpkg/ports/solid3/disable-examples.patch13
-rw-r--r--vcpkg/ports/solid3/no-sse.patch19
-rw-r--r--vcpkg/ports/solid3/portfile.cmake39
-rw-r--r--vcpkg/ports/solid3/potentially-uninitialized-local-pointer-variable.patch26
-rw-r--r--vcpkg/ports/solid3/vcpkg.json17
5 files changed, 114 insertions, 0 deletions
diff --git a/vcpkg/ports/solid3/disable-examples.patch b/vcpkg/ports/solid3/disable-examples.patch
new file mode 100644
index 0000000..5af3b26
--- /dev/null
+++ b/vcpkg/ports/solid3/disable-examples.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0303a8f..be43838 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -97,7 +97,7 @@ if(UNIX)
+ endif(UNIX)
+
+ add_subdirectory(src)
+-add_subdirectory(examples)
++#add_subdirectory(examples)
+ #add_subdirectory(doc)
+
+ include(CMakePackageConfigHelpers)
diff --git a/vcpkg/ports/solid3/no-sse.patch b/vcpkg/ports/solid3/no-sse.patch
new file mode 100644
index 0000000..ed2cb1d
--- /dev/null
+++ b/vcpkg/ports/solid3/no-sse.patch
@@ -0,0 +1,19 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index be43838..fe71394 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -87,8 +87,12 @@ if(MSVC)
+ endif(MSVC)
+
+ if(UNIX)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -ffast-math -msse2 -mfpmath=sse")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -Wall -ffast-math -msse2 -mfpmath=sse")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -ffast-math")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -Wall -ffast-math")
++ if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
++ endif()
+ if (DYNAMIC_SOLID)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
diff --git a/vcpkg/ports/solid3/portfile.cmake b/vcpkg/ports/solid3/portfile.cmake
new file mode 100644
index 0000000..d39d15f
--- /dev/null
+++ b/vcpkg/ports/solid3/portfile.cmake
@@ -0,0 +1,39 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO dtecta/solid3
+ REF c53f6bb1eaaafb1cfb305ef71b1c3a2edb4844e6
+ SHA512 ae42ba75f5309fecba836e5786d4cb81eeb1240f6fd7c458c6d1329d8e1075021504b927ea0aedb66162deeb79ad674cacb0190385afe456420c0d9184596f1f
+ HEAD_REF master
+ PATCHES
+ disable-examples.patch
+ potentially-uninitialized-local-pointer-variable.patch
+ no-sse.patch
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(DYNAMIC_SOLID OFF)
+else()
+ set(DYNAMIC_SOLID ON)
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DDYNAMIC_SOLID=${DYNAMIC_SOLID}
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/solid3)
+
+file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/solid3/README.md ${CURRENT_PACKAGES_DIR}/share/solid3/copyright)
+file(COPY ${SOURCE_PATH}/LICENSE_GPL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3)
+file(COPY ${SOURCE_PATH}/LICENSE_QPL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
diff --git a/vcpkg/ports/solid3/potentially-uninitialized-local-pointer-variable.patch b/vcpkg/ports/solid3/potentially-uninitialized-local-pointer-variable.patch
new file mode 100644
index 0000000..baec567
--- /dev/null
+++ b/vcpkg/ports/solid3/potentially-uninitialized-local-pointer-variable.patch
@@ -0,0 +1,26 @@
+diff --git a/src/qhull/geom2.c b/src/qhull/geom2.c
+index bd58ce1..c4798d2 100644
+--- a/src/qhull/geom2.c
++++ b/src/qhull/geom2.c
+@@ -2080,7 +2080,7 @@ boolT qh_sharpnewfacets () {
+ pointT *qh_voronoi_center (int dim, setT *points) {
+ pointT *point, **pointp, *point0;
+ pointT *center= (pointT*)qh_memalloc (qh center_size);
+- setT *simplex;
++ setT *simplex= NULL;
+ int i, j, k, size= qh_setsize(points);
+ coordT *gmcoord;
+ realT *diffp, sum2, *sum2row, *sum2p, det, factor;
+diff --git a/src/qhull/io.c b/src/qhull/io.c
+index 79ca799..41c18bc 100644
+--- a/src/qhull/io.c
++++ b/src/qhull/io.c
+@@ -3740,7 +3740,7 @@ coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc) {
+ coordT *points, *coords, *infinity= NULL;
+ realT paraboloid, maxboloid= -REALmax, value;
+ realT *coordp= NULL, *offsetp= NULL, *normalp= NULL;
+- char *s, *t, firstline[qh_MAXfirst+1];
++ char *s= NULL, *t, firstline[qh_MAXfirst+1];
+ int diminput=0, numinput=0, dimfeasible= 0, newnum, k, tempi;
+ int firsttext=0, firstshort=0, firstlong=0, firstpoint=0;
+ int tokcount= 0, linecount=0, maxcount, coordcount=0;
diff --git a/vcpkg/ports/solid3/vcpkg.json b/vcpkg/ports/solid3/vcpkg.json
new file mode 100644
index 0000000..3a45bbb
--- /dev/null
+++ b/vcpkg/ports/solid3/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "solid3",
+ "version": "3.5.8",
+ "port-version": 2,
+ "description": "Software Library for Interference Detection",
+ "license": "GPL-2.0-only OR QPL-1.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}