]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
depends: native_libtapi: don't include git rev
authortobtoht <tob@featherwallet.org>
Fri, 13 Oct 2023 19:58:26 +0000 (21:58 +0200)
committertobtoht <tob@featherwallet.org>
Fri, 13 Oct 2023 19:58:26 +0000 (21:58 +0200)
contrib/depends/packages/native_libtapi.mk
contrib/depends/patches/native_libtapi/no_embed_git_rev.patch [new file with mode: 0644]

index 9a02320a389c3da9c9a1c88d5f5e660954cc0a9c..e512c16b15d2eefe28eb668e5608bc475a8a33f8 100644 (file)
@@ -3,6 +3,11 @@ $(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026
 $(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive
 $(package)_file_name=$($(package)_version).tar.gz
 $(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61
+$(package)_patches=no_embed_git_rev.patch
+
+define $(package)_preprocess_cmds
+  patch -p1 -i $($(package)_patch_dir)/no_embed_git_rev.patch
+endef
 
 define $(package)_build_cmds
   CC=$(clang_prog) CXX=$(clangxx_prog) INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh
diff --git a/contrib/depends/patches/native_libtapi/no_embed_git_rev.patch b/contrib/depends/patches/native_libtapi/no_embed_git_rev.patch
new file mode 100644 (file)
index 0000000..5c83618
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git a/src/llvm/CMakeLists.txt b/src/llvm/CMakeLists.txt
+index ab92717c8..dff3a292a 100644
+--- a/src/llvm/CMakeLists.txt
++++ b/src/llvm/CMakeLists.txt
+@@ -754,7 +754,6 @@ set(LLVM_SRPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/srpm")
+ # SVN_REVISION and GIT_COMMIT get set by the call to add_version_info_from_vcs.
+ # DUMMY_VAR contains a version string which we don't care about.
+-add_version_info_from_vcs(DUMMY_VAR)
+ if ( SVN_REVISION )
+   set(LLVM_RPM_SPEC_REVISION "r${SVN_REVISION}")
+ elseif ( GIT_COMMIT )
+diff --git a/src/llvm/cmake/modules/GenerateVersionFromCVS.cmake b/src/llvm/cmake/modules/GenerateVersionFromCVS.cmake
+index 6b1c71983..e16326ed6 100644
+--- a/src/llvm/cmake/modules/GenerateVersionFromCVS.cmake
++++ b/src/llvm/cmake/modules/GenerateVersionFromCVS.cmake
+@@ -24,7 +24,7 @@ include(VersionFromVCS)
+ set(ENV{TERM} "dumb")
+ function(append_info name path)
+-  add_version_info_from_vcs(REVISION ${path})
++  set(REVISION "git-0000000")
+   string(STRIP "${REVISION}" REVISION)
+   file(APPEND "${HEADER_FILE}.txt"
+     "#define ${name} \"${REVISION}\"\n")