SDL: use vopt helpers; use shlib_requires; simplify.
This commit is contained in:
parent
6b5ec16a95
commit
978ff9061d
|
@ -1,13 +1,15 @@
|
|||
# Template file for 'SDL'
|
||||
pkgname=SDL
|
||||
version=1.2.15
|
||||
revision=8
|
||||
revision=9
|
||||
patch_args="-Np1"
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-alsa --disable-esd --disable-rpath
|
||||
--enable-clock_gettime --disable-nas --disable-arts --disable-x11-shared
|
||||
--disable-alsa-shared --disable-pulseaudio-shared --disable-video-dga
|
||||
--disable-osmesa-shared"
|
||||
--disable-osmesa-shared $(vopt_enable aalib video-aalib)
|
||||
$(vopt_enable pulseaudio) $(vopt_enable opengl video-opengl)
|
||||
$(vopt_if x11 '-enable-video-x11-xrandr --enable-video-x11-vm --enable-video-x11-xv')"
|
||||
short_desc="Simple Directmedia Layer"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
homepage="http://www.libsdl.org/"
|
||||
|
@ -16,7 +18,9 @@ distfiles="http://www.libsdl.org/release/SDL-$version.tar.gz"
|
|||
checksum=d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00
|
||||
|
||||
hostmakedepends="pkg-config nasm"
|
||||
makedepends="alsa-lib-devel"
|
||||
makedepends="alsa-lib-devel $(vopt_if x11 libXrandr-devel)
|
||||
$(vopt_if aalib aalib-devel) $(vopt_if opengl glu-devel)
|
||||
$(vopt_if pulseaudio pulseaudio-devel)"
|
||||
|
||||
# Package build options
|
||||
build_options="x11 opengl aalib pulseaudio"
|
||||
|
@ -27,52 +31,15 @@ if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; the
|
|||
build_options_default+=" opengl pulseaudio"
|
||||
fi
|
||||
|
||||
if [ "$build_option_x11" ]; then
|
||||
configure_args+=" --enable-video-x11-xrandr --enable-video-x11-vm --enable-video-x11-xv"
|
||||
makedepends+=" 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_aalib" ]; then
|
||||
configure_args+=" --enable-video-aalib"
|
||||
makedepends+=" aalib-devel"
|
||||
else
|
||||
configure_args+=" --disable-video-aalib"
|
||||
fi
|
||||
|
||||
if [ "$build_option_pulseaudio" ]; then
|
||||
configure_args+=" --enable-pulseaudio"
|
||||
makedepends+=" pulseaudio-devel"
|
||||
else
|
||||
configure_args+=" --disable-pulseaudio"
|
||||
fi
|
||||
|
||||
if [ "$build_option_opengl" ]; then
|
||||
# libGL.so.1 is dynamically loaded with dlopen.
|
||||
shlib_requires="libGL.so.1"
|
||||
depends="libGL"
|
||||
fi
|
||||
|
||||
SDL-devel_package() {
|
||||
short_desc+=" - development files"
|
||||
depends="alsa-lib-devel SDL>=${version}"
|
||||
if [ "$build_option_x11" ]; then
|
||||
depends+=" libXrandr-devel"
|
||||
fi
|
||||
if [ "$build_option_opengl" ]; then
|
||||
depends+=" glu-devel"
|
||||
fi
|
||||
if [ "$build_option_pulseaudio" ]; then
|
||||
depends+=" pulseaudio-devel"
|
||||
fi
|
||||
|
||||
depends="${makedepends} SDL>=${version}_${revision}"
|
||||
pkg_install() {
|
||||
vmove usr/bin
|
||||
vmove usr/include
|
||||
|
|
Loading…
Reference in New Issue