/[gentoo-x86]/media-libs/libsdl/libsdl-1.2.15.ebuild
Gentoo

Contents of /media-libs/libsdl/libsdl-1.2.15.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Mon Feb 27 06:36:13 2012 UTC (4 years, 7 months ago) by jdhore
Branch: MAIN
Changes since 1.5: +2 -2 lines
marked x86 per bug 405217

(Portage version: 2.2.0_alpha89/cvs/Linux i686)

1 mr_bones_ 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 jdhore 1.6 # $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.15.ebuild,v 1.5 2012/02/25 15:00:20 ssuominen Exp $
4 mr_bones_ 1.1
5     EAPI=2
6     inherit flag-o-matic multilib toolchain-funcs eutils libtool
7    
8     DESCRIPTION="Simple Direct Media Layer"
9     HOMEPAGE="http://www.libsdl.org/"
10     SRC_URI="http://www.libsdl.org/release/SDL-${PV}.tar.gz"
11    
12     LICENSE="LGPL-2.1"
13     SLOT="0"
14 jdhore 1.6 KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 ~sh ~sparc x86 ~x86-fbsd"
15 mr_bones_ 1.1 # WARNING:
16     # If you turn on the custom-cflags use flag in USE and something breaks,
17     # you pick up the pieces. Be prepared for bug reports to be marked INVALID.
18     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"
19    
20     RDEPEND="audio? ( >=media-libs/audiofile-0.1.9 )
21     alsa? ( media-libs/alsa-lib )
22     nas? (
23     media-libs/nas
24     x11-libs/libXt
25     x11-libs/libXext
26     x11-libs/libX11
27     )
28     X? (
29     x11-libs/libXt
30     x11-libs/libXext
31     x11-libs/libX11
32     x11-libs/libXrandr
33     )
34     directfb? ( >=dev-libs/DirectFB-0.9.19 )
35     ggi? ( >=media-libs/libggi-2.0_beta3 )
36     svga? ( >=media-libs/svgalib-1.4.2 )
37     aalib? ( media-libs/aalib )
38     libcaca? ( >=media-libs/libcaca-0.9-r1 )
39     opengl? ( virtual/opengl virtual/glu )
40     ppc64? ( ps3? ( sys-libs/libspe2 ) )
41     tslib? ( x11-libs/tslib )
42     pulseaudio? ( media-sound/pulseaudio )"
43     DEPEND="${RDEPEND}
44     nas? (
45     x11-proto/xextproto
46     x11-proto/xproto
47     )
48     X? (
49     x11-proto/xextproto
50     x11-proto/xproto
51     )
52     x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"
53    
54     S=${WORKDIR}/SDL-${PV}
55    
56     pkg_setup() {
57     if use custom-cflags ; then
58     ewarn "Since you've chosen to use possibly unsafe CFLAGS,"
59     ewarn "don't bother filing libsdl-related bugs until trying to remerge"
60     ewarn "libsdl without the custom-cflags use flag in USE."
61     epause 10
62     fi
63     }
64    
65     src_prepare() {
66     epatch "${FILESDIR}"/${P}-sdl-config.patch
67    
68     elibtoolize
69     }
70    
71     src_configure() {
72     local myconf=
73     if [[ $(tc-arch) != "x86" ]] ; then
74     myconf="${myconf} --disable-nasm"
75     else
76     myconf="${myconf} --enable-nasm"
77     fi
78     use custom-cflags || strip-flags
79     use audio || myconf="${myconf} --disable-audio"
80     use video \
81     && myconf="${myconf} --enable-video-dummy" \
82     || myconf="${myconf} --disable-video"
83     use joystick || myconf="${myconf} --disable-joystick"
84    
85     local directfbconf="--disable-video-directfb"
86     if use directfb ; then
87     # since DirectFB can link against SDL and trigger a
88     # dependency loop, only link against DirectFB if it
89     # isn't broken #61592
90     echo 'int main(){}' > directfb-test.c
91     $(tc-getCC) directfb-test.c -ldirectfb 2>/dev/null \
92     && directfbconf="--enable-video-directfb" \
93     || ewarn "Disabling DirectFB since libdirectfb.so is broken"
94     fi
95    
96     myconf="${myconf} ${directfbconf}"
97    
98     econf \
99     --disable-rpath \
100     --disable-arts \
101     --disable-esd \
102     --enable-events \
103     --enable-cdrom \
104     --enable-threads \
105     --enable-timers \
106     --enable-file \
107     --enable-cpuinfo \
108     --disable-alsa-shared \
109     --disable-esd-shared \
110     --disable-pulseaudio-shared \
111     --disable-arts-shared \
112     --disable-nas-shared \
113     --disable-osmesa-shared \
114     $(use_enable oss) \
115     $(use_enable alsa) \
116     $(use_enable pulseaudio) \
117     $(use_enable nas) \
118     $(use_enable X video-x11) \
119     $(use_enable dga) \
120     $(use_enable xv video-x11-xv) \
121     $(use_enable xinerama video-x11-xinerama) \
122     $(use_enable X video-x11-xrandr) \
123     $(use_enable dga video-dga) \
124     $(use_enable fbcon video-fbcon) \
125     $(use_enable ggi video-ggi) \
126     $(use_enable svga video-svga) \
127     $(use_enable aalib video-aalib) \
128     $(use_enable libcaca video-caca) \
129     $(use_enable opengl video-opengl) \
130     $(use_enable ps3 video-ps3) \
131     $(use_enable tslib input-tslib) \
132     $(use_with X x) \
133     $(use_enable static-libs static) \
134     --disable-video-x11-xme \
135     ${myconf}
136     }
137    
138     src_install() {
139     emake DESTDIR="${D}" install || die "emake install failed"
140     use static-libs || rm -f "${D}"/usr/$(get_libdir)/lib*.la
141     dodoc BUGS CREDITS README README-SDL.txt README.HG TODO WhatsNew
142     dohtml -r ./
143     }

  ViewVC Help
Powered by ViewVC 1.1.20