mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-22 21:04:18 +08:00
Merge branch 'migrate_to_recipe_toml' into 'master'
Migrate a bunch of recipes to recipe.toml See merge request redox-os/cookbook!514
This commit is contained in:
commit
9d5819d403
@ -1,32 +0,0 @@
|
||||
BUILD_DEPENDS=(liborbital llvm18 mesa mesa-glu zlib)
|
||||
|
||||
function recipe_version {
|
||||
printf "1.0.0"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_prepare {
|
||||
rm -rf source
|
||||
mkdir source
|
||||
cp osdemo.c source
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
set -x
|
||||
"${CXX}" -O2 -I "$sysroot/include" -L "$sysroot/lib" osdemo.c -o osdemo -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
set +x
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
"$REDOX_MAKE" clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
mkdir -pv "$dest/bin"
|
||||
cp -v "osdemo" "$dest/bin/osdemo"
|
||||
skip=1
|
||||
}
|
||||
15
recipes/demos/osdemo/recipe.toml
Normal file
15
recipes/demos/osdemo/recipe.toml
Normal file
@ -0,0 +1,15 @@
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"liborbital",
|
||||
"llvm18",
|
||||
"mesa",
|
||||
"mesa-glu",
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
cp "${COOKBOOK_SOURCE}/../osdemo.c" ./osdemo.c
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/include" -L "${COOKBOOK_SYSROOT}/lib" osdemo.c -o osdemo -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
cp -v "osdemo" "${COOKBOOK_STAGE}/usr/bin/osdemo"
|
||||
"""
|
||||
@ -1,38 +0,0 @@
|
||||
BUILD_DEPENDS=(sdl2-image sdl2-mixer sdl2-ttf sdl2 liborbital llvm18 mesa freetype2 libjpeg libpng libogg libvorbis zlib)
|
||||
|
||||
function recipe_version {
|
||||
printf "1.0.0"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_prepare {
|
||||
rm -rf source
|
||||
mkdir source
|
||||
cp gears.c source
|
||||
mkdir source/assets
|
||||
cp assets/* source/assets
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
set -x
|
||||
"${CXX}" -O2 -I "$sysroot/include" -L "$sysroot/lib" gears.c -o sdl2_gears -dynamic -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2 -lorbital $("${PKG_CONFIG}" --libs osmesa) -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz
|
||||
set +x
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
echo "skipping clean"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
mkdir -pv "$dest/usr/games/sdl2_gears"
|
||||
mkdir -pv "$dest/usr/games/sdl2_gears/assets"
|
||||
cp -v "sdl2_gears" "$dest/usr/games/sdl2_gears/sdl2_gears"
|
||||
cp -v "assets/image.png" "$dest/usr/games/sdl2_gears/assets/image.png"
|
||||
cp -v "assets/music.wav" "$dest/usr/games/sdl2_gears/assets/music.wav"
|
||||
cp -v "assets/font.ttf" "$dest/usr/games/sdl2_gears/assets/font.ttf"
|
||||
skip=1
|
||||
}
|
||||
26
recipes/demos/sdl2-gears/recipe.toml
Normal file
26
recipes/demos/sdl2-gears/recipe.toml
Normal file
@ -0,0 +1,26 @@
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"sdl2-image",
|
||||
"sdl2-mixer",
|
||||
"sdl2-ttf",
|
||||
"sdl2",
|
||||
"liborbital",
|
||||
"llvm18",
|
||||
"mesa",
|
||||
"freetype2",
|
||||
"libjpeg",
|
||||
"libpng",
|
||||
"libogg",
|
||||
"libvorbis",
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
cp "${COOKBOOK_SOURCE}/../gears.c" ./gears.c
|
||||
rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/../assets" ./assets
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/include" -L "${COOKBOOK_SYSROOT}/lib" gears.c -o sdl2_gears -dynamic -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2 -lorbital $("${PKG_CONFIG}" --libs osmesa) -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz
|
||||
rm -rf "${COOKBOOK_STAGE}/usr/games/sdl2_gears"
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/games/sdl2_gears"
|
||||
cp -v "sdl2_gears" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/sdl2_gears"
|
||||
cp -rv "assets" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/assets"
|
||||
"""
|
||||
@ -1,29 +0,0 @@
|
||||
VERSION=1.13
|
||||
TAR=https://dev.yorhel.nl/download/ncdu-$VERSION.tar.gz
|
||||
BUILD_DEPENDS=(ncurses)
|
||||
DEPENDS=(terminfo)
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
function recipe_build {
|
||||
sysroot="$PWD/../sysroot"
|
||||
export CPPFLAGS="-I$sysroot/include -I$sysroot/include/ncurses"
|
||||
export LDFLAGS="-L$sysroot/lib -static"
|
||||
./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
|
||||
}
|
||||
22
recipes/tui/ncdu/recipe.toml
Normal file
22
recipes/tui/ncdu/recipe.toml
Normal file
@ -0,0 +1,22 @@
|
||||
[source]
|
||||
tar = "https://dev.yorhel.nl/download/ncdu-1.13.tar.gz"
|
||||
blake3 = "f6d771e78c87202a051e3357820be3c63ea895ff4f07edf14c6f21fb18afceed"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"ncurses",
|
||||
"terminfo"
|
||||
]
|
||||
script = """
|
||||
rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/" ./
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/ncurses"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static"
|
||||
./configure \
|
||||
--build=${BUILD} \
|
||||
--host="${TARGET}" \
|
||||
--prefix=/
|
||||
"${COOKBOOK_MAKE}" -j"$(${NPROC})"
|
||||
|
||||
"${COOKBOOK_MAKE}" DESTDIR="${COOKBOOK_STAGE}" install
|
||||
"""
|
||||
@ -1,27 +0,0 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/sdl-player.git
|
||||
BUILD_DEPENDS=(ffmpeg6 liborbital sdl1 zlib)
|
||||
|
||||
function recipe_version {
|
||||
echo "1.0.0"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
export CPPFLAGS="-I$sysroot/include"
|
||||
export LDFLAGS="-L$sysroot/lib -static"
|
||||
"$REDOX_MAKE" -j"$($NPROC)"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
"$REDOX_MAKE" clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
mkdir -pv "$dest/bin"
|
||||
cp -v "player" "$dest/bin/sdl-player"
|
||||
skip=1
|
||||
}
|
||||
20
recipes/video/sdl-player/recipe.toml
Normal file
20
recipes/video/sdl-player/recipe.toml
Normal file
@ -0,0 +1,20 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/sdl-player.git"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"ffmpeg6",
|
||||
"liborbital",
|
||||
"sdl1",
|
||||
"zlib"
|
||||
]
|
||||
script = """
|
||||
rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/" ./
|
||||
export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include"
|
||||
export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static"
|
||||
"${COOKBOOK_MAKE}" -j"$(${NPROC})"
|
||||
|
||||
mkdir -pv "${COOKBOOK_STAGE}/bin"
|
||||
cp -v "player" "${COOKBOOK_STAGE}/bin/sdl-player"
|
||||
"""
|
||||
Loading…
Reference in New Issue
Block a user