From 260fd6bdc8cb86177ea6c6e2a380eab465850641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 3 Oct 2017 13:57:43 +0200 Subject: [PATCH] rocksndiamonds: enable gles for armv[5-6]* --- srcpkgs/rocksndiamonds/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/srcpkgs/rocksndiamonds/template b/srcpkgs/rocksndiamonds/template index dd260480334..e595f6cbde6 100644 --- a/srcpkgs/rocksndiamonds/template +++ b/srcpkgs/rocksndiamonds/template @@ -12,6 +12,27 @@ homepage="http://www.artsoft.org/rocksndiamonds" distfiles="http://www.artsoft.org/RELEASES/unix/${pkgname}/${pkgname}-${version}.tar.gz" checksum=c91a0151ff415b87561409bffca3682020a1aaccfd7c44b8f20120179b9821ea +# Package build options +build_options="gles" + +case "$XBPS_TARGET_MACHINE" in + arm*) + # Enable OpenGL/ES on rpi platforms + build_options_default="gles" + ;; +esac + + +if [ "$build_option_gles" ]; then + case "$XBPS_TARGET_MACHINE" in + armv[67]*) + # RaspberryPi, use Videocore IV + makedepends+=" rpi-userland-devel" + LDFLAGS="-L${XBPS_CROSS_BASE}/opt/vc/lib -lbcm_host" + ;; + esac +fi + do_build() { CFLAGS+=" -DTARGET_SDL2" CFLAGS+=" -DRO_GAME_DIR='\"/usr/share/${pkgname}\"'"