mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-30 00:28:44 +08:00
Migrate glutin to new recipe format
This commit is contained in:
parent
5df67123ce
commit
7d31150e21
@ -1,22 +0,0 @@
|
||||
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
|
||||
}
|
||||
32
recipes/glutin/recipe.toml
Normal file
32
recipes/glutin/recipe.toml
Normal file
@ -0,0 +1,32 @@
|
||||
[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
|
||||
"""
|
||||
Loading…
Reference in New Issue
Block a user