aboutsummaryrefslogtreecommitdiff
path: root/ports/jsonnet
diff options
context:
space:
mode:
authorMikhaylov Anton <anion155@gmail.com>2020-02-04 13:40:15 +0500
committerMikhaylov Anton <anion155@gmail.com>2020-02-04 13:40:15 +0500
commitd56ed7ee7613e969a3f304b3377438cc5a9064d4 (patch)
treed352eee837443f070bbf5d6c5fdd9a6f22f4f8c2 /ports/jsonnet
parentab5b74c797f5a2bd6b28915908355e2b32876dfa (diff)
parent85bf9d9d792e379e973d66c8af9f39d65d1d6d42 (diff)
downloadvcpkg-d56ed7ee7613e969a3f304b3377438cc5a9064d4.tar.gz
vcpkg-d56ed7ee7613e969a3f304b3377438cc5a9064d4.zip
Merge branch 'master' into patch-1
Diffstat (limited to 'ports/jsonnet')
-rw-r--r--ports/jsonnet/0003-use-upstream-nlohmann-json.patch13
-rw-r--r--ports/jsonnet/002-fix-dependency-and-install.patch2
-rw-r--r--ports/jsonnet/CONTROL3
-rw-r--r--ports/jsonnet/portfile.cmake6
4 files changed, 20 insertions, 4 deletions
diff --git a/ports/jsonnet/0003-use-upstream-nlohmann-json.patch b/ports/jsonnet/0003-use-upstream-nlohmann-json.patch
new file mode 100644
index 000000000..a2e1105b7
--- /dev/null
+++ b/ports/jsonnet/0003-use-upstream-nlohmann-json.patch
@@ -0,0 +1,13 @@
+diff --git a/core/vm.cpp b/core/vm.cpp
+index 0cf06fa..d65a6d7 100644
+--- a/core/vm.cpp
++++ b/core/vm.cpp
+@@ -23,7 +23,7 @@ limitations under the License.
+
+ #include "desugarer.h"
+ #include "json.h"
+-#include "json.hpp"
++#include "nlohmann/json.hpp"
+ #include "md5.h"
+ #include "parser.h"
+ #include "state.h"
diff --git a/ports/jsonnet/002-fix-dependency-and-install.patch b/ports/jsonnet/002-fix-dependency-and-install.patch
index cccdc9439..7c7b5da77 100644
--- a/ports/jsonnet/002-fix-dependency-and-install.patch
+++ b/ports/jsonnet/002-fix-dependency-and-install.patch
@@ -24,7 +24,7 @@ index 82fb7c2..a94b4ff 100644
endif()
+
+
-+install(FILES ${LIBJSONNET_HEADERS} DESTINATION include)
++install(FILES ${LIB_HEADER} DESTINATION include)
\ No newline at end of file
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index bf349df..6ed1442 100644
diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL
index 2f6e669ef..78542024c 100644
--- a/ports/jsonnet/CONTROL
+++ b/ports/jsonnet/CONTROL
@@ -1,4 +1,5 @@
Source: jsonnet
-Version: 0.14.0
+Version: 0.14.0-1
Homepage: https://github.com/google/jsonnet
Description: Jsonnet - The data templating language
+Build-Depends: nlohmann-json
diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake
index 2840f513f..6b4a30a11 100644
--- a/ports/jsonnet/portfile.cmake
+++ b/ports/jsonnet/portfile.cmake
@@ -11,9 +11,10 @@ vcpkg_from_github(
PATCHES
001-enable-msvc.patch
002-fix-dependency-and-install.patch
+ 0003-use-upstream-nlohmann-json.patch
)
-if (VCPKG_TARGET_IS_WINDOWS)
+if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_execute_required_process(
COMMAND Powershell -Command "((Get-Content -AsByteStream \"${SOURCE_PATH}/stdlib/std.jsonnet\") -join ',') + ',0' | Out-File -Encoding Ascii \"${SOURCE_PATH}/core/std.jsonnet.h\""
WORKING_DIRECTORY "${SOURCE_PATH}"
@@ -27,7 +28,7 @@ else()
)
endif()
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(BUILD_SHARED ON)
set(BUILD_STATIC OFF)
else()
@@ -44,6 +45,7 @@ vcpkg_configure_cmake(
-DBUILD_JSONNET=OFF
-DBUILD_JSONNETFMT=OFF
-DBUILD_TESTS=OFF
+ -DUSE_SYSTEM_JSON=ON
)
vcpkg_install_cmake()