diff options
| author | João Maia <jpmmaia@gmail.com> | 2021-07-06 18:29:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-06 10:29:48 -0700 |
| commit | 110c89fc6ada7bc9fad715eaf8211f20aad084f5 (patch) | |
| tree | 246332634c1496a0e3c6d5fe467eaeaa7b432b0f | |
| parent | b361c2eefa3966cb7cec45275aff32e90430aaa6 (diff) | |
| download | vcpkg-110c89fc6ada7bc9fad715eaf8211f20aad084f5.tar.gz vcpkg-110c89fc6ada7bc9fad715eaf8211f20aad084f5.zip | |
[klein] create a new port (#18279)
* [klein] new port
* [klein] Replace version-string by version
* [klein] Add call to vcpkg_fixup_pkgconfig()
* [klein] Replace klein by ${PORT}
* [klein] Add patch to avoid using FetchContent
* [klein] Change version to version-date
* update version
* Apply suggestions from code review
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
* Update git-tree version
Co-authored-by: Jonliu1993 <13720414433@163.com>
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
| -rw-r--r-- | ports/klein/find_simde_first.patch | 23 | ||||
| -rw-r--r-- | ports/klein/portfile.cmake | 29 | ||||
| -rw-r--r-- | ports/klein/usage | 10 | ||||
| -rw-r--r-- | ports/klein/vcpkg.json | 16 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/k-/klein.json | 9 |
6 files changed, 91 insertions, 0 deletions
diff --git a/ports/klein/find_simde_first.patch b/ports/klein/find_simde_first.patch new file mode 100644 index 000000000..ab9f715c6 --- /dev/null +++ b/ports/klein/find_simde_first.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c5d6f3f..a3ba161 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,16 +29,7 @@ endif()
+ option(KLEIN_BUILD_SYM "Enable compilation of symbolic Klein utility" ON)
+ option(KLEIN_BUILD_C_BINDINGS "Enable compilation of the Klein C bindings" ON)
+
+-include(FetchContent)
+-FetchContent_Declare(
+- simde
+- GIT_REPOSITORY https://github.com/simd-everywhere/simde
+- GIT_TAG v0.7.2
+- GIT_SHALLOW ON
+-)
+-FetchContent_GetProperties(simde)
+-if(NOT simde_POPULATED)
+- FetchContent_Populate(simde)
+-endif()
++find_path(SIMDE_INCLUDE_DIR "simde/x86/sse4.1.h" REQUIRED)
++set(simde_SOURCE_DIR ${SIMDE_INCLUDE_DIR}/simde)
+
+ # The default platform and instruction set is x86 SSE3
diff --git a/ports/klein/portfile.cmake b/ports/klein/portfile.cmake new file mode 100644 index 000000000..aea4b100a --- /dev/null +++ b/ports/klein/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO jeremyong/klein
+ REF 92023c6a946af84e716deb1488cad22048d3e08d
+ SHA512 5d12ae143f07173992a6f9aa90539c4cb6c895a7169e5c086a10f78a31f7b2c9d64faf5ce1db014bd3badd92d24ff612dd2d2dc2f7508baac59307e3dccb6ebe
+ HEAD_REF master
+ PATCHES
+ "find_simde_first.patch"
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DKLEIN_ENABLE_PERF=OFF
+ -DKLEIN_ENABLE_TESTS=OFF
+ -DKLEIN_VALIDATE=OFF
+ -DKLEIN_BUILD_SYM=OFF
+ -DKLEIN_BUILD_C_BINDINGS=OFF
+ -DKLEIN_INSTALL=ON
+)
+
+vcpkg_cmake_install()
+vcpkg_fixup_pkgconfig()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+
diff --git a/ports/klein/usage b/ports/klein/usage new file mode 100644 index 000000000..63658e26e --- /dev/null +++ b/ports/klein/usage @@ -0,0 +1,10 @@ +The package klein:x64-windows provides CMake targets:
+
+ find_package(klein CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE klein::klein)
+
+ # Or use the C++ 11 version
+ target_link_libraries(main PRIVATE klein::klein_cxx11)
+
+ # Or use the SSE4.1 version
+ target_link_libraries(main PRIVATE klein::klein_sse42)
diff --git a/ports/klein/vcpkg.json b/ports/klein/vcpkg.json new file mode 100644 index 000000000..9b6393b3b --- /dev/null +++ b/ports/klein/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "klein", + "version-date": "2021-05-09", + "description": "Klein is an implementation of P(R*_{3, 0, 1}), aka 3D Projective Geometric Algebra. It is designed for applications that demand high-throughput (animation libraries, kinematic solvers, etc).", + "dependencies": [ + "simde", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index a200b7aee..9cbe756ae 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2920,6 +2920,10 @@ "baseline": "2020-03-30", "port-version": 0 }, + "klein": { + "baseline": "2021-05-09", + "port-version": 0 + }, "knet": { "baseline": "1.0.2", "port-version": 0 diff --git a/versions/k-/klein.json b/versions/k-/klein.json new file mode 100644 index 000000000..37c636709 --- /dev/null +++ b/versions/k-/klein.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "5a367eafd82860f61245c54f64306b35a9e0978c", + "version-date": "2021-05-09", + "port-version": 0 + } + ] +} |
