Merge branch 'cargo-dynamic-all' into 'master'

Make cargo template dynamically linked

See merge request redox-os/cookbook!692
This commit is contained in:
Jeremy Soller 2025-11-18 07:39:37 -07:00
commit 2423c3d379
22 changed files with 43 additions and 22 deletions

View File

@ -5,6 +5,7 @@ branch = "redox"
[build]
template = "custom"
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
./autogen.sh
./configure \

View File

@ -2,7 +2,16 @@
git = "https://gitlab.redox-os.org/redox-os/extrautils.git"
[build]
template = "cargo"
template = "custom"
dependencies = [
"xz"
]
script = """
DYNAMIC_INIT
if [ "${COOKBOOK_DYNAMIC}" != "1" ]; then
install_flags+=" --features=static"
fi
cookbook_cargo
"""

View File

@ -4,5 +4,6 @@ git = "https://gitlab.redox-os.org/redox-os/findutils.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo --bin find
"""

View File

@ -4,5 +4,6 @@ git = "https://gitlab.redox-os.org/redox-os/ion.git"
[build]
template = "custom"
script = """
# Must be statically linked
cookbook_cargo
"""

View File

@ -2,11 +2,5 @@
git = "https://gitlab.redox-os.org/redox-os/pkgar.git"
[build]
template = "custom"
script = """
"${COOKBOOK_CARGO}" install \
--path "${COOKBOOK_SOURCE}/pkgar" \
--root "${COOKBOOK_STAGE}/usr" \
--locked \
--no-track
"""
template = "cargo"
package_path = "pkgar"

View File

@ -4,6 +4,7 @@ git = "https://gitlab.redox-os.org/redox-os/pkgutils.git"
[build]
template = "custom"
script = """
# Must be statically linked
PACKAGE_PATH=pkg-cli
cookbook_cargo
"""

View File

@ -2,4 +2,8 @@
git = "https://gitlab.redox-os.org/redox-os/profiled.git"
[build]
template = "cargo"
template = "custom"
script = """
# Must be statically linked
cookbook_cargo
"""

View File

@ -2,4 +2,8 @@
git = "https://gitlab.redox-os.org/redox-os/redoxfs.git"
[build]
template = "cargo"
template = "custom"
script = """
# Must be statically linked
cookbook_cargo
"""

View File

@ -4,6 +4,7 @@ git = "https://gitlab.redox-os.org/redox-os/userutils.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo
cp -rv "${COOKBOOK_SOURCE}/res" "${COOKBOOK_STAGE}/etc"
ln -s id "${COOKBOOK_STAGE}/usr/bin/whoami"

View File

@ -5,6 +5,7 @@ git = "https://github.com/uutils/coreutils"
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo --no-default-features --features feat_os_unix_redox --bin coreutils
BINS=(

View File

@ -2,8 +2,5 @@
git = "https://github.com/lukas-kirschner/procedural-wallpapers-rs.git"
[build]
template = "custom"
script = """
COOKBOOK_SOURCE="${COOKBOOK_SOURCE}"/procedural_wallpapers
cookbook_cargo
"""
template = "cargo"
package_path = "procedural_wallpapers"

View File

@ -4,6 +4,7 @@ git = "https://gitlab.redox-os.org/redox-os/installer-gui.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo
mkdir -pv "${COOKBOOK_STAGE}/ui/apps"

View File

@ -4,6 +4,7 @@ git = "https://gitlab.redox-os.org/redox-os/orbterm.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
mkdir -pv "${COOKBOOK_STAGE}/ui"
cp -rv "${COOKBOOK_SOURCE}/apps" "${COOKBOOK_STAGE}/ui/apps"

View File

@ -4,6 +4,7 @@ git = "https://gitlab.redox-os.org/redox-os/orbutils.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
mkdir -pv "${COOKBOOK_STAGE}/ui"
cp -rv "${COOKBOOK_SOURCE}/apps" "${COOKBOOK_STAGE}/ui/apps"

View File

@ -12,6 +12,7 @@ dependencies = [
"zlib"
]
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
GNU_CONFIG_GET config.sub
DYNAMIC_INIT

View File

@ -12,6 +12,7 @@ dependencies = [
"readline",
]
script = """
DYNAMIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
ac_cv_func_wcwidth=no # TODO: add more wc functions and remove this
bash_cv_func_sigsetjmp=no

View File

@ -9,7 +9,7 @@ autoreconf
[build]
template = "custom"
script = """
export LDFLAGS="-static"
DYNAMIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
gt_cv_locale_fr=false
gt_cv_locale_fr_utf8=false

View File

@ -6,12 +6,10 @@ patches = ["grep.patch"]
[build]
template = "custom"
script = """
DYNAMIC_INIT
COOKBOOK_CONFIGURE_FLAGS+=(
--prefix=/
)
cookbook_configure
"${TARGET}-strip" "${COOKBOOK_STAGE}/bin/grep"
rm -rf "${COOKBOOK_STAGE}"/{lib,share}
"""
"""

View File

@ -4,6 +4,8 @@ git = "https://gitlab.redox-os.org/redox-os/periodictable.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo
mkdir -pv "${COOKBOOK_STAGE}/ui/apps"
cp -v "${COOKBOOK_SOURCE}/pkg/manifest" "${COOKBOOK_STAGE}/ui/apps/periodictable"
mkdir -pv "${COOKBOOK_STAGE}/ui/icons"

View File

@ -4,6 +4,7 @@ git = "https://gitlab.redox-os.org/redox-os/sodium.git"
[build]
template = "custom"
script = """
DYNAMIC_INIT
"${COOKBOOK_CARGO}" install \
--path "${COOKBOOK_SOURCE}" \
--root "${COOKBOOK_STAGE}/usr" \

View File

@ -7,6 +7,7 @@ patches = ["vim.patch"]
dependencies = ["ncurses"]
template = "custom"
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
export vim_cv_toupper_broken=no

View File

@ -298,7 +298,7 @@ pub fn build(
cargoflags,
} => {
format!(
"PACKAGE_PATH={} cookbook_cargo {cargoflags}",
"DYNAMIC_INIT\nPACKAGE_PATH={} cookbook_cargo {cargoflags}",
package_path.as_deref().unwrap_or(".")
)
}