SDL: explicitly link to required libs rather than dlopen; use options.
The following options are supported now: x11 - to support X11 video output (enabled on x86) opengl - to support OpenGL (enabled on x86) pulseaudio - to support pulseaudio audio output (enabled on x86). aalib - to support aalib video output (disabled)
This commit is contained in:
parent
d27ae73021
commit
373ffc4e05
3 changed files with 68 additions and 15 deletions
|
@ -1,15 +1,25 @@
|
|||
# Template file for 'SDL-devel'.
|
||||
#
|
||||
noarch=yes
|
||||
depends="glu-devel ${sourcepkg}>=${version}"
|
||||
short_desc="${short_desc} (development files)"
|
||||
long_desc="${long_desc}
|
||||
depends="alsa-lib-devel SDL>=${version}"
|
||||
|
||||
This package contains files for development, headers, static libs, etc."
|
||||
if [ "$build_option_x11" ]; then
|
||||
depends="${depends} libXrandr-devel"
|
||||
fi
|
||||
|
||||
if [ "$build_option_opengl" ]; then
|
||||
depends="${depends} glu-devel"
|
||||
fi
|
||||
|
||||
if [ "$build_option_pulseaudio" ]; then
|
||||
depends="${depends} pulseaudio-devel"
|
||||
fi
|
||||
|
||||
short_desc="${short_desc} -- development files"
|
||||
|
||||
do_install() {
|
||||
vmove usr/bin usr
|
||||
vmove usr/include usr
|
||||
vmove usr/lib/pkgconfig usr/lib
|
||||
vmove "usr/lib/*.a" usr/lib
|
||||
vmove usr/share usr
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
# Template file for 'SDL'
|
||||
pkgname=SDL
|
||||
version=1.2.15
|
||||
revision=5
|
||||
revision=6
|
||||
patch_args="-Np1"
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-alsa --disable-esd --disable-rpath
|
||||
--enable-clock_gettime --disable-nas --disable-arts --disable-static"
|
||||
--enable-clock_gettime --disable-nas --disable-arts --disable-x11-shared
|
||||
--disable-alsa-shared --disable-pulseaudio-shared --disable-video-dga
|
||||
--disable-osmesa-shared"
|
||||
subpackages="SDL-devel"
|
||||
short_desc="Simple Directmedia Layer"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
@ -20,11 +22,5 @@ long_desc="
|
|||
emulators, and many popular games, including the award winning Linux port
|
||||
of Civilization: Call To Power."
|
||||
|
||||
# The following run-time dependencies are dlopen(3)ed.
|
||||
depends="libX11 libXext libXrender libXi alsa-lib libpulseaudio"
|
||||
makedepends="pkg-config nasm libXext-devel libXrender-devel libX11-devel
|
||||
glu-devel MesaLib-devel alsa-lib-devel pulseaudio-devel"
|
||||
|
||||
post_install() {
|
||||
rm -f ${DESTDIR}/usr/lib/*.a
|
||||
}
|
||||
hostmakedepends="pkg-config nasm"
|
||||
makedepends="alsa-lib-devel"
|
||||
|
|
47
srcpkgs/SDL/template.options
Normal file
47
srcpkgs/SDL/template.options
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Package build options
|
||||
build_options="x11 opengl aalib pulseaudio"
|
||||
|
||||
desc_option_x11="Enable support for X11 video output"
|
||||
desc_option_opengl="Enable support for OpenGL support"
|
||||
desc_option_aalib="Enable support for aalib video output"
|
||||
desc_option_pulseaudio="Enable support for pulseaudio autio 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="${build_options_default} opengl pulseaudio"
|
||||
fi
|
||||
|
||||
do_options() {
|
||||
if [ "$build_option_x11" ]; then
|
||||
configure_args="${configure_args} --enable-video-x11-xrandr
|
||||
--enable-video-x11-vm --enable-video-x11-xv"
|
||||
makedepends="${makedepends} libXrandr-devel"
|
||||
else
|
||||
configure_args="${configure_args} --without-x"
|
||||
fi
|
||||
|
||||
if [ "$build_option_opengl" ]; then
|
||||
configure_args="${configure_args} --enable-video-opengl"
|
||||
makedepends="${makedepends} glu-devel"
|
||||
# libGL.so.1 is dynamically loaded with dlopen.
|
||||
depends="${depends} libGL"
|
||||
else
|
||||
configure_args="${configure_args} --disable-video-opengl"
|
||||
fi
|
||||
|
||||
if [ "$build_option_aalib" ]; then
|
||||
configure_args="${configure_args} --enable-video-aalib"
|
||||
makedepends="${makedepends} aalib-devel"
|
||||
else
|
||||
configure_args="${configure_args} --disable-video-aalib"
|
||||
fi
|
||||
|
||||
if [ "$build_option_pulseaudio" ]; then
|
||||
configure_args="${configure_args} --enable-pulseaudio"
|
||||
makedepends="${makedepends} pulseaudio-devel"
|
||||
else
|
||||
configure_args="${configure_args} --disable-pulseaudio"
|
||||
fi
|
||||
}
|
Loading…
Reference in a new issue