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