mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:28:00 +08:00
[fix][jsonnet] Replicating generation command in Linux format (#5652)
* Replicating generation command in Linux format Current port only support Windows. Replicating the commands that generate "std.jsonnet.h" for a Linux build. New command is closer to the original at https://github.com/google/jsonnet/blob/master/Makefile#L162 * [jsonnet] bump control version to force rebuild on update
This commit is contained in:
parent
842d6169a6
commit
a317e182de
@ -1,3 +1,3 @@
|
||||
Source: jsonnet
|
||||
Version: 2018-11-01
|
||||
Version: 2018-11-01-1
|
||||
Description: Jsonnet - The data templating language
|
||||
|
@ -8,12 +8,19 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND Powershell -Command "((Get-Content -Encoding Byte ${SOURCE_PATH}/stdlib/std.jsonnet) -join ',') + ',0' > ${SOURCE_PATH}/core/std.jsonnet.h"
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME "std.jsonnet"
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND Powershell -Command "((Get-Content -Encoding Byte ${SOURCE_PATH}/stdlib/std.jsonnet) -join ',') + ',0' > ${SOURCE_PATH}/core/std.jsonnet.h"
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME "std.jsonnet"
|
||||
)
|
||||
else()
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND bash -c "((od -v -Anone -t u1 ${SOURCE_PATH}/stdlib/std.jsonnet | tr ' ' '\\n' | grep -v '^$' | tr '\\n' ',' ) && echo '0') > ${SOURCE_PATH}/core/std.jsonnet.h"
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME "std.jsonnet"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user