aboutsummaryrefslogtreecommitdiff
path: root/ports/jsonnet
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2020-02-04 15:50:10 -0800
committerRobert Schumacher <roschuma@microsoft.com>2020-02-04 15:50:10 -0800
commit6f66ad14fe9da11d4bf50f5b25b4da86ed971c53 (patch)
tree0f5dbcd1719cd6a8e486c4058cfefd607d58aa6c /ports/jsonnet
parentd502f061bb3ee0258d6453acbf258b9e5d93d564 (diff)
parentd808514c9df44bb97d6eccff952bfe8ec4e156f7 (diff)
downloadvcpkg-6f66ad14fe9da11d4bf50f5b25b4da86ed971c53.tar.gz
vcpkg-6f66ad14fe9da11d4bf50f5b25b4da86ed971c53.zip
Merge remote-tracking branch 'origin/master' into HEAD
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()