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

Migrate glutin to new recipe format

parent 5df67123
No related branches found
No related tags found
No related merge requests found
GIT=https://gitlab.redox-os.org/redox-os/glutin.git
GIT_UPSTREAM=https://github.com/rust-windowing/glutin.git
BUILD_DEPENDS=(llvm mesa zlib)
BRANCH=redox-0.29
function recipe_build {
sysroot="$(realpath ../sysroot)"
set -x
cargo rustc --target "$TARGET" --release --package glutin_examples --example window \
-- \
-L "${sysroot}/lib" \
-C link-args="-Wl,-Bstatic $("${PKG_CONFIG}" --libs osmesa) -lz -lstdc++ -lc -lgcc"
set +x
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
mkdir -pv "$dest/bin"
cp -v "target/${TARGET}/release/examples/window" "$dest/bin/glutin"
skip=1
}
[source]
git = "https://gitlab.redox-os.org/redox-os/glutin.git"
branch = "redox-0.29"
upstream = "https://github.com/rust-windowing/glutin.git"
[build]
template = "custom"
dependencies = [
"llvm",
"mesa",
"zlib"
]
script = """
EXAMPLES=(
multiwindow
transparent
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
"""
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