1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.14-r6.ebuild,v 1.1 2011/03/08 22:09:48 mr_bones_ Exp $
6 inherit flag-o-matic multilib toolchain-funcs eutils libtool
8 DESCRIPTION
="Simple Direct Media Layer"
9 HOMEPAGE
="http://www.libsdl.org/"
10 SRC_URI
="http://www.libsdl.org/release/SDL-${PV}.tar.gz"
14 KEYWORDS
="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
16 # if you disable the audio, video, joystick use flags or turn on the custom-cflags use flag
17 # in USE and something breaks, you pick up the pieces. Be prepared for
18 # bug reports to be marked INVALID.
19 IUSE
="oss alsa nas X dga xv xinerama fbcon directfb ggi svga tslib aalib opengl libcaca +audio +video +joystick custom-cflags pulseaudio ps3 static-libs esd"
21 RDEPEND
="audio? ( >=media-libs/audiofile-0.1.9 )
22 alsa? ( media-libs/alsa-lib )
35 directfb? ( >=dev-libs/DirectFB-0.9.19 )
36 ggi? ( >=media-libs/libggi-2.0_beta3 )
37 svga? ( >=media-libs/svgalib-1.4.2 )
38 aalib? ( media-libs/aalib )
39 libcaca? ( >=media-libs/libcaca-0.9-r1 )
40 opengl? ( virtual/opengl virtual/glu )
41 ppc64? ( ps3? ( sys-libs/libspe2 ) )
42 tslib? ( x11-libs/tslib )
43 pulseaudio? ( media-sound/pulseaudio )"
53 x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"
55 S
=${WORKDIR}/SDL-
${PV}
58 if use
!audio || use
!video || use
!joystick
; then
59 ewarn
"Since you've chosen to turn off some of libsdl's functionality,"
60 ewarn
"don't bother filing libsdl-related bugs until trying to remerge"
61 ewarn
"libsdl with the audio, video, and joystick flags in USE."
62 ewarn
"You need to know what you're doing to selectively turn off parts of libsdl."
65 if use custom-cflags
; then
66 ewarn
"Since you've chosen to use possibly unsafe CFLAGS,"
67 ewarn
"don't bother filing libsdl-related bugs until trying to remerge"
68 ewarn
"libsdl without the custom-cflags use flag in USE."
75 "${FILESDIR}"/${PN}-1.2
.13-sdl-config.
patch \
76 "${FILESDIR}"/${P}-click.
patch \
77 "${FILESDIR}"/${P}-joystick.
patch \
78 "${FILESDIR}"/${P}-glibc213.
patch
85 if [[ $
(tc-arch
) != "x86" ]] ; then
86 myconf
="${myconf} --disable-nasm"
88 myconf
="${myconf} --enable-nasm"
90 use custom-cflags || strip-flags
91 use audio || myconf
="${myconf} --disable-audio"
93 && myconf
="${myconf} --enable-video-dummy" \
94 || myconf
="${myconf} --disable-video"
95 use joystick || myconf
="${myconf} --disable-joystick"
97 local directfbconf
="--disable-video-directfb"
98 if use directfb
; then
99 # since DirectFB can link against SDL and trigger a
100 # dependency loop, only link against DirectFB if it
101 # isn't broken #61592
102 echo 'int main(){}' > directfb-test.c
103 $
(tc-getCC
) directfb-test.c
-ldirectfb 2>/dev
/null \
104 && directfbconf
="--enable-video-directfb" \
105 || ewarn
"Disabling DirectFB since libdirectfb.so is broken"
108 myconf
="${myconf} ${directfbconf}"
120 $
(use_enable alsa alsa-shared
) \
121 $
(use_enable esd esd-shared
) \
122 $
(use_enable pulseaudio pulseaudio-shared
) \
123 --disable-arts-shared \
124 $
(use_enable nas nas-shared
) \
125 --disable-osmesa-shared \
128 $
(use_enable pulseaudio
) \
130 $
(use_enable X video-x11
) \
132 $
(use_enable xv video-x11-xv
) \
133 $
(use_enable xinerama video-x11-xinerama
) \
134 $
(use_enable X video-x11-xrandr
) \
135 $
(use_enable dga video-dga
) \
136 $
(use_enable fbcon video-fbcon
) \
137 $
(use_enable ggi video-ggi
) \
138 $
(use_enable svga video-svga
) \
139 $
(use_enable aalib video-aalib
) \
140 $
(use_enable libcaca video-caca
) \
141 $
(use_enable opengl video-opengl
) \
142 $
(use_enable ps3 video-ps3
) \
143 $
(use_enable tslib input-tslib
) \
145 $
(use_enable static-libs static
) \
146 --disable-video-x11-xme \
151 emake DESTDIR
="${D}" install || die
"emake install failed"
152 use static-libs ||
rm -f "${D}"/usr
/$
(get_libdir
)/lib
*.la
153 dodoc BUGS CREDITS README README-SDL.txt README.CVS TODO WhatsNew