1 |
scarabeus 10/05/06 13:38:12 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: mplayer-1.0_rc4_p20100506.ebuild |
5 |
Removed: mplayer-1.0_rc4_p20100427.ebuild |
6 |
mplayer-1.0_rc4_p20100213-r1.ebuild |
7 |
Log: |
8 |
Rollup new snapshot. Drop old. This should be stable candidate. |
9 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.738 media-video/mplayer/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.738&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.738&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?r1=1.737&r2=1.738 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v |
21 |
retrieving revision 1.737 |
22 |
retrieving revision 1.738 |
23 |
diff -u -r1.737 -r1.738 |
24 |
--- ChangeLog 5 May 2010 08:37:34 -0000 1.737 |
25 |
+++ ChangeLog 6 May 2010 13:38:12 -0000 1.738 |
26 |
@@ -1,6 +1,17 @@ |
27 |
# ChangeLog for media-video/mplayer |
28 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.737 2010/05/05 08:37:34 scarabeus Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.738 2010/05/06 13:38:12 scarabeus Exp $ |
31 |
+ |
32 |
+*mplayer-1.0_rc4_p20100506 (06 May 2010) |
33 |
+ |
34 |
+ 06 May 2010; Tomáš Chvátal <scarabeus@g.o> |
35 |
+ -files/mplayer-1.0_rc2_p20090322-fix-undeclared-spudec.patch, |
36 |
+ -files/mplayer-1.0_rc2_p20090530-fix-mp3lib-use-local-labels-2.patch, |
37 |
+ -files/mplayer-1.0_rc2_p20090731-linguas.patch, |
38 |
+ -mplayer-1.0_rc4_p20100213-r1.ebuild, -mplayer-1.0_rc4_p20100427.ebuild, |
39 |
+ +mplayer-1.0_rc4_p20100506.ebuild, |
40 |
+ -files/mplayer-1.0_rc4_p20091124-r1-libtheora.patch: |
41 |
+ Rollup new snapshot. Drop old. This should be stable candidate. |
42 |
|
43 |
05 May 2010; Tomáš Chvátal <scarabeus@g.o> mplayer-9999.ebuild: |
44 |
Remove emake call from src_compile, is already run by base eclass. |
45 |
|
46 |
|
47 |
|
48 |
1.1 media-video/mplayer/mplayer-1.0_rc4_p20100506.ebuild |
49 |
|
50 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20100506.ebuild?rev=1.1&view=markup |
51 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20100506.ebuild?rev=1.1&content-type=text/plain |
52 |
|
53 |
Index: mplayer-1.0_rc4_p20100506.ebuild |
54 |
=================================================================== |
55 |
# Copyright 1999-2010 Gentoo Foundation |
56 |
# Distributed under the terms of the GNU General Public License v2 |
57 |
# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20100506.ebuild,v 1.1 2010/05/06 13:38:12 scarabeus Exp $ |
58 |
|
59 |
EAPI="2" |
60 |
|
61 |
ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" |
62 |
[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion" || SVN_ECLASS="" |
63 |
|
64 |
inherit eutils flag-o-matic multilib base ${SVN_ECLASS} |
65 |
|
66 |
[[ ${PV} != *9999* ]] && MPLAYER_REVISION=SVN-r30554 |
67 |
|
68 |
IUSE="3dnow 3dnowext +a52 aalib +alsa altivec +ass bidi bindist bl bs2b |
69 |
+cddb +cdio cdparanoia cpudetection custom-cpuopts debug dga +dirac directfb |
70 |
doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac +faad fbcon ftp |
71 |
gif ggi -gmplayer +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa |
72 |
libcaca lirc +live lzo mad md5sum +mmx mmxext mng +mp3 nas +network nut openal |
73 |
amr +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime radio +rar +real +rtc |
74 |
samba +shm +schroedinger sdl +speex sse sse2 ssse3 svga tga +theora +tremor |
75 |
+truetype +toolame +twolame +unicode v4l v4l2 vdpau vidix +vorbis win32codecs |
76 |
+X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc zoran" |
77 |
[[ ${PV} == *9999* ]] && IUSE+=" external-ffmpeg" |
78 |
|
79 |
VIDEO_CARDS="s3virge mga tdfx vesa" |
80 |
for x in ${VIDEO_CARDS}; do |
81 |
IUSE+=" video_cards_${x}" |
82 |
done |
83 |
|
84 |
BLUV="1.7" |
85 |
SVGV="1.9.17" |
86 |
AMR_URI="http://www.3gpp.org/ftp/Specs/archive" |
87 |
FONT_URI=" |
88 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
89 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
90 |
mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 |
91 |
" |
92 |
if [[ ${PV} == *9999* ]]; then |
93 |
RELEASE_URI="" |
94 |
else |
95 |
RELEASE_URI="mirror://gentoo/${P}.tar.bz2" |
96 |
fi |
97 |
SRC_URI="${RELEASE_URI} |
98 |
!truetype? ( ${FONT_URI} ) |
99 |
gmplayer? ( mirror://mplayer/skins/Blue-${BLUV}.tar.bz2 ) |
100 |
svga? ( mirror://gentoo/svgalib_helper-${SVGV}-mplayer.tar.gz )" |
101 |
|
102 |
DESCRIPTION="Media Player for Linux" |
103 |
HOMEPAGE="http://www.mplayerhq.hu/" |
104 |
|
105 |
FONT_RDEPS=" |
106 |
virtual/ttf-fonts |
107 |
media-libs/fontconfig |
108 |
>=media-libs/freetype-2.2.1:2 |
109 |
" |
110 |
X_RDEPS=" |
111 |
x11-libs/libXext |
112 |
x11-libs/libXxf86vm |
113 |
" |
114 |
[[ ${PV} == *9999* ]] && RDEPEND+=" external-ffmpeg? ( media-video/ffmpeg )" |
115 |
# Rar: althrought -gpl version is nice, it cant do most functions normal rars can |
116 |
# nemesi? ( net-libs/libnemesi ) |
117 |
RDEPEND+=" |
118 |
sys-libs/ncurses |
119 |
!bindist? ( |
120 |
x86? ( |
121 |
win32codecs? ( media-libs/win32codecs ) |
122 |
) |
123 |
) |
124 |
X? ( |
125 |
${X_RDEPS} |
126 |
dga? ( x11-libs/libXxf86dga ) |
127 |
ggi? ( |
128 |
media-libs/libggi |
129 |
media-libs/libggiwmh |
130 |
) |
131 |
gmplayer? ( |
132 |
media-libs/libpng |
133 |
x11-libs/gtk+:2 |
134 |
x11-libs/libXi |
135 |
) |
136 |
opengl? ( virtual/opengl ) |
137 |
vdpau? ( || ( x11-libs/libvdpau >=x11-drivers/nvidia-drivers-180.51 ) ) |
138 |
xinerama? ( x11-libs/libXinerama ) |
139 |
xscreensaver? ( x11-libs/libXScrnSaver ) |
140 |
xv? ( |
141 |
x11-libs/libXv |
142 |
xvmc? ( x11-libs/libXvMC ) |
143 |
) |
144 |
) |
145 |
aalib? ( media-libs/aalib ) |
146 |
alsa? ( media-libs/alsa-lib ) |
147 |
amr? ( !bindist? ( media-libs/opencore-amr ) ) |
148 |
ass? ( ${FONT_RDEPS} media-libs/libass ) |
149 |
bidi? ( dev-libs/fribidi ) |
150 |
bs2b? ( media-libs/libbs2b ) |
151 |
cdio? ( dev-libs/libcdio ) |
152 |
cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) |
153 |
dirac? ( media-video/dirac ) |
154 |
directfb? ( dev-libs/DirectFB ) |
155 |
dts? ( media-libs/libdca ) |
156 |
dv? ( media-libs/libdv ) |
157 |
dvb? ( media-tv/linuxtv-dvb-headers ) |
158 |
encode? ( |
159 |
!twolame? ( toolame? ( media-sound/toolame ) ) |
160 |
twolame? ( media-sound/twolame ) |
161 |
faac? ( media-libs/faac ) |
162 |
mp3? ( media-sound/lame ) |
163 |
x264? ( >=media-libs/x264-0.0.20100423 ) |
164 |
xvid? ( media-libs/xvid ) |
165 |
) |
166 |
esd? ( media-sound/esound ) |
167 |
enca? ( app-i18n/enca ) |
168 |
faad? ( media-libs/faad2 ) |
169 |
gif? ( media-libs/giflib ) |
170 |
jack? ( media-sound/jack-audio-connection-kit ) |
171 |
jpeg? ( media-libs/jpeg ) |
172 |
jpeg2k? ( media-libs/openjpeg ) |
173 |
ladspa? ( media-libs/ladspa-sdk ) |
174 |
libcaca? ( media-libs/libcaca ) |
175 |
lirc? ( app-misc/lirc ) |
176 |
live? ( media-plugins/live ) |
177 |
lzo? ( >=dev-libs/lzo-2 ) |
178 |
mad? ( media-libs/libmad ) |
179 |
mng? ( media-libs/libmng ) |
180 |
nas? ( media-libs/nas ) |
181 |
nut? ( >=media-libs/libnut-661 ) |
182 |
openal? ( media-libs/openal ) |
183 |
png? ( media-libs/libpng ) |
184 |
pnm? ( media-libs/netpbm ) |
185 |
pulseaudio? ( media-sound/pulseaudio ) |
186 |
rar? ( |
187 |
|| ( |
188 |
app-arch/unrar |
189 |
app-arch/rar |
190 |
) |
191 |
) |
192 |
samba? ( net-fs/samba ) |
193 |
schroedinger? ( media-libs/schroedinger ) |
194 |
sdl? ( media-libs/libsdl ) |
195 |
speex? ( media-libs/speex ) |
196 |
svga? ( media-libs/svgalib ) |
197 |
theora? ( media-libs/libtheora ) |
198 |
truetype? ( ${FONT_RDEPS} ) |
199 |
vorbis? ( media-libs/libvorbis ) |
200 |
xanim? ( media-video/xanim ) |
201 |
" |
202 |
|
203 |
X_DEPS=" |
204 |
x11-proto/videoproto |
205 |
x11-proto/xf86vidmodeproto |
206 |
" |
207 |
ASM_DEP="dev-lang/yasm" |
208 |
DEPEND="${RDEPEND} |
209 |
dev-util/pkgconfig |
210 |
X? ( |
211 |
${X_DEPS} |
212 |
dga? ( x11-proto/xf86dgaproto ) |
213 |
dxr3? ( media-video/em8300-libraries ) |
214 |
gmplayer? ( x11-proto/xextproto ) |
215 |
xinerama? ( x11-proto/xineramaproto ) |
216 |
xscreensaver? ( x11-proto/scrnsaverproto ) |
217 |
) |
218 |
amd64? ( ${ASM_DEP} ) |
219 |
doc? ( dev-libs/libxslt ) |
220 |
iconv? ( virtual/libiconv ) |
221 |
x86? ( ${ASM_DEP} ) |
222 |
x86-fbsd? ( ${ASM_DEP} ) |
223 |
" |
224 |
|
225 |
SLOT="0" |
226 |
LICENSE="GPL-2" |
227 |
if [[ ${PV} != *9999* ]]; then |
228 |
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
229 |
else |
230 |
KEYWORDS="" |
231 |
fi |
232 |
|
233 |
PATCHES=( |
234 |
) |
235 |
|
236 |
pkg_setup() { |
237 |
if [[ ${PV} == *9999* ]]; then |
238 |
elog "" |
239 |
elog "This is a live ebuild which installs the latest from upstream's" |
240 |
elog "subversion repository, and is unsupported by Gentoo." |
241 |
elog "Everything but bugs in the ebuild itself will be ignored." |
242 |
elog "" |
243 |
fi |
244 |
|
245 |
if use gmplayer; then |
246 |
ewarn "" |
247 |
ewarn "GMPlayer is no longer actively developed upstream" |
248 |
ewarn "and is not supported by Gentoo. There are alternatives" |
249 |
ewarn "for a GUI frontend: smplayer, gnome-mplayer or kmplayer." |
250 |
fi |
251 |
|
252 |
if use cpudetection; then |
253 |
ewarn "" |
254 |
ewarn "You've enabled the cpudetection flag. This feature is" |
255 |
ewarn "included mainly for people who want to use the same" |
256 |
ewarn "binary on another system with a different CPU architecture." |
257 |
ewarn "MPlayer will already detect your CPU settings by default at" |
258 |
ewarn "buildtime; this flag is used for runtime detection." |
259 |
ewarn "You won't need this turned on if you are only building" |
260 |
ewarn "mplayer for this system. Also, if your compile fails, try" |
261 |
ewarn "disabling this use flag." |
262 |
fi |
263 |
|
264 |
if use custom-cpuopts; then |
265 |
ewarn "" |
266 |
ewarn "You are using the custom-cpuopts flag which will" |
267 |
ewarn "specifically allow you to enable / disable certain" |
268 |
ewarn "CPU optimizations." |
269 |
ewarn "" |
270 |
ewarn "Most desktop users won't need this functionality, but it" |
271 |
ewarn "is included for corner cases like cross-compiling and" |
272 |
ewarn "certain profiles. If unsure, disable this flag and MPlayer" |
273 |
ewarn "will automatically detect and use your available CPU" |
274 |
ewarn "optimizations." |
275 |
ewarn "" |
276 |
ewarn "Using this flag means your build is unsupported, so" |
277 |
ewarn "please make sure your CPU optimization use flags (3dnow" |
278 |
ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." |
279 |
fi |
280 |
} |
281 |
|
282 |
src_unpack() { |
283 |
[[ ${PV} = *9999* ]] && subversion_src_unpack || unpack ${A} |
284 |
|
285 |
if ! use truetype; then |
286 |
unpack font-arial-iso-8859-1.tar.bz2 \ |
287 |
font-arial-iso-8859-2.tar.bz2 \ |
288 |
font-arial-cp1250.tar.bz2 |
289 |
fi |
290 |
|
291 |
use gmplayer && unpack "Blue-${BLUV}.tar.bz2" |
292 |
use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.gz" |
293 |
} |
294 |
|
295 |
src_prepare() { |
296 |
if [[ ${PV} = *9999* ]]; then |
297 |
# Set SVN version manually |
298 |
subversion_wc_info |
299 |
sed -i s/UNKNOWN/${ESVN_WC_REVISION}/ "${S}/version.sh" |
300 |
else |
301 |
# Set version # |
302 |
sed -i s/UNKNOWN/${MPLAYER_REVISION}/ "${S}/version.sh" |
303 |
fi |
304 |
|
305 |
if use svga; then |
306 |
echo |
307 |
einfo "Enabling vidix non-root mode." |
308 |
einfo "(You need a proper svgalib_helper.o module for your kernel" |
309 |
einfo "to actually use this)" |
310 |
echo |
311 |
|
312 |
mv "${WORKDIR}/svgalib_helper" "${S}/libdha" |
313 |
fi |
314 |
|
315 |
base_src_prepare |
316 |
} |
317 |
|
318 |
src_configure() { |
319 |
local myconf="" |
320 |
local uses i |
321 |
|
322 |
# set LINGUAS |
323 |
[[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" |
324 |
|
325 |
# mplayer ebuild uses "use foo || --disable-foo" to forcibly disable |
326 |
# compilation in almost every situation. The reason for this is |
327 |
# because if --enable is used, it will force the build of that option, |
328 |
# regardless of whether the dependency is available or not. |
329 |
|
330 |
################### |
331 |
#Optional features# |
332 |
################### |
333 |
myconf+=" |
334 |
--disable-arts |
335 |
--disable-kai |
336 |
$(use_enable network) |
337 |
$(use_enable joystick) |
338 |
" |
339 |
uses="ass bl enca ftp rtc" # nemesi <- not working with in-tree ebuild |
340 |
myconf+=" --disable-nemesi" # nemesi automagic disable |
341 |
myconf+=" --disable-ass-internal" # always use system libass |
342 |
for i in ${uses}; do |
343 |
use ${i} || myconf+=" --disable-${i}" |
344 |
done |
345 |
use bidi || myconf+=" --disable-fribidi" |
346 |
use encode || myconf+=" --disable-mencoder" |
347 |
use ipv6 || myconf+=" --disable-inet6" |
348 |
use nut || myconf+=" --disable-libnut" |
349 |
use rar || myconf+=" --disable-unrarexec" |
350 |
use samba || myconf+=" --disable-smb" |
351 |
if ! use lirc; then |
352 |
myconf+=" |
353 |
--disable-lirc |
354 |
--disable-lircc |
355 |
--disable-apple-ir |
356 |
" |
357 |
fi |
358 |
|
359 |
# libcdio support: prefer libcdio over cdparanoia |
360 |
# don't check for cddb w/cdio |
361 |
if use cdio; then |
362 |
myconf+=" --disable-cdparanoia" |
363 |
else |
364 |
myconf+=" --disable-libcdio" |
365 |
use cdparanoia || myconf+=" --disable-cdparanoia" |
366 |
use cddb || myconf+=" --disable-cddb" |
367 |
fi |
368 |
|
369 |
################################ |
370 |
# DVD read, navigation support # |
371 |
################################ |
372 |
# |
373 |
# dvdread - accessing a DVD |
374 |
# dvdnav - navigation of menus |
375 |
# |
376 |
# internal dvdread and dvdnav use flags enable internal |
377 |
# versions of the libraries, which are snapshots of the fork. |
378 |
|
379 |
if use dvd; then |
380 |
use dvdnav || myconf+=" --disable-dvdnav" |
381 |
else |
382 |
myconf+=" |
383 |
--disable-dvdnav |
384 |
--disable-dvdread |
385 |
--disable-dvdread-internal |
386 |
--disable-libdvdcss-internal |
387 |
" |
388 |
fi |
389 |
|
390 |
############# |
391 |
# Subtitles # |
392 |
############# |
393 |
# |
394 |
# SRT/ASS/SSA (subtitles) requires freetype support |
395 |
# freetype support requires iconv |
396 |
# iconv optionally can use unicode |
397 |
|
398 |
if ! use ass; then |
399 |
if ! use truetype; then |
400 |
myconf+=" --disable-freetype" |
401 |
if ! use iconv; then |
402 |
myconf+=" |
403 |
--disable-iconv |
404 |
--charset=noconv |
405 |
" |
406 |
fi |
407 |
fi |
408 |
fi |
409 |
use iconv && use unicode && myconf+=" --charset=UTF-8" |
410 |
|
411 |
##################################### |
412 |
# DVB / Video4Linux / Radio support # |
413 |
##################################### |
414 |
myconf+=" --disable-tv-bsdbt848" |
415 |
# broken upstream, won't work with recent kernels |
416 |
myconf+=" --disable-ivtv" |
417 |
if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then |
418 |
use dvb || myconf+=" --disable-dvb" |
419 |
use pvr || myconf+=" --disable-pvr" |
420 |
use v4l || myconf+=" --disable-tv-v4l1" |
421 |
use v4l2 || myconf+=" --disable-tv-v4l2" |
422 |
if use radio && { use dvb || use v4l || use v4l2; }; then |
423 |
myconf+=" |
424 |
--enable-radio |
425 |
$(use_enable encode radio-capture) |
426 |
" |
427 |
else |
428 |
myconf+=" |
429 |
--disable-radio-v4l2 |
430 |
--disable-radio-bsdbt848 |
431 |
" |
432 |
fi |
433 |
else |
434 |
myconf+=" |
435 |
--disable-tv |
436 |
--disable-tv-v4l1 |
437 |
--disable-tv-v4l2 |
438 |
--disable-radio |
439 |
--disable-radio-v4l2 |
440 |
--disable-radio-bsdbt848 |
441 |
--disable-dvb |
442 |
--disable-v4l2 |
443 |
--disable-pvr" |
444 |
fi |
445 |
|
446 |
########## |
447 |
# Codecs # |
448 |
########## |
449 |
# Won't work with external liba52 |
450 |
myconf+=" --disable-liba52" |
451 |
use a52 && myconf+=" --enable-liba52-internal" |
452 |
# Use internal musepack codecs for SV7 and SV8 support |
453 |
myconf+=" --disable-musepack" |
454 |
|
455 |
myconf+=" --disable-faad-internal" # always use system media-libs/faad2 |
456 |
use dirac || myconf+=" --disable-libdirac-lavc" |
457 |
use dts || myconf+=" --disable-libdca" |
458 |
use dv || myconf+=" --disable-libdv" |
459 |
use lzo || myconf+=" --disable-liblzo" |
460 |
if ! use mp3; then |
461 |
myconf+=" |
462 |
--disable-mp3lame |
463 |
--disable-mp3lame-lavc |
464 |
--disable-mp3lib |
465 |
" |
466 |
fi |
467 |
use bs2b || myconf+=" --disable-libbs2b" |
468 |
use schroedinger || myconf+=" --disable-libschroedinger-lavc" |
469 |
# Disable opencore-amr with bindist |
470 |
# https://bugs.gentoo.org/show_bug.cgi?id=299405#c6 |
471 |
{ use amr && use !bindist ; } || myconf+=" --disable-libopencore_amrnb --disable-libopencore_amrwb" |
472 |
if ! use png && ! use gmplayer; then |
473 |
myconf+=" --disable-png" |
474 |
fi |
475 |
|
476 |
uses="faad gif jpeg live mad mng pnm speex tga theora xanim" |
477 |
for i in ${uses}; do |
478 |
use ${i} || myconf+=" --disable-${i}" |
479 |
done |
480 |
use jpeg2k || myconf+=" --disable-libopenjpeg" |
481 |
if use vorbis || use tremor; then |
482 |
use tremor || myconf+=" --disable-tremor-internal" |
483 |
use vorbis || myconf+=" --disable-libvorbis" |
484 |
else |
485 |
myconf+=" |
486 |
--disable-tremor-internal |
487 |
--disable-tremor |
488 |
--disable-libvorbis |
489 |
" |
490 |
fi |
491 |
# Encoding |
492 |
if use encode; then |
493 |
uses="faac x264 xvid toolame twolame" |
494 |
for i in ${uses}; do |
495 |
use ${i} || myconf+=" --disable-${i}" |
496 |
done |
497 |
use faac || myconf+=" --disable-faac-lavc" |
498 |
else |
499 |
myconf+=" |
500 |
--disable-faac-lavc |
501 |
--disable-faac |
502 |
--disable-x264 |
503 |
--disable-xvid |
504 |
--disable-x264-lavc |
505 |
--disable-xvid-lavc |
506 |
--disable-twolame |
507 |
--disable-toolame |
508 |
" |
509 |
uses="faac x264 xvid toolame twolame" |
510 |
for i in ${uses}; do |
511 |
use ${i} && elog "Useflag \"${i}\" require \"encode\" useflag enabled to work." |
512 |
done |
513 |
fi |
514 |
|
515 |
################# |
516 |
# Binary codecs # |
517 |
################# |
518 |
# bug 213836 |
519 |
if ! use x86 || ! use win32codecs; then |
520 |
use quicktime || myconf+=" --disable-qtx" |
521 |
fi |
522 |
|
523 |
###################### |
524 |
# RealPlayer support # |
525 |
###################### |
526 |
# Realplayer support shows up in four places: |
527 |
# - libavcodec (internal) |
528 |
# - win32codecs |
529 |
# - realcodecs (win32codecs libs) |
530 |
# - realcodecs (realplayer libs) |
531 |
|
532 |
# internal |
533 |
use real || myconf+=" --disable-real" |
534 |
|
535 |
# Real binary codec support only available on x86, amd64 |
536 |
if use real; then |
537 |
use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs" |
538 |
use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs" |
539 |
elif ! use bindist; then |
540 |
myconf+=" $(use_enable win32codecs win32dll)" |
541 |
fi |
542 |
|
543 |
################ |
544 |
# Video Output # |
545 |
################ |
546 |
uses="directfb md5sum sdl" |
547 |
for i in ${uses}; do |
548 |
use ${i} || myconf+=" --disable-${i}" |
549 |
done |
550 |
use aalib || myconf+=" --disable-aa" |
551 |
use fbcon || myconf+=" --disable-fbdev" |
552 |
use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb" |
553 |
use libcaca || myconf+=" --disable-caca" |
554 |
use zoran || myconf+=" --disable-zr" |
555 |
|
556 |
if ! use kernel_linux && ! use video_cards_mga; then |
557 |
myconf+=" --disable-mga --disable-xmga" |
558 |
fi |
559 |
|
560 |
if use video_cards_tdfx; then |
561 |
myconf+=" |
562 |
$(use_enable video_cards_tdfx tdfxvid) |
563 |
$(use_enable fbcon tdfxfb) |
564 |
" |
565 |
else |
566 |
myconf+=" |
567 |
--disable-3dfx |
568 |
--disable-tdfxvid |
569 |
--disable-tdfxfb |
570 |
" |
571 |
fi |
572 |
|
573 |
################ |
574 |
# Audio Output # |
575 |
################ |
576 |
uses="alsa esd jack ladspa nas openal" |
577 |
for i in ${uses}; do |
578 |
use ${i} || myconf+=" --disable-${i}" |
579 |
done |
580 |
use pulseaudio || myconf+=" --disable-pulse" |
581 |
if ! use radio; then |
582 |
use oss || myconf+=" --disable-ossaudio" |
583 |
fi |
584 |
|
585 |
#################### |
586 |
# Advanced Options # |
587 |
#################### |
588 |
# Platform specific flags, hardcoded on amd64 (see below) |
589 |
if use cpudetection; then |
590 |
myconf+=" --enable-runtime-cpudetection" |
591 |
fi |
592 |
|
593 |
# Turning off CPU optimizations usually will break the build. |
594 |
# However, this use flag, if enabled, will allow users to completely |
595 |
# specify which ones to use. If disabled, mplayer will automatically |
596 |
# enable all CPU optimizations that the host build supports. |
597 |
if use custom-cpuopts; then |
598 |
uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3" |
599 |
for i in ${uses}; do |
600 |
myconf+=" $(use_enable ${i})" |
601 |
done |
602 |
fi |
603 |
|
604 |
use debug && myconf+=" --enable-debug=3" |
605 |
|
606 |
if use x86; then |
607 |
filter-flags -fPIC -fPIE |
608 |
append-ldflags -nopie |
609 |
fi |
610 |
|
611 |
is-flag -O? || append-flags -O2 |
612 |
if use x86 || use x86-fbsd; then |
613 |
use debug || append-flags -fomit-frame-pointer |
614 |
fi |
615 |
|
616 |
########################### |
617 |
# X enabled configuration # |
618 |
########################### |
619 |
if use X; then |
620 |
uses="dxr3 ggi xinerama" |
621 |
for i in ${uses}; do |
622 |
use ${i} || myconf+=" --disable-${i}" |
623 |
done |
624 |
use dga || myconf+=" --disable-dga1 --disable-dga2" |
625 |
use opengl || myconf+=" --disable-gl" |
626 |
use osdmenu && myconf+=" --enable-menu" |
627 |
use vdpau || myconf+=" --disable-vdpau" |
628 |
use video_cards_vesa || myconf+=" --disable-vesa" |
629 |
use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb" |
630 |
use xscreensaver || myconf+=" --disable-xss" |
631 |
|
632 |
# GTK gmplayer gui |
633 |
# Unsupported by Gentoo, upstream has dropped development |
634 |
myconf+=" $(use_enable gmplayer gui)" |
635 |
|
636 |
if use xv; then |
637 |
if use xvmc; then |
638 |
myconf+=" --enable-xvmc --with-xvmclib=XvMCW" |
639 |
else |
640 |
myconf+=" --disable-xvmc" |
641 |
fi |
642 |
else |
643 |
myconf+=" |
644 |
--disable-xv |
645 |
--disable-xvmc |
646 |
" |
647 |
use xvmc && elog "Disabling xvmc because it requires \"xv\" useflag enabled." |
648 |
fi |
649 |
else |
650 |
myconf+=" |
651 |
--disable-dga1 |
652 |
--disable-dga2 |
653 |
--disable-dxr3 |
654 |
--disable-ggi |
655 |
--disable-gl |
656 |
--disable-vdpau |
657 |
--disable-vidix |
658 |
--disable-vidix-pcidb |
659 |
--disable-xinerama |
660 |
--disable-xss |
661 |
--disable-xv |
662 |
--disable-xvmc |
663 |
" |
664 |
uses="dga dxr3 ggi opengl osdmenu vdpau vidix xinerama xscreensaver xv" |
665 |
for i in ${uses}; do |
666 |
use ${i} && elog "Useflag \"${i}\" require \"X\" useflag enabled to work." |
667 |
done |
668 |
fi |
669 |
|
670 |
if [[ ${PV} == *9999* ]]; then |
671 |
################### |
672 |
# External FFmpeg # |
673 |
################### |
674 |
use external-ffmpeg && myconf+=" --disable-libavutil_a --disable-libavcodec_a --disable-libavformat_a --disable-libpostproc_a --disable-libswscale_a" |
675 |
fi |
676 |
|
677 |
myconf="--cc=$(tc-getCC) \ |
678 |
--host-cc=$(tc-getBUILD_CC) \ |
679 |
--prefix=/usr \ |
680 |
--confdir=/etc/mplayer \ |
681 |
--datadir=/usr/share/mplayer \ |
682 |
--libdir=/usr/$(get_libdir) \ |
683 |
${myconf}" |
684 |
|
685 |
CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died" |
686 |
} |
687 |
|
688 |
src_compile() { |
689 |
base_src_compile |
690 |
# Build only user-requested docs if they're available. |
691 |
if use doc ; then |
692 |
# select available languages from $LINGUAS |
693 |
LINGUAS=${LINGUAS/zh/zh_CN} |
694 |
local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" |
695 |
local BUILT_DOCS="" |
696 |
for i in ${LINGUAS} ; do |
697 |
hasq $i ${ALLOWED_LINGUAS} && BUILT_DOCS+=" $i" |
698 |
done |
699 |
if [[ -z $BUILT_DOCS ]] |
700 |
then |
701 |
emake -j1 -C DOCS/xml html-chunked || die "Failed to generate html docs" |
702 |
else |
703 |
for i in ${BUILT_DOCS} ; do |
704 |
emake -j1 -C DOCS/xml html-chunked-$i || die "Failed to generate html docs for $i" |
705 |
done |
706 |
fi |
707 |
fi |
708 |
} |
709 |
|
710 |
src_install() { |
711 |
local i |
712 |
|
713 |
emake prefix="${D}/usr" \ |
714 |
BINDIR="${D}/usr/bin" \ |
715 |
LIBDIR="${D}/usr/$(get_libdir)" \ |
716 |
CONFDIR="${D}/etc/mplayer" \ |
717 |
DATADIR="${D}/usr/share/mplayer" \ |
718 |
MANDIR="${D}/usr/share/man" \ |
719 |
INSTALLSTRIP="" \ |
720 |
install || die "emake install failed" |
721 |
|
722 |
dodoc AUTHORS Changelog Copyright README etc/codecs.conf || die |
723 |
|
724 |
docinto tech/ |
725 |
dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} || die |
726 |
docinto TOOLS/ |
727 |
dodoc TOOLS/* || die |
728 |
if use real; then |
729 |
docinto tech/realcodecs/ |
730 |
dodoc DOCS/tech/realcodecs/* || die |
731 |
docinto TOOLS/realcodecs/ |
732 |
dodoc TOOLS/realcodecs/* || die |
733 |
fi |
734 |
docinto tech/mirrors/ |
735 |
dodoc DOCS/tech/mirrors/* || die |
736 |
|
737 |
if use doc; then |
738 |
docinto html/ |
739 |
dohtml -r "${S}"/DOCS/HTML/* || die |
740 |
fi |
741 |
|
742 |
# Install the default Skin and Gnome menu entry |
743 |
if use gmplayer; then |
744 |
dodir /usr/share/mplayer/skins |
745 |
cp -r "${WORKDIR}/Blue" \ |
746 |
"${D}/usr/share/mplayer/skins/default" || die "cp skins died" |
747 |
|
748 |
# Fix the symlink |
749 |
rm -rf "${D}/usr/bin/gmplayer" |
750 |
dosym mplayer /usr/bin/gmplayer |
751 |
fi |
752 |
|
753 |
if ! use ass && ! use truetype; then |
754 |
dodir /usr/share/mplayer/fonts |
755 |
# Do this generic, as the mplayer people like to change the structure |
756 |
# of their zips ... |
757 |
for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do |
758 |
cp -pPR "${i}" "${D}/usr/share/mplayer/fonts" |
759 |
done |
760 |
# Fix the font symlink ... |
761 |
rm -rf "${D}/usr/share/mplayer/font" |
762 |
dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font |
763 |
fi |
764 |
|
765 |
insinto /etc/mplayer |
766 |
newins "${S}/etc/example.conf" mplayer.conf || die |
767 |
doins "${S}/etc/input.conf" || die |
768 |
if use osdmenu; then |
769 |
doins "${S}/etc/menu.conf" || die |
770 |
fi |
771 |
|
772 |
if use ass || use truetype; then |
773 |
cat >> "${D}/etc/mplayer/mplayer.conf" << _EOF_ |
774 |
fontconfig=1 |
775 |
subfont-osd-scale=4 |
776 |
subfont-text-scale=3 |
777 |
_EOF_ |
778 |
fi |
779 |
|
780 |
# bug 256203 |
781 |
if use rar; then |
782 |
cat >> "${D}/etc/mplayer/mplayer.conf" << _EOF_ |
783 |
unrarexec=/usr/bin/unrar |
784 |
_EOF_ |
785 |
fi |
786 |
|
787 |
dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf |
788 |
newbin "${S}/TOOLS/midentify.sh" midentify || die |
789 |
} |
790 |
|
791 |
pkg_preinst() { |
792 |
[[ -d ${ROOT}/usr/share/mplayer/Skin/default ]] && \ |
793 |
rm -rf "${ROOT}/usr/share/mplayer/Skin/default" |
794 |
} |
795 |
|
796 |
pkg_postrm() { |
797 |
# Cleanup stale symlinks |
798 |
[ -L "${ROOT}/usr/share/mplayer/font" -a \ |
799 |
! -e "${ROOT}/usr/share/mplayer/font" ] && \ |
800 |
rm -f "${ROOT}/usr/share/mplayer/font" |
801 |
|
802 |
[ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \ |
803 |
! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ] && \ |
804 |
rm -f "${ROOT}/usr/share/mplayer/subfont.ttf" |
805 |
} |