redox/recipes/examples/glutin/recipe.toml
2023-11-05 12:58:51 +00:00

31 lines
770 B
TOML

[source]
git = "https://gitlab.redox-os.org/redox-os/glutin.git"
branch = "redox-0.30"
upstream = "https://github.com/rust-windowing/glutin.git"
[build]
template = "custom"
dependencies = [
"llvm",
"mesa",
"zlib"
]
script = """
EXAMPLES=(
window
)
for example in "${EXAMPLES[@]}"
do
cargo rustc \
--target "$TARGET" \
--release \
--manifest-path "${COOKBOOK_SOURCE}/glutin_examples/Cargo.toml" \
--example "${example}" \
-- \
-L "${COOKBOK_SYSROOT}/lib" \
-C link-args="-Wl,-Bstatic $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v "target/${TARGET}/release/examples/${example}" "${COOKBOOK_STAGE}/bin/glutin_${example}"
done
"""