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/vlpp | |
Diffstat (limited to 'vcpkg/ports/vlpp')
| -rw-r--r-- | vcpkg/ports/vlpp/fix-install.patch | 12 | ||||
| -rw-r--r-- | vcpkg/ports/vlpp/fix-tool-build.patch | 24 | ||||
| -rw-r--r-- | vcpkg/ports/vlpp/fix_miss_file.patch | 24 | ||||
| -rw-r--r-- | vcpkg/ports/vlpp/portfile.cmake | 88 | ||||
| -rw-r--r-- | vcpkg/ports/vlpp/vcpkg.json | 108 |
5 files changed, 256 insertions, 0 deletions
diff --git a/vcpkg/ports/vlpp/fix-install.patch b/vcpkg/ports/vlpp/fix-install.patch new file mode 100644 index 0000000..b237beb --- /dev/null +++ b/vcpkg/ports/vlpp/fix-install.patch @@ -0,0 +1,12 @@ +diff --git a/Import/CMakeLists.txt b/Import/CMakeLists.txt +index 3547dae..23d6c39 100644 +--- a/Import/CMakeLists.txt ++++ b/Import/CMakeLists.txt +@@ -184,7 +184,6 @@ if (GACUI_CORE) + + if (GACUI_REFLECTION) + install(FILES GacUIReflection.h DESTINATION include) +- install(FILES GacUIR.UnitTest.UIReflection.h DESTINATION include) + install(FILES Skins/DarkSkin/DarkSkinReflection.h DESTINATION include/Skins/DarkSkin) + endif() + diff --git a/vcpkg/ports/vlpp/fix-tool-build.patch b/vcpkg/ports/vlpp/fix-tool-build.patch new file mode 100644 index 0000000..e7bf293 --- /dev/null +++ b/vcpkg/ports/vlpp/fix-tool-build.patch @@ -0,0 +1,24 @@ +diff --git a/Import/CMakeLists.txt b/Import/CMakeLists.txt +index c65ab65..2101e86 100644 +--- a/Import/CMakeLists.txt ++++ b/Import/CMakeLists.txt +@@ -10,6 +10,7 @@ cmake_dependent_option(WORKFLOW_COMPILER "Use VlppWorkflowCompiler" ON "WORKFLOW + cmake_dependent_option(GACUI_CORE "Use GacUI" ON "GLR_PARSER;WORKFLOW_LIBRARY" OFF) + cmake_dependent_option(GACUI_REFLECTION "Use GacUIReflection" ON "GACUI_CORE;WORKFLOW_RUNTIME;REFLECTION" OFF) + cmake_dependent_option(GACUI_COMPILER "Use GacUICompiler" ON "GACUI_REFLECTION;WORKFLOW_COMPILER" OFF) ++option(BUILD_TOOLS "Build tools" OFF) + + # core library + set(CORE_HDRS +@@ -144,6 +145,11 @@ if (GACUI_CORE) + list(APPEND EXPORT_TARGETS gacui_core) + endif() + ++if (BUILD_TOOLS) ++ add_subdirectory(gacgen/Tools/GacGen) ++ add_subdirectory(workflow/Tools/CppMerge) ++endif() ++ + # Install targets + install( + TARGETS ${EXPORT_TARGETS} diff --git a/vcpkg/ports/vlpp/fix_miss_file.patch b/vcpkg/ports/vlpp/fix_miss_file.patch new file mode 100644 index 0000000..0792d43 --- /dev/null +++ b/vcpkg/ports/vlpp/fix_miss_file.patch @@ -0,0 +1,24 @@ +diff --git a/Import/VlppReflection.h b/Import/VlppReflection.h
+index 4589f99..85c9c01 100644
+--- a/Import/VlppReflection.h
++++ b/Import/VlppReflection.h
+@@ -5,6 +5,7 @@ DEVELOPER: Zihan Chen(vczh)
+ #include "VlppOS.h"
+ #include "Vlpp.h"
+ #include "VlppRegex.h"
++#include <float.h>
+
+ /***********************************************************************
+ .\DESCRIPTABLEOBJECT.H
+diff --git a/Tools/GacGen/CMakeLists.txt b/Tools/GacGen/CMakeLists.txt
+index f809893..5354e75 100644
+--- a/Tools/GacGen/CMakeLists.txt
++++ b/Tools/GacGen/CMakeLists.txt
+@@ -25,7 +25,6 @@ set(SRCS
+ ../../Release/GacUIReflection.cpp
+ GacGen/GacGen.cpp
+ GacGen/Main.cpp
+- GacGen/NativeController.cpp
+ )
+
+ if (WIN32)
diff --git a/vcpkg/ports/vlpp/portfile.cmake b/vcpkg/ports/vlpp/portfile.cmake new file mode 100644 index 0000000..f21b49e --- /dev/null +++ b/vcpkg/ports/vlpp/portfile.cmake @@ -0,0 +1,88 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vczh-libraries/Release + REF "${VERSION}" + SHA512 327f62a03e45f90cdf84a973b097b0e7643848fe771919044c1b83635e74b26439fe96fb413d100b33ce030a013a0cb84b34597ca69de2478a4c773ba9b2ccf2 + HEAD_REF master + PATCHES + fix-tool-build.patch + fix-install.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH LICENSE_PATH + REPO vczh-libraries/License + REF 2173abd38478ba78f7a8f1a062475d04c014eb7a + SHA512 fb8df2380640c3ca14fce1320cdfb47b002eabbe42fa2d1a5356b3c641138d61b8f79f9d4894573d759876d1ab18f822d7fac4e4bce5c14f449acda29aac5e9c + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + reflection REFLECTION + glrparser GLR_PARSER + workflowlibrary WORKFLOW_LIBRARY + workflowruntime WORKFLOW_RUNTIME + workflowcompiler WORKFLOW_COMPILER + gacuicore GACUI_CORE + gacuirecompiler GACUI_COMPILER + gacuireflection GACUI_REFLECTION + tools BUILD_TOOLS +) + +if (BUILD_TOOLS) + vcpkg_from_github( + OUT_SOURCE_PATH GACGEN_SOURCE_PATH + REPO vczh-libraries/GacUI + REF 6547518c5bd775d336e53c583b39095a88e9723c + SHA512 114957408012ed1a03381f9caf6aafb463e8d94a4978b66f694698b5ff1bb86bcaa01c28c0aa75203e15d04126ed003b1fa370cc54f62ae87309c4bb798ede77 + HEAD_REF master + PATCHES + fix_miss_file.patch + ) + vcpkg_from_github( + OUT_SOURCE_PATH CPPMERGE_SOURCE_PATH + REPO vczh-libraries/Workflow + REF 3b1984b0d9e9602757774d259d11bdb43e5e30c4 + SHA512 dcb41d4658d65510d6ffc6015f79eb9d08cf6a7f52fc24b8832bfdc1706ea7d3dcef34bb46b4664b09579b4787bf01406b68a33193c8952a6e13018793ef05e8 + HEAD_REF master + ) + + if (NOT EXISTS "${SOURCE_PATH}/Import/gacgen") + file(RENAME "${GACGEN_SOURCE_PATH}" "${SOURCE_PATH}/Import/gacgen") + endif() + if (NOT EXISTS "${SOURCE_PATH}/Import/workflow") + file(RENAME "${CPPMERGE_SOURCE_PATH}" "${SOURCE_PATH}/Import/workflow") + endif() +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/Import" + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +if (BUILD_TOOLS) + file(GLOB TOOL_GACGEN "${CURRENT_PACKAGES_DIR}/bin/GacGen*${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + get_filename_component(TOOL_GACGEN "${TOOL_GACGEN}" NAME_WLE) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_GACGEN} CppMerge AUTO_CLEAN) + + # Handle scripts + if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW) + set(TOOL_SCRIPT_SUFFIX ".ps1") + else() + set(TOOL_SCRIPT_SUFFIX ".bin") + endif() + file(GLOB TOOL_SCRIPTS "${SOURCE_PATH}/Tools/*${TOOL_SCRIPT_SUFFIX}") + foreach (TOOL_SCRIPT IN LISTS TOOL_SCRIPTS) + file(COPY "${TOOL_SCRIPT}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + endforeach() +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +# Handle copyright +file(INSTALL "${LICENSE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/vlpp/vcpkg.json b/vcpkg/ports/vlpp/vcpkg.json new file mode 100644 index 0000000..7aedde8 --- /dev/null +++ b/vcpkg/ports/vlpp/vcpkg.json @@ -0,0 +1,108 @@ +{ + "name": "vlpp", + "version": "1.2.10.2", + "maintainers": "vczh", + "description": "Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc", + "homepage": "https://github.com/vczh-libraries/Release", + "license": null, + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "gacuicore": { + "description": "Enable GacUI Core", + "dependencies": [ + { + "name": "vlpp", + "features": [ + "glrparser", + "workflowlibrary" + ] + } + ] + }, + "gacuirecompiler": { + "description": "Enable GacUI Compiler", + "dependencies": [ + { + "name": "vlpp", + "features": [ + "gacuireflection", + "workflowcompiler" + ] + } + ] + }, + "gacuireflection": { + "description": "Enable GacUI Reflection", + "dependencies": [ + { + "name": "vlpp", + "features": [ + "gacuicore", + "workflowruntime" + ] + } + ] + }, + "glrparser": { + "description": "Enable GlrParser", + "dependencies": [ + { + "name": "vlpp", + "features": [ + "reflection" + ] + } + ] + }, + "reflection": { + "description": "Enable Reflection" + }, + "tools": { + "description": "Build tools", + "supports": "!osx" + }, + "workflowcompiler": { + "description": "Enable VlppWorkflow Compiler", + "dependencies": [ + { + "name": "vlpp", + "features": [ + "workflowruntime" + ] + } + ] + }, + "workflowlibrary": { + "description": "Enable VlppWorkflow Library", + "dependencies": [ + { + "name": "vlpp", + "features": [ + "reflection" + ] + } + ] + }, + "workflowruntime": { + "description": "Enable VlppWorkflow Runtime", + "dependencies": [ + { + "name": "vlpp", + "features": [ + "workflowlibrary" + ] + } + ] + } + } +} |