From 239bf7610183ddc4014db06788ef8365afc65c25 Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Tue, 19 Apr 2022 06:04:15 +0200 Subject: [PATCH] [vlpp] fix to support ARM on unix (#24191) * [vlpp] does not support osx arm * fix ARM, rather than just marking !supports * add license * ughhhh lack of malloc Co-authored-by: nicole mazzuca --- ports/vlpp/fix-arm.patch | 34 ++++++++++++++++++++++++++++++++++ ports/vlpp/portfile.cmake | 1 + ports/vlpp/vcpkg.json | 5 +++-- versions/baseline.json | 2 +- versions/v-/vlpp.json | 5 +++++ 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 ports/vlpp/fix-arm.patch diff --git a/ports/vlpp/fix-arm.patch b/ports/vlpp/fix-arm.patch new file mode 100644 index 0000000000..862e94f081 --- /dev/null +++ b/ports/vlpp/fix-arm.patch @@ -0,0 +1,34 @@ +--- 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/portfile.cmake b/ports/vlpp/portfile.cmake index b7f91d9ee7..ee1591d872 100644 --- a/ports/vlpp/portfile.cmake +++ b/ports/vlpp/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( REF 5dfe25c4f4997da2d7a23bdc80c2438e72d9813a # 0.11.0.0 SHA512 5d585e561246385b074c625a3644b79defa22328dab0ab14112c846cb917f384abb617a5f400971ca29e4ee5ac391b88b17ee65d594caf9ebf279806db669a4a HEAD_REF master + PATCHES fix-arm.patch ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") diff --git a/ports/vlpp/vcpkg.json b/ports/vlpp/vcpkg.json index 3bc64f290e..01662b3009 100644 --- a/ports/vlpp/vcpkg.json +++ b/ports/vlpp/vcpkg.json @@ -1,9 +1,10 @@ { "name": "vlpp", - "version-string": "0.11.0.0", - "port-version": 2, + "version": "0.11.0.0", + "port-version": 3, "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, "dependencies": [ { "name": "vcpkg-cmake", diff --git a/versions/baseline.json b/versions/baseline.json index 5a4765c0d3..82351d0fb3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7366,7 +7366,7 @@ }, "vlpp": { "baseline": "0.11.0.0", - "port-version": 2 + "port-version": 3 }, "volk": { "baseline": "1.3.204", diff --git a/versions/v-/vlpp.json b/versions/v-/vlpp.json index 37a6699ba2..31ead26bdb 100644 --- a/versions/v-/vlpp.json +++ b/versions/v-/vlpp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b4f56db04c13b5bf335e4e5939617596e15e89ac", + "version": "0.11.0.0", + "port-version": 3 + }, { "git-tree": "cfa763a8d53142b93748fde4a578ddbd95431ac2", "version-string": "0.11.0.0",