mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-21 04:14:17 +08:00
Add glium, fix recipes
This commit is contained in:
parent
16e482c5af
commit
ef52e78ecc
24
recipes/glium/recipe.sh
Normal file
24
recipes/glium/recipe.sh
Normal file
@ -0,0 +1,24 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/glium.git
|
||||
GIT_UPSTREAM=https://github.com/glium/glium.git
|
||||
BUILD_DEPENDS=(llvm mesa zlib)
|
||||
BRANCH=redox
|
||||
CARGOFLAGS="--example teapot"
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
cp -p "$ROOT/Xargo.toml" "Xargo.toml"
|
||||
set -x
|
||||
xargo rustc --target "$TARGET" --release ${CARGOFLAGS} \
|
||||
-- \
|
||||
-L "${sysroot}/lib" \
|
||||
-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/examples/teapot" "$dest/bin/glium"
|
||||
skip=1
|
||||
}
|
||||
@ -1,20 +1,18 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/glutin.git
|
||||
GIT_UPSTREAM=https://github.com/tomaka/glutin.git
|
||||
BUILD_DEPENDS=(mesa zlib)
|
||||
BUILD_DEPENDS=(llvm mesa zlib)
|
||||
BRANCH=redox
|
||||
CARGOFLAGS="--example window"
|
||||
|
||||
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 OSMesa \
|
||||
-l glapi \
|
||||
-l z \
|
||||
-l stdc++ \
|
||||
-C link-args="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
||||
-C link-args="$("${PKG_CONFIG}" --libs osmesa) -lglapi -lz -lstdc++ -lc -lgcc"
|
||||
set +x
|
||||
skip=1
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/hematite.git
|
||||
GIT_UPSTREAM=https://github.com/PistonDevelopers/hematite.git
|
||||
BUILD_DEPENDS=(mesa llvm zlib)
|
||||
BUILD_DEPENDS=(llvm mesa zlib)
|
||||
BRANCH=redox
|
||||
|
||||
function recipe_build {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
VERSION=2.13.01
|
||||
VERSION=2.14.02
|
||||
TAR=http://www.nasm.us/pub/nasm/releasebuilds/$VERSION/nasm-$VERSION.tar.gz
|
||||
|
||||
function recipe_version {
|
||||
@ -29,8 +29,7 @@ function recipe_clean {
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
make INSTALLROOT="$dest" install
|
||||
rm -rf "$dest"/share
|
||||
make install DESTDIR="$dest"
|
||||
find "$dest"/bin -exec ${HOST}-strip {} ';' 2> /dev/null
|
||||
skip=1
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
BUILD_DEPENDS=(liborbital mesa mesa_glu zlib)
|
||||
BUILD_DEPENDS=(liborbital llvm mesa mesa_glu zlib)
|
||||
|
||||
function recipe_version {
|
||||
printf "1.0.0"
|
||||
@ -19,7 +19,7 @@ function recipe_prepare {
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
set -x
|
||||
"${CXX}" -I "$sysroot/include" -L "$sysroot/lib" osdemo.c -o osdemo -lorbital -lOSMesa -lGLU -lglapi -lz -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lm
|
||||
"${CXX}" -O2 -I "$sysroot/include" -L "$sysroot/lib" osdemo.c -o osdemo -lorbital $("${PKG_CONFIG}" --libs glu) -lglapi -lz
|
||||
set +x
|
||||
skip=1
|
||||
}
|
||||
|
||||
@ -13,7 +13,11 @@ function recipe_update {
|
||||
|
||||
function recipe_build {
|
||||
sysroot="$(realpath ../sysroot)"
|
||||
./configure --host=${HOST} --prefix=/
|
||||
./configure \
|
||||
--host=${HOST} \
|
||||
--prefix=/ \
|
||||
--disable-shared \
|
||||
--enable-static
|
||||
make -j"$(nproc)"
|
||||
skip=1
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user