diff options
author | Danny Milosavljevic <dannym@friendly-machines.com> | 2024-12-21 20:01:20 +0100 |
---|---|---|
committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2024-12-21 20:22:52 +0100 |
commit | 63041aacbb3e557dc35a2a4181ddd510acace5ec (patch) | |
tree | 93f7bd10391e68ba40d478aa88adbee8b20985cd /gnu/packages/patches | |
parent | 91af94dc9d628a7b62bce62f8a0da6d3234a91dd (diff) |
gnu: Add c2rust.
* gnu/packages/c2rust.scm (c2rust): New variable.
* gnu/packages/patches/c2rust-ast-exporter-local-search.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add reference to it.
Change-Id: I9a80c6071a48ab5baed0a83e1c2463f83a6c6b9b
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/c2rust-ast-exporter-local-search.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/patches/c2rust-ast-exporter-local-search.patch b/gnu/packages/patches/c2rust-ast-exporter-local-search.patch new file mode 100644 index 0000000000..959321a9f7 --- /dev/null +++ b/gnu/packages/patches/c2rust-ast-exporter-local-search.patch @@ -0,0 +1,24 @@ +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!("CMAKE_TINYCBOR_SOURCE_DIR")) + .define("LLVM_DIR", &format!("{}/cmake/llvm", llvm_lib_dir)) + .define("Clang_DIR", &format!("{}/cmake/clang", llvm_lib_dir)) + // What to build |