aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquickiwiki <eldargafiyatov@gmail.com>2018-09-18 13:35:50 +0500
committerRobert Schumacher <roschuma@microsoft.com>2018-09-18 01:35:50 -0700
commitadd489dd755d6b7c48e7c8031aea3619d789c37b (patch)
treec11aadbcf03c858911a079a25438c95300bd0397
parentc7f99a77a882ab5c2dce52dc5fa9005fe905773f (diff)
downloadvcpkg-add489dd755d6b7c48e7c8031aea3619d789c37b.tar.gz
vcpkg-add489dd755d6b7c48e7c8031aea3619d789c37b.zip
Added tinyspline library to ports (#4298)
* Added tinyspline library to ports * Removed commented code * [tinyspline] Simplify patching, remove extra comments and unused directives
-rw-r--r--ports/tinyspline/CONTROL3
-rw-r--r--ports/tinyspline/cmake.patch29
-rw-r--r--ports/tinyspline/portfile.cmake25
3 files changed, 57 insertions, 0 deletions
diff --git a/ports/tinyspline/CONTROL b/ports/tinyspline/CONTROL
new file mode 100644
index 000000000..ef83e311b
--- /dev/null
+++ b/ports/tinyspline/CONTROL
@@ -0,0 +1,3 @@
+Source: tinyspline
+Version: 0.2.0-1
+Description: Library for NURBS, B-Splines, and B?zier curves, allowing you to handle splines with ease
diff --git a/ports/tinyspline/cmake.patch b/ports/tinyspline/cmake.patch
new file mode 100644
index 000000000..2cb6a2602
--- /dev/null
+++ b/ports/tinyspline/cmake.patch
@@ -0,0 +1,29 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 02dfb83..35e01f8 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -387,6 +387,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ # TINYSPLINE_LIBRARY_C_FLAGS
+ set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /Wall")
+ set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /WX")
++ set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /wd4820")
++ set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /wd5045")
++ set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /wd4711")
+
+ # TINYSPLINE_LIBRARY_CXX_FLAGS
+ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /Wall")
+@@ -395,6 +398,14 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4710")
+ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4350")
+ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4820")
++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd5045")
++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4571")
++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4625")
++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4626")
++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd5026")
++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd5027")
++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4774")
++ set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4711")
+
+ # TINYSPLINE_BINDING_CXX_FLAGS
+ set(TINYSPLINE_BINDING_CXX_FLAGS "${TINYSPLINE_BINDING_CXX_FLAGS} /w")
diff --git a/ports/tinyspline/portfile.cmake b/ports/tinyspline/portfile.cmake
new file mode 100644
index 000000000..a290cf3a7
--- /dev/null
+++ b/ports/tinyspline/portfile.cmake
@@ -0,0 +1,25 @@
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO msteinbeck/tinyspline
+ REF 0.2.0
+ SHA512 50cf4927b311eeca6de7954f1b8d585cbf71355f5e5b0aac2f92f5f4ba37986df16eb3251f94a2304d27dab27d4f6b838b410f53e30de28bab53facf194eb640
+ HEAD_REF master
+ PATCHES
+ cmake.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}/src
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+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)
+
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/tinyspline/copyright COPYONLY)