Skip to content

Commit

Permalink
helix: fix build on clang envs
Browse files Browse the repository at this point in the history
  • Loading branch information
mati865 authored and ognevny committed Dec 9, 2024
1 parent 86b9c8d commit 7a8cad3
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mingw-w64-helix/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ optdepends=("${MINGW_PACKAGE_PREFIX}-rust-analyzer: Rust LSP"
"${MINGW_PACKAGE_PREFIX}-lldb: for lldb-dap")
source=("$url/archive/$pkgver/${_realname}-${pkgver}.tar.gz"
'icon.patch'
'fix-runtime-dir.patch')
'fix-runtime-dir.patch'
'disable-vendoring-and-bump-cc.patch')
noextract=("${_realname}-${pkgver}.tar.gz")
sha256sums=('0f466ed2de039a7eca6faf29fc0db712c92e1a59d0bdc7e8916c717ceee8b3b3'
'f45f0656cb1ceb5c90925c80b093335622f9ad3f64d4e2c8a3a0ea0ab43d900e'
'f071538f25e12ca0898c61daa3a2fbf9416a5be4f014682942dcf34dfb0f1335')
'f071538f25e12ca0898c61daa3a2fbf9416a5be4f014682942dcf34dfb0f1335'
'6a0a2ee91f7a81959a732561ff5899e113e29ca3085121fda1c559d815a4616b')

prepare() {
tar xf "${_realname}-${pkgver}.tar.gz" \
Expand Down Expand Up @@ -53,6 +55,11 @@ END

patch -Np1 -i ../icon.patch
patch -Np1 -i ../fix-runtime-dir.patch

# pull in https://github.com/rust-lang/cc-rs/pull/1176
if [[ "${MSYSTEM}" == *"CLANG"* ]]; then
patch -Np1 -i ../disable-vendoring-and-bump-cc.patch
fi
}

build() {
Expand Down
44 changes: 44 additions & 0 deletions mingw-w64-helix/disable-vendoring-and-bump-cc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff -ruN helix-24.07.orig/.cargo/config.toml helix-24.07/.cargo/config.toml
--- helix-24.07.orig/.cargo/config.toml 2024-12-08 18:03:22.524729200 +0100
+++ helix-24.07/.cargo/config.toml 2024-12-08 18:17:52.970280500 +0100
@@ -14,9 +14,3 @@
[alias]
xtask = "run --package xtask --"
integration-test = "test --features integration --profile integration --workspace --test integration"
-
-[source.crates-io]
-replace-with = "vendored-sources"
-
-[source.vendored-sources]
-directory = "vendor"
diff -ruN helix-24.07.orig/Cargo.lock helix-24.07/Cargo.lock
--- helix-24.07.orig/Cargo.lock 2024-12-08 18:03:29.415843800 +0100
+++ helix-24.07/Cargo.lock 2024-12-08 18:17:06.038135300 +0100
@@ -136,9 +136,12 @@

[[package]]
name = "cc"
-version = "1.0.106"
+version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "066fce287b1d4eafef758e89e09d724a24808a9196fe9756b8ca90e86d0719a2"
+checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d"
+dependencies = [
+ "shlex",
+]

[[package]]
name = "cfg-if"
@@ -2181,6 +2184,12 @@
checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"

[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
name = "signal-hook"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"

0 comments on commit 7a8cad3

Please sign in to comment.