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/cutelyst2 | |
Diffstat (limited to 'vcpkg/ports/cutelyst2')
| -rw-r--r-- | vcpkg/ports/cutelyst2/fix-static-build.patch | 38 | ||||
| -rw-r--r-- | vcpkg/ports/cutelyst2/portfile.cmake | 53 | ||||
| -rw-r--r-- | vcpkg/ports/cutelyst2/vcpkg.json | 20 |
3 files changed, 111 insertions, 0 deletions
diff --git a/vcpkg/ports/cutelyst2/fix-static-build.patch b/vcpkg/ports/cutelyst2/fix-static-build.patch new file mode 100644 index 0000000..e40cd1d --- /dev/null +++ b/vcpkg/ports/cutelyst2/fix-static-build.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9a695fd..0667668 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -129,6 +129,33 @@ add_definitions( + -DQT_DISABLE_DEPRECATED_BEFORE=0x050c00 + ) + ++if (BUILD_WIN_STATIC) ++ add_definitions( ++ -DCutelyst2Qt5_EXPORTS ++ -DActionRenderView_EXPORTS ++ -DActionREST_EXPORTS ++ -DActionRoleACL_EXPORTS ++ -DCutelyst2Qt5Authentication_EXPORTS ++ -DCutelyst2Qt5Session_EXPORTS ++ -DCutelyst2Qt5StaticSimple_EXPORTS ++ -DCutelyst2Qt5StaticCompressed_EXPORTS ++ -DCutelyst2Qt5UtilsPagination_EXPORTS ++ -DCutelyst2Qt5StatusMessage_EXPORTS ++ -DCutelyst2Qt5Memcached_EXPORTS ++ -DCutelyst2Qt5MemcachedSessionStore_EXPORTS ++ -DCutelyst2Qt5CSRFProtection_EXPORTS ++ -DCutelyst2Qt5UtilsSql_EXPORTS ++ -DCutelyst2Qt5UtilsValidator_EXPORTS ++ -DCutelyst2Qt5UtilsLangSelect_EXPORTS ++ -DCutelyst2Qt5ViewClearSilver_EXPORTS ++ -DCutelyst2Qt5ViewEmail_EXPORTS ++ -DCutelyst2Qt5ViewGrantlee_EXPORTS ++ -DCutelyst2Qt5ViewJson_EXPORTS ++ -DCutelyst2Qt5Wsgi_EXPORTS ++ -DCutelyst2Qt5UserAgent_EXPORTS ++ ) ++endif() ++ + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/vcpkg/ports/cutelyst2/portfile.cmake b/vcpkg/ports/cutelyst2/portfile.cmake new file mode 100644 index 0000000..10a5d4d --- /dev/null +++ b/vcpkg/ports/cutelyst2/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cutelyst/cutelyst + REF 526aef6b4c1a48f8e91d59607763fade9157d01f # v2.12.0 + SHA512 0960801ae8d772a93e3f2dcd221f919ff28000076cecd4d1a2ff7b6e62575805738292257e63a48e455f6fc0bc446c90214fc33679ea1deb17b0c31d6f125e2a + HEAD_REF master + PATCHES fix-static-build.patch +) + +set(BUILD_WIN_STATIC OFF) +if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_WIN_STATIC ON) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTS:BOOL=OFF + -DBUILD_WIN_STATIC=${BUILD_WIN_STATIC} +) + +vcpkg_cmake_install() + +# Move CMake config files to the right place +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Cutelyst2Qt5) + +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/cutelyst2" "${CURRENT_PACKAGES_DIR}/bin/cutelyst2-wsgi" "${CURRENT_PACKAGES_DIR}/bin/cutelyst2.exe" "${CURRENT_PACKAGES_DIR}/bin/cutelyst-wsgi2.exe") +file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2" "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-wsgi" "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2.exe" "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst-wsgi2.exe") +if(EXES OR DEBUG_EXES) + file(COPY ${EXES} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/cutelyst2") + file(REMOVE ${EXES} ${DEBUG_EXES}) + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/cutelyst2") +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cutelyst2-plugins/ActionREST.dll") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/cutelyst2-plugins" "${CURRENT_PACKAGES_DIR}/bin/cutelyst2-plugins") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins/ActionREST.dll") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins" "${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-plugins") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/cutelyst2/copyright" COPYONLY) + +vcpkg_copy_pdbs() +if(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") +else() + vcpkg_fixup_pkgconfig() +endif() diff --git a/vcpkg/ports/cutelyst2/vcpkg.json b/vcpkg/ports/cutelyst2/vcpkg.json new file mode 100644 index 0000000..928b614 --- /dev/null +++ b/vcpkg/ports/cutelyst2/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "cutelyst2", + "version": "2.12.0", + "port-version": 2, + "description": "A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework", + "dependencies": [ + { + "name": "qt5-base", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |