mirror of
https://github.com/gopher64/gopher64.git
synced 2026-04-25 15:06:00 +03:00
[PR #608] [CLOSED] cargo: add features to choose origin of SDL3 #641
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gopher64#641
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/gopher64/gopher64/pull/608
Author: @PaulGrandperrin
Created: 11/4/2025
Status: ❌ Closed
Base:
main← Head:feature-sdl-origin📝 Commits (1)
adfee2fcargo: add features to choose origin of SDL3📊 Changes
3 files changed (+13 additions, -3 deletions)
View changed files
📝
Cargo.lock(+2 -0)📝
Cargo.toml(+7 -2)📝
build.rs(+4 -1)📄 Description
Hi!
gopher64 is packaged on NixOS but outdated (1.0.17) so I wanted to update it (and automate the process) but it is not as straightforward as it could be .
Like probably all linux distros, packaging vendored dependencies is forbidden or at least very heavily discouraged, which means packagers have to maintains software patches to force the use of system libs.
It is usually easy, but with rust/cargo, it means changes in the
Cargo.lock(in addition toCargo.toml) and since this lock file can changes heavily at each cargo update, it means the patch we need to maintain breaks all the time and needs to be recreated from scratch, which is annoying and can't be automated easily.https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/go/gopher64/use-sdl3-via-pkg-config.patch
That's the reason why I'm suggesting you this PR to allow building gopher64 with SDL3 from the system, without using patches :)
I added two cargo features, one for SDL from source, and the other for taking it from pkg-config. The first one is enabled by default so the project works exactly as before by default.
If someone wants to use the system's SDL, they can run
cargo build --no-default-features --features sdl-use-pkg-config.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.