1 |
beandog 09/05/30 21:53:39 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: mplayer-1.0_rc2_p20090530.ebuild |
5 |
Log: |
6 |
Snapshot bump; Backport ebuild changes from live ebuild; drop arts |
7 |
(Portage version: 2.2_rc33/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.635 media-video/mplayer/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.635&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.635&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?r1=1.634&r2=1.635 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v |
19 |
retrieving revision 1.634 |
20 |
retrieving revision 1.635 |
21 |
diff -u -r1.634 -r1.635 |
22 |
--- ChangeLog 30 May 2009 21:31:18 -0000 1.634 |
23 |
+++ ChangeLog 30 May 2009 21:53:39 -0000 1.635 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for media-video/mplayer |
26 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.634 2009/05/30 21:31:18 beandog Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.635 2009/05/30 21:53:39 beandog Exp $ |
29 |
+ |
30 |
+*mplayer-1.0_rc2_p20090530 (30 May 2009) |
31 |
+ |
32 |
+ 30 May 2009; Steve Dibb <beandog@g.o> |
33 |
+ +mplayer-1.0_rc2_p20090530.ebuild: |
34 |
+ Snapshot bump; Backport ebuild changes from live ebuild; drop arts |
35 |
|
36 |
30 May 2009; Steve Dibb <beandog@g.o> mplayer-9999.ebuild, |
37 |
metadata.xml: |
38 |
|
39 |
|
40 |
|
41 |
1.1 media-video/mplayer/mplayer-1.0_rc2_p20090530.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2_p20090530.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2_p20090530.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: mplayer-1.0_rc2_p20090530.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2009 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2_p20090530.ebuild,v 1.1 2009/05/30 21:53:39 beandog Exp $ |
51 |
|
52 |
EAPI="2" |
53 |
|
54 |
inherit eutils flag-o-matic multilib |
55 |
|
56 |
MPLAYER_REVISION=29330 |
57 |
|
58 |
IUSE="3dnow 3dnowext +a52 +aac aalib +alsa altivec +amrnb +amrwb +ass |
59 |
bidi bindist bl +cddb +cdio cdparanoia cpudetection custom-cflags |
60 |
custom-cpuopts debug dga +dirac directfb doc +dts +dv dvb +dvd +dvdnav dxr3 |
61 |
+enca +encode esd +faac +faad fbcon ftp gif ggi -gmplayer +iconv ipv6 jack |
62 |
joystick jpeg kernel_linux ladspa libcaca lirc +live lzo mad md5sum +mmx |
63 |
mmxext mng +mp2 +mp3 musepack nas +nemesi +network nut openal +opengl +osdmenu |
64 |
oss png pnm pulseaudio pvr +quicktime radio +rar +real +rtc samba +shm |
65 |
+schroedinger sdl +speex sse sse2 ssse3 svga teletext tga +theora +tremor |
66 |
+truetype +unicode v4l v4l2 vdpau vidix +vorbis win32codecs +X +x264 xanim |
67 |
xinerama +xscreensaver +xv +xvid xvmc zoran" |
68 |
|
69 |
VIDEO_CARDS="s3virge mga tdfx nvidia vesa" |
70 |
|
71 |
for x in ${VIDEO_CARDS}; do |
72 |
IUSE="${IUSE} video_cards_${x}" |
73 |
done |
74 |
|
75 |
BLUV="1.7" |
76 |
SVGV="1.9.17" |
77 |
AMR_URI="http://www.3gpp.org/ftp/Specs/archive" |
78 |
SRC_URI="mirror://gentoo/${P}.tar.bz2 |
79 |
!truetype? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
80 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
81 |
mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 ) |
82 |
!iconv? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
83 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
84 |
mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 ) |
85 |
gmplayer? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 ) |
86 |
svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )" |
87 |
|
88 |
DESCRIPTION="Media Player for Linux" |
89 |
HOMEPAGE="http://www.mplayerhq.hu/" |
90 |
|
91 |
RDEPEND="sys-libs/ncurses |
92 |
!bindist? ( |
93 |
x86? ( |
94 |
win32codecs? ( media-libs/win32codecs ) |
95 |
) |
96 |
) |
97 |
aalib? ( media-libs/aalib ) |
98 |
alsa? ( media-libs/alsa-lib ) |
99 |
amrnb? ( media-libs/amrnb ) |
100 |
amrwb? ( media-libs/amrwb ) |
101 |
ass? ( media-libs/freetype:2 |
102 |
media-libs/fontconfig ) |
103 |
openal? ( media-libs/openal ) |
104 |
bidi? ( dev-libs/fribidi ) |
105 |
cdio? ( dev-libs/libcdio ) |
106 |
cdparanoia? ( media-sound/cdparanoia ) |
107 |
dirac? ( media-video/dirac ) |
108 |
directfb? ( dev-libs/DirectFB ) |
109 |
dga? ( x11-libs/libXxf86dga ) |
110 |
dts? ( media-libs/libdca ) |
111 |
dv? ( media-libs/libdv ) |
112 |
dvb? ( media-tv/linuxtv-dvb-headers ) |
113 |
encode? ( |
114 |
mp2? ( media-sound/twolame ) |
115 |
mp3? ( media-sound/lame ) |
116 |
faac? ( media-libs/faac ) |
117 |
x264? ( >=media-libs/x264-0.0.20081006 ) |
118 |
xvid? ( media-libs/xvid ) |
119 |
) |
120 |
esd? ( media-sound/esound ) |
121 |
enca? ( app-i18n/enca ) |
122 |
faad? ( !aac? ( media-libs/faad2 ) ) |
123 |
gif? ( media-libs/giflib ) |
124 |
ggi? ( media-libs/libggi |
125 |
media-libs/libggiwmh ) |
126 |
gmplayer? ( media-libs/libpng |
127 |
x11-libs/libXxf86vm |
128 |
x11-libs/libXext |
129 |
x11-libs/libXi |
130 |
x11-libs/gtk+:2 ) |
131 |
jack? ( media-sound/jack-audio-connection-kit ) |
132 |
jpeg? ( media-libs/jpeg ) |
133 |
ladspa? ( media-libs/ladspa-sdk ) |
134 |
libcaca? ( media-libs/libcaca ) |
135 |
lirc? ( app-misc/lirc ) |
136 |
lzo? ( >=dev-libs/lzo-2 ) |
137 |
mad? ( media-libs/libmad ) |
138 |
mng? ( media-libs/libmng ) |
139 |
musepack? ( >=media-libs/libmpcdec-1.2.2 ) |
140 |
nas? ( media-libs/nas ) |
141 |
nut? ( >=media-libs/libnut-661 ) |
142 |
opengl? ( virtual/opengl ) |
143 |
png? ( media-libs/libpng ) |
144 |
pnm? ( media-libs/netpbm ) |
145 |
pulseaudio? ( media-sound/pulseaudio ) |
146 |
rar? ( || ( app-arch/unrar-gpl |
147 |
app-arch/unrar |
148 |
app-arch/rar ) ) |
149 |
samba? ( net-fs/samba ) |
150 |
schroedinger? ( media-libs/schroedinger ) |
151 |
sdl? ( media-libs/libsdl ) |
152 |
speex? ( media-libs/speex ) |
153 |
svga? ( media-libs/svgalib ) |
154 |
theora? ( media-libs/libtheora ) |
155 |
live? ( media-plugins/live ) |
156 |
truetype? ( media-libs/freetype:2 |
157 |
media-libs/fontconfig ) |
158 |
video_cards_nvidia? ( |
159 |
vdpau? ( >=x11-drivers/nvidia-drivers-180.51 ) |
160 |
) |
161 |
vidix? ( x11-libs/libXxf86vm |
162 |
x11-libs/libXext ) |
163 |
vorbis? ( media-libs/libvorbis ) |
164 |
xanim? ( media-video/xanim ) |
165 |
xinerama? ( x11-libs/libXinerama |
166 |
x11-libs/libXxf86vm |
167 |
x11-libs/libXext ) |
168 |
xscreensaver? ( x11-libs/libXScrnSaver ) |
169 |
xv? ( x11-libs/libXv |
170 |
x11-libs/libXxf86vm |
171 |
x11-libs/libXext |
172 |
xvmc? ( x11-libs/libXvMC ) ) |
173 |
X? ( x11-libs/libXxf86vm |
174 |
x11-libs/libXext |
175 |
)" |
176 |
|
177 |
DEPEND="${RDEPEND} |
178 |
amd64? ( dev-lang/yasm ) |
179 |
doc? ( dev-libs/libxslt ) |
180 |
dga? ( x11-proto/xf86dgaproto ) |
181 |
dxr3? ( media-video/em8300-libraries ) |
182 |
xinerama? ( x11-proto/xineramaproto ) |
183 |
xv? ( x11-proto/videoproto |
184 |
x11-proto/xf86vidmodeproto ) |
185 |
gmplayer? ( x11-proto/xextproto |
186 |
x11-proto/xf86vidmodeproto ) |
187 |
X? ( x11-proto/xextproto |
188 |
x11-proto/xf86vidmodeproto ) |
189 |
x86? ( dev-lang/yasm ) |
190 |
x86-fbsd? ( dev-lang/yasm ) |
191 |
xscreensaver? ( x11-proto/scrnsaverproto ) |
192 |
iconv? ( virtual/libiconv )" |
193 |
|
194 |
SLOT="0" |
195 |
LICENSE="GPL-2" |
196 |
KEYWORDS="" |
197 |
|
198 |
pkg_setup() { |
199 |
|
200 |
elog "" |
201 |
elog "This is a live ebuild which installs the latest from upstream's" |
202 |
elog "subversion repository, and is unsupported by Gentoo." |
203 |
elog "Everything but bugs in the ebuild itself will be ignored." |
204 |
elog "" |
205 |
|
206 |
if [[ -n ${LINGUAS} ]]; then |
207 |
elog "" |
208 |
elog "MPlayer's build system uses the LINGUAS variable for both" |
209 |
elog "output messages and which man pages to build. The first" |
210 |
elog "language in the LINGUAS variable will be used to display" |
211 |
elog "output messages. See bug #228799." |
212 |
fi |
213 |
|
214 |
if use gmplayer; then |
215 |
ewarn "" |
216 |
ewarn "GMPlayer is no longer actively developed upstream" |
217 |
ewarn "and is not supported by Gentoo. There are alternatives" |
218 |
ewarn "for a GUI frontend: smplayer, gnome-mplayer and kmplayer." |
219 |
fi |
220 |
|
221 |
if use cpudetection; then |
222 |
ewarn "" |
223 |
ewarn "You've enabled the cpudetection flag. This feature is" |
224 |
ewarn "included mainly for people who want to use the same" |
225 |
ewarn "binary on another system with a different CPU architecture." |
226 |
ewarn "MPlayer will already detect your CPU settings by default at" |
227 |
ewarn "buildtime; this flag is used for runtime detection." |
228 |
ewarn "You won't need this turned on if you are only building" |
229 |
ewarn "mplayer for this system. Also, if your compile fails, try" |
230 |
ewarn "disabling this use flag." |
231 |
fi |
232 |
|
233 |
if use custom-cflags; then |
234 |
ewarn "" |
235 |
ewarn "You've enabled the custom-cflags USE flag, which overrides" |
236 |
ewarn "mplayer's recommended behavior, making this build unsupported." |
237 |
ewarn "" |
238 |
ewarn "Re-emerge mplayer without this flag before filing bugs." |
239 |
fi |
240 |
|
241 |
if use custom-cpuopts; then |
242 |
ewarn "" |
243 |
ewarn "You are using the custom-cpuopts flag which will" |
244 |
ewarn "specifically allow you to enable / disable certain" |
245 |
ewarn "CPU optimizations." |
246 |
ewarn "" |
247 |
ewarn "Most desktop users won't need this functionality, but it" |
248 |
ewarn "is included for corner cases like cross-compiling and" |
249 |
ewarn "certain profiles. If unsure, disable this flag and MPlayer" |
250 |
ewarn "will automatically detect and use your available CPU" |
251 |
ewarn "optimizations." |
252 |
ewarn "" |
253 |
ewarn "Using this flag means your build is unsupported, so" |
254 |
ewarn "please make sure your CPU optimization use flags (3dnow" |
255 |
ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." |
256 |
fi |
257 |
} |
258 |
|
259 |
src_unpack() { |
260 |
unpack ${A} |
261 |
|
262 |
if ! use truetype ; then |
263 |
unpack font-arial-iso-8859-1.tar.bz2 \ |
264 |
font-arial-iso-8859-2.tar.bz2 \ |
265 |
font-arial-cp1250.tar.bz2 |
266 |
fi |
267 |
|
268 |
cd "${WORKDIR}" |
269 |
|
270 |
use gmplayer && unpack "Blue-${BLUV}.tar.bz2" |
271 |
|
272 |
use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.bz2" |
273 |
|
274 |
cd "${S}" |
275 |
|
276 |
# Set version # |
277 |
sed -i s/UNKNOWN/${MPLAYER_REVISION}/ "${S}/version.sh" |
278 |
|
279 |
if use svga; then |
280 |
echo |
281 |
einfo "Enabling vidix non-root mode." |
282 |
einfo "(You need a proper svgalib_helper.o module for your kernel" |
283 |
einfo "to actually use this)" |
284 |
echo |
285 |
|
286 |
mv "${WORKDIR}/svgalib_helper" "${S}/libdha" |
287 |
fi |
288 |
} |
289 |
|
290 |
src_configure() { |
291 |
|
292 |
local myconf="" |
293 |
|
294 |
# MPlayer reads in the LINGUAS variable from make.conf, and sets |
295 |
# the languages accordingly. Some will have to be altered to match |
296 |
# upstream's naming scheme. |
297 |
[[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" |
298 |
|
299 |
# mplayer ebuild uses "use foo || --disable-foo" to forcibly disable |
300 |
# compilation in almost every situation. The reason for this is |
301 |
# because if --enable is used, it will force the build of that option, |
302 |
# regardless of whether the dependency is available or not. |
303 |
|
304 |
################ |
305 |
#Optional features# |
306 |
############### |
307 |
myconf="${myconf} $(use_enable network) --disable-arts" |
308 |
use ass || myconf="${myconf} --disable-ass" |
309 |
use bidi || myconf="${myconf} --disable-fribidi" |
310 |
use bl && myconf="${myconf} --enable-bl" |
311 |
use enca || myconf="${myconf} --disable-enca" |
312 |
use encode || myconf="${myconf} --disable-mencoder" |
313 |
use ftp || myconf="${myconf} --disable-ftp" |
314 |
use ipv6 || myconf="${myconf} --disable-inet6" |
315 |
use lirc || myconf="${myconf} --disable-lirc --disable-lircc \ |
316 |
--disable-apple-ir" |
317 |
use nemesi || myconf="${myconf} --disable-nemesi" |
318 |
use nut || myconf="${myconf} --disable-libnut" |
319 |
use osdmenu || myconf="${myconf} --disable-menu" |
320 |
use rar || myconf="${myconf} --disable-unrarexec" |
321 |
use rtc || myconf="${myconf} --disable-rtc" |
322 |
use samba || myconf="${myconf} --disable-smb" |
323 |
use xscreensaver || myconf="${myconf} --disable-xss" |
324 |
myconf="${myconf} $(use_enable joystick)" |
325 |
|
326 |
# libcdio support: prefer libcdio over cdparanoia |
327 |
# don't check for cddb w/cdio |
328 |
if use cdio; then |
329 |
myconf="${myconf} --disable-cdparanoia" |
330 |
else |
331 |
myconf="${myconf} --disable-libcdio" |
332 |
use cdparanoia || myconf="${myconf} --disable-cdparanoia" |
333 |
use cddb || myconf="${myconf} --disable-cddb" |
334 |
fi |
335 |
|
336 |
############### |
337 |
# DVD read, navigation support |
338 |
############### |
339 |
# |
340 |
# dvdread - accessing a DVD |
341 |
# dvdnav - navigation of menus |
342 |
# |
343 |
# internal dvdread and dvdnav use flags enable internal |
344 |
# versions of the libraries, which are snapshots of the fork. |
345 |
# |
346 |
# Only check for disabled a52 use flag inside the DVD check, |
347 |
# since many users were getting confused why there was no |
348 |
# audio stream. |
349 |
# |
350 |
if use dvd; then |
351 |
use dvdnav || myconf="${myconf} --disable-dvdnav" |
352 |
else |
353 |
myconf="${myconf} --disable-dvdnav --disable-dvdread \ |
354 |
--disable-dvdread-internal --disable-libdvdcss-internal" |
355 |
use a52 || myconf="${myconf} --disable-liba52-internal" |
356 |
fi |
357 |
|
358 |
############### |
359 |
# Subtitles |
360 |
############### |
361 |
# |
362 |
# SRT/ASS/SSA (subtitles) requires freetype support |
363 |
# freetype support requires iconv |
364 |
# iconv optionally can use unicode |
365 |
if ! use ass; then |
366 |
if ! use truetype; then |
367 |
myconf="${myconf} --disable-freetype" |
368 |
if ! use iconv; then |
369 |
myconf="${myconf} --disable-iconv --charset=noconv" |
370 |
fi |
371 |
fi |
372 |
fi |
373 |
use iconv && use unicode && myconf="${myconf} --charset=UTF-8" |
374 |
|
375 |
############### |
376 |
# DVB / Video4Linux / Radio support |
377 |
############### |
378 |
myconf="${myconf} --disable-tv-bsdbt848" |
379 |
# broken upstream, won't work with recent kernels |
380 |
myconf="${myconf} --disable-ivtv" |
381 |
if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then |
382 |
use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead" |
383 |
use pvr || myconf="${myconf} --disable-pvr" |
384 |
use v4l || myconf="${myconf} --disable-tv-v4l1" |
385 |
use v4l2 || myconf="${myconf} --disable-tv-v4l2" |
386 |
use teletext || myconf="${myconf} --disable-tv-teletext" |
387 |
if use radio && { use dvb || use v4l || use v4l2; }; then |
388 |
myconf="${myconf} --enable-radio $(use_enable encode radio-capture)" |
389 |
else |
390 |
myconf="${myconf} --disable-radio-v4l2 --disable-radio-bsdbt848" |
391 |
fi |
392 |
else |
393 |
myconf="${myconf} --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 \ |
394 |
--disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848 \ |
395 |
--disable-dvb --disable-dvbhead --disable-tv-teletext \ |
396 |
--disable-v4l2 --disable-pvr" |
397 |
fi |
398 |
|
399 |
######### |
400 |
# Codecs # |
401 |
######## |
402 |
# Won't work with external liba52 |
403 |
myconf="${myconf} --disable-liba52" |
404 |
|
405 |
use aac || myconf="${myconf} --disable-faad-internal" |
406 |
use amrnb || myconf="${myconf} --disable-libamr_nb" |
407 |
use amrwb || myconf="${myconf} --disable-libamr_wb" |
408 |
use dirac || myconf="${myconf} --disable-libdirac-lavc" |
409 |
use dts || myconf="${myconf} --disable-libdca" |
410 |
use dv || myconf="${myconf} --disable-libdv" |
411 |
use faad || myconf="${myconf} --disable-faad" |
412 |
use lzo || myconf="${myconf} --disable-liblzo" |
413 |
use mp3 || myconf="${myconf} --disable-mp3lame --disable-mp3lame-lavc \ |
414 |
--disable-mp3lib" |
415 |
use schroedinger || myconf="${myconf} --disable-libschroedinger-lavc" |
416 |
use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods" |
417 |
! use png && ! use gmplayer && myconf="${myconf} --disable-png" |
418 |
for x in gif jpeg live mad mng musepack pnm speex tga theora xanim; do |
419 |
use ${x} || myconf="${myconf} --disable-${x}" |
420 |
done |
421 |
if use vorbis || use tremor; then |
422 |
use tremor || myconf="${myconf} --disable-tremor-internal" |
423 |
use vorbis || myconf="${myconf} --disable-libvorbis" |
424 |
else |
425 |
myconf="${myconf} --disable-tremor-internal --disable-tremor \ |
426 |
--disable-libvorbis" |
427 |
fi |
428 |
# Encoding |
429 |
if use encode; then |
430 |
use aac || myconf="${myconf} --disable-faac-lavc" |
431 |
use faac || myconf="${myconf} --disable-faac" |
432 |
use x264 || myconf="${myconf} --disable-x264" |
433 |
use xvid || myconf="${myconf} --disable-xvid" |
434 |
use mp2 || myconf="${myconf} --disable-twolame --disable-toolame" |
435 |
else |
436 |
myconf="${myconf} --disable-faac-lavc --disable-faac --disable-x264 \ |
437 |
--disable-xvid --disable-x264-lavc --disable-xvid-lavc \ |
438 |
--disable-twolame --disable-toolame" |
439 |
fi |
440 |
|
441 |
############### |
442 |
# Binary codecs |
443 |
############### |
444 |
# bug 213836 |
445 |
if ! use x86 || ! use win32codecs; then |
446 |
use quicktime || myconf="${myconf} --disable-qtx" |
447 |
fi |
448 |
|
449 |
############### |
450 |
# RealPlayer support |
451 |
############### |
452 |
# |
453 |
# Realplayer support shows up in four places: |
454 |
# - libavcodec (internal) |
455 |
# - win32codecs |
456 |
# - realcodecs (win32codecs libs) |
457 |
# - realcodecs (realplayer libs) |
458 |
# |
459 |
|
460 |
# internal |
461 |
use real || myconf="${myconf} --disable-real" |
462 |
|
463 |
# Real binary codec support only available on x86, amd64 |
464 |
if use real; then |
465 |
use x86 && myconf="${myconf} \ |
466 |
--realcodecsdir=/opt/RealPlayer/codecs" |
467 |
use amd64 && myconf="${myconf} \ |
468 |
--realcodecsdir=/usr/$(get_libdir)/codecs" |
469 |
elif ! use bindist; then |
470 |
myconf="${myconf} $(use_enable win32codecs win32dll)" |
471 |
fi |
472 |
|
473 |
############# |
474 |
# Video Output # |
475 |
############# |
476 |
for x in directfb ggi md5sum sdl xinerama; do |
477 |
use ${x} || myconf="${myconf} --disable-${x}" |
478 |
done |
479 |
use aalib || myconf="${myconf} --disable-aa" |
480 |
use dga || myconf="${myconf} --disable-dga1 --disable-dga2" |
481 |
use dxr3 || myconf="${myconf} --disable-dxr3" |
482 |
use fbcon || myconf="${myconf} --disable-fbdev" |
483 |
use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb" |
484 |
use libcaca || myconf="${myconf} --disable-caca" |
485 |
use opengl || myconf="${myconf} --disable-gl" |
486 |
use video_cards_vesa || myconf="${myconf} --disable-vesa" |
487 |
use video_cards_nvidia && use vdpau || myconf="${myconf} --disable-vdpau" |
488 |
use vidix || myconf="${myconf} --disable-vidix --disable-vidix-pcidb" |
489 |
use zoran || myconf="${myconf} --disable-zr" |
490 |
|
491 |
# GTK gmplayer gui |
492 |
# Unsupported by Gentoo, upstream has dropped development |
493 |
myconf="${myconf} $(use_enable gmplayer gui)" |
494 |
|
495 |
if use xv; then |
496 |
if use xvmc; then |
497 |
myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW" |
498 |
else |
499 |
myconf="${myconf} --disable-xvmc" |
500 |
fi |
501 |
else |
502 |
myconf="${myconf} --disable-xv --disable-xvmc" |
503 |
fi |
504 |
|
505 |
if ! use kernel_linux && ! use video_cards_mga; then |
506 |
myconf="${myconf} --disable-mga --disable-xmga" |
507 |
fi |
508 |
|
509 |
if use video_cards_tdfx; then |
510 |
myconf="${myconf} $(use_enable video_cards_tdfx tdfxvid) \ |
511 |
$(use_enable fbcon tdfxfb)" |
512 |
else |
513 |
myconf="${myconf} --disable-3dfx --disable-tdfxvid --disable-tdfxfb" |
514 |
fi |
515 |
|
516 |
############# |
517 |
# Audio Output # |
518 |
############# |
519 |
for x in alsa esd jack ladspa nas openal; do |
520 |
use ${x} || myconf="${myconf} --disable-${x}" |
521 |
done |
522 |
use pulseaudio || myconf="${myconf} --disable-pulse" |
523 |
if ! use radio; then |
524 |
use oss || myconf="${myconf} --disable-ossaudio" |
525 |
fi |
526 |
|
527 |
################# |
528 |
# Advanced Options # |
529 |
################# |
530 |
# Platform specific flags, hardcoded on amd64 (see below) |
531 |
if use cpudetection; then |
532 |
myconf="${myconf} --enable-runtime-cpudetection" |
533 |
fi |
534 |
|
535 |
# Turning off CPU optimizations usually will break the build. |
536 |
# However, this use flag, if enabled, will allow users to completely |
537 |
# specify which ones to use. If disabled, mplayer will automatically |
538 |
# enable all CPU optimizations that the host build supports. |
539 |
if use custom-cpuopts; then |
540 |
for x in 3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3; do |
541 |
myconf="${myconf} $(use_enable $x)" |
542 |
done |
543 |
fi |
544 |
|
545 |
use debug && myconf="${myconf} --enable-debug=3" |
546 |
|
547 |
if use custom-cflags; then |
548 |
|
549 |
# ugly optimizations cause MPlayer to cry on x86 systems! |
550 |
if use x86 || use x86-fbsd ; then |
551 |
replace-flags -O* -O2 |
552 |
filter-flags -fPIC -fPIE |
553 |
|
554 |
use debug || append-flags -fomit-frame-pointer |
555 |
fi |
556 |
append-flags -D__STDC_LIMIT_MACROS |
557 |
else |
558 |
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS YASMFLAGS |
559 |
fi |
560 |
|
561 |
myconf="--cc=$(tc-getCC) \ |
562 |
--host-cc=$(tc-getBUILD_CC) \ |
563 |
--prefix=/usr \ |
564 |
--confdir=/etc/mplayer \ |
565 |
--datadir=/usr/share/mplayer \ |
566 |
--libdir=/usr/$(get_libdir) \ |
567 |
${myconf}" |
568 |
|
569 |
#echo "CFLAGS=\"${CFLAGS}\" ./configure ${myconf}" |
570 |
CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died" |
571 |
|
572 |
} |
573 |
|
574 |
src_compile() { |
575 |
emake || die "Failed to build MPlayer!" |
576 |
use doc && make -C DOCS/xml html-chunked |
577 |
} |
578 |
|
579 |
src_install() { |
580 |
|
581 |
make prefix="${D}/usr" \ |
582 |
BINDIR="${D}/usr/bin" \ |
583 |
LIBDIR="${D}/usr/$(get_libdir)" \ |
584 |
CONFDIR="${D}/etc/mplayer" \ |
585 |
DATADIR="${D}/usr/share/mplayer" \ |
586 |
MANDIR="${D}/usr/share/man" \ |
587 |
INSTALLSTRIP="" \ |
588 |
install || die "Failed to install MPlayer!" |
589 |
|
590 |
dodoc AUTHORS Changelog Copyright README etc/codecs.conf |
591 |
|
592 |
docinto tech/ |
593 |
dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} |
594 |
docinto TOOLS/ |
595 |
dodoc TOOLS/* |
596 |
if use real; then |
597 |
docinto tech/realcodecs/ |
598 |
dodoc DOCS/tech/realcodecs/* |
599 |
docinto TOOLS/realcodecs/ |
600 |
dodoc TOOLS/realcodecs/* |
601 |
fi |
602 |
docinto tech/mirrors/ |
603 |
dodoc DOCS/tech/mirrors/* |
604 |
|
605 |
use doc && dohtml -r "${S}"/DOCS/HTML/* |
606 |
|
607 |
# Install the default Skin and Gnome menu entry |
608 |
if use gmplayer; then |
609 |
dodir /usr/share/mplayer/skins |
610 |
cp -r "${WORKDIR}/Blue" \ |
611 |
"${D}/usr/share/mplayer/skins/default" || die "cp skins died" |
612 |
|
613 |
# Fix the symlink |
614 |
rm -rf "${D}/usr/bin/gmplayer" |
615 |
dosym mplayer /usr/bin/gmplayer |
616 |
fi |
617 |
|
618 |
if ! use ass && ! use truetype; then |
619 |
dodir /usr/share/mplayer/fonts |
620 |
local x= |
621 |
# Do this generic, as the mplayer people like to change the structure |
622 |
# of their zips ... |
623 |
for x in $(find "${WORKDIR}/" -type d -name 'font-arial-*') |
624 |
do |
625 |
cp -pPR "${x}" "${D}/usr/share/mplayer/fonts" |
626 |
done |
627 |
# Fix the font symlink ... |
628 |
rm -rf "${D}/usr/share/mplayer/font" |
629 |
dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font |
630 |
fi |
631 |
|
632 |
insinto /etc/mplayer |
633 |
newins "${S}/etc/example.conf" mplayer.conf |
634 |
|
635 |
if use ass || use truetype; then |
636 |
cat >> "${D}/etc/mplayer/mplayer.conf" << EOT |
637 |
fontconfig=1 |
638 |
subfont-osd-scale=4 |
639 |
subfont-text-scale=3 |
640 |
EOT |
641 |
fi |
642 |
|
643 |
# bug 256203 |
644 |
if use rar; then |
645 |
cat >> "${D}/etc/mplayer/mplayer.conf" << EOT |
646 |
unrarexec=/usr/bin/unrar |
647 |
EOT |
648 |
fi |
649 |
|
650 |
dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf |
651 |
|
652 |
newbin "${S}/TOOLS/midentify.sh" midentify |
653 |
|
654 |
insinto /usr/share/mplayer |
655 |
doins "${S}/etc/input.conf" |
656 |
use osdmenu && doins "${S}/etc/menu.conf" |
657 |
} |
658 |
|
659 |
pkg_preinst() { |
660 |
|
661 |
if [[ -d ${ROOT}/usr/share/mplayer/Skin/default ]] |
662 |
then |
663 |
rm -rf "${ROOT}/usr/share/mplayer/Skin/default" |
664 |
fi |
665 |
} |
666 |
|
667 |
pkg_postrm() { |
668 |
|
669 |
# Cleanup stale symlinks |
670 |
if [ -L "${ROOT}/usr/share/mplayer/font" -a \ |
671 |
! -e "${ROOT}/usr/share/mplayer/font" ] |
672 |
then |
673 |
rm -f "${ROOT}/usr/share/mplayer/font" |
674 |
fi |
675 |
|
676 |
if [ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \ |
677 |
! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ] |
678 |
then |
679 |
rm -f "${ROOT}/usr/share/mplayer/subfont.ttf" |
680 |
fi |
681 |
} |