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