gears: convert to toml, install to /usr

This commit is contained in:
Jeremy Soller 2025-02-28 18:46:43 -07:00
parent 49c8edd4fe
commit 375dfdced0
No known key found for this signature in database
GPG Key ID: 670FDFB5428E05CA
2 changed files with 16 additions and 32 deletions

View File

@ -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
}

View 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"
"""