SDL2: enable OpenGL/ES for all ARM platforms; use shlib_requires.

Close #892
This commit is contained in:
Juan RP 2015-01-19 11:38:43 +01:00
parent d6e4e8b0aa
commit 7213247129
1 changed files with 6 additions and 21 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'SDL2'
pkgname=SDL2
version=2.0.3
revision=2
revision=3
build_style=gnu-configure
configure_args="--enable-alsa --disable-esd --disable-rpath --enable-libudev
--enable-clock_gettime --disable-nas --disable-arts --disable-x11-shared
@ -22,14 +22,15 @@ if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; the
# Enable OpenGL, pulseaudio and x11
build_options_default+=" opengl pulseaudio x11"
elif [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then
# Enable OpenGL/ES on RaspberryPi
elif [ "$XBPS_TARGET_MACHINE" = "armv6l" -o "$XBPS_TARGET_MACHINE" = "armv7l" ]; then
# Enable OpenGL/ES on ARM platforms
build_options_default+=" gles"
fi
if [ "$build_option_gles" ]; then
# libGLESv2.so.1 is dynamically loaded with dlopen.
shlib_requires="libGLESv2.so.1"
depends+=" libGLES>=1.0"
configure_args+=" --enable-video-opengles"
if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then
@ -46,6 +47,7 @@ fi
if [ "$build_option_opengl" ]; then
# libGL.so.1 is dynamically loaded with dlopen.
shlib_requires="libGL.so.1"
depends+=" libGL"
configure_args+=" --enable-video-opengl"
makedepends+=" glu-devel"
@ -82,24 +84,7 @@ fi
SDL2-devel_package() {
short_desc+=" - development files"
depends="alsa-lib-devel ${sourcepkg}>=${version}_${revision}"
if [ "$build_option_opengl" ]; then
depends+=" glu-devel"
fi
if [ "$build_option_pulseaudio" ]; then
depends+=" pulseaudio-devel"
fi
if [ "$build_option_wayland" ]; then
depends+=" wayland-devel"
fi
if [ "$build_option_x11" ]; then
depends+=" libSM-devel libXcursor-devel libXinerama-devel libXScrnSaver-devel libXrandr-devel"
fi
depends="alsa-lib-devel ${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin
vmove usr/include