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

[lionkor-commandline] Add new port #23471

Merged
merged 23 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from 12 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
14 changes: 14 additions & 0 deletions ports/commandline/add-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4db57c..7ace55c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,3 +22,4 @@ if(BUILD_EXAMPLES)
target_link_libraries(test commandline)
endif()

+install(
+ TARGETS commandline
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
24 changes: 24 additions & 0 deletions ports/commandline/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lionkor/commandline
REF 4a8000d6b767263a79c589fcc74099a4454e07a9
SHA512 81ee2716b7048e51d26f75033be7a6d3a1aec9bfef833ad067112b26144023dfad8f5f8d145b4162dba2de3ad09de223dbe9143cf9e2f5f5102374d3412aebf7
HEAD_REF master
PATCHES
add-install.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_EXAMPLES=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()


# Handle header
file(INSTALL "${SOURCE_PATH}/commandline.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
18 changes: 18 additions & 0 deletions ports/commandline/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "commandline",
"version-semver": "1.0.0",
"description": "A C++ commandline for use in servers and chat software. Provides very simple asynchronous input/output.",
"homepage": "https://github.com/lionkor/commandline/",
"license": "MIT",
"supports": "!osx & static",
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
"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 @@ -1472,6 +1472,10 @@
"baseline": "3.7",
"port-version": 0
},
"commandline": {
"baseline": "1.0.0",
"port-version": 0
},
"comms": {
"baseline": "3.4.0",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/c-/commandline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "18e1e8483a0a5b81a25fd0efcc87403dcbf64432",
"version-semver": "1.0.0",
"port-version": 0
}
]
}