aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/telnetpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/telnetpp')
-rw-r--r--vcpkg/ports/telnetpp/fix-install-paths-v3.patch45
-rw-r--r--vcpkg/ports/telnetpp/fix_include.patch13
-rw-r--r--vcpkg/ports/telnetpp/portfile.cmake41
-rw-r--r--vcpkg/ports/telnetpp/vcpkg.json37
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"
+ ]
+ }
+ }
+}