1 |
aballier 15/07/30 14:54:36 |
2 |
|
3 |
Modified: ChangeLog mplayer-9999.ebuild |
4 |
Added: mplayer-1.2_pre20150730.ebuild |
5 |
Log: |
6 |
bump a new snapshot, fixing bug #538186 |
7 |
|
8 |
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 160F534A) |
9 |
|
10 |
Revision Changes Path |
11 |
1.948 media-video/mplayer/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.948&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.948&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/ChangeLog?r1=1.947&r2=1.948 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v |
20 |
retrieving revision 1.947 |
21 |
retrieving revision 1.948 |
22 |
diff -u -r1.947 -r1.948 |
23 |
--- ChangeLog 27 Jul 2015 04:25:50 -0000 1.947 |
24 |
+++ ChangeLog 30 Jul 2015 14:54:36 -0000 1.948 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for media-video/mplayer |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.947 2015/07/27 04:25:50 jer Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.948 2015/07/30 14:54:36 aballier Exp $ |
30 |
+ |
31 |
+*mplayer-1.2_pre20150730 (30 Jul 2015) |
32 |
+ |
33 |
+ 30 Jul 2015; Alexis Ballier <aballier@g.o> |
34 |
+ +mplayer-1.2_pre20150730.ebuild, mplayer-9999.ebuild: |
35 |
+ bump a new snapshot, fixing bug #538186 |
36 |
|
37 |
27 Jul 2015; Jeroen Roovers <jer@g.o> |
38 |
mplayer-1.2_pre20150214-r1.ebuild: |
39 |
|
40 |
|
41 |
|
42 |
1.169 media-video/mplayer/mplayer-9999.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/mplayer-9999.ebuild?rev=1.169&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/mplayer-9999.ebuild?rev=1.169&content-type=text/plain |
46 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/mplayer-9999.ebuild?r1=1.168&r2=1.169 |
47 |
|
48 |
Index: mplayer-9999.ebuild |
49 |
=================================================================== |
50 |
RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-9999.ebuild,v |
51 |
retrieving revision 1.168 |
52 |
retrieving revision 1.169 |
53 |
diff -u -r1.168 -r1.169 |
54 |
--- mplayer-9999.ebuild 15 Mar 2015 17:45:19 -0000 1.168 |
55 |
+++ mplayer-9999.ebuild 30 Jul 2015 14:54:36 -0000 1.169 |
56 |
@@ -1,6 +1,6 @@ |
57 |
# Copyright 1999-2015 Gentoo Foundation |
58 |
# Distributed under the terms of the GNU General Public License v2 |
59 |
-# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-9999.ebuild,v 1.168 2015/03/15 17:45:19 ulm Exp $ |
60 |
+# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-9999.ebuild,v 1.169 2015/07/30 14:54:36 aballier Exp $ |
61 |
|
62 |
EAPI=5 |
63 |
|
64 |
@@ -60,7 +60,7 @@ |
65 |
sys-libs/ncurses |
66 |
app-arch/bzip2 |
67 |
sys-libs/zlib |
68 |
- >=media-video/ffmpeg-2.0:0 |
69 |
+ >=media-video/ffmpeg-2.6:0= |
70 |
a52? ( media-libs/a52dec ) |
71 |
aalib? ( media-libs/aalib ) |
72 |
alsa? ( media-libs/alsa-lib ) |
73 |
|
74 |
|
75 |
|
76 |
1.1 media-video/mplayer/mplayer-1.2_pre20150730.ebuild |
77 |
|
78 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/mplayer-1.2_pre20150730.ebuild?rev=1.1&view=markup |
79 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/mplayer-1.2_pre20150730.ebuild?rev=1.1&content-type=text/plain |
80 |
|
81 |
Index: mplayer-1.2_pre20150730.ebuild |
82 |
=================================================================== |
83 |
# Copyright 1999-2015 Gentoo Foundation |
84 |
# Distributed under the terms of the GNU General Public License v2 |
85 |
# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.2_pre20150730.ebuild,v 1.1 2015/07/30 14:54:36 aballier Exp $ |
86 |
|
87 |
EAPI=5 |
88 |
|
89 |
EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git" |
90 |
ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk" |
91 |
[[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS="" |
92 |
|
93 |
inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS} |
94 |
|
95 |
IUSE="cpu_flags_x86_3dnow cpu_flags_x86_3dnowext a52 aalib +alsa altivec aqua bidi bl bluray |
96 |
bs2b cddb +cdio cdparanoia cpudetection debug dga |
97 |
directfb doc dts dv dvb +dvd +dvdnav +enca +encode faac faad fbcon |
98 |
ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa |
99 |
+libass libcaca libmpeg2 lirc live lzo mad md5sum +cpu_flags_x86_mmx cpu_flags_x86_mmxext mng mp3 nas |
100 |
+network nut openal opengl +osdmenu oss png pnm pulseaudio pvr |
101 |
radio rar rtc rtmp samba selinux +shm sdl speex cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_ssse3 |
102 |
tga theora tremor +truetype toolame twolame +unicode v4l vdpau vidix |
103 |
vorbis +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran" |
104 |
|
105 |
VIDEO_CARDS="s3virge mga tdfx" |
106 |
for x in ${VIDEO_CARDS}; do |
107 |
IUSE+=" video_cards_${x}" |
108 |
done |
109 |
|
110 |
FONT_URI=" |
111 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2 |
112 |
mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2 |
113 |
mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 |
114 |
" |
115 |
if [[ ${PV} == *9999* ]]; then |
116 |
RELEASE_URI="" |
117 |
elif [ "${PV%_rc*}" = "${PV}" -a "${PV%_pre*}" = "${PV}" ]; then |
118 |
MY_P="MPlayer-${PV}" |
119 |
S="${WORKDIR}/${MY_P}" |
120 |
RELEASE_URI="mirror://mplayer/releases/${MY_P}.tar.xz" |
121 |
else |
122 |
RELEASE_URI="mirror://gentoo/${P}.tar.xz" |
123 |
fi |
124 |
SRC_URI="${RELEASE_URI} |
125 |
!truetype? ( ${FONT_URI} )" |
126 |
|
127 |
DESCRIPTION="Media Player for Linux" |
128 |
HOMEPAGE="http://www.mplayerhq.hu/" |
129 |
|
130 |
FONT_RDEPS=" |
131 |
virtual/ttf-fonts |
132 |
media-libs/fontconfig |
133 |
>=media-libs/freetype-2.2.1:2 |
134 |
" |
135 |
X_RDEPS=" |
136 |
x11-libs/libXext |
137 |
x11-libs/libXxf86vm |
138 |
" |
139 |
# Rar: althrought -gpl version is nice, it cant do most functions normal rars can |
140 |
# nemesi? ( net-libs/libnemesi ) |
141 |
RDEPEND+=" |
142 |
sys-libs/ncurses |
143 |
app-arch/bzip2 |
144 |
sys-libs/zlib |
145 |
>=media-video/ffmpeg-2.6:0= |
146 |
a52? ( media-libs/a52dec ) |
147 |
aalib? ( media-libs/aalib ) |
148 |
alsa? ( media-libs/alsa-lib ) |
149 |
bidi? ( dev-libs/fribidi ) |
150 |
bluray? ( >=media-libs/libbluray-0.2.1 ) |
151 |
bs2b? ( media-libs/libbs2b ) |
152 |
cdio? ( dev-libs/libcdio ) |
153 |
cdparanoia? ( !cdio? ( media-sound/cdparanoia ) ) |
154 |
dga? ( x11-libs/libXxf86dga ) |
155 |
directfb? ( dev-libs/DirectFB ) |
156 |
dts? ( media-libs/libdca ) |
157 |
dv? ( media-libs/libdv ) |
158 |
dvb? ( virtual/linuxtv-dvb-headers ) |
159 |
dvd? ( >=media-libs/libdvdread-4.1.3 ) |
160 |
dvdnav? ( >=media-libs/libdvdnav-4.1.3 ) |
161 |
encode? ( |
162 |
!twolame? ( toolame? ( media-sound/toolame ) ) |
163 |
twolame? ( media-sound/twolame ) |
164 |
faac? ( media-libs/faac ) |
165 |
mp3? ( media-sound/lame ) |
166 |
x264? ( >=media-libs/x264-0.0.20100423:= ) |
167 |
xvid? ( media-libs/xvid ) |
168 |
) |
169 |
enca? ( app-i18n/enca ) |
170 |
faad? ( media-libs/faad2 ) |
171 |
ggi? ( media-libs/libggi media-libs/libggiwmh ) |
172 |
gif? ( media-libs/giflib ) |
173 |
gsm? ( media-sound/gsm ) |
174 |
iconv? ( virtual/libiconv ) |
175 |
jack? ( media-sound/jack-audio-connection-kit ) |
176 |
jpeg? ( virtual/jpeg:0 ) |
177 |
jpeg2k? ( media-libs/openjpeg:0 ) |
178 |
ladspa? ( media-libs/ladspa-sdk ) |
179 |
libass? ( >=media-libs/libass-0.9.10:=[enca?] ) |
180 |
libcaca? ( media-libs/libcaca ) |
181 |
libmpeg2? ( media-libs/libmpeg2 ) |
182 |
lirc? ( app-misc/lirc ) |
183 |
live? ( media-plugins/live ) |
184 |
lzo? ( >=dev-libs/lzo-2 ) |
185 |
mad? ( media-libs/libmad ) |
186 |
mng? ( media-libs/libmng:= ) |
187 |
mp3? ( media-sound/mpg123 ) |
188 |
nas? ( media-libs/nas ) |
189 |
nut? ( >=media-libs/libnut-661 ) |
190 |
openal? ( media-libs/openal ) |
191 |
opengl? ( virtual/opengl ) |
192 |
png? ( media-libs/libpng:0= ) |
193 |
pnm? ( media-libs/netpbm ) |
194 |
pulseaudio? ( media-sound/pulseaudio ) |
195 |
rar? ( |
196 |
|| ( |
197 |
app-arch/unrar |
198 |
app-arch/rar |
199 |
) |
200 |
) |
201 |
rtmp? ( media-video/rtmpdump ) |
202 |
samba? ( net-fs/samba ) |
203 |
sdl? ( media-libs/libsdl ) |
204 |
speex? ( media-libs/speex ) |
205 |
theora? ( media-libs/libtheora[encode?] ) |
206 |
tremor? ( media-libs/tremor ) |
207 |
truetype? ( ${FONT_RDEPS} ) |
208 |
vdpau? ( x11-libs/libvdpau ) |
209 |
vorbis? ( !tremor? ( media-libs/libvorbis ) ) |
210 |
X? ( ${X_RDEPS} ) |
211 |
xanim? ( media-video/xanim ) |
212 |
xinerama? ( x11-libs/libXinerama ) |
213 |
xscreensaver? ( x11-libs/libXScrnSaver ) |
214 |
xv? ( x11-libs/libXv ) |
215 |
xvmc? ( x11-libs/libXvMC ) |
216 |
" |
217 |
|
218 |
X_DEPS=" |
219 |
x11-proto/videoproto |
220 |
x11-proto/xf86vidmodeproto |
221 |
" |
222 |
ASM_DEP="dev-lang/yasm" |
223 |
DEPEND="${RDEPEND} |
224 |
virtual/pkgconfig |
225 |
dga? ( x11-proto/xf86dgaproto ) |
226 |
X? ( ${X_DEPS} ) |
227 |
xinerama? ( x11-proto/xineramaproto ) |
228 |
xscreensaver? ( x11-proto/scrnsaverproto ) |
229 |
amd64? ( ${ASM_DEP} ) |
230 |
doc? ( |
231 |
dev-libs/libxslt app-text/docbook-xml-dtd |
232 |
app-text/docbook-xsl-stylesheets |
233 |
) |
234 |
x86? ( ${ASM_DEP} ) |
235 |
x86-fbsd? ( ${ASM_DEP} ) |
236 |
" |
237 |
RDEPEND+=" |
238 |
selinux? ( sec-policy/selinux-mplayer ) |
239 |
" |
240 |
|
241 |
SLOT="0" |
242 |
LICENSE="GPL-2" |
243 |
if [[ ${PV} != *9999* ]]; then |
244 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" |
245 |
else |
246 |
KEYWORDS="" |
247 |
fi |
248 |
|
249 |
# faac codecs are nonfree |
250 |
# libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio |
251 |
# dvd navigation requires dvd read support |
252 |
# ass and freetype font require iconv and ass requires freetype fonts |
253 |
# unicode transformations are usefull only with iconv |
254 |
# radio requires oss or alsa backend |
255 |
# xvmc requires xvideo support |
256 |
REQUIRED_USE=" |
257 |
dga? ( X ) |
258 |
dvdnav? ( dvd ) |
259 |
enca? ( iconv ) |
260 |
ggi? ( X ) |
261 |
libass? ( truetype ) |
262 |
opengl? ( X ) |
263 |
osdmenu? ( X ) |
264 |
truetype? ( iconv ) |
265 |
vdpau? ( X ) |
266 |
vidix? ( X ) |
267 |
xinerama? ( X ) |
268 |
xscreensaver? ( X ) |
269 |
xv? ( X ) |
270 |
xvmc? ( xv )" |
271 |
RESTRICT="faac? ( bindist )" |
272 |
|
273 |
PATCHES=( |
274 |
# Work with pulseaudio-6, bug #549680, https://trac.mplayerhq.hu/ticket/2241 |
275 |
"${FILESDIR}"/${PN}-1.2_pre20150214-pulseaudio-6.0.patch |
276 |
) |
277 |
|
278 |
pkg_setup() { |
279 |
if [[ ${PV} == *9999* ]]; then |
280 |
elog |
281 |
elog "This is a live ebuild which installs the latest from upstream's" |
282 |
elog "subversion repository, and is unsupported by Gentoo." |
283 |
elog "Everything but bugs in the ebuild itself will be ignored." |
284 |
elog |
285 |
fi |
286 |
|
287 |
if use cpudetection; then |
288 |
ewarn |
289 |
ewarn "You've enabled the cpudetection flag. This feature is" |
290 |
ewarn "included mainly for people who want to use the same" |
291 |
ewarn "binary on another system with a different CPU architecture." |
292 |
ewarn "MPlayer will already detect your CPU settings by default at" |
293 |
ewarn "buildtime; this flag is used for runtime detection." |
294 |
ewarn "You won't need this turned on if you are only building" |
295 |
ewarn "mplayer for this system. Also, if your compile fails, try" |
296 |
ewarn "disabling this use flag." |
297 |
fi |
298 |
|
299 |
if has_version 'media-video/libav' ; then |
300 |
ewarn "Please note that upstream uses media-video/ffmpeg." |
301 |
ewarn "media-video/libav should be fine in theory but if you" |
302 |
ewarn "experience any problem, try to move to media-video/ffmpeg." |
303 |
fi |
304 |
} |
305 |
|
306 |
src_unpack() { |
307 |
if [[ ${PV} = *9999* ]]; then |
308 |
subversion_src_unpack |
309 |
cd "${WORKDIR}" |
310 |
rm -rf "${WORKDIR}/${P}/ffmpeg/" |
311 |
( S="${WORKDIR}/${P}/ffmpeg/" git-2_src_unpack ) |
312 |
else |
313 |
unpack ${A} |
314 |
fi |
315 |
|
316 |
if [[ ${PV} = *9999* ]] || [[ "${PV%_rc*}" = "${PV}" ]]; then |
317 |
cd "${S}" |
318 |
cp "${FILESDIR}/dump_ffmpeg.sh" . || die |
319 |
chmod +x dump_ffmpeg.sh |
320 |
./dump_ffmpeg.sh || die |
321 |
fi |
322 |
|
323 |
if ! use truetype; then |
324 |
unpack font-arial-iso-8859-1.tar.bz2 \ |
325 |
font-arial-iso-8859-2.tar.bz2 \ |
326 |
font-arial-cp1250.tar.bz2 |
327 |
fi |
328 |
} |
329 |
|
330 |
src_prepare() { |
331 |
local svf=snapshot_version |
332 |
if [[ ${PV} = *9999* ]]; then |
333 |
# Set SVN version manually |
334 |
subversion_wc_info |
335 |
printf "${ESVN_WC_REVISION}" > $svf |
336 |
fi |
337 |
if [ ! -f VERSION ] ; then |
338 |
[ -f "$svf" ] || die "Missing ${svf}. Did you generate your snapshot with prepare_mplayer.sh?" |
339 |
local sv=$(<$svf) |
340 |
printf "SVN-r${sv} (Gentoo)" > VERSION |
341 |
fi |
342 |
|
343 |
# fix path to bash executable in configure scripts |
344 |
sed -i -e "1c\#!${EPREFIX}/bin/bash" configure version.sh || die |
345 |
|
346 |
base_src_prepare |
347 |
|
348 |
# Use sane default for >=virtual/udev-197 |
349 |
sed -i -e '/default_dvd_device/s:/dev/dvd:/dev/cdrom:' configure || die |
350 |
} |
351 |
|
352 |
src_configure() { |
353 |
local myconf="" |
354 |
local uses i |
355 |
|
356 |
# set LINGUAS |
357 |
[[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}" |
358 |
[[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/zh/zh_CN}" #482968 |
359 |
|
360 |
# mplayer ebuild uses "use foo || --disable-foo" to forcibly disable |
361 |
# compilation in almost every situation. The reason for this is |
362 |
# because if --enable is used, it will force the build of that option, |
363 |
# regardless of whether the dependency is available or not. |
364 |
|
365 |
################### |
366 |
#Optional features# |
367 |
################### |
368 |
# disable svga since we don't want it |
369 |
# disable arts since we don't have kde3 |
370 |
# always disable internal ass |
371 |
# disable opus and ilbc since it only controls support in internal |
372 |
# ffmpeg which we do not use |
373 |
myconf+=" |
374 |
--disable-svga --disable-svgalib_helper |
375 |
--disable-ass-internal |
376 |
--disable-arts |
377 |
--disable-kai |
378 |
--disable-libopus |
379 |
--disable-libilbc |
380 |
$(use_enable network networking) |
381 |
$(use_enable joystick) |
382 |
" |
383 |
uses="bl bluray enca ftp rtc" # nemesi <- not working with in-tree ebuild |
384 |
myconf+=" --disable-nemesi" # nemesi automagic disable |
385 |
for i in ${uses}; do |
386 |
use ${i} || myconf+=" --disable-${i}" |
387 |
done |
388 |
use bidi || myconf+=" --disable-fribidi" |
389 |
use ipv6 || myconf+=" --disable-inet6" |
390 |
use libass || myconf+=" --disable-ass" |
391 |
use nut || myconf+=" --disable-libnut" |
392 |
use rar || myconf+=" --disable-unrarexec" |
393 |
use samba || myconf+=" --disable-smb" |
394 |
use lirc || myconf+=" --disable-lirc --disable-lircc --disable-apple-ir" |
395 |
|
396 |
# libcdio support: prefer libcdio over cdparanoia |
397 |
# don't check for cddb w/cdio |
398 |
if use cdio; then |
399 |
myconf+=" --disable-cdparanoia" |
400 |
else |
401 |
myconf+=" --disable-libcdio" |
402 |
use cdparanoia || myconf+=" --disable-cdparanoia" |
403 |
use cddb || myconf+=" --disable-cddb" |
404 |
fi |
405 |
|
406 |
################################ |
407 |
# DVD read, navigation support # |
408 |
################################ |
409 |
# |
410 |
# dvdread - accessing a DVD |
411 |
# dvdnav - navigation of menus |
412 |
use dvd || myconf+=" --disable-dvdread" |
413 |
use dvdnav || myconf+=" --disable-dvdnav" |
414 |
|
415 |
############# |
416 |
# Subtitles # |
417 |
############# |
418 |
# |
419 |
# SRT/ASS/SSA (subtitles) requires freetype support |
420 |
# freetype support requires iconv |
421 |
# iconv optionally can use unicode |
422 |
use truetype || myconf+=" --disable-freetype" |
423 |
use iconv || myconf+=" --disable-iconv --charset=noconv" |
424 |
use iconv && use unicode && myconf+=" --charset=UTF-8" |
425 |
|
426 |
##################################### |
427 |
# DVB / Video4Linux / Radio support # |
428 |
##################################### |
429 |
myconf+=" --disable-tv-bsdbt848" |
430 |
# broken upstream, won't work with recent kernels |
431 |
myconf+=" --disable-ivtv" |
432 |
# gone since linux-headers-2.6.38 |
433 |
myconf+=" --disable-tv-v4l1" |
434 |
if { use dvb || use v4l || use pvr || use radio; }; then |
435 |
use dvb || myconf+=" --disable-dvb" |
436 |
use pvr || myconf+=" --disable-pvr" |
437 |
use v4l || myconf+=" --disable-tv-v4l2" |
438 |
if use radio && { use dvb || use v4l; }; then |
439 |
myconf+=" |
440 |
--enable-radio |
441 |
$(use_enable encode radio-capture) |
442 |
" |
443 |
else |
444 |
myconf+=" |
445 |
--disable-radio-v4l2 |
446 |
--disable-radio-bsdbt848 |
447 |
" |
448 |
fi |
449 |
else |
450 |
myconf+=" |
451 |
--disable-tv |
452 |
--disable-tv-v4l2 |
453 |
--disable-radio |
454 |
--disable-radio-v4l2 |
455 |
--disable-radio-bsdbt848 |
456 |
--disable-dvb |
457 |
--disable-v4l2 |
458 |
--disable-pvr" |
459 |
fi |
460 |
|
461 |
########## |
462 |
# Codecs # |
463 |
########## |
464 |
myconf+=" --disable-musepack" # Use internal musepack codecs for SV7 and SV8 support |
465 |
myconf+=" --disable-libmpeg2-internal" # always use system media-libs/libmpeg2 |
466 |
use dts || myconf+=" --disable-libdca" |
467 |
if ! use mp3; then |
468 |
myconf+=" |
469 |
--disable-mp3lame |
470 |
--disable-mpg123 |
471 |
" |
472 |
fi |
473 |
uses="a52 bs2b dv gsm lzo rtmp vorbis" |
474 |
for i in ${uses}; do |
475 |
use ${i} || myconf+=" --disable-lib${i}" |
476 |
done |
477 |
|
478 |
uses="faad gif jpeg libmpeg2 live mad mng png pnm speex tga theora tremor xanim" |
479 |
for i in ${uses}; do |
480 |
use ${i} || myconf+=" --disable-${i}" |
481 |
done |
482 |
use jpeg2k || myconf+=" --disable-libopenjpeg" |
483 |
|
484 |
# Encoding |
485 |
uses="faac x264 xvid toolame twolame" |
486 |
if use encode; then |
487 |
for i in ${uses}; do |
488 |
use ${i} || myconf+=" --disable-${i}" |
489 |
done |
490 |
else |
491 |
myconf+=" --disable-mencoder" |
492 |
for i in ${uses}; do |
493 |
myconf+=" --disable-${i}" |
494 |
use ${i} && elog "Useflag \"${i}\" will only be useful for encoding, i.e., with \"encode\" useflag enabled." |
495 |
done |
496 |
fi |
497 |
|
498 |
################# |
499 |
# Binary codecs # |
500 |
################# |
501 |
myconf+=" --disable-qtx --disable-real --disable-win32dll" |
502 |
|
503 |
################ |
504 |
# Video Output # |
505 |
################ |
506 |
uses="directfb md5sum sdl" |
507 |
for i in ${uses}; do |
508 |
use ${i} || myconf+=" --disable-${i}" |
509 |
done |
510 |
use aalib || myconf+=" --disable-aa" |
511 |
use fbcon || myconf+=" --disable-fbdev" |
512 |
use fbcon && use video_cards_s3virge && myconf+=" --enable-s3fb" |
513 |
use libcaca || myconf+=" --disable-caca" |
514 |
use zoran || myconf+=" --disable-zr" |
515 |
|
516 |
if ! use kernel_linux || ! use video_cards_mga; then |
517 |
myconf+=" --disable-mga --disable-xmga" |
518 |
fi |
519 |
|
520 |
if use video_cards_tdfx; then |
521 |
myconf+=" |
522 |
$(use_enable video_cards_tdfx tdfxvid) |
523 |
$(use_enable fbcon tdfxfb) |
524 |
" |
525 |
else |
526 |
myconf+=" |
527 |
--disable-3dfx |
528 |
--disable-tdfxvid |
529 |
--disable-tdfxfb |
530 |
" |
531 |
fi |
532 |
|
533 |
# sun card, disable by default, see bug #258729 |
534 |
myconf+=" --disable-xvr100" |
535 |
|
536 |
################ |
537 |
# Audio Output # |
538 |
################ |
539 |
myconf+=" --disable-esd" |
540 |
uses="alsa jack ladspa nas openal" |
541 |
for i in ${uses}; do |
542 |
use ${i} || myconf+=" --disable-${i}" |
543 |
done |
544 |
use pulseaudio || myconf+=" --disable-pulse" |
545 |
if ! use radio; then |
546 |
use oss || myconf+=" --disable-ossaudio" |
547 |
fi |
548 |
|
549 |
#################### |
550 |
# Advanced Options # |
551 |
#################### |
552 |
# Platform specific flags, hardcoded on amd64 (see below) |
553 |
use cpudetection && myconf+=" --enable-runtime-cpudetection" |
554 |
|
555 |
uses="3dnow 3dnowext mmx mmxext sse sse2 ssse3" |
556 |
for i in ${uses}; do |
557 |
myconf+=" $(use_enable cpu_flags_x86_${i} ${i})" |
558 |
done |
559 |
|
560 |
uses="altivec shm" |
561 |
for i in ${uses}; do |
562 |
myconf+=" $(use_enable ${i})" |
563 |
done |
564 |
|
565 |
use debug && myconf+=" --enable-debug=3" |
566 |
|
567 |
if use x86 && gcc-specs-pie; then |
568 |
filter-flags -fPIC -fPIE |
569 |
append-ldflags -nopie |
570 |
fi |
571 |
|
572 |
########################### |
573 |
# X enabled configuration # |
574 |
########################### |
575 |
myconf+=" --disable-gui" |
576 |
myconf+=" --disable-vesa" |
577 |
uses="ggi vdpau xinerama xv" |
578 |
for i in ${uses}; do |
579 |
use ${i} || myconf+=" --disable-${i}" |
580 |
done |
581 |
use dga || myconf+=" --disable-dga1 --disable-dga2" |
582 |
use opengl || myconf+=" --disable-gl" |
583 |
use osdmenu && myconf+=" --enable-menu" |
584 |
use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb" |
585 |
use xscreensaver || myconf+=" --disable-xss" |
586 |
use X || myconf+=" --disable-x11" |
587 |
if use xvmc; then |
588 |
myconf+=" --enable-xvmc --with-xvmclib=XvMCW" |
589 |
else |
590 |
myconf+=" --disable-xvmc" |
591 |
fi |
592 |
|
593 |
############################ |
594 |
# OSX (aqua) configuration # |
595 |
############################ |
596 |
if use aqua; then |
597 |
myconf+=" |
598 |
--enable-macosx-finder |
599 |
--enable-macosx-bundle |
600 |
" |
601 |
fi |
602 |
|
603 |
./configure \ |
604 |
--cc="$(tc-getCC)" \ |
605 |
--host-cc="$(tc-getBUILD_CC)" \ |
606 |
--prefix="${EPREFIX}/usr" \ |
607 |
--bindir="${EPREFIX}/usr/bin" \ |
608 |
--libdir="${EPREFIX}/usr/$(get_libdir)" \ |
609 |
--confdir="${EPREFIX}/etc/mplayer" \ |
610 |
--datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \ |
611 |
--mandir="${EPREFIX}/usr/share/man" \ |
612 |
--disable-ffmpeg_a \ |
613 |
${myconf} || die |
614 |
} |
615 |
|
616 |
src_compile() { |
617 |
base_src_compile |
618 |
# Build only user-requested docs if they're available. |
619 |
if use doc ; then |
620 |
# select available languages from $LINGUAS |
621 |
local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN" |
622 |
local BUILT_DOCS="" |
623 |
for i in ${LINGUAS} ; do |
624 |
has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}" |
625 |
done |
626 |
if [[ -z $BUILT_DOCS ]]; then |
627 |
emake -j1 html-chunked |
628 |
else |
629 |
for i in ${BUILT_DOCS}; do |
630 |
emake -j1 html-chunked-${i} |
631 |
done |
632 |
fi |
633 |
fi |
634 |
} |
635 |
|
636 |
src_install() { |
637 |
local i |
638 |
|
639 |
emake \ |
640 |
DESTDIR="${D}" \ |
641 |
INSTALLSTRIP="" \ |
642 |
install |
643 |
|
644 |
dodoc AUTHORS Changelog Copyright README etc/codecs.conf |
645 |
|
646 |
docinto tech/ |
647 |
dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist} |
648 |
docinto TOOLS/ |
649 |
dodoc -r TOOLS |
650 |
docinto tech/mirrors/ |
651 |
dodoc DOCS/tech/mirrors/* |
652 |
|
653 |
if use doc; then |
654 |
docinto html/ |
655 |
dohtml -r "${S}"/DOCS/HTML/* |
656 |
fi |
657 |
|
658 |
if ! use truetype; then |
659 |
dodir /usr/share/mplayer/fonts |
660 |
# Do this generic, as the mplayer people like to change the structure |
661 |
# of their zips ... |
662 |
for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do |
663 |
cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts" |
664 |
done |
665 |
# Fix the font symlink ... |
666 |
rm -rf "${ED}/usr/share/mplayer/font" |
667 |
dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font |
668 |
fi |
669 |
|
670 |
insinto /etc/mplayer |
671 |
newins "${S}/etc/example.conf" mplayer.conf |
672 |
cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ |
673 |
# Config options can be section specific, global |
674 |
# options should go in the default section |
675 |
[default] |
676 |
_EOF_ |
677 |
doins "${S}/etc/input.conf" |
678 |
if use osdmenu; then |
679 |
doins "${S}/etc/menu.conf" |
680 |
fi |
681 |
|
682 |
if use truetype; then |
683 |
cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ |
684 |
fontconfig=1 |
685 |
subfont-osd-scale=4 |
686 |
subfont-text-scale=3 |
687 |
_EOF_ |
688 |
fi |
689 |
|
690 |
# bug 256203 |
691 |
if use rar; then |
692 |
cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_ |
693 |
unrarexec=${EPREFIX}/usr/bin/unrar |
694 |
_EOF_ |
695 |
fi |
696 |
|
697 |
dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf |
698 |
newbin "${S}/TOOLS/midentify.sh" midentify |
699 |
} |
700 |
|
701 |
pkg_preinst() { |
702 |
[[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \ |
703 |
rm -rf "${EROOT}/usr/share/mplayer/Skin/default" |
704 |
} |
705 |
|
706 |
pkg_postrm() { |
707 |
# Cleanup stale symlinks |
708 |
[ -L "${EROOT}/usr/share/mplayer/font" -a \ |
709 |
! -e "${EROOT}/usr/share/mplayer/font" ] && \ |
710 |
rm -f "${EROOT}/usr/share/mplayer/font" |
711 |
|
712 |
[ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \ |
713 |
! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \ |
714 |
rm -f "${EROOT}/usr/share/mplayer/subfont.ttf" |
715 |
} |