New package: SDL2-2.0.0.

This commit is contained in:
Juan RP 2013-10-09 11:56:49 +02:00
parent 30391e32a2
commit f1ff6dcf64
3 changed files with 108 additions and 0 deletions

View File

@ -1414,3 +1414,4 @@ libmozjs-17.0.so mozjs17-17.0.0_1
libgeocode-glib.so.0 geocode-glib-3.10.0_1 libgeocode-glib.so.0 geocode-glib-3.10.0_1
libzeitgeist-2.0.so.0 libzeitgeist2-0.9.14_1 libzeitgeist-2.0.so.0 libzeitgeist2-0.9.14_1
libpotrace.so.0 libpotrace-1.11_1 libpotrace.so.0 libpotrace-1.11_1
libSDL2-2.0.so.0 SDL2-2.0.0_1

1
srcpkgs/SDL2-devel Symbolic link
View File

@ -0,0 +1 @@
SDL2

106
srcpkgs/SDL2/template Normal file
View File

@ -0,0 +1,106 @@
# Template file for 'SDL2'
pkgname=SDL2
version=2.0.0
revision=1
build_style=gnu-configure
configure_args="--enable-alsa --disable-esd --disable-rpath --enable-libudev
--enable-clock_gettime --disable-nas --disable-arts --disable-x11-shared
--disable-alsa-shared --disable-pulseaudio-shared --enable-dbus"
hostmakedepends="pkg-config nasm"
makedepends="alsa-lib-devel dbus-devel libudev-devel libusb-compat-devel"
short_desc="Simple DirectMedia Layer (version 2)"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.libsdl.org/"
license="zlib"
distfiles="http://www.libsdl.org/release/${pkgname}-$version.tar.gz"
checksum=6f6ac8153d90e06a118474d5400624ae82b3d3e080915505db27cebc52b27178
long_desc="
This is the Simple DirectMedia Layer, a generic API that provides low
level access to audio, keyboard, mouse, and display framebuffer across
multiple platforms."
# Package build options
build_options="gles opengl pulseaudio x11"
desc_option_gles="Enable support for OpenGL/ES rendering"
desc_option_opengl="Enable support for OpenGL rendering"
desc_option_pulseaudio="Enable support for pulseaudio audio output"
desc_option_x11="Enable support for X11 video output"
build_options_default="x11"
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
# Enable OpenGL and pulseaudio on x86.
build_options_default+=" opengl pulseaudio"
fi
if [ "$build_option_x11" ]; then
configure_args+=" --enable-video-x11-xcursor --enable-video-x11-xrandr
--enable-video-x11-xinerama --enable-video-x11-vm
--enable-video-x11-xinput --enable-video-x11-scrnsaver
--enable-video-x11-xshape"
makedepends+=" libSM-devel libXcursor-devel libXinerama-devel libXScrnSaver-devel libXrandr-devel"
else
configure_args+=" --without-x"
fi
if [ "$build_option_opengl" ]; then
configure_args+=" --enable-video-opengl"
makedepends+=" glu-devel"
else
configure_args+=" --disable-video-opengl"
fi
if [ "$build_option_gles" ]; then
configure_args+=" --enable-video-opengles"
makedepends+=" glu-devel"
else
configure_args+=" --disable-video-opengles"
fi
if [ "$build_option_pulseaudio" ]; then
configure_args+=" --enable-pulseaudio"
makedepends+=" pulseaudio-devel"
else
configure_args+=" --disable-pulseaudio"
fi
SDL2-devel_package() {
short_desc+=" - development files"
depends="alsa-lib-devel ${sourcepkg}>=${version}_${revision}"
if [ "$build_option_x11" ]; then
depends+=" libXcursor-devel libXinerama-devel libXScrnSaver-devel libXrandr-devel"
fi
if [ "$build_option_opengl" -o "$build_option_gles" ]; then
depends+=" glu-devel"
fi
if [ "$build_option_pulseaudio" ]; then
depends+=" pulseaudio-devel"
fi
pkg_install() {
vmove usr/bin
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/share
}
}
SDL2_package() {
if [ "$build_option_opengl" ]; then
# libGL.so.1 is dynamically loaded with dlopen.
depends+=" libGL"
fi
if [ "$build_option_gles" ]; then
# libGLESv2.so.1 is dynamically loaded with dlopen.
depends+=" libGLES"
fi
pkg_install() {
vmove all
}
}