From 59643b9d234fa426af125ba37903ac6a0c9470c4 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jeremy@system76.com> Date: Fri, 11 Jan 2019 18:06:01 -0700 Subject: [PATCH] Add webrender recipe --- recipes/webrender/recipe.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 recipes/webrender/recipe.sh diff --git a/recipes/webrender/recipe.sh b/recipes/webrender/recipe.sh new file mode 100644 index 000000000..fe7571553 --- /dev/null +++ b/recipes/webrender/recipe.sh @@ -0,0 +1,27 @@ +GIT=https://gitlab.redox-os.org/redox-os/webrender.git +GIT_UPSTREAM=https://github.com/servo/webrender.git +BRANCH=redox +BUILD_DEPENDS=(freetype libpng llvm mesa zlib) +CARGOFLAGS="--manifest-path examples/Cargo.toml --bin basic" + +function recipe_build { + sysroot="$(realpath ../sysroot)" + cp -p "$ROOT/Xargo.toml" "Xargo.toml" + set -x + xargo rustc --target "$TARGET" --release ${CARGOFLAGS} \ + -- \ + -L "${sysroot}/lib" \ + -l static=freetype \ + -l static=png \ + -C link-args="$("${PKG_CONFIG}" --libs osmesa) -lglapi -lz -lstdc++ -lc -lgcc" + set +x + skip=1 +} + + +function recipe_stage { + dest="$(realpath $1)" + mkdir -pv "$dest/bin" + cp -v "target/${TARGET}/release/basic" "$dest/bin/webrender" + skip=1 +} -- GitLab