From ee2d5454788352933338aa62ebd1f8db8e63d347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Tue, 3 Oct 2017 13:52:06 +0200 Subject: [PATCH] smpeg2: enable gles for armv[5-6]* --- srcpkgs/smpeg2/template | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/srcpkgs/smpeg2/template b/srcpkgs/smpeg2/template index 85cd08c9bb..763d0137ca 100644 --- a/srcpkgs/smpeg2/template +++ b/srcpkgs/smpeg2/template @@ -1,7 +1,7 @@ # Template file for 'smpeg2' pkgname=smpeg2 version=2.0.0 -revision=2 +revision=3 build_style=gnu-configure makedepends="SDL2-devel" short_desc="SDL2 MPEG Player Library" @@ -11,6 +11,27 @@ maintainer="rogi " distfiles="https://www.libsdl.org/projects/smpeg/release/smpeg2-${version}.tar.gz" checksum=979a65b211744a44fa641a9b6e4d64e64a12ff703ae776bafe3c4c4cd85494b3 +# 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 + smpeg2-devel_package() { depends="${makedepends} ${sourcepkg}>=${version}_${revision}" short_desc+=" - development files"