Skip to content
Snippets Groups Projects
Verified Commit 60bf37dd authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Convert some recipes to toml

parent 5ee7d682
No related branches found
No related tags found
No related merge requests found
VERSION=2.71
TAR=https://ftp.gnu.org/gnu/autoconf/autoconf-$VERSION.tar.xz
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_build {
wget -O build-aux/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
./configure --build=${BUILD} --host=${HOST} --prefix=''
"$REDOX_MAKE" -j"$($NPROC)"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" install
skip=1
}
[source]
tar = "https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz"
blake3 = "da1cc8af8551c343de9f42af0ae53fd7dff3623487157623892b6cd7e3bb5692"
[build]
template = "configure"
VERSION=1.16.5
TAR=https://ftp.gnu.org/gnu/automake/automake-$VERSION.tar.xz
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_build {
wget -O lib/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false"
sed -i 's|.*/doc/help2man.*|\&\& true|' Makefile.in
sed -i 's|install-info-am install-man|install-info-am|' Makefile.in
./configure --build=${BUILD} --host=${HOST} --prefix=''
"$REDOX_MAKE" -j"$($NPROC)"
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" install
skip=1
}
[source]
tar = "https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz"
blake3 = "f42cfc333aaaa11f2bcb05b5b0273b8706c820c22f9ba4367f7eb920551695cd"
[build]
template = "configure"
GIT=https://github.com/pop-os/cosmic-text.git
BRANCH=main
function recipe_build {
sysroot="$(realpath ../sysroot)"
set -x
cargo build --target "$TARGET" --release --package editor-orbclient --features vi
set +x
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "target/${TARGET}/release/editor-orbclient" "$dest/bin/cosmic-text"
skip=1
}
[source]
git = "https://github.com/pop-os/cosmic-text.git"
branch = "main"
[build]
template = "custom"
script = """
cookbook_cargo_packages editor-orbclient
"""
GIT=https://gitlab.redox-os.org/redox-os/cpal.git
GIT_UPSTREAM=https://github.com/tomaka/cpal.git
BRANCH=redox
CARGOFLAGS="--example beep"
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "target/${TARGET}/release/examples/beep" "$dest/bin/cpal"
skip=1
}
[source]
git = "https://gitlab.redox-os.org/redox-os/cpal.git"
branch = "redox"
upstream = "https://github.com/tomaka/cpal.git"
[build]
template = "custom"
script = """
cookbook_cargo_examples beep
"""
GIT=https://gitlab.redox-os.org/redox-os/orbclient.git
CARGOFLAGS="--example simple"
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "target/${TARGET}/release/examples/simple" "$dest/bin/orbclient"
skip=1
}
[source]
git = "https://gitlab.redox-os.org/redox-os/orbclient.git"
[build]
template = "custom"
script = """
cookbook_cargo_examples simple
"""
...@@ -8,6 +8,7 @@ COOKBOOK_CARGO_FLAGS=( ...@@ -8,6 +8,7 @@ COOKBOOK_CARGO_FLAGS=(
--path "${COOKBOOK_SOURCE}" --path "${COOKBOOK_SOURCE}"
--root "${COOKBOOK_STAGE}/ui" --root "${COOKBOOK_STAGE}/ui"
--locked --locked
--no-track
) )
cookbook_cargo cookbook_cargo
""" """
......
GIT=https://gitlab.redox-os.org/redox-os/winit.git
GIT_UPSTREAM=https://github.com/rust-windowing/winit.git
BRANCH=redox-0.27
CARGOFLAGS="--example window"
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "target/${TARGET}/release/examples/window" "$dest/bin/winit"
skip=1
}
[source]
git = "https://gitlab.redox-os.org/redox-os/winit.git"
branch = "redox-0.27"
upstream = "https://github.com/rust-windowing/winit.git"
[build]
template = "custom"
script = """
cookbook_cargo_examples window
"""
...@@ -471,6 +471,38 @@ function cookbook_cargo { ...@@ -471,6 +471,38 @@ function cookbook_cargo {
"${COOKBOOK_CARGO}" install "${COOKBOOK_CARGO_FLAGS[@]}" "${COOKBOOK_CARGO}" install "${COOKBOOK_CARGO_FLAGS[@]}"
} }
# helper for installing binaries that are cargo examples
function cookbook_cargo_examples {
recipe="$(basename "${COOKBOOK_RECIPE}")"
for example in "$@"
do
"${COOKBOOK_CARGO}" build \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
--example "${example}" \
--release
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v \
"target/${TARGET}/release/examples/${example}" \
"${COOKBOOK_STAGE}/bin/${recipe}_${example}"
done
}
# helper for installing binaries that are cargo packages
function cookbook_cargo_packages {
recipe="$(basename "${COOKBOOK_RECIPE}")"
for package in "$@"
do
"${COOKBOOK_CARGO}" build \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
--package "${package}" \
--release
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v \
"target/${TARGET}/release/${package}" \
"${COOKBOOK_STAGE}/bin/${recipe}_${package}"
done
}
# configure template # configure template
COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure" COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure"
COOKBOOK_CONFIGURE_FLAGS=( COOKBOOK_CONFIGURE_FLAGS=(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment