Accepting request 992542 from home:MSirringhaus:branches:utilities
With rust1.62, we got the ability to compile WASM-files. So we can now compile the plugins from source too, and not use the pre-built binaries. OBS-URL: https://build.opensuse.org/request/show/992542 OBS-URL: https://build.opensuse.org/package/show/utilities/zellij?expand=0&rev=7
This commit is contained in:
parent
d007fe7850
commit
ecda691393
19
zellij.spec
19
zellij.spec
@ -27,8 +27,8 @@ Source0: https://github.com/zellij-org/zellij/archive/refs/tags/v%{versio
|
||||
Source1: vendor.tar.gz
|
||||
Source2: cargo_config
|
||||
Source3: README.suse-maint.md
|
||||
BuildRequires: rust+cargo >= 1.62
|
||||
BuildRequires: cargo-packaging
|
||||
BuildRequires: rust >= 1.60
|
||||
ExclusiveArch: %{rust_tier1_arches}
|
||||
%if %{with test}
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
@ -46,8 +46,25 @@ language that compiles to WebAssembly.
|
||||
%autosetup -a1
|
||||
mkdir -p .cargo
|
||||
cp %{SOURCE2} .cargo/config
|
||||
# Remove prebuilt binaries
|
||||
rm assets/plugins/*
|
||||
|
||||
%build
|
||||
# First rebuilt plugins we just deleted
|
||||
# Note: RUSTFLAGS break linking with WASM-files, so we don't use the cargo_build-macro here
|
||||
pushd default-plugins/status-bar
|
||||
cargo --offline build --release --target=wasm32-wasi
|
||||
popd
|
||||
pushd default-plugins/tab-bar
|
||||
cargo --offline build --release --target=wasm32-wasi
|
||||
popd
|
||||
pushd default-plugins/strider
|
||||
cargo --offline build --release --target=wasm32-wasi
|
||||
popd
|
||||
# Move the results to the place they are expected
|
||||
mv target/wasm32-wasi/release/*.wasm assets/plugins/
|
||||
|
||||
# Build zellij proper
|
||||
%{cargo_build} --all-features
|
||||
|
||||
%install
|
||||
|
Loading…
x
Reference in New Issue
Block a user