Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ports/zycore/fix-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d17f7d7..44ac4a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,8 +207,11 @@ install(FILES
)

install(TARGETS "Zycore" EXPORT "zycore-targets"
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch can be minimized. We only need to insert RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} in the middle.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

+)
+

install(EXPORT "zycore-targets"
NAMESPACE "Zycore::"
27 changes: 27 additions & 0 deletions ports/zycore/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zyantific/zycore-c
REF 4a8b5e2ab4d6ee73aa92d04bc318fed607394e67
SHA512 c707f5e07411d9f00fa59e3c382345009f225ed9406063b9863604f15a9c45c9a32bc9c3100f08d9c5800cc2254f71bfae817979b85bc604739ca1ee854c94e5
HEAD_REF master
PATCHES
fix-install.patch
)

string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} dynamic ZYCORE_BUILD_STATIC)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS -DZYCORE_BUILD_SHARED_LIB=${ZYCORE_BUILD_STATIC}
)

vcpkg_cmake_install()


vcpkg_cmake_config_fixup(
CONFIG_PATH lib/cmake/${PORT}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use the PORT variable here. CONFIG_PATH is a source path. It doesn't depend on the value of PORT but on the literal name chosen by the package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

)

configure_file(${SOURCE_PATH}/LICENSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency in all ports, I would prever to see copyrigh handled in the last line. The common pattern is file(INSTALL ... DESTINATION ... RENAME "copyright") but now there is also a vcpkg_install_copyright command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
17 changes: 17 additions & 0 deletions ports/zycore/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "zycore",
"version": "1.3.0",
"description": "Internal library of Zydis",
"homepage": "https://github.com/zyantific/zycore-c",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8136,6 +8136,10 @@
"baseline": "2021-04-23",
"port-version": 1
},
"zycore": {
"baseline": "1.3.0",
"port-version": 0
},
"zydis": {
"baseline": "3.2.1",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/z-/zycore.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "8bff14ed238b49e8769b9630d8d0c89313492be7",
"version": "1.3.0",
"port-version": 0
}
]
}