forge
Explore
Log in

Don't you dare go Hollow

CI: Inline freebsd patches and update to pw 0.10.1

Browse files at this commit

8df918d2baceab042ccbb3cb42aab197d0968718Ivan MolodetskikhParent: d18b201
.github/workflows/ci.ymlmodified+31 -5
@@ -268,15 +268,41 @@ jobs:
268 pkg update -f268 pkg update -f
269 pkg install -y ${{ env.DEPS_PKG }}269 pkg install -y ${{ env.DEPS_PKG }}
270 run: |270 run: |
271- wcurl 'https://raw.githubusercontent.com/freebsd/freebsd-ports/268f8513e0b5f26e87b296f861059048196cbf8f/audio/songrec/files/patch-cargo-crates_pipewire-sys-0.10.0_build.rs'
272- wcurl 'https://raw.githubusercontent.com/freebsd/freebsd-ports/268f8513e0b5f26e87b296f861059048196cbf8f/audio/songrec/files/patch-cargo-crates_pipewire-sys-0.10.0_src_lib.rs'
273- wcurl 'https://raw.githubusercontent.com/freebsd/freebsd-ports/bc722672141332346c78fd4eed7cab079b4165cc/x11-wm/niri/files/patch-libdisplay-info-0.3'
274-
275 export CARGO_HOME="$PWD/cargo-home"271 export CARGO_HOME="$PWD/cargo-home"
276 272
277 cargo fetch273 cargo fetch
278 274
279- ( cd $CARGO_HOME/registry/src/index.crates.io-*/; patch -p1 < $CARGO_HOME/../patch-cargo-crates_pipewire-sys-0.10.0_build.rs; patch -p1 < $CARGO_HOME/../patch-cargo-crates_pipewire-sys-0.10.0_src_lib.rs; patch -p1 < $CARGO_HOME/../patch-libdisplay-info-0.3; )275+ (
276+ cd $CARGO_HOME/registry/src/index.crates.io-*/
277+ patch -p0 <<'PATCH'
278+ --- pipewire-sys-0.10.1/build.rs
279+ +++ pipewire-sys-0.10.1/build.rs
280+ @@ -23,6 +23,8 @@
281+ .parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
282+ .size_t_is_usize(true)
283+ .allowlist_function("pw_.*")
284+ + .allowlist_function("pipewire_init")
285+ + .allowlist_function("pipewire_deinit")
286+ .allowlist_type("pw_.*")
287+ .allowlist_var("pw_.*")
288+ .allowlist_var("PW_.*")
289+ --- pipewire-sys-0.10.1/src/lib.rs
290+ +++ pipewire-sys-0.10.1/src/lib.rs
291+ @@ -13,0 +14,7 @@
292+ +
293+ +// On FreeBSD, pw_init and pw_deinit are macros aliasing pipewire_init/pipewire_deinit,
294+ +// so bindgen generates the underlying symbol names. Re-export them under the expected names.
295+ +#[cfg(target_os = "freebsd")]
296+ +pub use bindings::pipewire_init as pw_init;
297+ +#[cfg(target_os = "freebsd")]
298+ +pub use bindings::pipewire_deinit as pw_deinit;
299+ --- libdisplay-info-sys-0.3.0/Cargo.toml
300+ +++ libdisplay-info-sys-0.3.0/Cargo.toml
301+ @@ -45 +45 @@
302+ -version = ">= 0.1.0, < 0.4.0"
303+ +version = ">= 0.1.0"
304+ PATCH
305+ )
280 306
281 cargo build \307 cargo build \
282 --offline \308 --offline \