SDL2: added 'rpi' build option (enabled on arm*).

Enabled by default on arm*; for non rpi devices this
one should be disabled...

This fixes the build of packages that depend on SDL2-devel
and try to use libglvnd.
This commit is contained in:
Juan RP 2020-01-05 19:24:57 +01:00
parent de3d81b090
commit 7e5eb85e99
No known key found for this signature in database
GPG key ID: AF19F6CB482F9368

View file

@ -1,7 +1,7 @@
# Template file for 'SDL2'
pkgname=SDL2
version=2.0.10
revision=1
revision=2
build_style=gnu-configure
configure_args="--enable-alsa --disable-esd --disable-rpath --enable-libudev
--enable-clock_gettime --disable-nas --disable-arts --disable-x11-shared
@ -27,8 +27,8 @@ case "$XBPS_TARGET_MACHINE" in
build_options_default="gles opengl pulseaudio sndio x11"
;;
arm*)
# Enable OpenGL/ES on rpi platforms
build_options_default="gles sndio"
build_options+=" rpi"
build_options_default="rpi pulseaudio sndio x11"
;;
esac
@ -40,23 +40,21 @@ esac
if [ "$build_option_gles" ]; then
configure_args+=" --enable-video-opengles"
case "$XBPS_TARGET_MACHINE" in
armv[67]*)
# RaspberryPi, use Videocore IV
makedepends+=" rpi-userland-devel"
CFLAGS="-I${XBPS_CROSS_BASE}/opt/vc/include -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos/pthreads"
LDFLAGS="-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-rpath=/opt/vc/lib"
;;
*)
# libGLESv2.so.2 is dynamically loaded with dlopen.
shlib_requires="libGLESv2.so.2"
depends="libGLES"
;;
esac
# libGLESv2.so.2 is dynamically loaded with dlopen.
shlib_requires="libGLESv2.so.2"
depends+=" libGLES"
else
configure_args+=" --disable-video-opengles"
fi
if [ "$build_option_rpi" ]; then
# RaspberryPi, use Videocore IV
configure_args+=" --enable-video-opengles"
makedepends+=" rpi-userland-devel"
CFLAGS="-I${XBPS_CROSS_BASE}/opt/vc/include -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos/pthreads"
LDFLAGS="-L${XBPS_CROSS_BASE}/opt/vc/lib -Wl,-rpath=/opt/vc/lib"
fi
if [ "$build_option_opengl" ]; then
# libGL.so.1 is dynamically loaded with dlopen.
shlib_requires+=" libGL.so.1"
@ -116,7 +114,7 @@ fi
SDL2-devel_package() {
short_desc+=" - development files"
depends="alsa-lib-devel ${makedepends} ${sourcepkg}>=${version}_${revision}"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin
vmove usr/include