diff options
| author | Andre Abrantes <andre.abrantes@sieve.com.br> | 2019-03-13 15:21:25 -0300 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-03-13 11:21:25 -0700 |
| commit | a317e182de238e0771cca2493c3ce29e88342792 (patch) | |
| tree | d8647b763e7a4696a1822e7d67f4ca856040e475 | |
| parent | 842d6169a6aaded4822c7c3c1c8c1e98ce8946e7 (diff) | |
| download | vcpkg-a317e182de238e0771cca2493c3ce29e88342792.tar.gz vcpkg-a317e182de238e0771cca2493c3ce29e88342792.zip | |
[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
| -rw-r--r-- | ports/jsonnet/CONTROL | 2 | ||||
| -rw-r--r-- | ports/jsonnet/portfile.cmake | 19 |
2 files changed, 14 insertions, 7 deletions
diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 3a96ceeb1..99901570d 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-11-01 +Version: 2018-11-01-1 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 6a8e0f5cb..f2d0bbb8f 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -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}) |
