1 |
beandog 08/10/07 01:56:59 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: mplayer-1.0_rc2_p27725.ebuild |
5 |
Log: |
6 |
Version bump, security bugs 239130 and 231836 |
7 |
(Portage version: 2.2_rc11/cvs/Linux 2.6.26-tuxonice x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.590 media-video/mplayer/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.590&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.590&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?r1=1.589&r2=1.590 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v |
19 |
retrieving revision 1.589 |
20 |
retrieving revision 1.590 |
21 |
diff -u -r1.589 -r1.590 |
22 |
--- ChangeLog 16 Sep 2008 14:06:36 -0000 1.589 |
23 |
+++ ChangeLog 7 Oct 2008 01:56:59 -0000 1.590 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for media-video/mplayer |
26 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.589 2008/09/16 14:06:36 jer Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.590 2008/10/07 01:56:59 beandog Exp $ |
29 |
+ |
30 |
+*mplayer-1.0_rc2_p27725 (07 Oct 2008) |
31 |
+ |
32 |
+ 07 Oct 2008; Steve Dibb <beandog@g.o> |
33 |
+ +mplayer-1.0_rc2_p27725.ebuild: |
34 |
+ Version bump, security bugs 239130 and 231836 |
35 |
|
36 |
16 Sep 2008; Jeroen Roovers <jer@g.o> |
37 |
mplayer-1.0_rc2_p27458.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 media-video/mplayer/mplayer-1.0_rc2_p27725.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2_p27725.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2_p27725.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: mplayer-1.0_rc2_p27725.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2008 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_p27725.ebuild,v 1.1 2008/10/07 01:56:59 beandog Exp $ |
51 |
|
52 |
EAPI="1" |
53 |
|
54 |
inherit eutils flag-o-matic multilib |
55 |
|
56 |
# Ugly hack, feel free to fix |
57 |
MPLAYER_REVISION=27725 |
58 |
|
59 |
IUSE="3dnow 3dnowext +a52 aac -aalib +alsa altivec amrnb amrwb -arts bidi bl |
60 |
bindist cddb cdio cdparanoia -cpudetection -custom-cflags -custom-cpuopts debug |
61 |
dga dirac doc dts dvb directfb +dvd dv dxr3 enca encode esd -fbcon ftp -gif ggi |
62 |
-gtk iconv ipv6 jack joystick -jpeg kernel_linux ladspa -libcaca lirc live lzo |
63 |
+mad -md5sum +mmx mmxext mp2 +mp3 musepack nas nemesi +vorbis opengl |
64 |
openal oss -png -pnm pulseaudio -pvr quicktime radio -rar real rtc -samba schroedinger sdl |
65 |
speex srt sse sse2 ssse3 svga teletext tga +theora +truetype unicode v4l v4l2 vidix win32codecs +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran" |
66 |
|
67 |
VIDEO_CARDS="s3virge mga tdfx vesa" |
68 |
|
69 |
for x in ${VIDEO_CARDS}; do |
70 |
IUSE="${IUSE} video_cards_${x}" |
71 |
done |
72 |
|
73 |
BLUV="1.7" |
74 |
SVGV="1.9.17" |
75 |
AMR_URI="http://www.3gpp.org/ftp/Specs/archive" |
76 |
SRC_URI="mirror://gentoo/${P}.tar.bz2 |
77 |
!truetype? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
78 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
79 |
mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 ) |
80 |
!iconv? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
81 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
82 |
mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 ) |
83 |
gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 ) |
84 |
svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )" |
85 |
|
86 |
DESCRIPTION="Media Player for Linux" |
87 |
HOMEPAGE="http://www.mplayerhq.hu/" |
88 |
|
89 |
RDEPEND="sys-libs/ncurses |
90 |
!bindist? ( |
91 |
x86? ( |
92 |
win32codecs? ( media-libs/win32codecs ) |
93 |
real? ( media-libs/win32codecs |
94 |
media-video/realplayer ) |
95 |
) |
96 |
amd64? ( real? ( media-libs/amd64codecs ) ) |
97 |
) |
98 |
aalib? ( media-libs/aalib ) |
99 |
alsa? ( media-libs/alsa-lib ) |
100 |
amrnb? ( media-libs/amrnb ) |
101 |
amrwb? ( media-libs/amrwb ) |
102 |
arts? ( kde-base/arts ) |
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-0.10.0 ) |
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 |
aac? ( media-libs/faac ) |
115 |
mp2? ( media-sound/twolame ) |
116 |
mp3? ( media-sound/lame ) |
117 |
x264? ( >=media-libs/x264-0.0.20080406 ) |
118 |
) |
119 |
esd? ( media-sound/esound ) |
120 |
enca? ( app-i18n/enca ) |
121 |
gif? ( media-libs/giflib ) |
122 |
ggi? ( media-libs/libggi |
123 |
media-libs/libggiwmh ) |
124 |
gtk? ( media-libs/libpng |
125 |
x11-libs/libXxf86vm |
126 |
x11-libs/libXext |
127 |
x11-libs/libXi |
128 |
=x11-libs/gtk+-2* ) |
129 |
jpeg? ( media-libs/jpeg ) |
130 |
ladspa? ( media-libs/ladspa-sdk ) |
131 |
libcaca? ( media-libs/libcaca ) |
132 |
lirc? ( app-misc/lirc ) |
133 |
lzo? ( >=dev-libs/lzo-2 ) |
134 |
mad? ( media-libs/libmad ) |
135 |
musepack? ( >=media-libs/libmpcdec-1.2.2 ) |
136 |
nas? ( media-libs/nas ) |
137 |
opengl? ( virtual/opengl ) |
138 |
png? ( media-libs/libpng ) |
139 |
pnm? ( media-libs/netpbm ) |
140 |
pulseaudio? ( media-sound/pulseaudio ) |
141 |
samba? ( net-fs/samba ) |
142 |
schroedinger? ( media-libs/schroedinger ) |
143 |
sdl? ( media-libs/libsdl ) |
144 |
speex? ( >=media-libs/speex-1.1.7 ) |
145 |
srt? ( >=media-libs/freetype-2.1 |
146 |
media-libs/fontconfig ) |
147 |
svga? ( media-libs/svgalib ) |
148 |
theora? ( media-libs/libtheora ) |
149 |
live? ( >=media-plugins/live-2007.02.20 ) |
150 |
truetype? ( >=media-libs/freetype-2.1 |
151 |
media-libs/fontconfig ) |
152 |
vidix? ( x11-libs/libXxf86vm |
153 |
x11-libs/libXext ) |
154 |
xanim? ( media-video/xanim ) |
155 |
xinerama? ( x11-libs/libXinerama |
156 |
x11-libs/libXxf86vm |
157 |
x11-libs/libXext ) |
158 |
xscreensaver? ( x11-libs/libXScrnSaver ) |
159 |
xv? ( x11-libs/libXv |
160 |
x11-libs/libXxf86vm |
161 |
x11-libs/libXext |
162 |
xvmc? ( x11-libs/libXvMC ) ) |
163 |
xvid? ( media-libs/xvid ) |
164 |
X? ( x11-libs/libXxf86vm |
165 |
x11-libs/libXext |
166 |
)" |
167 |
|
168 |
DEPEND="${RDEPEND} |
169 |
doc? ( >=app-text/docbook-sgml-dtd-4.1.2 |
170 |
app-text/docbook-xml-dtd |
171 |
>=app-text/docbook-xml-simple-dtd-1.50.0 |
172 |
dev-libs/libxslt ) |
173 |
dga? ( x11-proto/xf86dgaproto ) |
174 |
dxr3? ( media-video/em8300-libraries ) |
175 |
xinerama? ( x11-proto/xineramaproto ) |
176 |
xv? ( x11-proto/videoproto |
177 |
x11-proto/xf86vidmodeproto ) |
178 |
gtk? ( x11-proto/xextproto |
179 |
x11-proto/xf86vidmodeproto ) |
180 |
X? ( x11-proto/xextproto |
181 |
x11-proto/xf86vidmodeproto ) |
182 |
xscreensaver? ( x11-proto/scrnsaverproto ) |
183 |
iconv? ( virtual/libiconv )" |
184 |
# Make sure the assembler USE flags are unmasked on amd64 |
185 |
# Remove this once default-linux/amd64/2006.1 is deprecated |
186 |
DEPEND="${DEPEND} amd64? ( >=sys-apps/portage-2.1.2 ) |
187 |
mp2? ( >=sys-apps/portage-2.1.2 )" |
188 |
|
189 |
SLOT="0" |
190 |
LICENSE="GPL-2" |
191 |
KEYWORDS="~amd64 ~hppa ~ppc64 ~x86" |
192 |
|
193 |
pkg_setup() { |
194 |
|
195 |
if [[ -n ${LINGUAS} ]]; then |
196 |
elog "" |
197 |
elog "MPlayer's build system uses the LINGUAS variable for both" |
198 |
elog "output messages and which man pages to build. The first" |
199 |
elog "language in the LINGUAS variable will be used to display" |
200 |
elog "output messages. See bug #228799." |
201 |
fi |
202 |
|
203 |
if use gtk; then |
204 |
ewarn "" |
205 |
ewarn "You've enabled the 'gtk' use flag which will build" |
206 |
ewarn "GMPlayer, which is no longer actively developed upstream" |
207 |
ewarn "and is not supported by Gentoo. There are alternatives" |
208 |
ewarn "for a GUI frontend: smplayer, gnome-mplayer and kmplayer." |
209 |
fi |
210 |
|
211 |
if use cpudetection; then |
212 |
ewarn "" |
213 |
ewarn "You've enabled the cpudetection flag. This feature is" |
214 |
ewarn "included mainly for people who want to use the same" |
215 |
ewarn "binary on another system with a different CPU architecture." |
216 |
ewarn "MPlayer will already detect your CPU settings by default at" |
217 |
ewarn "buildtime; this flag is used for runtime detection." |
218 |
ewarn "You won't need this turned on if you are only building" |
219 |
ewarn "mplayer for this system. Also, if your compile fails, try" |
220 |
ewarn "disabling this use flag." |
221 |
fi |
222 |
|
223 |
if use custom-cpuopts; then |
224 |
ewarn "" |
225 |
ewarn "You are using the custom-cpuopts flag which will" |
226 |
ewarn "specifically allow you to enable / disable certain" |
227 |
ewarn "CPU optimizations." |
228 |
ewarn "" |
229 |
ewarn "Most desktop users won't need this functionality, but it" |
230 |
ewarn "is included for corner cases like cross-compiling and" |
231 |
ewarn "certain profiles. If unsure, disable this flag and MPlayer" |
232 |
ewarn "will automatically detect and use your available CPU" |
233 |
ewarn "optimizations." |
234 |
ewarn "" |
235 |
ewarn "Using this flag means your build is unsupported, so" |
236 |
ewarn "please make sure your CPU optimization use flags (3dnow" |
237 |
ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." |
238 |
fi |
239 |
} |
240 |
|
241 |
src_unpack() { |
242 |
unpack ${A} |
243 |
|
244 |
if ! use truetype ; then |
245 |
unpack font-arial-iso-8859-1.tar.bz2 \ |
246 |
font-arial-iso-8859-2.tar.bz2 \ |
247 |
font-arial-cp1250.tar.bz2 |
248 |
fi |
249 |
|
250 |
use gtk && unpack "Blue-${BLUV}.tar.bz2" |
251 |
|
252 |
use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.bz2" |
253 |
|
254 |
cd "${S}" |
255 |
|
256 |
# Set version # |
257 |
sed -i s/UNKNOWN/${MPLAYER_REVISION}/ "${S}/version.sh" |
258 |
|
259 |
# Fix hppa compilation |
260 |
use hppa && sed -i -e "s/-O4/-O1/" "${S}/configure" |
261 |
|
262 |
if use svga; then |
263 |
echo |
264 |
einfo "Enabling vidix non-root mode." |
265 |
einfo "(You need a proper svgalib_helper.o module for your kernel" |
266 |
einfo "to actually use this)" |
267 |
echo |
268 |
|
269 |
mv "${WORKDIR}/svgalib_helper" "${S}/libdha" |
270 |
fi |
271 |
|
272 |
# Fix polish spelling errors |
273 |
[[ -n ${LINGUAS} ]] && sed -e 's:Zarządano:Zażądano:' -i help/help_mp-pl.h |
274 |
} |
275 |
|
276 |
src_compile() { |
277 |
|
278 |
local myconf=" --disable-tv-bsdbt848 \ |
279 |
--disable-faad" |
280 |
|
281 |
# broken upstream, won't work with recent kernels |
282 |
myconf="${myconf} --disable-ivtv" |
283 |
|
284 |
# MPlayer reads in the LINGUAS variable from make.conf, and sets |
285 |
# the languages accordingly. Some will have to be altered to match |
286 |
# upstream's naming scheme. |
287 |
[[ -n $LINGUAS ]] && LINGUAS=${LINGUAS/da/dk} |
288 |
|
289 |
################ |
290 |
#Optional features# |
291 |
############### |
292 |
use bidi || myconf="${myconf} --disable-fribidi" |
293 |
use bl && myconf="${myconf} --enable-bl" |
294 |
use enca || myconf="${myconf} --disable-enca" |
295 |
use encode || myconf="${myconf} --disable-mencoder" |
296 |
use ftp || myconf="${myconf} --disable-ftp" |
297 |
use nemesi || myconf="${myconf} --disable-nemesi" |
298 |
use xscreensaver || myconf="${myconf} --disable-xss" |
299 |
|
300 |
# libcdio support: prefer libcdio over cdparanoia |
301 |
# don't check for cddb w/cdio |
302 |
if use cdio; then |
303 |
myconf="${myconf} --disable-cdparanoia" |
304 |
else |
305 |
myconf="${myconf} --disable-libcdio" |
306 |
use cdparanoia || myconf="${myconf} --disable-cdparanoia" |
307 |
use cddb || myconf="${myconf} --disable-cddb" |
308 |
fi |
309 |
|
310 |
# DVD support |
311 |
# dvdread and libdvdcss are internal libs |
312 |
# http://www.mplayerhq.hu/DOCS/HTML/en/dvd.html |
313 |
# You can optionally use external dvdread support, but against |
314 |
# upstream's suggestion. We don't. |
315 |
if ! use dvd; then |
316 |
myconf="${myconf} --disable-dvdnav --disable-dvdread" |
317 |
use a52 || myconf="${myconf} --disable-liba52 \ |
318 |
--disable-liba52-internal" |
319 |
fi |
320 |
|
321 |
|
322 |
# SRT (subtitles) requires freetype support |
323 |
# freetype support requires iconv |
324 |
# iconv optionally can use unicode |
325 |
if ! use srt; then |
326 |
myconf="${myconf} --disable-ass" |
327 |
if ! use truetype; then |
328 |
myconf="${myconf} --disable-freetype" |
329 |
if ! use iconv; then |
330 |
myconf="${myconf} --disable-iconv --charset=noconv" |
331 |
fi |
332 |
fi |
333 |
fi |
334 |
use iconv && use unicode && myconf="${myconf} --charset=UTF-8" |
335 |
|
336 |
use lirc || myconf="${myconf} --disable-lirc --disable-lircc" |
337 |
myconf="${myconf} $(use_enable joystick)" |
338 |
use ipv6 || myconf="${myconf} --disable-inet6" |
339 |
use rar || myconf="${myconf} --disable-unrarexec" |
340 |
use rtc || myconf="${myconf} --disable-rtc" |
341 |
use samba || myconf="${myconf} --disable-smb" |
342 |
|
343 |
# DVB / Video4Linux / Radio support |
344 |
if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then |
345 |
use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead" |
346 |
use pvr || myconf="${myconf} --disable-pvr" |
347 |
use v4l || myconf="${myconf} --disable-tv-v4l1" |
348 |
use v4l2 || myconf="${myconf} --disable-tv-v4l2" |
349 |
use teletext || myconf="${myconf} --disable-tv-teletext" |
350 |
if use radio && { use dvb || use v4l || use v4l2; }; then |
351 |
myconf="${myconf} --enable-radio $(use_enable encode radio-capture)" |
352 |
else |
353 |
myconf="${myconf} --disable-radio-v4l2 --disable-radio-bsdbt848" |
354 |
fi |
355 |
else |
356 |
myconf="${myconf} --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 \ |
357 |
--disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848 \ |
358 |
--disable-dvb --disable-dvbhead --disable-tv-teletext \ |
359 |
--disable-v4l2 --disable-pvr" |
360 |
fi |
361 |
|
362 |
######### |
363 |
# Codecs # |
364 |
######## |
365 |
for x in gif jpeg live mad musepack pnm speex tga theora xanim; do |
366 |
use ${x} || myconf="${myconf} --disable-${x}" |
367 |
done |
368 |
for x in dirac schroedinger ; do |
369 |
use ${x} || myconf="${myconf} --disable-lib${x}-lavc" |
370 |
done |
371 |
use aac || myconf="${myconf} --disable-faac --disable-faac-lavc" |
372 |
use amrnb || myconf="${myconf} --disable-libamr_nb" |
373 |
use amrwb || myconf="${myconf} --disable-libamr_wb" |
374 |
use dts || myconf="${myconf} --disable-libdca" |
375 |
use dv || myconf="${myconf} --disable-libdv" |
376 |
! use png && ! use gtk && myconf="${myconf} --disable-png" |
377 |
use lzo || myconf="${myconf} --disable-liblzo" |
378 |
use encode && use mp2 || myconf="${myconf} --disable-twolame \ |
379 |
--disable-toolame" |
380 |
use mp3 || myconf="${myconf} --disable-mp3lame --disable-mp3lame-lavc" |
381 |
use vorbis || myconf="${myconf} --disable-libvorbis" |
382 |
use x264 || myconf="${myconf} --disable-x264 --disable-x264-lavc" |
383 |
use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods" |
384 |
use xvid || myconf="${myconf} --disable-xvid --disable-xvid-lavc" |
385 |
|
386 |
# Real codec support, only available on x86, amd64 |
387 |
if use real && use x86; then |
388 |
myconf="${myconf} --realcodecsdir=/opt/RealPlayer/codecs" |
389 |
elif use real && use amd64; then |
390 |
myconf="${myconf} --realcodecsdir=/usr/$(get_libdir)/codecs" |
391 |
else |
392 |
myconf="${myconf} --disable-real" |
393 |
fi |
394 |
if ! use bindist && ! use real; then |
395 |
myconf="${myconf} $(use_enable win32codecs win32dll)" |
396 |
fi |
397 |
# bug 213836 |
398 |
if ! use x86 || ! use win32codecs; then |
399 |
use quicktime || myconf="${myconf} --disable-qtx" |
400 |
fi |
401 |
|
402 |
############# |
403 |
# Video Output # |
404 |
############# |
405 |
for x in directfb ggi md5sum sdl xinerama; do |
406 |
use ${x} || myconf="${myconf} --disable-${x}" |
407 |
done |
408 |
use aalib || myconf="${myconf} --disable-aa" |
409 |
use dga || myconf="${myconf} --disable-dga1 --disable-dga2" |
410 |
use fbcon || myconf="${myconf} --disable-fbdev" |
411 |
use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb" |
412 |
use libcaca || myconf="${myconf} --disable-caca" |
413 |
use opengl || myconf="${myconf} --disable-gl" |
414 |
use video_cards_vesa || myconf="${myconf} --disable-vesa" |
415 |
use vidix || myconf="${myconf} --disable-vidix \ |
416 |
--disable-vidix-pcidb" |
417 |
use zoran || myconf="${myconf} --disable-zr" |
418 |
|
419 |
# MPlayer incorrectly looks for DXR3 support, so forcibly enable |
420 |
# if requested. See bug 223587 |
421 |
myconf="${myconf} $(use_enable dxr3)" |
422 |
|
423 |
# GTK gmplayer gui |
424 |
myconf="${myconf} $(use_enable gtk gui)" |
425 |
|
426 |
if use xv; then |
427 |
if use xvmc; then |
428 |
myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW" |
429 |
else |
430 |
myconf="${myconf} --disable-xvmc" |
431 |
fi |
432 |
else |
433 |
myconf="${myconf} --disable-xv --disable-xvmc" |
434 |
fi |
435 |
|
436 |
if ! use kernel_linux && ! use video_cards_mga; then |
437 |
myconf="${myconf} --disable-mga --disable-xmga" |
438 |
fi |
439 |
|
440 |
if use video_cards_tdfx; then |
441 |
myconf="${myconf} $(use_enable video_cards_tdfx tdfxvid) \ |
442 |
$(use_enable fbcon tdfxfb)" |
443 |
else |
444 |
myconf="${myconf} --disable-3dfx --disable-tdfxvid --disable-tdfxfb" |
445 |
fi |
446 |
|
447 |
############# |
448 |
# Audio Output # |
449 |
############# |
450 |
for x in alsa arts esd jack ladspa nas openal; do |
451 |
use ${x} || myconf="${myconf} --disable-${x}" |
452 |
done |
453 |
use pulseaudio || myconf="${myconf} --disable-pulse" |
454 |
if ! use radio; then |
455 |
use oss || myconf="${myconf} --disable-ossaudio" |
456 |
fi |
457 |
################# |
458 |
# Advanced Options # |
459 |
################# |
460 |
# Platform specific flags, hardcoded on amd64 (see below) |
461 |
if use cpudetection || use bindist; then |
462 |
myconf="${myconf} --enable-runtime-cpudetection" |
463 |
fi |
464 |
|
465 |
# Turning off CPU optimizations usually will break the build. |
466 |
# However, this use flag, if enabled, will allow users to completely |
467 |
# specify which ones to use. If disabled, mplayer will automatically |
468 |
# enable all CPU optimizations that the host build supports. |
469 |
if use custom-cpuopts; then |
470 |
for x in 3dnow 3dnowext mmx mmxext sse sse2 ssse3; do |
471 |
myconf="${myconf} $(use_enable $x)" |
472 |
done |
473 |
fi |
474 |
|
475 |
use debug && myconf="${myconf} --enable-debug=3" |
476 |
|
477 |
myconf="${myconf} $(use_enable altivec)" |
478 |
|
479 |
if use custom-cflags; then |
480 |
# let's play the filtration game! MPlayer hates on all! |
481 |
strip-flags |
482 |
# ugly optimizations cause MPlayer to cry on x86 systems! |
483 |
if use x86 || use x86-fbsd ; then |
484 |
replace-flags -O* -O2 |
485 |
filter-flags -fPIC -fPIE |
486 |
|
487 |
use debug || append-flags -fomit-frame-pointer |
488 |
fi |
489 |
append-flags -D__STDC_LIMIT_MACROS |
490 |
else |
491 |
unset CFLAGS CXXFLAGS |
492 |
fi |
493 |
|
494 |
myconf="--cc=$(tc-getCC) \ |
495 |
--host-cc=$(tc-getBUILD_CC) \ |
496 |
--prefix=/usr \ |
497 |
--confdir=/etc/mplayer \ |
498 |
--datadir=/usr/share/mplayer \ |
499 |
--libdir=/usr/$(get_libdir) \ |
500 |
--enable-menu \ |
501 |
--enable-network \ |
502 |
${myconf}" |
503 |
#echo "CFLAGS=\"${CFLAGS}\" ./configure ${myconf}" |
504 |
CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died" |
505 |
|
506 |
emake || die "Failed to build MPlayer!" |
507 |
use doc && make -C DOCS/xml html-chunked |
508 |
} |
509 |
|
510 |
src_install() { |
511 |
|
512 |
make prefix="${D}/usr" \ |
513 |
BINDIR="${D}/usr/bin" \ |
514 |
LIBDIR="${D}/usr/$(get_libdir)" \ |
515 |
CONFDIR="${D}/etc/mplayer" \ |
516 |
DATADIR="${D}/usr/share/mplayer" \ |
517 |
MANDIR="${D}/usr/share/man" \ |
518 |
INSTALLSTRIP="" \ |
519 |
install || die "Failed to install MPlayer!" |
520 |
|
521 |
dodoc AUTHORS Changelog README etc/codecs.conf |
522 |
# Install the documentation; DOCS is all mixed up not just html |
523 |
if use doc ; then |
524 |
find "${S}/DOCS" -type d | xargs -- chmod 0755 |
525 |
find "${S}/DOCS" -type f | xargs -- chmod 0644 |
526 |
cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die "cp docs died" |
527 |
fi |
528 |
|
529 |
# Copy misc tools to documentation path, as they're not installed directly |
530 |
# and yes, we are nuking the +x bit. |
531 |
find "${S}/TOOLS" -type d | xargs -- chmod 0755 |
532 |
find "${S}/TOOLS" -type f | xargs -- chmod 0644 |
533 |
cp -r "${S}/TOOLS" "${D}/usr/share/doc/${PF}/" || die "cp docs died" |
534 |
|
535 |
# Install the default Skin and Gnome menu entry |
536 |
if use gtk; then |
537 |
dodir /usr/share/mplayer/skins |
538 |
cp -r "${WORKDIR}/Blue" \ |
539 |
"${D}/usr/share/mplayer/skins/default" || die "cp skins died" |
540 |
|
541 |
# Fix the symlink |
542 |
rm -rf "${D}/usr/bin/gmplayer" |
543 |
dosym mplayer /usr/bin/gmplayer |
544 |
fi |
545 |
|
546 |
if ! use srt && ! use truetype; then |
547 |
dodir /usr/share/mplayer/fonts |
548 |
local x= |
549 |
# Do this generic, as the mplayer people like to change the structure |
550 |
# of their zips ... |
551 |
for x in $(find "${WORKDIR}/" -type d -name 'font-arial-*') |
552 |
do |
553 |
cp -pPR "${x}" "${D}/usr/share/mplayer/fonts" |
554 |
done |
555 |
# Fix the font symlink ... |
556 |
rm -rf "${D}/usr/share/mplayer/font" |
557 |
dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font |
558 |
fi |
559 |
|
560 |
insinto /etc/mplayer |
561 |
newins "${S}/etc/example.conf" mplayer.conf |
562 |
|
563 |
if use srt || use truetype; then |
564 |
cat >> "${D}/etc/mplayer/mplayer.conf" << EOT |
565 |
fontconfig=1 |
566 |
subfont-osd-scale=4 |
567 |
subfont-text-scale=3 |
568 |
EOT |
569 |
fi |
570 |
|
571 |
dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf |
572 |
|
573 |
newbin "${S}/TOOLS/midentify.sh" midentify |
574 |
|
575 |
insinto /usr/share/mplayer |
576 |
doins "${S}/etc/input.conf" |
577 |
doins "${S}/etc/menu.conf" |
578 |
} |
579 |
|
580 |
pkg_preinst() { |
581 |
|
582 |
if [[ -d ${ROOT}/usr/share/mplayer/Skin/default ]] |
583 |
then |
584 |
rm -rf "${ROOT}/usr/share/mplayer/Skin/default" |
585 |
fi |
586 |
} |
587 |
|
588 |
pkg_postrm() { |
589 |
|
590 |
# Cleanup stale symlinks |
591 |
if [ -L "${ROOT}/usr/share/mplayer/font" -a \ |
592 |
! -e "${ROOT}/usr/share/mplayer/font" ] |
593 |
then |
594 |
rm -f "${ROOT}/usr/share/mplayer/font" |
595 |
fi |
596 |
|
597 |
if [ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \ |
598 |
! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ] |
599 |
then |
600 |
rm -f "${ROOT}/usr/share/mplayer/subfont.ttf" |
601 |
fi |
602 |
} |