8 Commits

Author SHA1 Message Date
41ca417386 Drop unneeded build-dep 2025-11-19 12:34:19 -06:00
6e2482f68c Update changelog for new snapshot 2025-11-19 12:25:16 -06:00
f383836c24 Fix branch name in d/gbp.conf 2025-11-19 12:24:45 -06:00
de58cd8d7c Mangle the rules file, trying to get WASM build 2025-11-19 10:18:15 -06:00
3d9dc77837 Build-Depend on rust-llvm to get default linker
Cargo is trying to use rust-lld by default. Instead of patching the
config file to use "lld", name the dependency in the dependencies list.
2025-11-19 10:14:20 -06:00
f7a49a2760 Revert "Build for WASM32 and use the LLD linker"
This reverts commit 3cabfa46c3.

I don't need to patch the linker, I need to take a dependency on the one
it's trying to use.
2025-11-19 10:13:07 -06:00
3cabfa46c3 Build for WASM32 and use the LLD linker 2025-11-18 14:13:18 -06:00
bb99cc8042 Add build dependency on the LLD linker
Rust defaults to `rust-lld`, which is somehow different from the no-
prefix "lld". I can add a patch to .cargo/config.toml to override the
linker selection.
2025-11-18 14:10:24 -06:00
4 changed files with 38 additions and 15 deletions

13
debian/changelog vendored
View File

@@ -1,6 +1,6 @@
another-boids-in-rust (0.6.0-1~1.gbp57907c) UNRELEASED; urgency=medium another-boids-in-rust (0.6.0-1~2.gbpf38383) UNRELEASED; urgency=medium
** SNAPSHOT build @57907c105ab79d6b10bcb730d9cbcab8e693f150 ** ** SNAPSHOT build @f383836c24993ba70f8560a60565d9d605c834e8 **
* Fix: Missing destination in Docker copy instr. * Fix: Missing destination in Docker copy instr.
* Add a Makefile to make web builds more ergonomic * Add a Makefile to make web builds more ergonomic
@@ -41,8 +41,15 @@ another-boids-in-rust (0.6.0-1~1.gbp57907c) UNRELEASED; urgency=medium
* Pin transitive dep ruzstd=0.8.1 * Pin transitive dep ruzstd=0.8.1
* Lock the new dependencies and vendor them * Lock the new dependencies and vendor them
* Re-diff patch queue * Re-diff patch queue
* Update changelog for 0.6.0-1~1.gbp57907c release
* Add build dependency on the LLD linker
* Build for WASM32 and use the LLD linker
* Revert "Build for WASM32 and use the LLD linker"
* Build-Depend on rust-llvm to get default linker
* Mangle the rules file, trying to get WASM build
* Fix branch name in d/gbp.conf
-- Robert Garrett <robertgarrett404@gmail.com> Tue, 18 Nov 2025 13:32:25 -0600 -- Robert Garrett <robertgarrett404@gmail.com> Wed, 19 Nov 2025 12:25:05 -0600
another-boids-in-rust (0.3.0-1.1) unstable; urgency=medium another-boids-in-rust (0.3.0-1.1) unstable; urgency=medium

1
debian/control vendored
View File

@@ -9,6 +9,7 @@ Build-Depends:
pkg-config, pkg-config,
libasound2-dev, libasound2-dev,
libudev-dev, libudev-dev,
rust-llvm,
Homepage: https://git.gelvin.dev/robert/boids Homepage: https://git.gelvin.dev/robert/boids
Vcs-Git: https://git.gelvin.dev/robert/boids Vcs-Git: https://git.gelvin.dev/robert/boids
Vcs-Browser: https://git.gelvin.dev/robert/boids Vcs-Browser: https://git.gelvin.dev/robert/boids

2
debian/gbp.conf vendored
View File

@@ -2,5 +2,5 @@
compression = xz compression = xz
compression-level = 9 compression-level = 9
upstream-tag = v%(version)s+vendor upstream-tag = v%(version)s+vendor
debian-branch = deb/trixie debian-branch = deb/trixie-web

37
debian/rules vendored
View File

@@ -1,18 +1,27 @@
#!/usr/bin/make -f #!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all DH_VERBOSE = 1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk # export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/rustc/architecture.mk # DPKG_EXPORT_BUILDFLAGS = 1
export DEB_HOST_RUST_TYPE
export PATH:=/usr/share/cargo/bin:$(PATH) # Remove because they're for normal builds, not "cross" builds, or what ever
export CARGO=/usr/share/cargo/bin/cargo # WASM is considered to be. Sort-of a cross-compile, but it isn't self hosting,
# so I'm not sure what to call it.
# include /usr/share/dpkg/default.mk
# include /usr/share/rustc/architecture.mk
# finds package info and puts it in vars like DEB_VERSION_UPSTREAM
include /usr/share/dpkg/pkg-info.mk
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
CARGO=/usr/share/cargo/bin/cargo
export CARGO_HOME=$(CURDIR)/debian/cargo_home export CARGO_HOME=$(CURDIR)/debian/cargo_home
export CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry CARGO_REGISTRY=$(CURDIR)/debian/cargo_registry
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
%: %:
dh $@ --buildsystem=cargo dh $@
execute_after_dh_auto_clean: execute_after_dh_auto_clean:
$(CARGO) clean $(CARGO) clean
@@ -20,8 +29,14 @@ execute_after_dh_auto_clean:
rm -rf $(CARGO_REGISTRY) rm -rf $(CARGO_REGISTRY)
rm -f debian/cargo-checksum.json rm -f debian/cargo-checksum.json
execute_before_dh_auto_configure: override_dh_auto_configure:
$(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system $(CARGO) prepare-debian $(CARGO_REGISTRY) --link-from-system
rm -f Cargo.lock
touch debian/cargo-checksum.json touch debian/cargo-checksum.json
# patch cargo_home config to use lld with wasm, otherwise the build fails
echo "\n[target.wasm32-unknown-unknown]" >> debian/cargo_home/config.toml
cat debian/cargo_home/config.toml | sed "s/linker=[^']\+/linker=rust-lld/" | grep "^rustflags = " >> debian/cargo_home/config.toml
dh_auto_configure
override_dh_auto_test:
# No tests. Can't execute a WASM binary
echo "Skipping tests, can't run WASM files"