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