wabt: 1.0.12 -> 1.0.13

https://github.com/WebAssembly/wabt/releases/tag/1.0.13
This commit is contained in:
Maximilian Bosch 2020-01-17 23:15:16 +01:00
parent 281e3a3c23
commit ac65998957
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
2 changed files with 42 additions and 6 deletions

View File

@ -1,16 +1,24 @@
{ stdenv, fetchFromGitHub, cmake, python3 }:
{ stdenv, fetchFromGitHub, cmake, python3, substituteAll }:
stdenv.mkDerivation rec {
pname = "wabt";
version = "1.0.12";
version = "1.0.13";
src = fetchFromGitHub {
owner = "WebAssembly";
repo = "wabt";
rev = version;
sha256 = "1zlv3740wkqj4mn6sr84h0x6wk2lcp4pwwmqsh5yyqp1j1glbsa0";
owner = "WebAssembly";
repo = "wabt";
rev = version;
sha256 = "07x8m5sf4c7zjq1flypycw1d15ylqdp38l81vn961ds089ngvpgg";
fetchSubmodules = true;
};
patches = [
(substituteAll {
src = ./version.patch;
inherit version;
})
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_TESTS=OFF" ];
buildInputs = [ python3 ];

View File

@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 363a5660..ad3300ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,22 +68,7 @@ endif ()
include(CheckTypeSize)
check_type_size(ssize_t SSIZE_T)
check_type_size(size_t SIZEOF_SIZE_T)
-
-FIND_PACKAGE(Git QUIET REQUIRED)
-EXECUTE_PROCESS(COMMAND
- "${GIT_EXECUTABLE}" --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git describe --tags
- RESULT_VARIABLE
- GIT_HASH_RESULT
- OUTPUT_VARIABLE
- GIT_HASH
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-IF(${GIT_HASH_RESULT} EQUAL 0)
- SET(WABT_VERSION_INFO "${GIT_HASH}")
-ELSE()
- MESSAGE(WARNING "Error running git describe to determine version")
- SET(WABT_VERSION_INFO "(unable to determine version)")
-ENDIF()
+SET(WABT_VERSION_INFO "@version@")
configure_file(
${WABT_SOURCE_DIR}/src/config.h.in