remove some outdated
[sgilles-overlay.git] / media-libs / libsdl2 / libsdl2-2.0.4-r1.ebuild
blob8809feacaa1f92002dc785b76f35ea2ff51a8dd2
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
5 # TODO: convert FusionSound #484250
7 EAPI=7
8 inherit autotools flag-o-matic toolchain-funcs eutils multilib-minimal
10 MY_P=SDL2-${PV}
11 DESCRIPTION="Simple Direct Media Layer"
12 HOMEPAGE="http://www.libsdl.org"
13 SRC_URI="http://www.libsdl.org/release/${MY_P}.tar.gz"
15 LICENSE="ZLIB"
16 SLOT="0"
17 KEYWORDS="alpha amd64 arm hppa ppc64 x86"
19 IUSE="cpu_flags_x86_3dnow alsa altivec custom-cflags dbus doc fusionsound gles haptic +joystick cpu_flags_x86_mmx nas opengl oss pulseaudio +sound cpu_flags_x86_sse cpu_flags_x86_sse2 static-libs +threads tslib udev +video wayland X xinerama xscreensaver"
20 REQUIRED_USE="
21 alsa? ( sound )
22 fusionsound? ( sound )
23 gles? ( video )
24 nas? ( sound )
25 opengl? ( video )
26 pulseaudio? ( sound )
27 wayland? ( gles )
28 xinerama? ( X )
29 xscreensaver? ( X )"
31 RDEPEND="
32 alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
33 dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
34 fusionsound? ( || ( >=media-libs/FusionSound-1.1.1 >=dev-libs/DirectFB-1.7.1[fusionsound] ) )
35 gles? ( >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},gles2] )
36 nas? ( >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}] )
37 opengl? (
38 >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
39 >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
41 pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
42 tslib? ( >=x11-libs/tslib-1.0-r3[${MULTILIB_USEDEP}] )
43 udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )
44 wayland? (
45 >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}]
46 >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},egl,gles2,wayland]
47 >=x11-libs/libxkbcommon-0.2.0[${MULTILIB_USEDEP}]
49 X? (
50 >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
51 >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}]
52 >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
53 >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
54 >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
55 >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
56 >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
57 xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )
58 xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
60 doc? ( !media-libs/libsdl[manpages] )
62 DEPEND="${RDEPEND}
63 X? (
64 >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
65 >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}]
67 doc? ( app-doc/doxygen )
68 virtual/pkgconfig"
70 S=${WORKDIR}/${MY_P}
72 src_prepare() {
73 # https://bugzilla.libsdl.org/show_bug.cgi?id=1431
74 epatch "${FILESDIR}"/${P}-static-libs.patch
75 sed -i -e 's/configure.in/configure.ac/' Makefile.in || die
76 mv configure.{in,ac} || die
77 AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
79 # jury-rig manpage creation
80 use doc && cp "${FILESDIR}/doxyfile" "${S}/src/doxyfile"
83 multilib_src_configure() {
84 use custom-cflags || strip-flags
86 # sorted by `./configure --help`
87 ECONF_SOURCE="${S}" econf \
88 $(use_enable static-libs static) \
89 --enable-atomic \
90 $(use_enable sound audio) \
91 $(use_enable video) \
92 --enable-render \
93 --enable-events \
94 $(use_enable joystick) \
95 $(use_enable haptic) \
96 --enable-power \
97 --enable-filesystem \
98 $(use_enable threads) \
99 --enable-timers \
100 --enable-file \
101 --disable-loadso \
102 --enable-cpuinfo \
103 --enable-assembly \
104 $(use_enable cpu_flags_x86_sse ssemath) \
105 $(use_enable cpu_flags_x86_mmx mmx) \
106 $(use_enable cpu_flags_x86_3dnow 3dnow) \
107 $(use_enable cpu_flags_x86_sse sse) \
108 $(use_enable cpu_flags_x86_sse2 sse2) \
109 $(use_enable altivec) \
110 $(use_enable oss) \
111 $(use_enable alsa) \
112 --disable-alsa-shared \
113 --disable-esd \
114 $(use_enable pulseaudio) \
115 --disable-pulseaudio-shared \
116 --disable-arts \
117 $(use_enable nas) \
118 --disable-nas-shared \
119 --disable-sndio \
120 --disable-sndio-shared \
121 $(use_enable sound diskaudio) \
122 $(use_enable sound dummyaudio) \
123 $(use_enable wayland video-wayland) \
124 --disable-wayland-shared \
125 --disable-video-mir \
126 $(use_enable X video-x11) \
127 --disable-x11-shared \
128 $(use_enable X video-x11-xcursor) \
129 $(use_enable X video-x11-xdbe) \
130 $(use_enable xinerama video-x11-xinerama) \
131 $(use_enable X video-x11-xinput) \
132 $(use_enable X video-x11-xrandr) \
133 $(use_enable xscreensaver video-x11-scrnsaver) \
134 $(use_enable X video-x11-xshape) \
135 $(use_enable X video-x11-vm) \
136 --disable-video-cocoa \
137 --disable-video-directfb \
138 $(multilib_native_use_enable fusionsound) \
139 --disable-fusionsound-shared \
140 $(use_enable video video-dummy) \
141 $(use_enable opengl video-opengl) \
142 $(use_enable gles video-opengles) \
143 $(use_enable udev libudev) \
144 $(use_enable dbus) \
145 --disable-ibus \
146 $(use_enable tslib input-tslib) \
147 --disable-directx \
148 --disable-rpath \
149 --disable-render-d3d \
150 $(use_with X x)
153 multilib_src_compile() {
154 default
156 if multilib_is_native_abi && use doc; then
157 # They don't seem to have a documentation make target.
158 cd "${S}"
159 doxygen "${S}/src/doxyfile"
163 multilib_src_install() {
164 emake DESTDIR="${D}" install
166 if multilib_is_native_abi && use doc; then
167 doman "${S}"/output/man/man3/SDL_*.3
168 doman "${S}"/output/man/man3/SDL.h.3
172 multilib_src_install_all() {
173 prune_libtool_files
174 dodoc {BUGS,CREDITS,README,README-SDL,TODO,WhatsNew}.txt docs/README*.md