mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 23:44:17 +08:00
gears: convert to toml, install to /usr
This commit is contained in:
parent
49c8edd4fe
commit
375dfdced0
@ -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 gears.c source
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
set -x
|
||||
"${CXX}" -O2 -I "$sysroot/include" -L "$sysroot/lib" gears.c -o gears -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 "gears" "$dest/bin/gears"
|
||||
skip=1
|
||||
}
|
||||
16
recipes/demos/gears/recipe.toml
Normal file
16
recipes/demos/gears/recipe.toml
Normal file
@ -0,0 +1,16 @@
|
||||
[build]
|
||||
dependencies=[
|
||||
"liborbital",
|
||||
"llvm18",
|
||||
"mesa",
|
||||
"mesa-glu",
|
||||
"zlib",
|
||||
]
|
||||
template = "custom"
|
||||
script = """
|
||||
set -x
|
||||
"${CXX}" -O2 -I "${COOKBOOK_SYSROOT}/usr/include" -L "${COOKBOOK_SYSROOT}/usr/lib" "${COOKBOOK_RECIPE}/gears.c" -o gears -static -lorbital $("${PKG_CONFIG}" --libs glu) -lz
|
||||
set +x
|
||||
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
|
||||
cp -v "gears" "${COOKBOOK_STAGE}/usr/bin/gears"
|
||||
"""
|
||||
Loading…
Reference in New Issue
Block a user