1 |
lu_zero 11/11/30 04:49:34 |
2 |
|
3 |
Modified: metadata.xml ChangeLog mplayer2-9999.ebuild |
4 |
Added: mplayer2-2.0_p20111126.ebuild |
5 |
Log: |
6 |
New snapshot, thanks to Nikoli <nikoli@×××××××.com> for the updated ebuild in bug #385115 |
7 |
|
8 |
(Portage version: 2.2.0_alpha76/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.6 media-video/mplayer2/metadata.xml |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/metadata.xml?rev=1.6&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/metadata.xml?rev=1.6&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/metadata.xml?r1=1.5&r2=1.6 |
16 |
|
17 |
Index: metadata.xml |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer2/metadata.xml,v |
20 |
retrieving revision 1.5 |
21 |
retrieving revision 1.6 |
22 |
diff -u -r1.5 -r1.6 |
23 |
--- metadata.xml 3 Apr 2011 20:28:38 -0000 1.5 |
24 |
+++ metadata.xml 30 Nov 2011 04:49:34 -0000 1.6 |
25 |
@@ -21,6 +21,7 @@ |
26 |
</longdescription> |
27 |
<use> |
28 |
<flag name="3dnowext">Enable 3dnowext cpu instructions</flag> |
29 |
+ <flag name="amr">Enables Adaptive Multi-Rate format support</flag> |
30 |
<flag name="ass">SRT/SSA/ASS (SubRip / SubStation Alpha) subtitle support</flag> |
31 |
<flag name="bl">Blinkenlights video output</flag> |
32 |
<flag name="bluray">Enable playback of Blu-ray filesystems</flag> |
33 |
@@ -28,6 +29,7 @@ |
34 |
<flag name="cdio">Use libcdio for CD support (instead of cdparanoia)</flag> |
35 |
<flag name="cpudetection">Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)</flag> |
36 |
<flag name="custom-cpuopts">Fine-tune custom CPU optimizations (UNSUPPORTED)</flag> |
37 |
+ <flag name="dirac">Enable Dirac video support (an advanced royalty-free video compression format) via the reference library: dirac.</flag> |
38 |
<flag name="dvdnav">Use forked libdvdnav, navigate menus in GUIs</flag> |
39 |
<flag name="dxr3">Enable DXR3/H+ video output</flag> |
40 |
<flag name="enca">Enables support for charset discovery and conversion</flag> |
41 |
@@ -46,11 +48,14 @@ |
42 |
<flag name="rar">Enable Unique RAR File Library</flag> |
43 |
<flag name="real">Adds real audo/video support</flag> |
44 |
<flag name="rtc">Enables usage of the linux real time clock. The alternative is software emulation of rtc</flag> |
45 |
+ <flag name="rtmp">Enables RTMP support through librtmp</flag> |
46 |
+ <flag name="schroedinger">Enable Dirac video support (an advanced royalty-free video compression format) via libschroedinger (high-speed implementation in C of the Dirac codec).</flag> |
47 |
<flag name="shm">Enable support for shm</flag> |
48 |
<flag name="ssse3">Faster floating point optimization for SSSE3 capable chips (Intel Core 2 and later chips)</flag> |
49 |
<flag name="tga">Enables Targa video output</flag> |
50 |
<flag name="vdpau">Enables experimental VDPAU support (requires nVidia video cards) to offload MPEG2/MPEG4/VC1/WMV CPU processing to video card</flag> |
51 |
- <flag name="xanim">Enables support for xanim based codecs</flag> |
52 |
+ <flag name="vpx">Enables vp8 codec support using libvpx: Decoding vp8 does not require this to be enabled but libvpx can also be used for decoding; encoding vp8 requires this useflag to be enabled though.</flag> |
53 |
+<flag name="xanim">Enables support for xanim based codecs</flag> |
54 |
<flag name="xvmc">Enables X-Video Motion Compensation support</flag> |
55 |
</use> |
56 |
</pkgmetadata> |
57 |
|
58 |
|
59 |
|
60 |
1.29 media-video/mplayer2/ChangeLog |
61 |
|
62 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/ChangeLog?rev=1.29&view=markup |
63 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/ChangeLog?rev=1.29&content-type=text/plain |
64 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/ChangeLog?r1=1.28&r2=1.29 |
65 |
|
66 |
Index: ChangeLog |
67 |
=================================================================== |
68 |
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v |
69 |
retrieving revision 1.28 |
70 |
retrieving revision 1.29 |
71 |
diff -u -r1.28 -r1.29 |
72 |
--- ChangeLog 1 Nov 2011 20:20:23 -0000 1.28 |
73 |
+++ ChangeLog 30 Nov 2011 04:49:34 -0000 1.29 |
74 |
@@ -1,6 +1,13 @@ |
75 |
# ChangeLog for media-video/mplayer2 |
76 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
77 |
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v 1.28 2011/11/01 20:20:23 mattst88 Exp $ |
78 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/ChangeLog,v 1.29 2011/11/30 04:49:34 lu_zero Exp $ |
79 |
+ |
80 |
+*mplayer2-2.0_p20111126 (30 Nov 2011) |
81 |
+ |
82 |
+ 30 Nov 2011; Luca Barbato <lu_zero@g.o> |
83 |
+ +mplayer2-2.0_p20111126.ebuild: |
84 |
+ New snapshot, thanks to Nikoli <nikoli@×××××××.com> for the updated ebuild in |
85 |
+ bug #385115 |
86 |
|
87 |
01 Nov 2011; Matt Turner <mattst88@g.o> mplayer2-2.0.ebuild: |
88 |
Add ~alpha, bug 365953. |
89 |
|
90 |
|
91 |
|
92 |
1.18 media-video/mplayer2/mplayer2-9999.ebuild |
93 |
|
94 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild?rev=1.18&view=markup |
95 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild?rev=1.18&content-type=text/plain |
96 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild?r1=1.17&r2=1.18 |
97 |
|
98 |
Index: mplayer2-9999.ebuild |
99 |
=================================================================== |
100 |
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild,v |
101 |
retrieving revision 1.17 |
102 |
retrieving revision 1.18 |
103 |
diff -u -r1.17 -r1.18 |
104 |
--- mplayer2-9999.ebuild 1 Nov 2011 01:05:08 -0000 1.17 |
105 |
+++ mplayer2-9999.ebuild 30 Nov 2011 04:49:34 -0000 1.18 |
106 |
@@ -1,6 +1,6 @@ |
107 |
# Copyright 1999-2011 Gentoo Foundation |
108 |
# Distributed under the terms of the GNU General Public License v2 |
109 |
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild,v 1.17 2011/11/01 01:05:08 ssuominen Exp $ |
110 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-9999.ebuild,v 1.18 2011/11/30 04:49:34 lu_zero Exp $ |
111 |
|
112 |
EAPI=4 |
113 |
|
114 |
@@ -32,7 +32,7 @@ |
115 |
libcaca lirc +live mad md5sum +mmx mmxext mng +mp3 nas |
116 |
+network nut +opengl oss png pnm pulseaudio pvr +quicktime |
117 |
radio +rar +real +rtc samba +shm sdl +speex sse sse2 ssse3 |
118 |
-tga +theora +truetype +unicode v4l v4l2 vdpau |
119 |
+tga +theora +truetype +unicode v4l vdpau |
120 |
+vorbis win32codecs +X xanim xinerama +xscreensaver +xv xvid" |
121 |
|
122 |
VIDEO_CARDS="s3virge mga tdfx vesa" |
123 |
|
124 |
|
125 |
|
126 |
1.1 media-video/mplayer2/mplayer2-2.0_p20111126.ebuild |
127 |
|
128 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-2.0_p20111126.ebuild?rev=1.1&view=markup |
129 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer2/mplayer2-2.0_p20111126.ebuild?rev=1.1&content-type=text/plain |
130 |
|
131 |
Index: mplayer2-2.0_p20111126.ebuild |
132 |
=================================================================== |
133 |
# Copyright 1999-2011 Gentoo Foundation |
134 |
# Distributed under the terms of the GNU General Public License v2 |
135 |
# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer2/mplayer2-2.0_p20111126.ebuild,v 1.1 2011/11/30 04:49:34 lu_zero Exp $ |
136 |
|
137 |
EAPI=4 |
138 |
|
139 |
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS="" |
140 |
|
141 |
inherit toolchain-funcs eutils flag-o-matic multilib base ${VCS_ECLASS} |
142 |
|
143 |
NAMESUF="${PN/mplayer/}" |
144 |
DESCRIPTION="Media Player for Linux" |
145 |
HOMEPAGE="http://www.mplayer2.org/" |
146 |
|
147 |
if [[ ${PV} == *9999* ]]; then |
148 |
EGIT_REPO_URI="git://git.mplayer2.org/mplayer2.git" |
149 |
else |
150 |
RELEASE_URI="http://dev.gentoo.org/~lu_zero/${PN}/${P}.tar.xz" |
151 |
fi |
152 |
SRC_URI="${RELEASE_URI} |
153 |
!truetype? ( |
154 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
155 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
156 |
mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 |
157 |
) |
158 |
" |
159 |
|
160 |
LICENSE="GPL-3" |
161 |
SLOT="0" |
162 |
if [[ ${PV} == *9999* ]]; then |
163 |
KEYWORDS="" |
164 |
else |
165 |
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux" |
166 |
fi |
167 |
IUSE="3dnow 3dnowext +a52 aalib +alsa altivec aqua +ass bidi bindist bl |
168 |
bluray bs2b +bzip2 cddb +cdio cdparanoia cpudetection custom-cpuopts |
169 |
custom-cflags debug dga +dirac directfb doc +dts +dv dvb +dvd +dvdnav |
170 |
dxr3 +enca esd +faad fbcon ftp gif ggi gsm +iconv ipv6 jack joystick |
171 |
jpeg jpeg2k kernel_linux ladspa libcaca lirc +live mad md5sum +mmx |
172 |
mmxext mng +mp3 nas +network nut amr +opengl oss png pnm pulseaudio |
173 |
pvr +quicktime radio +rar +real +rtc rtmp samba +shm +schroedinger |
174 |
sdl +speex sse sse2 ssse3 tga +theora threads +truetype +unicode |
175 |
v4l vdpau +vorbis vpx win32codecs +X xanim xinerama +xscreensaver |
176 |
+xv xvid |
177 |
" |
178 |
IUSE+=" symlink" |
179 |
|
180 |
VIDEO_CARDS="s3virge mga tdfx vesa" |
181 |
for x in ${VIDEO_CARDS}; do |
182 |
IUSE+=" video_cards_${x}" |
183 |
done |
184 |
|
185 |
# bindist does not cope with win32codecs, which are nonfree |
186 |
REQUIRED_USE="bindist? ( !win32codecs ) |
187 |
cdio? ( !cdparanoia ) |
188 |
cddb? ( || ( cdio cdparanoia ) network ) |
189 |
dvdnav? ( dvd ) |
190 |
radio? ( || ( dvb v4l ) ) |
191 |
dga? ( X ) |
192 |
dxr3? ( X ) |
193 |
ggi? ( X ) |
194 |
opengl? ( X ) |
195 |
vdpau? ( X ) |
196 |
xinerama? ( X ) |
197 |
xscreensaver? ( X ) |
198 |
xv? ( X ) |
199 |
" |
200 |
|
201 |
FONT_RDEPS=" |
202 |
virtual/ttf-fonts |
203 |
media-libs/fontconfig |
204 |
>=media-libs/freetype-2.2.1:2 |
205 |
" |
206 |
# Rar: althrought -gpl version is nice, it cant do most functions normal rars can |
207 |
# nemesi? ( net-libs/libnemesi ) |
208 |
# virtual/ffmpeg does not have all USE |
209 |
LIBAV_USE="[amr?,bzip2?,dirac?,gsm?,jpeg2k?,rtmp?,schroedinger?,threads?,vpx?]" |
210 |
RDEPEND+=" |
211 |
sys-libs/ncurses |
212 |
sys-libs/zlib |
213 |
!bindist? ( |
214 |
x86? ( |
215 |
win32codecs? ( media-libs/win32codecs ) |
216 |
) |
217 |
) |
218 |
X? ( |
219 |
x11-libs/libXext |
220 |
x11-libs/libXxf86vm |
221 |
dga? ( x11-libs/libXxf86dga ) |
222 |
ggi? ( |
223 |
media-libs/libggi |
224 |
media-libs/libggiwmh |
225 |
) |
226 |
opengl? ( virtual/opengl ) |
227 |
vdpau? ( x11-libs/libvdpau ) |
228 |
xinerama? ( x11-libs/libXinerama ) |
229 |
xscreensaver? ( x11-libs/libXScrnSaver ) |
230 |
xv? ( |
231 |
x11-libs/libXv |
232 |
) |
233 |
) |
234 |
a52? ( media-libs/a52dec ) |
235 |
aalib? ( media-libs/aalib ) |
236 |
alsa? ( media-libs/alsa-lib ) |
237 |
bidi? ( dev-libs/fribidi ) |
238 |
bluray? ( media-libs/libbluray ) |
239 |
bs2b? ( media-libs/libbs2b ) |
240 |
cdio? ( dev-libs/libcdio ) |
241 |
cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) |
242 |
directfb? ( dev-libs/DirectFB ) |
243 |
dts? ( media-libs/libdca ) |
244 |
dv? ( media-libs/libdv ) |
245 |
dvb? ( media-tv/linuxtv-dvb-headers ) |
246 |
dvd? ( |
247 |
>=media-libs/libdvdread-4.1.3 |
248 |
dvdnav? ( >=media-libs/libdvdnav-4.1.3 ) |
249 |
) |
250 |
esd? ( media-sound/esound ) |
251 |
enca? ( app-i18n/enca ) |
252 |
faad? ( media-libs/faad2 ) |
253 |
gif? ( media-libs/giflib ) |
254 |
iconv? ( virtual/libiconv ) |
255 |
jack? ( media-sound/jack-audio-connection-kit ) |
256 |
jpeg? ( virtual/jpeg ) |
257 |
ladspa? ( media-libs/ladspa-sdk ) |
258 |
ass? ( ${FONT_RDEPS} >=media-libs/libass-0.9.10[enca?,fontconfig] ) |
259 |
libcaca? ( media-libs/libcaca ) |
260 |
lirc? ( app-misc/lirc ) |
261 |
live? ( media-plugins/live ) |
262 |
mad? ( media-libs/libmad ) |
263 |
mng? ( media-libs/libmng ) |
264 |
mp3? ( media-sound/mpg123 ) |
265 |
nas? ( media-libs/nas ) |
266 |
nut? ( >=media-libs/libnut-661 ) |
267 |
png? ( media-libs/libpng ) |
268 |
pnm? ( media-libs/netpbm ) |
269 |
pulseaudio? ( media-sound/pulseaudio ) |
270 |
rar? ( |
271 |
|| ( |
272 |
app-arch/unrar |
273 |
app-arch/rar |
274 |
) |
275 |
) |
276 |
samba? ( net-fs/samba ) |
277 |
sdl? ( media-libs/libsdl ) |
278 |
speex? ( media-libs/speex ) |
279 |
theora? ( media-libs/libtheora ) |
280 |
truetype? ( ${FONT_RDEPS} ) |
281 |
vorbis? ( media-libs/libvorbis ) |
282 |
xanim? ( media-video/xanim ) |
283 |
xvid? ( media-libs/xvid ) |
284 |
|| ( |
285 |
>=media-video/libav-0.6.2${LIBAV_USE} |
286 |
>=media-video/ffmpeg-0.6_p25423${LIBAV_USE} |
287 |
) |
288 |
symlink? ( !media-video/mplayer ) |
289 |
" |
290 |
ASM_DEP="dev-lang/yasm" |
291 |
DEPEND="${RDEPEND} |
292 |
dev-util/pkgconfig |
293 |
dev-lang/python |
294 |
sys-devel/gettext |
295 |
X? ( |
296 |
x11-proto/videoproto |
297 |
x11-proto/xf86vidmodeproto |
298 |
dga? ( x11-proto/xf86dgaproto ) |
299 |
dxr3? ( media-video/em8300-libraries ) |
300 |
xinerama? ( x11-proto/xineramaproto ) |
301 |
xscreensaver? ( x11-proto/scrnsaverproto ) |
302 |
) |
303 |
amd64? ( ${ASM_DEP} ) |
304 |
doc? ( |
305 |
dev-libs/libxslt app-text/docbook-xml-dtd |
306 |
app-text/docbook-xsl-stylesheets |
307 |
) |
308 |
x86? ( ${ASM_DEP} ) |
309 |
x86-fbsd? ( ${ASM_DEP} ) |
310 |
" |
311 |
|
312 |
pkg_setup() { |
313 |
if [[ ${PV} == *9999* ]]; then |
314 |
elog |
315 |
elog "This is a live ebuild which installs the latest from upstream's" |
316 |
elog "${VCS_ECLASS} repository, and is unsupported by Gentoo." |
317 |
elog "Everything but bugs in the ebuild itself will be ignored." |
318 |
elog |
319 |
fi |
320 |
|
321 |
if use cpudetection; then |
322 |
ewarn |
323 |
ewarn "You've enabled the cpudetection flag. This feature is" |
324 |
ewarn "included mainly for people who want to use the same" |
325 |
ewarn "binary on another system with a different CPU architecture." |
326 |
ewarn "MPlayer will already detect your CPU settings by default at" |
327 |
ewarn "buildtime; this flag is used for runtime detection." |
328 |
ewarn "You won't need this turned on if you are only building" |
329 |
ewarn "mplayer for this system. Also, if your compile fails, try" |
330 |
ewarn "disabling this use flag." |
331 |
fi |
332 |
|
333 |
if use custom-cpuopts; then |
334 |
ewarn |
335 |
ewarn "You are using the custom-cpuopts flag which will" |
336 |
ewarn "specifically allow you to enable / disable certain" |
337 |
ewarn "CPU optimizations." |
338 |
ewarn |
339 |
ewarn "Most desktop users won't need this functionality, but it" |
340 |
ewarn "is included for corner cases like cross-compiling and" |
341 |
ewarn "certain profiles. If unsure, disable this flag and MPlayer" |
342 |
ewarn "will automatically detect and use your available CPU" |
343 |
ewarn "optimizations." |
344 |
ewarn |
345 |
ewarn "Using this flag means your build is unsupported, so" |
346 |
ewarn "please make sure your CPU optimization use flags (3dnow" |
347 |
ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set." |
348 |
fi |
349 |
|
350 |
einfo "For various format support you need to enable the support on your ffmpeg package:" |
351 |
einfo " media-video/libav or media-video/ffmpeg" |
352 |
} |
353 |
|
354 |
src_prepare() { |
355 |
# fix path to bash executable in configure scripts |
356 |
local bash_scripts="configure version.sh" |
357 |
sed -i -e "1c\#!${EPREFIX}/bin/bash" \ |
358 |
${bash_scripts} || die |
359 |
|
360 |
if [[ -n ${NAMESUF} ]]; then |
361 |
sed -e "/elif linux ; then/a\ _exesuf=\"${NAMESUF}\"" \ |
362 |
-i configure || die |
363 |
sed -e "\, -m 644 DOCS/man/en/mplayer,i\ mv DOCS/man/en/mplayer.1 DOCS/man/en/${PN}.1" \ |
364 |
-e "\, -m 644 DOCS/man/\$(lang)/mplayer,i\ mv DOCS/man/\$(lang)/mplayer.1 DOCS/man/\$(lang)/${PN}.1" \ |
365 |
-e "s/er.1/er${NAMESUF}.1/g" \ |
366 |
-i Makefile || die |
367 |
sed -e "s/mplayer/${PN}/" \ |
368 |
-i TOOLS/midentify.sh || die |
369 |
fi |
370 |
|
371 |
base_src_prepare |
372 |
} |
373 |
|
374 |
src_configure() { |
375 |
local myconf="" |
376 |
local uses i |
377 |
|
378 |
# set LINGUAS |
379 |
[[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" |
380 |
|
381 |
# mplayer ebuild uses "use foo || --disable-foo" to forcibly disable |
382 |
# compilation in almost every situation. The reason for this is |
383 |
# because if --enable is used, it will force the build of that option, |
384 |
# regardless of whether the dependency is available or not. |
385 |
|
386 |
################### |
387 |
#Optional features# |
388 |
################### |
389 |
# disable svga since we don't want it |
390 |
# disable arts since we don't have kde3 |
391 |
# disable tremor, it needs libvorbisidec and is for FPU-less systems only |
392 |
myconf+=" |
393 |
--disable-svga |
394 |
--disable-arts |
395 |
--disable-kai |
396 |
--disable-tremor |
397 |
$(use_enable network networking) |
398 |
$(use_enable joystick) |
399 |
" |
400 |
uses="ass bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild |
401 |
myconf+=" --disable-nemesi" # nemesi automagic disable |
402 |
for i in ${uses}; do |
403 |
use ${i} || myconf+=" --disable-${i}" |
404 |
done |
405 |
use bidi || myconf+=" --disable-fribidi" |
406 |
use ipv6 || myconf+=" --disable-inet6" |
407 |
use nut || myconf+=" --disable-libnut" |
408 |
use rar || myconf+=" --disable-unrarexec" |
409 |
use samba || myconf+=" --disable-smb" |
410 |
if ! use lirc; then |
411 |
myconf+=" |
412 |
--disable-lirc |
413 |
--disable-lircc |
414 |
--disable-apple-ir |
415 |
" |
416 |
fi |
417 |
|
418 |
######## |
419 |
# CDDA # |
420 |
######## |
421 |
use cddb || myconf+=" --disable-cddb" |
422 |
use cdio || myconf+=" --disable-libcdio" |
423 |
use cdparanoia || myconf+=" --disable-cdparanoia" |
424 |
|
425 |
################################ |
426 |
# DVD read, navigation support # |
427 |
################################ |
428 |
# |
429 |
# dvdread - accessing a DVD |
430 |
# dvdnav - navigation of menus |
431 |
# |
432 |
# use external libdvdcss, dvdread and dvdnav |
433 |
myconf+=" --disable-dvdread-internal --disable-libdvdcss-internal" |
434 |
if use dvd; then |
435 |
use dvdnav || myconf+=" --disable-dvdnav" |
436 |
else |
437 |
myconf+=" |
438 |
--disable-dvdnav |
439 |
--disable-dvdread |
440 |
" |
441 |
fi |
442 |
|
443 |
############# |
444 |
# Subtitles # |
445 |
############# |
446 |
# SRT/ASS/SSA (subtitles) requires freetype support |
447 |
# freetype support requires iconv |
448 |
# iconv optionally can use unicode |
449 |
if ! use ass && ! use truetype; then |
450 |
myconf+=" --disable-freetype" |
451 |
if ! use iconv; then |
452 |
myconf+=" |
453 |
--disable-iconv |
454 |
--charset=noconv |
455 |
" |
456 |
fi |
457 |
fi |
458 |
use iconv && use unicode && myconf+=" --charset=UTF-8" |
459 |
|
460 |
##################################### |
461 |
# DVB / Video4Linux / Radio support # |
462 |
##################################### |
463 |
myconf+=" --disable-tv-bsdbt848" |
464 |
# broken upstream, won't work with recent kernels |
465 |
myconf+=" --disable-ivtv" |
466 |
# v4l1 is gone since linux-headers-2.6.38 |
467 |
myconf+=" --disable-tv-v4l1" |
468 |
if { use dvb || use v4l || use pvr || use radio; }; then |
469 |
use dvb || myconf+=" --disable-dvb" |
470 |
use pvr || myconf+=" --disable-pvr" |
471 |
use v4l || myconf+=" --disable-tv-v4l2" |
472 |
if use radio && { use dvb || use v4l; }; then |
473 |
myconf+=" |
474 |
--enable-radio |
475 |
--disable-radio-capture |
476 |
" |
477 |
else |
478 |
myconf+=" |
479 |
--disable-radio-v4l2 |
480 |
--disable-radio-bsdbt848 |
481 |
" |
482 |
fi |
483 |
else |
484 |
myconf+=" |
485 |
--disable-tv |
486 |
--disable-tv-v4l2 |
487 |
--disable-radio |
488 |
--disable-radio-v4l2 |
489 |
--disable-radio-bsdbt848 |
490 |
--disable-dvb |
491 |
--disable-v4l2 |
492 |
--disable-pvr" |
493 |
fi |
494 |
|
495 |
########## |
496 |
# Codecs # |
497 |
########## |
498 |
myconf+=" --disable-musepack" # deprecated, libavcodec Musepack decoder is preferred |
499 |
use dts || myconf+=" --disable-libdca" |
500 |
use mp3 || myconf+=" --disable-mpg123" |
501 |
uses="a52 bs2b dv vorbis" |
502 |
for i in ${uses}; do |
503 |
use ${i} || myconf+=" --disable-lib${i}" |
504 |
done |
505 |
uses="faad gif jpeg live mad mng png pnm speex tga theora xanim xvid" |
506 |
for i in ${uses}; do |
507 |
use ${i} || myconf+=" --disable-${i}" |
508 |
done |
509 |
|
510 |
################# |
511 |
# Binary codecs # |
512 |
################# |
513 |
# bug 213836 |
514 |
if ! use x86 || ! use win32codecs; then |
515 |
use quicktime || myconf+=" --disable-qtx" |
516 |
fi |
517 |
|
518 |
###################### |
519 |
# RealPlayer support # |
520 |
###################### |
521 |
# Realplayer support shows up in four places: |
522 |
# - libavcodec (internal) |
523 |
# - win32codecs |
524 |
# - realcodecs (win32codecs libs) |
525 |
# - realcodecs (realplayer libs) |
526 |
|
527 |
# internal |
528 |
use real || myconf+=" --disable-real" |
529 |
|
530 |
# Real binary codec support only available on x86, amd64 |
531 |
if use real; then |
532 |
use x86 && myconf+=" --codecsdir=/opt/RealPlayer/codecs" |
533 |
use amd64 && myconf+=" --codecsdir=/usr/$(get_libdir)/codecs" |
534 |
fi |
535 |
myconf+=" $(use_enable win32codecs win32dll)" |
536 |
|
537 |
################ |
538 |
# Video Output # |
539 |
################ |
540 |
uses="directfb md5sum sdl" |
541 |
for i in ${uses}; do |
542 |
use ${i} || myconf+=" --disable-${i}" |
543 |
done |
544 |
use aalib || myconf+=" --disable-aa" |
545 |
use fbcon || myconf+=" --disable-fbdev" |
546 |
use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb" |
547 |
use libcaca || myconf+=" --disable-caca" |
548 |
|
549 |
if ! use kernel_linux || ! use video_cards_mga; then |
550 |
myconf+=" --disable-mga --disable-xmga" |
551 |
fi |
552 |
|
553 |
if use video_cards_tdfx; then |
554 |
myconf+=" |
555 |
$(use_enable video_cards_tdfx tdfxvid) |
556 |
$(use_enable fbcon tdfxfb) |
557 |
" |
558 |
else |
559 |
myconf+=" |
560 |
--disable-3dfx |
561 |
--disable-tdfxvid |
562 |
--disable-tdfxfb |
563 |
" |
564 |
fi |
565 |
|
566 |
# sun card, disable by default, see bug #258729 |
567 |
myconf+=" --disable-xvr100" |
568 |
|
569 |
################ |
570 |
# Audio Output # |
571 |
################ |
572 |
myconf+=" --disable-rsound" # media-sound/rsound is in pro-audio overlay only |
573 |
uses="alsa esd jack ladspa nas" |
574 |
for i in ${uses}; do |
575 |
use ${i} || myconf+=" --disable-${i}" |
576 |
done |
577 |
#use openal && myconf+=" --enable-openal" # build fails |
578 |
use pulseaudio || myconf+=" --disable-pulse" |
579 |
if ! use radio; then |
580 |
use oss || myconf+=" --disable-ossaudio" |
581 |
fi |
582 |
|
583 |
#################### |
584 |
# Advanced Options # |
585 |
#################### |
586 |
# Platform specific flags, hardcoded on amd64 (see below) |
587 |
use cpudetection && myconf+=" --enable-runtime-cpudetection" |
588 |
|
589 |
# Turning off CPU optimizations usually will break the build. |
590 |
# However, this use flag, if enabled, will allow users to completely |
591 |
# specify which ones to use. If disabled, mplayer will automatically |
592 |
# enable all CPU optimizations that the host build supports. |
593 |
if use custom-cpuopts; then |
594 |
uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3" |
595 |
for i in ${uses}; do |
596 |
myconf+=" $(use_enable ${i})" |
597 |
done |
598 |
fi |
599 |
|
600 |
use debug && myconf+=" --enable-debug=3" |
601 |
|
602 |
if use x86 && gcc-specs-pie; then |
603 |
filter-flags -fPIC -fPIE |
604 |
append-ldflags -nopie |
605 |
fi |
606 |
|
607 |
is-flag -O? || append-flags -O2 |
608 |
|
609 |
# workaround bug, x86 just has too few registers, see c.f. |
610 |
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=402950#44 |
611 |
# and 32-bits OSX, bug 329861 |
612 |
if [[ ${CHOST} == i?86-* ]] ; 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 xv" |
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 vdpau || myconf+=" --disable-vdpau" |
627 |
use video_cards_vesa || myconf+=" --disable-vesa" |
628 |
use xscreensaver || myconf+=" --disable-xss" |
629 |
else |
630 |
myconf+=" |
631 |
--disable-dga1 |
632 |
--disable-dga2 |
633 |
--disable-dxr3 |
634 |
--disable-ggi |
635 |
--disable-gl |
636 |
--disable-vdpau |
637 |
--disable-xinerama |
638 |
--disable-xss |
639 |
--disable-xv |
640 |
--disable-x11 |
641 |
" |
642 |
fi |
643 |
|
644 |
############################ |
645 |
# OSX (aqua) configuration # |
646 |
############################ |
647 |
if use aqua; then |
648 |
myconf+=" |
649 |
--enable-macosx-finder |
650 |
--enable-macosx-bundle |
651 |
" |
652 |
fi |
653 |
|
654 |
./configure \ |
655 |
--cc=$(tc-getCC) \ |
656 |
--host-cc=$(tc-getBUILD_CC) \ |
657 |
--prefix="${EPREFIX}"/usr \ |
658 |
--bindir="${EPREFIX}"/usr/bin \ |
659 |
--libdir="${EPREFIX}"/usr/$(get_libdir) \ |
660 |
--confdir="${EPREFIX}"/etc/${PN} \ |
661 |
--datadir="${EPREFIX}"/usr/share/${PN} \ |
662 |
--mandir="${EPREFIX}"/usr/share/man \ |
663 |
--localedir="${EPREFIX}"/usr/share/locale \ |
664 |
--enable-translation \ |
665 |
${myconf} || die |
666 |
} |
667 |
|
668 |
src_compile() { |
669 |
base_src_compile |
670 |
# Build only user-requested docs if they're available. |
671 |
if use doc ; then |
672 |
# select available languages from $LINGUAS |
673 |
LINGUAS=${LINGUAS/zh/zh_CN} |
674 |
local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" |
675 |
local BUILT_DOCS="" |
676 |
for i in ${LINGUAS} ; do |
677 |
has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}" |
678 |
done |
679 |
if [[ -z $BUILT_DOCS ]]; then |
680 |
emake -j1 -C DOCS/xml html-chunked |
681 |
else |
682 |
for i in ${BUILT_DOCS}; do |
683 |
emake -j1 -C DOCS/xml html-chunked-${i} |
684 |
done |
685 |
fi |
686 |
fi |
687 |
} |
688 |
|
689 |
src_install() { |
690 |
local i |
691 |
|
692 |
emake \ |
693 |
DESTDIR="${D}" \ |
694 |
INSTALLSTRIP="" \ |
695 |
install |
696 |
|
697 |
dodoc AUTHORS Copyright README etc/codecs.conf |
698 |
|
699 |
docinto tech/ |
700 |
dodoc DOCS/tech/{*.txt,mpsub.sub,playtree} |
701 |
docinto TOOLS/ |
702 |
dodoc -r TOOLS |
703 |
if use real; then |
704 |
docinto tech/realcodecs/ |
705 |
dodoc DOCS/tech/realcodecs/* |
706 |
fi |
707 |
|
708 |
if use doc; then |
709 |
docinto html/ |
710 |
dohtml -r "${S}"/DOCS/HTML/* |
711 |
fi |
712 |
|
713 |
if ! use ass && ! use truetype; then |
714 |
dodir /usr/share/${PN}/fonts |
715 |
# Do this generic, as the mplayer people like to change the structure |
716 |
# of their zips ... |
717 |
for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do |
718 |
cp -pPR "${i}" "${ED}/usr/share/${PN}/fonts" |
719 |
done |
720 |
# Fix the font symlink ... |
721 |
rm -rf "${ED}/usr/share/${PN}/font" |
722 |
dosym fonts/font-arial-14-iso-8859-1 /usr/share/${PN}/font |
723 |
fi |
724 |
|
725 |
insinto /etc/${PN} |
726 |
newins "${S}/etc/example.conf" mplayer.conf |
727 |
cat >> "${ED}/etc/${PN}/mplayer.conf" << _EOF_ |
728 |
# Config options can be section specific, global |
729 |
# options should go in the default section |
730 |
[default] |
731 |
_EOF_ |
732 |
doins "${S}/etc/input.conf" |
733 |
|
734 |
# set unrar path when required |
735 |
if use rar; then |
736 |
cat >> "${ED}/etc/${PN}/mplayer.conf" << _EOF_ |
737 |
unrarexec=${EPREFIX}/usr/bin/unrar |
738 |
_EOF_ |
739 |
fi |
740 |
dosym ../../../etc/${PN}/mplayer.conf /usr/share/${PN}/mplayer.conf |
741 |
|
742 |
newbin "${S}/TOOLS/midentify.sh" midentify${NAMESUF} |
743 |
|
744 |
if [[ -n ${NAMESUF} ]] && use symlink; then |
745 |
dosym "${PN}" /usr/bin/mplayer |
746 |
dosym "midentify${NAMESUF}" /usr/bin/midentify |
747 |
fi |
748 |
} |