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