From 30eaa01beafe5e7e925e96d76b202ab5f99ead9b Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jeremy@system76.com> Date: Mon, 10 Dec 2018 18:58:33 -0700 Subject: [PATCH] Fix glutin and winit compilation --- recipes/glutin/recipe.sh | 16 +++++++++++++++- recipes/winit/recipe.sh | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/recipes/glutin/recipe.sh b/recipes/glutin/recipe.sh index e8600bd9b..80a4712e6 100644 --- a/recipes/glutin/recipe.sh +++ b/recipes/glutin/recipe.sh @@ -1,4 +1,18 @@ GIT=https://gitlab.redox-os.org/redox-os/glutin.git GIT_UPSTREAM=https://github.com/tomaka/glutin.git -GIT_BRANCH=redox +BUILD_DEPENDS=(mesa) +BRANCH=redox CARGOFLAGS="--example window" + +function recipe_build { + sysroot="$(realpath ../sysroot)" + cp -p "$ROOT/Xargo.toml" "Xargo.toml" + xargo rustc --target "$TARGET" --release ${CARGOFLAGS} \ + -- \ + -L "${sysroot}/lib" \ + -l OSMesa \ + -l glapi \ + -l pthread \ + -l stdc++ + skip=1 +} diff --git a/recipes/winit/recipe.sh b/recipes/winit/recipe.sh index 48808d54d..eaa6196bb 100644 --- a/recipes/winit/recipe.sh +++ b/recipes/winit/recipe.sh @@ -1,4 +1,4 @@ GIT=https://gitlab.redox-os.org/redox-os/winit.git GIT_UPSTREAM=https://github.com/tomaka/winit.git -GIT_BRANCH=redox +BRANCH=redox CARGOFLAGS="--example window" -- GitLab