From 58ed58a0874ce7d700317c5e261328a15c80646d0899d58d730675b5bafbdb9c Mon Sep 17 00:00:00 2001 From: sisungo Date: Mon, 16 Nov 2026 11:24:07 +0000 Subject: [PATCH 1/2] feat: add package mold Signed-off-by: sisungo --- packages/mold/pkgbuild.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/mold/pkgbuild.py diff --git a/packages/mold/pkgbuild.py b/packages/mold/pkgbuild.py new file mode 100644 index 0000000..41d42a7 --- /dev/null +++ b/packages/mold/pkgbuild.py @@ -0,0 +1,22 @@ +from lib import rust +from lib.make import * + + +version("3.0.0") +description("A Modern Linker in Rust") +maintainer("sisungo ") +source_managed("github://rui314/mold#v3.0.0", "rust") + +builddep("shortcut/rust") + + +def build(): + rust.build() + +on_build(build) + + +package("mold") +dep("semi-libc @same-arch") +dep("libunwind @same-arch") +rust.use_auto_pack(["bin"]) From 79a6853b835edae90ecb926d587b89f93cc0167e192f6994394a872627c52981 Mon Sep 17 00:00:00 2001 From: sisungo Date: Thu, 3 Dec 2026 14:46:03 +0000 Subject: [PATCH 2/2] fix: rust auto-pack incorrectly inserts dylib Signed-off-by: sisungo --- lib/rust.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rust.py b/lib/rust.py index 6a566fb..cb63a57 100644 --- a/lib/rust.py +++ b/lib/rust.py @@ -45,7 +45,9 @@ def _autopack_filter_lib(ent) -> bool: def _autopack_filter_bin(ent) -> bool: - return os.access(ent.path, os.X_OK) and ent.is_file(follow_symlinks=False) + is_executable_file = os.access(ent.path, os.X_OK) and ent.is_file(follow_symlinks=False) + is_not_dylib = not (ent.path.endswith(".so") or ent.path.endswith(".dll") or ent.path.endswith(".dylib")) + return is_executable_file and is_not_dylib def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):