aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/licensepp
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/licensepp
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/licensepp')
-rw-r--r--vcpkg/ports/licensepp/FindCryptoPP.cmake27
-rw-r--r--vcpkg/ports/licensepp/add-stdint.diff13
-rw-r--r--vcpkg/ports/licensepp/devendoring.patch22
-rw-r--r--vcpkg/ports/licensepp/portfile.cmake30
-rw-r--r--vcpkg/ports/licensepp/remove-werror.diff13
-rw-r--r--vcpkg/ports/licensepp/vcpkg.json24
6 files changed, 129 insertions, 0 deletions
diff --git a/vcpkg/ports/licensepp/FindCryptoPP.cmake b/vcpkg/ports/licensepp/FindCryptoPP.cmake
new file mode 100644
index 0000000..c7e0f70
--- /dev/null
+++ b/vcpkg/ports/licensepp/FindCryptoPP.cmake
@@ -0,0 +1,27 @@
+find_path(CRYPTOPP_INCLUDE_DIRS NAMES cryptopp/cryptlib.h)
+
+get_filename_component(_prefix_path ${CRYPTOPP_INCLUDE_DIRS} PATH)
+
+find_library(
+ CRYPTOPP_LIBRARY_DEBUG
+ NAMES cryptopp-static cryptopp
+ PATHS ${_prefix_path}/debug/lib
+ NO_DEFAULT_PATH
+)
+find_library(
+ CRYPTOPP_LIBRARY_RELEASE
+ NAMES cryptopp-static cryptopp
+ PATHS ${_prefix_path}/lib
+ NO_DEFAULT_PATH
+)
+
+unset(_prefix_path)
+
+include(SelectLibraryConfigurations)
+select_library_configurations(CRYPTOPP)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+ CryptoPP
+ REQUIRED_VARS CRYPTOPP_LIBRARIES CRYPTOPP_INCLUDE_DIRS
+)
diff --git a/vcpkg/ports/licensepp/add-stdint.diff b/vcpkg/ports/licensepp/add-stdint.diff
new file mode 100644
index 0000000..6db3e7f
--- /dev/null
+++ b/vcpkg/ports/licensepp/add-stdint.diff
@@ -0,0 +1,13 @@
+diff --git a/include/license++/license.h b/include/license++/license.h
+index eab392d..67b405e 100644
+--- a/include/license++/license.h
++++ b/include/license++/license.h
+@@ -9,7 +9,7 @@
+
+ #ifndef LICENSEPP_License_h
+ #define LICENSEPP_License_h
+-
++#include <stdint.h>
+ #include <string>
+
+ namespace licensepp {
diff --git a/vcpkg/ports/licensepp/devendoring.patch b/vcpkg/ports/licensepp/devendoring.patch
new file mode 100644
index 0000000..095186b
--- /dev/null
+++ b/vcpkg/ports/licensepp/devendoring.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8581813..46e1565 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -48,7 +48,7 @@ include_directories (${CRYPTOPP_INCLUDE_DIRS})
+
+ # Ripe (static)
+ set(RIPE_USE_STATIC_LIBS OFF)
+-find_package(Ripe REQUIRED)
++find_package(unofficial-ripe REQUIRED)
+
+ include_directories (${EXTERNAL_INCLUDE_DIR})
+
+@@ -87,7 +87,7 @@ target_include_directories (licensepp-lib PUBLIC
+
+ target_link_libraries (licensepp-lib
+ ${CRYPTOPP_LIBRARIES}
+- ${RIPE_LIBRARY}
++ unofficial::ripe::ripe
+ )
+
+ set_target_properties (licensepp-lib PROPERTIES OUTPUT_NAME "licensepp")
diff --git a/vcpkg/ports/licensepp/portfile.cmake b/vcpkg/ports/licensepp/portfile.cmake
new file mode 100644
index 0000000..30608f9
--- /dev/null
+++ b/vcpkg/ports/licensepp/portfile.cmake
@@ -0,0 +1,30 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO amrayn/licensepp
+ REF v${VERSION}
+ SHA512 a27b8e669cff2ce06dfb0b2b6f961406e4c488f4a55fc086754274c719632d53942d88192010b6af8cc46784aee6a7b5c40780792e9d6f0d51ec3da76576f259
+ HEAD_REF master
+ PATCHES
+ add-stdint.diff
+ remove-werror.diff
+ devendoring.patch
+)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/FindCryptoPP.cmake" DESTINATION "${SOURCE_PATH}/cmake")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -Dtest=OFF
+ -Dtravis=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH share/${PORT}/cmake)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/licensepp/remove-werror.diff b/vcpkg/ports/licensepp/remove-werror.diff
new file mode 100644
index 0000000..ddbf3bd
--- /dev/null
+++ b/vcpkg/ports/licensepp/remove-werror.diff
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8581813..52b147f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -37,7 +37,7 @@ if (APPLE)
+ endif()
+
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3 -Wall -Werror -Wno-return-stack-address")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O3 -Wall -Wno-return-stack-address")
+ endif()
+
+ # Check for cryptopp (static)
diff --git a/vcpkg/ports/licensepp/vcpkg.json b/vcpkg/ports/licensepp/vcpkg.json
new file mode 100644
index 0000000..b9e212f
--- /dev/null
+++ b/vcpkg/ports/licensepp/vcpkg.json
@@ -0,0 +1,24 @@
+{
+ "name": "licensepp",
+ "version": "1.2.0",
+ "description": "Cross platform software licensing library",
+ "homepage": "https://github.com/amrayn/licensepp",
+ "supports": "!uwp",
+ "dependencies": [
+ "abumq-ripe",
+ {
+ "name": "cryptopp",
+ "features": [
+ "pem-pack"
+ ]
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}