diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/telnetpp | |
Diffstat (limited to 'vcpkg/ports/telnetpp')
| -rw-r--r-- | vcpkg/ports/telnetpp/fix-install-paths-v3.patch | 45 | ||||
| -rw-r--r-- | vcpkg/ports/telnetpp/fix_include.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/telnetpp/portfile.cmake | 41 | ||||
| -rw-r--r-- | vcpkg/ports/telnetpp/vcpkg.json | 37 |
4 files changed, 136 insertions, 0 deletions
diff --git a/vcpkg/ports/telnetpp/fix-install-paths-v3.patch b/vcpkg/ports/telnetpp/fix-install-paths-v3.patch new file mode 100644 index 0000000..26b968c --- /dev/null +++ b/vcpkg/ports/telnetpp/fix-install-paths-v3.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2dc81a3..4d53fa6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -260,11 +260,11 @@ install( + EXPORT + telnetpp-targets + ARCHIVE DESTINATION +- ${CMAKE_INSTALL_LIBDIR}/telnetpp-${TELNETPP_VERSION} ++ lib + RUNTIME DESTINATION +- ${CMAKE_INSTALL_LIBDIR}/telnetpp-${TELNETPP_VERSION} ++ bin + LIBRARY DESTINATION +- ${CMAKE_INSTALL_BINDIR}/telnetpp-${TELNETPP_VERSION} ++ lib + ) + + install( +@@ -273,14 +273,14 @@ install( + NAMESPACE + KazDragon:: + DESTINATION +- ${CMAKE_INSTALL_DATADIR}/telnetpp-${TELNETPP_VERSION} ++ share/telnetpp + ) + + install( + DIRECTORY + include/ + DESTINATION +- ${CMAKE_INSTALL_INCLUDEDIR}/telnetpp-${TELNETPP_VERSION} ++ include + ) + + install( +@@ -288,7 +288,7 @@ install( + "${CMAKE_CURRENT_BINARY_DIR}/telnetpp-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/telnetpp-config-version.cmake" + DESTINATION +- ${CMAKE_INSTALL_DATADIR}/telnetpp-${TELNETPP_VERSION} ++ share/telnetpp + ) + + if (TELNETPP_WITH_TESTS) diff --git a/vcpkg/ports/telnetpp/fix_include.patch b/vcpkg/ports/telnetpp/fix_include.patch new file mode 100644 index 0000000..f1ef7eb --- /dev/null +++ b/vcpkg/ports/telnetpp/fix_include.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4d53fa6..c426e70 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -218,7 +218,7 @@ target_compile_features(telnetpp
+ target_include_directories(telnetpp
+ PUBLIC
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+- $<INSTALL_INTERFACE:include/telnetpp-${TELNETPP_VERSION}>
++ $<INSTALL_INTERFACE:include>
+ )
+
+ generate_export_header(telnetpp
diff --git a/vcpkg/ports/telnetpp/portfile.cmake b/vcpkg/ports/telnetpp/portfile.cmake new file mode 100644 index 0000000..53ec9a1 --- /dev/null +++ b/vcpkg/ports/telnetpp/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KazDragon/telnetpp + REF "v${VERSION}" + SHA512 0ff458675a44462655ff3869ff1c3390eec9d594a57a9ed95fb18f9b627b740b4f4be5e1fee3a5b9558553a05aae33134f8f8d26a85b8e4d2e01a927a8337c32 + HEAD_REF master + PATCHES + fix-install-paths-v3.patch + fix_include.patch + +) + +set(USE_ZLIB OFF) +if("zlib" IN_LIST FEATURES) + set(USE_ZLIB ON) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DTELNETPP_WITH_ZLIB=${USE_ZLIB} + -DTELNETPP_WITH_TESTS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH share/telnetpp) +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/telnetpp-config.cmake" "####################################################################################" + [[#################################################################################### + include(CMakeFindDependencyMacro) + find_dependency(Boost) + find_dependency(gsl-lite) + find_dependency(ZLIB)]]) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE + "${CURRENT_PACKAGES_DIR}/include/telnetpp/version.hpp.in" +) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/telnetpp/vcpkg.json b/vcpkg/ports/telnetpp/vcpkg.json new file mode 100644 index 0000000..6d0591a --- /dev/null +++ b/vcpkg/ports/telnetpp/vcpkg.json @@ -0,0 +1,37 @@ +{ + "name": "telnetpp", + "version": "4.0.0", + "description": "A C++ library for interacting with Telnet streams", + "homepage": "https://github.com/KazDragon/telnetpp", + "documentation": "https://kazdragon.github.io/telnetpp/", + "license": "MIT", + "supports": "!uwp", + "dependencies": [ + "boost-algorithm", + "boost-container", + "boost-exception", + "boost-range", + "boost-scope-exit", + "boost-signals2", + "boost-variant", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "zlib" + ], + "features": { + "zlib": { + "description": "Zlib support", + "dependencies": [ + "zlib" + ] + } + } +} |