Gentoo Archives: gentoo-commits

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