Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[yalantinglibs] Add a new port #42154

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
25 changes: 25 additions & 0 deletions ports/yalantinglibs/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO alibaba/yalantinglibs
REF "${VERSION}"
SHA512 e217a6518f72e2acb0cf647c6c81b51e79779eb71e8f7149402337947ee1dbe56a6cc76aa745adfd890b38c08806aac9d5f33379f8161a2eed82b7e97ad429c0
HEAD_REF main
)


vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_BENCHMARK=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_UNIT_TESTS=OFF
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(PACKAGE_NAME "yalantinglibs" CONFIG_PATH "lib/cmake/yalantinglibs")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
Comment on lines +24 to +25
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

and with a line break at the end.

5 changes: 5 additions & 0 deletions ports/yalantinglibs/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
yalantinglibs provides CMake targets:

find_package(yalantinglibs CONFIG REQUIRED)
target_link_libraries(main yalantinglibs::yalantinglibs)
target_compile_features(main PRIVATE cxx_std_20)
Comment on lines +1 to +5
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
yalantinglibs provides CMake targets:
find_package(yalantinglibs CONFIG REQUIRED)
target_link_libraries(main yalantinglibs::yalantinglibs)
target_compile_features(main PRIVATE cxx_std_20)
yalantinglibs provides CMake targets:
find_package(yalantinglibs CONFIG REQUIRED)
target_link_libraries(main PRIVATE yalantinglibs::yalantinglibs)

with a line break at the end.

If cxx_std_20 is a usage requirement, it doesn't belong into the usage file, but to the target properties, i.e. the package must handle it via PUBLIC target compile options so that it becomes part of the exported properties.

17 changes: 17 additions & 0 deletions ports/yalantinglibs/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "yalantinglibs",
"version": "0.3.9",
"description": "A Collection of C++20 libraries, include struct_pack, struct_json, struct_xml, struct_yaml, struct_pb, easylog, coro_rpc, coro_http and async_simple",
"homepage": "https://github.com/alibaba/yalantinglibs",
"license": "Apache-2.0",
"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 @@ -9872,6 +9872,10 @@
"baseline": "2.1.0",
"port-version": 4
},
"yalantinglibs": {
"baseline": "0.3.9",
"port-version": 0
},
"yaml-cpp": {
"baseline": "0.8.0",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/y-/yalantinglibs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "6afdffc3a213dfaff6bf724f37581b8e669b9cea",
"version": "0.3.9",
"port-version": 0
}
]
}
Loading