Remove unmaintained packages - #557728 @bgo
[moonrise.git] / media-libs / libsdl / libsdl-1.2.14-r6.ebuild
blob2b3fcc286a4935062d509eb3adf5a0d035cc1e23
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 $
5 EAPI=2
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"
12 LICENSE="LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
15 # WARNING:
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 )
23 nas? (
24 media-libs/nas
25 x11-libs/libXt
26 x11-libs/libXext
27 x11-libs/libX11
29 X? (
30 x11-libs/libXt
31 x11-libs/libXext
32 x11-libs/libX11
33 x11-libs/libXrandr
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 )"
44 DEPEND="${RDEPEND}
45 nas? (
46 x11-proto/xextproto
47 x11-proto/xproto
49 X? (
50 x11-proto/xextproto
51 x11-proto/xproto
53 x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"
55 S=${WORKDIR}/SDL-${PV}
57 pkg_setup() {
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."
63 epause 30
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."
69 epause 10
73 src_prepare() {
74 epatch \
75 "${FILESDIR}"/${PN}-1.2.13-sdl-config.patch \
76 "${FILESDIR}"/${P}-click.patch \
77 "${FILESDIR}"/${P}-joystick.patch \
78 "${FILESDIR}"/${P}-glibc213.patch
80 elibtoolize
83 src_configure() {
84 local myconf=
85 if [[ $(tc-arch) != "x86" ]] ; then
86 myconf="${myconf} --disable-nasm"
87 else
88 myconf="${myconf} --enable-nasm"
90 use custom-cflags || strip-flags
91 use audio || myconf="${myconf} --disable-audio"
92 use video \
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}"
110 econf \
111 --disable-rpath \
112 --disable-arts \
113 --disable-esd \
114 --enable-events \
115 --enable-cdrom \
116 --enable-threads \
117 --enable-timers \
118 --enable-file \
119 --enable-cpuinfo \
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 \
126 $(use_enable oss) \
127 $(use_enable alsa) \
128 $(use_enable pulseaudio) \
129 $(use_enable nas) \
130 $(use_enable X video-x11) \
131 $(use_enable dga) \
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) \
144 $(use_with X x) \
145 $(use_enable static-libs static) \
146 --disable-video-x11-xme \
147 ${myconf}
150 src_install() {
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
154 dohtml -r ./