From ef9ca11bdcb5623c2043392cc374b7e64f2fc946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 3 Oct 2017 13:45:20 +0200 Subject: [PATCH] SDL2_image: enable gles for armv[5-6]* --- srcpkgs/SDL2_image/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/srcpkgs/SDL2_image/template b/srcpkgs/SDL2_image/template index 2600c034e8f..b88cf876516 100644 --- a/srcpkgs/SDL2_image/template +++ b/srcpkgs/SDL2_image/template @@ -14,6 +14,27 @@ homepage="http://www.libsdl.org/projects/SDL_image/" distfiles="http://www.libsdl.org/projects/SDL_image/release/$pkgname-$version.tar.gz" checksum=3a3eafbceea5125c04be585373bfd8b3a18f259bd7eae3efc4e6d8e60e0d7f64 +# 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 + post_install() { vlicense COPYING.txt COPYING }