diff --git a/ports/vlpp/CMakeLists.txt b/ports/vlpp/CMakeLists.txt deleted file mode 100644 index 5c254595f4..0000000000 --- a/ports/vlpp/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -cmake_minimum_required(VERSION 3.3.0) - -project(Vlpp VERSION 0.10.0.0 LANGUAGES CXX) - -# Sources -set(SRCS - Import/Vlpp.cpp - Import/VlppWorkflowLibrary.cpp - Import/VlppWorkflowCompiler.cpp - Import/VlppWorkflowRuntime.cpp) - -if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") -endif() - -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) -endif() - -# Create and configure the target -add_library(Vlpp ${SRCS}) - -# target_compile_definitions -target_compile_definitions(Vlpp PRIVATE UNICODE) -target_compile_definitions(Vlpp PRIVATE _UNICODE) - -target_include_directories(Vlpp PRIVATE ${PROJECT_SOURCE_DIR}/Import) - -# Install -install( - TARGETS Vlpp - RUNTIME DESTINATION "bin" - LIBRARY DESTINATION "lib" - ARCHIVE DESTINATION "lib" - ) - -if (NOT DEFINED SKIP_HEADERS) - install( - FILES - Import/Vlpp.h - Import/VlppWorkflowLibrary.h - Import/VlppWorkflowCompiler.h - Import/VlppWorkflowRuntime.h - DESTINATION "include" - ) -endif() diff --git a/ports/vlpp/fix-arm.patch b/ports/vlpp/fix-arm.patch deleted file mode 100644 index 862e94f081..0000000000 --- a/ports/vlpp/fix-arm.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/Import/Vlpp.h -+++ b/Import/Vlpp.h -@@ -50,13 +50,12 @@ - #define abstract - #endif -- -+#include - #if defined VCZH_MSVC - #include - #elif defined VCZH_GCC --#include - #include - #include - #include - #define abstract - #define __thiscall - #define __forceinline inline -@@ -160,14 +159,14 @@ - #define UI64TOA_S _ui64toa_s - #define UI64TOW_S _ui64tow_s - #if defined VCZH_MSVC - #define INCRC(x) (_InterlockedIncrement((volatile long*)(x))) - #define DECRC(x) (_InterlockedDecrement((volatile long*)(x))) - #elif defined VCZH_GCC --#define INCRC(x) (__sync_add_and_fetch(x, 1)) --#define DECRC(x) (__sync_sub_and_fetch(x, 1)) -+#define INCRC(x) (__atomic_add_fetch(x, 1, __ATOMIC_SEQ_CST)) -+#define DECRC(x) (__atomic_sub_fetch(x, 1, __ATOMIC_SEQ_CST)) - #endif - #endif - - /*********************************************************************** - Basic Types - ***********************************************************************/ diff --git a/ports/vlpp/fix-tool-build.patch b/ports/vlpp/fix-tool-build.patch new file mode 100644 index 0000000000..e7bf29357c --- /dev/null +++ b/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/ports/vlpp/portfile.cmake b/ports/vlpp/portfile.cmake index ee1591d872..83f43a7e45 100644 --- a/ports/vlpp/portfile.cmake +++ b/ports/vlpp/portfile.cmake @@ -1,27 +1,84 @@ -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vczh-libraries/Release - REF 5dfe25c4f4997da2d7a23bdc80c2438e72d9813a # 0.11.0.0 - SHA512 5d585e561246385b074c625a3644b79defa22328dab0ab14112c846cb917f384abb617a5f400971ca29e4ee5ac391b88b17ee65d594caf9ebf279806db669a4a + REF 039b6fcb5325af186060d2e6efb466f3d81afcb5 # 1.1.0.0 + SHA512 7c4da7f5686dd3ef8ddd211e440a9b70000fb5558a67fe75d73a3662ff6bd441fb0d2a125d77d9353abf0b5d273546d9fced9fba205a8aa4347a72e15064caf2 HEAD_REF master - PATCHES fix-arm.patch + PATCHES fix-tool-build.patch ) -file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +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 1de25738b534f78f7dce721798ff367099526488 + SHA512 adc104d22f9ce61e82f40875e217ec2cfcc32d3088cf8f32bca16ea99084bb62aaae1601ddea328ce2eb9ddb321db9779352cbccd9437e21e3210e32286feb85 + HEAD_REF master + ) + 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}" + SOURCE_PATH "${SOURCE_PATH}/Import" + OPTIONS ${FEATURE_OPTIONS} ) vcpkg_cmake_install() -vcpkg_copy_pdbs() -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_cmake_config_fixup() -# Tools -file(INSTALL "${SOURCE_PATH}/Tools/CppMerge.exe" DESTINATION "${CURRENT_PACKAGES_DIR}/tools") +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 "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vlpp" RENAME copyright) +file(INSTALL "${LICENSE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/vlpp/vcpkg.json b/ports/vlpp/vcpkg.json index 01662b3009..95ad4ef0fa 100644 --- a/ports/vlpp/vcpkg.json +++ b/ports/vlpp/vcpkg.json @@ -1,14 +1,107 @@ { "name": "vlpp", - "version": "0.11.0.0", - "port-version": 3, + "version": "1.1.0.0", + "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" + }, + "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" + ] + } + ] + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index 4a83e07b52..7a32db9b12 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7761,8 +7761,8 @@ "port-version": 1 }, "vlpp": { - "baseline": "0.11.0.0", - "port-version": 3 + "baseline": "1.1.0.0", + "port-version": 0 }, "volk": { "baseline": "1.3.204", diff --git a/versions/v-/vlpp.json b/versions/v-/vlpp.json index 31ead26bdb..e3e1162101 100644 --- a/versions/v-/vlpp.json +++ b/versions/v-/vlpp.json @@ -1,5 +1,15 @@ { "versions": [ + { + "git-tree": "8df8b965877d7d55e02b0563e1874d6c4fbbd9f2", + "version": "1.1.0.0", + "port-version": 0 + }, + { + "git-tree": "d593e711f4b1ee56e84b9cfe4fab3bcc79fc602e", + "version": "0.11.0.0", + "port-version": 4 + }, { "git-tree": "b4f56db04c13b5bf335e4e5939617596e15e89ac", "version": "0.11.0.0",