guix/gnu/packages/patches/c2rust-ast-exporter-local-search.patch
Danny Milosavljevic ce2d003da4
gnu: c2rust: Clean up environment variable names.
* gnu/packages/c2rust.scm (rust-c2rust-ast-exporter-0.18)[arguments]
<#:phases>[bundle-tinycbor]: Define GUIX_TINYCBOR_SOURCE_DIR.
(c2rust)[arguments]<#:phases>[patch]: Define GUIX_TINYCBOR_SOURCE_DIR.
* gnu/packages/patches/c2rust-ast-exporter-local-search.patch: Use
GUIX_TINYCBOR_SOURCE_DIR.

Change-Id: I2794016aaa56e5358a8153faf0e46ffb22d6b293
2024-12-21 20:22:52 +01:00

24 lines
1.4 KiB
Diff

diff -ru orig/c2rust-ast-exporter-0.18.0/src/CMakeLists.txt c2rust-ast-exporter-0.18.0/src/CMakeLists.txt
--- orig/c2rust-ast-exporter-0.18.0/src/CMakeLists.txt 2006-07-24 03:21:28.000000000 +0200
+++ c2rust-ast-exporter-0.18.0/src/CMakeLists.txt 2024-12-21 12:06:27.056455735 +0100
@@ -24,8 +24,7 @@
ExternalProject_Add(tinycbor_build
PREFIX ${TINYCBOR_PREFIX}
INSTALL_DIR ${CMAKE_BINARY_DIR}
- GIT_REPOSITORY ${TINYCBOR_REPO}
- GIT_TAG ${TINYCBOR_TAG}
+ SOURCE_DIR ${TINYCBOR_SOURCE_DIR}
# the fd redirection here fails when the build run inside Cargo.
# patch from upstream:
# https://github.com/intel/tinycbor/commit/6176e0a28d7c5ef3a5e9cbd02521999c412de72c
diff -ru orig/c2rust-ast-exporter-0.18.0/build.rs c2rust-ast-exporter-0.18.0/build.rs
--- orig/c2rust-ast-exporter-0.18.0/build.rs 2024-12-21 19:37:50.004786236 +0100
+++ c2rust-ast-exporter-0.18.0/build.rs 2024-12-21 19:39:20.188478196 +0100
@@ -127,6 +127,7 @@
// Build libclangAstExporter.a with cmake
let dst = Config::new("src")
// Where to find LLVM/Clang CMake files
+ .define("TINYCBOR_SOURCE_DIR", &env!("GUIX_TINYCBOR_SOURCE_DIR"))
.define("LLVM_DIR", &format!("{}/cmake/llvm", llvm_lib_dir))
.define("Clang_DIR", &format!("{}/cmake/clang", llvm_lib_dir))
// What to build