Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/mplayer: mplayer-1.0_rc4_p20091026.ebuild ChangeLog
Date: Mon, 26 Oct 2009 18:31:34
Message-Id: E1N2ULs-0000Dh-B9@stork.gentoo.org
1 ssuominen 09/10/26 18:31:32
2
3 Modified: ChangeLog
4 Added: mplayer-1.0_rc4_p20091026.ebuild
5 Log:
6 Version bump.
7 (Portage version: 2.2_rc46/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.683 media-video/mplayer/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.683&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.683&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?r1=1.682&r2=1.683
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v
19 retrieving revision 1.682
20 retrieving revision 1.683
21 diff -u -r1.682 -r1.683
22 --- ChangeLog 11 Oct 2009 09:15:44 -0000 1.682
23 +++ ChangeLog 26 Oct 2009 18:31:31 -0000 1.683
24 @@ -1,6 +1,12 @@
25 # ChangeLog for media-video/mplayer
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.682 2009/10/11 09:15:44 ssuominen Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.683 2009/10/26 18:31:31 ssuominen Exp $
29 +
30 +*mplayer-1.0_rc4_p20091026 (26 Oct 2009)
31 +
32 + 26 Oct 2009; Samuli Suominen <ssuominen@g.o>
33 + +mplayer-1.0_rc4_p20091026.ebuild:
34 + Version bump.
35
36 11 Oct 2009; Samuli Suominen <ssuominen@g.o>
37 mplayer-1.0_rc2_p20090322.ebuild:
38
39
40
41 1.1 media-video/mplayer/mplayer-1.0_rc4_p20091026.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20091026.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20091026.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mplayer-1.0_rc4_p20091026.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20091026.ebuild,v 1.1 2009/10/26 18:31:31 ssuominen Exp $
51
52 EAPI=2
53 inherit eutils flag-o-matic multilib toolchain-funcs
54
55 MPLAYER_REVISION=SVN-r29796
56
57 IUSE="3dnow 3dnowext +a52 +aac aalib +alsa altivec +ass bidi bindist bl +cddb
58 +cdio cdparanoia cpudetection custom-cpuopts debug dga +dirac directfb doc +dts
59 +dv dvb +dvd +dvdnav dxr3 +enca +encode esd +faac +faad fbcon ftp gif ggi
60 -gmplayer +iconv ipv6 jack joystick jpeg kernel_linux ladspa libcaca lirc +live
61 lzo mad md5sum +mmx mmxext mng +mp2 +mp3 nas +network nut openal +opengl
62 opencore-amr +osdmenu oss png pnm pulseaudio pvr +quicktime radio +rar +real
63 +rtc samba +shm +schroedinger sdl +speex sse sse2 ssse3 svga teletext tga
64 +theora +tremor +truetype +unicode v4l v4l2 vdpau vidix +vorbis win32codecs
65 +X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc zoran"
66
67 VIDEO_CARDS="s3virge mga tdfx nvidia"
68
69 for x in ${VIDEO_CARDS}; do
70 IUSE="${IUSE} video_cards_${x}"
71 done
72
73 BLUV="1.7"
74 SVGV="1.9.17"
75 AMR_URI="http://www.3gpp.org/ftp/Specs/archive"
76 SRC_URI="mirror://gentoo/${P}.tbz2
77 !truetype? ( 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 !iconv? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
81 mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
82 mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
83 gmplayer? ( mirror://mplayer/skins/Blue-${BLUV}.tar.bz2 )
84 svga? ( http://dev.gentoo.org/~ssuominen/svgalib_helper-${SVGV}-mplayer.tar.gz )"
85 # svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )
86
87 DESCRIPTION="Media Player for Linux"
88 HOMEPAGE="http://www.mplayerhq.hu/"
89
90 RDEPEND="sys-libs/ncurses
91 !bindist? (
92 x86? (
93 win32codecs? ( media-libs/win32codecs )
94 )
95 )
96 aalib? ( media-libs/aalib )
97 alsa? ( media-libs/alsa-lib )
98 opencore-amr? ( media-libs/opencore-amr )
99 openal? ( media-libs/openal )
100 bidi? ( dev-libs/fribidi )
101 cdio? ( dev-libs/libcdio )
102 cdparanoia? ( media-sound/cdparanoia )
103 dirac? ( media-video/dirac )
104 directfb? ( dev-libs/DirectFB )
105 dts? ( media-libs/libdca )
106 dv? ( media-libs/libdv )
107 dvb? ( media-tv/linuxtv-dvb-headers )
108 encode? (
109 mp2? ( media-sound/twolame )
110 mp3? ( media-sound/lame )
111 faac? ( media-libs/faac )
112 x264? ( >=media-libs/x264-0.0.20090629 )
113 xvid? ( media-libs/xvid )
114 )
115 esd? ( media-sound/esound )
116 enca? ( app-i18n/enca )
117 faad? ( !aac? ( media-libs/faad2 ) )
118 gif? ( media-libs/giflib )
119 jack? ( media-sound/jack-audio-connection-kit )
120 jpeg? ( media-libs/jpeg )
121 ladspa? ( media-libs/ladspa-sdk )
122 libcaca? ( media-libs/libcaca )
123 lirc? ( app-misc/lirc )
124 lzo? ( >=dev-libs/lzo-2 )
125 mad? ( media-libs/libmad )
126 mng? ( media-libs/libmng )
127 nas? ( media-libs/nas )
128 nut? ( >=media-libs/libnut-661 )
129 png? ( media-libs/libpng )
130 pnm? ( media-libs/netpbm )
131 pulseaudio? ( media-sound/pulseaudio )
132 rar? ( || ( app-arch/unrar-gpl
133 app-arch/unrar
134 app-arch/rar ) )
135 samba? ( net-fs/samba )
136 schroedinger? ( media-libs/schroedinger )
137 sdl? ( media-libs/libsdl )
138 speex? ( media-libs/speex )
139 svga? ( media-libs/svgalib )
140 theora? ( media-libs/libtheora )
141 live? ( media-plugins/live )
142 vorbis? ( media-libs/libvorbis )
143 xanim? ( media-video/xanim )
144 X? ( x11-libs/libXxf86vm
145 x11-libs/libXext
146 ass? ( || ( media-fonts/ttf-bitstream-vera media-fonts/dejavu )
147 media-libs/freetype:2 media-libs/fontconfig )
148 dga? ( x11-libs/libXxf86dga )
149 ggi? ( media-libs/libggi
150 media-libs/libggiwmh )
151 gmplayer? ( media-libs/libpng
152 x11-libs/libXxf86vm
153 x11-libs/libXext
154 x11-libs/libXi
155 x11-libs/gtk+:2 )
156 opengl? ( virtual/opengl )
157 truetype? ( media-libs/freetype:2
158 media-libs/fontconfig )
159 video_cards_nvidia? (
160 vdpau? ( >=x11-drivers/nvidia-drivers-180.60 )
161 )
162 vidix? ( x11-libs/libXxf86vm
163 x11-libs/libXext )
164 xinerama? ( x11-libs/libXinerama
165 x11-libs/libXxf86vm
166 x11-libs/libXext )
167 xscreensaver? ( x11-libs/libXScrnSaver )
168 xv? ( x11-libs/libXv
169 x11-libs/libXxf86vm
170 x11-libs/libXext
171 xvmc? ( x11-libs/libXvMC ) )
172 )"
173
174 DEPEND="${RDEPEND}
175 amd64? ( dev-lang/yasm )
176 doc? ( dev-libs/libxslt )
177 X? ( x11-proto/xextproto
178 x11-proto/xf86vidmodeproto
179 dga? ( x11-proto/xf86dgaproto )
180 dxr3? ( media-video/em8300-libraries )
181 xinerama? ( x11-proto/xineramaproto )
182 xv? ( x11-proto/videoproto
183 x11-proto/xf86vidmodeproto )
184 gmplayer? ( x11-proto/xextproto
185 x11-proto/xf86vidmodeproto )
186 xscreensaver? ( x11-proto/scrnsaverproto ) )
187 x86? ( dev-lang/yasm )
188 x86-fbsd? ( dev-lang/yasm )
189 iconv? ( virtual/libiconv )"
190
191 SLOT="0"
192 LICENSE="GPL-2"
193 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
194
195 pkg_setup() {
196 if use gmplayer; then
197 ewarn ""
198 ewarn "GMPlayer is no longer actively developed upstream"
199 ewarn "and is not supported by Gentoo. There are alternatives"
200 ewarn "for a GUI frontend: smplayer, gnome-mplayer and kmplayer."
201 fi
202
203 if use cpudetection; then
204 ewarn ""
205 ewarn "You've enabled the cpudetection flag. This feature is"
206 ewarn "included mainly for people who want to use the same"
207 ewarn "binary on another system with a different CPU architecture."
208 ewarn "MPlayer will already detect your CPU settings by default at"
209 ewarn "buildtime; this flag is used for runtime detection."
210 ewarn "You won't need this turned on if you are only building"
211 ewarn "mplayer for this system. Also, if your compile fails, try"
212 ewarn "disabling this use flag."
213 fi
214
215 if use custom-cpuopts; then
216 ewarn ""
217 ewarn "You are using the custom-cpuopts flag which will"
218 ewarn "specifically allow you to enable / disable certain"
219 ewarn "CPU optimizations."
220 ewarn ""
221 ewarn "Most desktop users won't need this functionality, but it"
222 ewarn "is included for corner cases like cross-compiling and"
223 ewarn "certain profiles. If unsure, disable this flag and MPlayer"
224 ewarn "will automatically detect and use your available CPU"
225 ewarn "optimizations."
226 ewarn ""
227 ewarn "Using this flag means your build is unsupported, so"
228 ewarn "please make sure your CPU optimization use flags (3dnow"
229 ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set."
230 fi
231 }
232
233 src_unpack() {
234 unpack ${A}
235
236 if ! use truetype ; then
237 unpack font-arial-iso-8859-1.tar.bz2 \
238 font-arial-iso-8859-2.tar.bz2 \
239 font-arial-cp1250.tar.bz2
240 fi
241
242 cd "${WORKDIR}"
243
244 use gmplayer && unpack "Blue-${BLUV}.tar.bz2"
245
246 use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.gz"
247 }
248
249 src_prepare() {
250 # Set version #
251 sed -i s/UNKNOWN/${MPLAYER_REVISION}/ "${S}/version.sh"
252
253 if use svga; then
254 echo
255 einfo "Enabling vidix non-root mode."
256 einfo "(You need a proper svgalib_helper.o module for your kernel"
257 einfo "to actually use this)"
258 echo
259
260 mv "${WORKDIR}/svgalib_helper" "${S}/libdha"
261 fi
262 }
263
264 src_configure() {
265 local myconf=""
266
267 [[ -n $LINGUAS ]] && LINGUAS="${LINGUAS/da/dk}"
268
269 # mplayer ebuild uses "use foo || --disable-foo" to forcibly disable
270 # compilation in almost every situation. The reason for this is
271 # because if --enable is used, it will force the build of that option,
272 # regardless of whether the dependency is available or not.
273
274 ################
275 #Optional features#
276 ###############
277 myconf="${myconf} $(use_enable network) --disable-arts --disable-nemesi"
278 use ass || myconf="${myconf} --disable-ass"
279 use bidi || myconf="${myconf} --disable-fribidi"
280 use bl && myconf="${myconf} --enable-bl"
281 use enca || myconf="${myconf} --disable-enca"
282 use encode || myconf="${myconf} --disable-mencoder"
283 use ftp || myconf="${myconf} --disable-ftp"
284 use ipv6 || myconf="${myconf} --disable-inet6"
285 use lirc || myconf="${myconf} --disable-lirc --disable-lircc \
286 --disable-apple-ir"
287 use nut || myconf="${myconf} --disable-libnut"
288 use rar || myconf="${myconf} --disable-unrarexec"
289 use rtc || myconf="${myconf} --disable-rtc"
290 use samba || myconf="${myconf} --disable-smb"
291 myconf="${myconf} $(use_enable joystick)"
292
293 # libcdio support: prefer libcdio over cdparanoia
294 # don't check for cddb w/cdio
295 if use cdio; then
296 myconf="${myconf} --disable-cdparanoia"
297 else
298 myconf="${myconf} --disable-libcdio"
299 use cdparanoia || myconf="${myconf} --disable-cdparanoia"
300 use cddb || myconf="${myconf} --disable-cddb"
301 fi
302
303 ###############
304 # DVD read, navigation support
305 ###############
306 #
307 # dvdread - accessing a DVD
308 # dvdnav - navigation of menus
309 #
310 # internal dvdread and dvdnav use flags enable internal
311 # versions of the libraries, which are snapshots of the fork.
312 #
313 # Only check for disabled a52 use flag inside the DVD check,
314 # since many users were getting confused why there was no
315 # audio stream.
316 #
317 if use dvd; then
318 use dvdnav || myconf="${myconf} --disable-dvdnav"
319 else
320 myconf="${myconf} --disable-dvdnav --disable-dvdread
321 --disable-dvdread-internal --disable-libdvdcss-internal"
322 use a52 || myconf="${myconf} --disable-liba52-internal"
323 fi
324
325 ###############
326 # Subtitles
327 ###############
328 #
329 # SRT/ASS/SSA (subtitles) requires freetype support
330 # freetype support requires iconv
331 # iconv optionally can use unicode
332 if ! use ass; then
333 if ! use truetype; then
334 myconf="${myconf} --disable-freetype"
335 if ! use iconv; then
336 myconf="${myconf} --disable-iconv --charset=noconv"
337 fi
338 fi
339 fi
340 use iconv && use unicode && myconf="${myconf} --charset=UTF-8"
341
342 ###############
343 # DVB / Video4Linux / Radio support
344 ###############
345 myconf="${myconf} --disable-tv-bsdbt848"
346 # broken upstream, won't work with recent kernels
347 myconf="${myconf} --disable-ivtv"
348 if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then
349 use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead"
350 use pvr || myconf="${myconf} --disable-pvr"
351 use v4l || myconf="${myconf} --disable-tv-v4l1"
352 use v4l2 || myconf="${myconf} --disable-tv-v4l2"
353 use teletext || myconf="${myconf} --disable-tv-teletext"
354 if use radio && { use dvb || use v4l || use v4l2; }; then
355 myconf="${myconf} --enable-radio $(use_enable encode radio-capture)"
356 else
357 myconf="${myconf} --disable-radio-v4l2 --disable-radio-bsdbt848"
358 fi
359 else
360 myconf="${myconf} --disable-tv --disable-tv-v4l1 --disable-tv-v4l2
361 --disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848
362 --disable-dvb --disable-dvbhead --disable-tv-teletext
363 --disable-v4l2 --disable-pvr"
364 fi
365
366 #########
367 # Codecs #
368 ########
369 # Won't work with external liba52
370 myconf="${myconf} --disable-liba52"
371 # Use internal musepack codecs for SV7 and SV8 support
372 myconf="${myconf} --disable-musepack"
373
374 use opencore-amr || myconf="${myconf} --disable-libopencore_amrnb
375 --disable-libopencore_amrwb"
376 use aac || myconf="${myconf} --disable-faad-internal"
377 use dirac || myconf="${myconf} --disable-libdirac-lavc"
378 use dts || myconf="${myconf} --disable-libdca"
379 use dv || myconf="${myconf} --disable-libdv"
380 use faad || myconf="${myconf} --disable-faad"
381 use lzo || myconf="${myconf} --disable-liblzo"
382 use mp3 || myconf="${myconf} --disable-mp3lame --disable-mp3lame-lavc
383 --disable-mp3lib"
384 use schroedinger || myconf="${myconf} --disable-libschroedinger-lavc"
385 use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods"
386 ! use png && ! use gmplayer && myconf="${myconf} --disable-png"
387 for x in gif jpeg live mad mng pnm speex tga theora xanim; do
388 use ${x} || myconf="${myconf} --disable-${x}"
389 done
390 if use vorbis || use tremor; then
391 use tremor || myconf="${myconf} --disable-tremor-internal"
392 use vorbis || myconf="${myconf} --disable-libvorbis"
393 else
394 myconf="${myconf} --disable-tremor-internal --disable-tremor
395 --disable-libvorbis"
396 fi
397 # Encoding
398 if use encode; then
399 use aac || myconf="${myconf} --disable-faac-lavc"
400 use faac || myconf="${myconf} --disable-faac"
401 use x264 || myconf="${myconf} --disable-x264"
402 use xvid || myconf="${myconf} --disable-xvid"
403 use mp2 || myconf="${myconf} --disable-twolame --disable-toolame"
404 else
405 myconf="${myconf} --disable-faac-lavc --disable-faac --disable-x264 \
406 --disable-xvid --disable-x264-lavc --disable-xvid-lavc \
407 --disable-twolame --disable-toolame"
408 fi
409
410 ###############
411 # Binary codecs
412 ###############
413 # bug 213836
414 if ! use x86 || ! use win32codecs; then
415 use quicktime || myconf="${myconf} --disable-qtx"
416 fi
417
418 ###############
419 # RealPlayer support
420 ###############
421 #
422 # Realplayer support shows up in four places:
423 # - libavcodec (internal)
424 # - win32codecs
425 # - realcodecs (win32codecs libs)
426 # - realcodecs (realplayer libs)
427 #
428
429 # internal
430 use real || myconf="${myconf} --disable-real"
431
432 # Real binary codec support only available on x86, amd64
433 if use real; then
434 use x86 && myconf="${myconf}
435 --realcodecsdir=/opt/RealPlayer/codecs"
436 use amd64 && myconf="${myconf}
437 --realcodecsdir=/usr/$(get_libdir)/codecs"
438 elif ! use bindist; then
439 myconf="${myconf} $(use_enable win32codecs win32dll)"
440 fi
441
442 #############
443 # Video Output #
444 #############
445 for x in directfb md5sum sdl; do
446 use ${x} || myconf="${myconf} --disable-${x}"
447 done
448 use aalib || myconf="${myconf} --disable-aa"
449 use fbcon || myconf="${myconf} --disable-fbdev"
450 use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb"
451 use libcaca || myconf="${myconf} --disable-caca"
452 use zoran || myconf="${myconf} --disable-zr"
453
454 # GTK gmplayer gui
455 # Unsupported by Gentoo, upstream has dropped development
456 myconf="${myconf} $(use_enable gmplayer gui)"
457
458 # X support
459 if use X; then
460 use dga || myconf="${myconf} --disable-dga1 --disable-dga2"
461 use dxr3 || myconf="${myconf} --disable-dxr3"
462 use ggi || myconf="${myconf} --disable-ggi"
463 use opengl || myconf="${myconf} --disable-gl"
464 use osdmenu && myconf="${myconf} --enable-menu"
465 use video_cards_nvidia && use vdpau || myconf="${myconf} --disable-vdpau"
466 use vidix || myconf="${myconf} --disable-vidix --disable-vidix-pcidb"
467 use xinerama || myconf="${myconf} --disable-xinerama"
468 use xscreensaver || myconf="${myconf} --disable-xss"
469 if use xv; then
470 if use xvmc; then
471 myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW"
472 else
473 myconf="${myconf} --disable-xvmc"
474 fi
475 else
476 myconf="${myconf} --disable-xv --disable-xvmc"
477 fi
478 else
479 myconf="${myconf} --disable-dga1 --disable-dga2 --disable-dxr3 \
480 --disable-ggi --disable-gl --disable-vdpau --disable-vidix \
481 --disable-vidix-pcidb --disable-xinerama --disable-xss \
482 --disable-xv --disable-xvmc"
483 fi
484
485 if ! use kernel_linux && ! use video_cards_mga; then
486 myconf="${myconf} --disable-mga --disable-xmga"
487 fi
488
489 if use video_cards_tdfx; then
490 myconf="${myconf} $(use_enable video_cards_tdfx tdfxvid)
491 $(use_enable fbcon tdfxfb)"
492 else
493 myconf="${myconf} --disable-3dfx --disable-tdfxvid --disable-tdfxfb"
494 fi
495
496 #############
497 # Audio Output #
498 #############
499 for x in alsa esd jack ladspa nas openal; do
500 use ${x} || myconf="${myconf} --disable-${x}"
501 done
502 use pulseaudio || myconf="${myconf} --disable-pulse"
503 if ! use radio; then
504 use oss || myconf="${myconf} --disable-ossaudio"
505 fi
506
507 #################
508 # Advanced Options #
509 #################
510 # Platform specific flags, hardcoded on amd64 (see below)
511 if use cpudetection; then
512 myconf="${myconf} --enable-runtime-cpudetection"
513 fi
514
515 # Turning off CPU optimizations usually will break the build.
516 # However, this use flag, if enabled, will allow users to completely
517 # specify which ones to use. If disabled, mplayer will automatically
518 # enable all CPU optimizations that the host build supports.
519 if use custom-cpuopts; then
520 for x in 3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3; do
521 myconf="${myconf} $(use_enable $x)"
522 done
523 fi
524
525 use debug && myconf="${myconf} --enable-debug=3"
526
527 filter-flags -fPIC -fPIE
528 append-flags -D__STDC_LIMIT_MACROS
529 if use x86 || use x86-fbsd; then
530 use debug || append-flags -fomit-frame-pointer
531 fi
532
533 myconf="--cc=$(tc-getCC)
534 --host-cc=$(tc-getBUILD_CC)
535 --prefix=/usr
536 --confdir=/etc/mplayer
537 --datadir=/usr/share/mplayer
538 --libdir=/usr/$(get_libdir)
539 ${myconf}"
540
541 #echo "CFLAGS=\"${CFLAGS}\" ./configure ${myconf}"
542 CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died"
543 }
544
545 src_compile() {
546 emake || die "Failed to build MPlayer!"
547 use doc && make -C DOCS/xml html-chunked
548 }
549
550 src_install() {
551 emake prefix="${D}/usr" \
552 BINDIR="${D}/usr/bin" \
553 LIBDIR="${D}/usr/$(get_libdir)" \
554 CONFDIR="${D}/etc/mplayer" \
555 DATADIR="${D}/usr/share/mplayer" \
556 MANDIR="${D}/usr/share/man" \
557 INSTALLSTRIP="" \
558 install || die "emake install failed"
559
560 dodoc AUTHORS Changelog Copyright README etc/codecs.conf
561
562 docinto tech/
563 dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
564 docinto TOOLS/
565 dodoc TOOLS/*
566 if use real; then
567 docinto tech/realcodecs/
568 dodoc DOCS/tech/realcodecs/*
569 docinto TOOLS/realcodecs/
570 dodoc TOOLS/realcodecs/*
571 fi
572 docinto tech/mirrors/
573 dodoc DOCS/tech/mirrors/*
574
575 use doc && dohtml -r "${S}"/DOCS/HTML/*
576
577 # Install the default Skin and Gnome menu entry
578 if use gmplayer; then
579 dodir /usr/share/mplayer/skins
580 cp -r "${WORKDIR}/Blue" \
581 "${D}/usr/share/mplayer/skins/default" || die "cp skins died"
582
583 # Fix the symlink
584 rm -rf "${D}/usr/bin/gmplayer"
585 dosym mplayer /usr/bin/gmplayer
586 fi
587
588 if ! use ass && ! use truetype; then
589 dodir /usr/share/mplayer/fonts
590 local x=
591 # Do this generic, as the mplayer people like to change the structure
592 # of their zips ...
593 for x in $(find "${WORKDIR}/" -type d -name 'font-arial-*')
594 do
595 cp -pPR "${x}" "${D}/usr/share/mplayer/fonts"
596 done
597 # Fix the font symlink ...
598 rm -rf "${D}/usr/share/mplayer/font"
599 dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
600 fi
601
602 insinto /etc/mplayer
603 newins "${S}/etc/example.conf" mplayer.conf
604 doins "${S}/etc/input.conf"
605 use osdmenu && doins "${S}/etc/menu.conf"
606
607 if use ass || use truetype; then
608 cat >> "${D}/etc/mplayer/mplayer.conf" << EOT
609 fontconfig=1
610 subfont-osd-scale=4
611 subfont-text-scale=3
612 EOT
613 fi
614
615 # bug 256203
616 if use rar; then
617 cat >> "${D}/etc/mplayer/mplayer.conf" << EOT
618 unrarexec=/usr/bin/unrar
619 EOT
620 fi
621
622 dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
623
624 newbin "${S}/TOOLS/midentify.sh" midentify
625 }
626
627 pkg_preinst() {
628 if [[ -d ${ROOT}/usr/share/mplayer/Skin/default ]]
629 then
630 rm -rf "${ROOT}/usr/share/mplayer/Skin/default"
631 fi
632 }
633
634 pkg_postrm() {
635 # Cleanup stale symlinks
636 if [ -L "${ROOT}/usr/share/mplayer/font" -a \
637 ! -e "${ROOT}/usr/share/mplayer/font" ]
638 then
639 rm -f "${ROOT}/usr/share/mplayer/font"
640 fi
641
642 if [ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \
643 ! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ]
644 then
645 rm -f "${ROOT}/usr/share/mplayer/subfont.ttf"
646 fi
647 }