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_p20120105.ebuild
Date: Thu, 05 Jan 2012 14:13:57
Message-Id: 20120105141346.4EF482004B@flycatcher.gentoo.org
1 aballier 12/01/05 14:13:46
2
3 Modified: ChangeLog
4 Added: mplayer-1.0_rc4_p20120105.ebuild
5 Log:
6 bump a new snapshot with accumulated fixes from 9999, working with ffmpeg 0.9.1 release
7
8 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.835 media-video/mplayer/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.835&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.835&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/ChangeLog?r1=1.834&r2=1.835
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v
20 retrieving revision 1.834
21 retrieving revision 1.835
22 diff -u -r1.834 -r1.835
23 --- ChangeLog 2 Jan 2012 15:53:34 -0000 1.834
24 +++ ChangeLog 5 Jan 2012 14:13:46 -0000 1.835
25 @@ -1,6 +1,13 @@
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.834 2012/01/02 15:53:34 dilfridge Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.835 2012/01/05 14:13:46 aballier Exp $
30 +
31 +*mplayer-1.0_rc4_p20120105 (05 Jan 2012)
32 +
33 + 05 Jan 2012; Alexis Ballier <aballier@g.o>
34 + +mplayer-1.0_rc4_p20120105.ebuild:
35 + bump a new snapshot with accumulated fixes from 9999, working with ffmpeg
36 + 0.9.1 release
37
38 02 Jan 2012; Andreas K. Huettel <dilfridge@g.o> +ChangeLog-2008:
39 Split ChangeLog.
40
41
42
43 1.1 media-video/mplayer/mplayer-1.0_rc4_p20120105.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20120105.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20120105.ebuild?rev=1.1&content-type=text/plain
47
48 Index: mplayer-1.0_rc4_p20120105.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_rc4_p20120105.ebuild,v 1.1 2012/01/05 14:13:46 aballier Exp $
53
54 EAPI=4
55
56 EGIT_REPO_URI="git://git.videolan.org/ffmpeg.git"
57 ESVN_REPO_URI="svn://svn.mplayerhq.hu/mplayer/trunk"
58 [[ ${PV} = *9999* ]] && SVN_ECLASS="subversion git-2" || SVN_ECLASS=""
59
60 inherit toolchain-funcs eutils flag-o-matic multilib base ${SVN_ECLASS}
61
62 IUSE="3dnow 3dnowext +a52 aalib +alsa altivec aqua +ass bidi bindist bl bluray
63 bs2b cddb +cdio cdparanoia cpudetection debug dga
64 directfb doc +dts +dv dvb +dvd +dvdnav dxr3 +enca +encode esd faac +faad fbcon
65 ftp gif ggi gsm +iconv ipv6 jack joystick jpeg jpeg2k kernel_linux ladspa
66 libcaca libmpeg2 lirc +live lzo mad md5sum +mmx mmxext mng +mp3 nas
67 +network nut openal +opengl +osdmenu oss png pnm pulseaudio pvr +quicktime
68 radio +rar +real +rtc rtmp samba +shm sdl +speex sse sse2 ssse3
69 tga +theora +tremor +truetype +toolame +twolame +unicode v4l vdpau vidix
70 +vorbis win32codecs +X +x264 xanim xinerama +xscreensaver +xv +xvid xvmc
71 zoran"
72
73 VIDEO_CARDS="s3virge mga tdfx"
74 for x in ${VIDEO_CARDS}; do
75 IUSE+=" video_cards_${x}"
76 done
77
78 FONT_URI="
79 mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
80 mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
81 mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
82 "
83 if [[ ${PV} == *9999* ]]; then
84 RELEASE_URI=""
85 else
86 RELEASE_URI="mirror://gentoo/${P}.tar.xz"
87 fi
88 SRC_URI="${RELEASE_URI}
89 !truetype? ( ${FONT_URI} )"
90
91 DESCRIPTION="Media Player for Linux"
92 HOMEPAGE="http://www.mplayerhq.hu/"
93
94 FONT_RDEPS="
95 virtual/ttf-fonts
96 media-libs/fontconfig
97 >=media-libs/freetype-2.2.1:2
98 "
99 X_RDEPS="
100 x11-libs/libXext
101 x11-libs/libXxf86vm
102 "
103 # Rar: althrought -gpl version is nice, it cant do most functions normal rars can
104 # nemesi? ( net-libs/libnemesi )
105 RDEPEND+="
106 sys-libs/ncurses
107 app-arch/bzip2
108 sys-libs/zlib
109 >=media-video/ffmpeg-0.9.1
110 !bindist? (
111 x86? (
112 win32codecs? ( media-libs/win32codecs )
113 )
114 )
115 a52? ( media-libs/a52dec )
116 aalib? ( media-libs/aalib )
117 alsa? ( media-libs/alsa-lib )
118 ass? ( >=media-libs/libass-0.9.10[enca?] )
119 bidi? ( dev-libs/fribidi )
120 bluray? ( >=media-libs/libbluray-0.2.1 )
121 bs2b? ( media-libs/libbs2b )
122 cdio? ( dev-libs/libcdio )
123 cdparanoia? ( !cdio? ( media-sound/cdparanoia ) )
124 dga? ( x11-libs/libXxf86dga )
125 directfb? ( dev-libs/DirectFB )
126 dts? ( media-libs/libdca )
127 dv? ( media-libs/libdv )
128 dvb? ( media-tv/linuxtv-dvb-headers )
129 dvd? ( >=media-libs/libdvdread-4.1.3 )
130 dvdnav? ( >=media-libs/libdvdnav-4.1.3 )
131 encode? (
132 !twolame? ( toolame? ( media-sound/toolame ) )
133 twolame? ( media-sound/twolame )
134 faac? ( media-libs/faac )
135 mp3? ( media-sound/lame )
136 x264? ( >=media-libs/x264-0.0.20100423 )
137 xvid? ( media-libs/xvid )
138 )
139 esd? ( media-sound/esound )
140 enca? ( app-i18n/enca )
141 faad? ( media-libs/faad2 )
142 ggi? ( media-libs/libggi media-libs/libggiwmh )
143 gif? ( media-libs/giflib )
144 gsm? ( media-sound/gsm )
145 iconv? ( virtual/libiconv )
146 jack? ( media-sound/jack-audio-connection-kit )
147 jpeg? ( virtual/jpeg )
148 jpeg2k? ( media-libs/openjpeg )
149 ladspa? ( media-libs/ladspa-sdk )
150 libcaca? ( media-libs/libcaca )
151 libmpeg2? ( media-libs/libmpeg2 )
152 lirc? ( app-misc/lirc )
153 live? ( media-plugins/live )
154 lzo? ( >=dev-libs/lzo-2 )
155 mad? ( media-libs/libmad )
156 mng? ( media-libs/libmng )
157 mp3? ( media-sound/mpg123 )
158 nas? ( media-libs/nas )
159 nut? ( >=media-libs/libnut-661 )
160 openal? ( media-libs/openal )
161 opengl? ( virtual/opengl )
162 png? ( media-libs/libpng )
163 pnm? ( media-libs/netpbm )
164 pulseaudio? ( media-sound/pulseaudio )
165 rar? (
166 || (
167 app-arch/unrar
168 app-arch/rar
169 )
170 )
171 rtmp? ( media-video/rtmpdump )
172 samba? ( net-fs/samba )
173 sdl? ( media-libs/libsdl )
174 speex? ( media-libs/speex )
175 theora? ( media-libs/libtheora[encode?] )
176 truetype? ( ${FONT_RDEPS} )
177 vdpau? ( x11-libs/libvdpau )
178 vorbis? ( media-libs/libvorbis )
179 X? ( ${X_RDEPS} )
180 xanim? ( media-video/xanim )
181 xinerama? ( x11-libs/libXinerama )
182 xscreensaver? ( x11-libs/libXScrnSaver )
183 xv? ( x11-libs/libXv )
184 xvmc? ( x11-libs/libXvMC )
185 "
186
187 X_DEPS="
188 x11-proto/videoproto
189 x11-proto/xf86vidmodeproto
190 "
191 ASM_DEP="dev-lang/yasm"
192 DEPEND="${RDEPEND}
193 dev-util/pkgconfig
194 dga? ( x11-proto/xf86dgaproto )
195 dxr3? ( media-video/em8300-libraries )
196 X? ( ${X_DEPS} )
197 xinerama? ( x11-proto/xineramaproto )
198 xscreensaver? ( x11-proto/scrnsaverproto )
199 amd64? ( ${ASM_DEP} )
200 doc? (
201 dev-libs/libxslt app-text/docbook-xml-dtd
202 app-text/docbook-xsl-stylesheets
203 )
204 x86? ( ${ASM_DEP} )
205 x86-fbsd? ( ${ASM_DEP} )
206 "
207
208 SLOT="0"
209 LICENSE="GPL-2"
210 if [[ ${PV} != *9999* ]]; then
211 KEYWORDS="~amd64 ~hppa ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
212 else
213 KEYWORDS=""
214 fi
215
216 # faac codecs are nonfree, win32codecs are nonfree
217 # libcdio support: prefer libcdio over cdparanoia and don't check for cddb w/cdio
218 # dvd navigation requires dvd read support
219 # ass and freetype font require iconv and ass requires freetype fonts
220 # unicode transformations are usefull only with iconv
221 # libvorbis require external tremor to work
222 # radio requires oss or alsa backend
223 # xvmc requires xvideo support
224 REQUIRED_USE="bindist? ( !faac !win32codecs )
225 dvdnav? ( dvd )
226 ass? ( truetype )
227 truetype? ( iconv )
228 dxr3? ( X )
229 ggi? ( X )
230 xinerama? ( X )
231 dga? ( X )
232 opengl? ( X )
233 osdmenu? ( X )
234 vdpau? ( X )
235 vidix? ( X )
236 xscreensaver? ( X )
237 xv? ( X )
238 xvmc? ( xv )"
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 uses="alsa esd jack ladspa nas openal"
522 for i in ${uses}; do
523 use ${i} || myconf+=" --disable-${i}"
524 done
525 use pulseaudio || myconf+=" --disable-pulse"
526 if ! use radio; then
527 use oss || myconf+=" --disable-ossaudio"
528 fi
529
530 ####################
531 # Advanced Options #
532 ####################
533 # Platform specific flags, hardcoded on amd64 (see below)
534 use cpudetection && myconf+=" --enable-runtime-cpudetection"
535
536 uses="3dnow 3dnowext altivec mmx mmxext shm sse sse2 ssse3"
537 for i in ${uses}; do
538 myconf+=" $(use_enable ${i})"
539 done
540
541 use debug && myconf+=" --enable-debug=3"
542
543 if use x86 && gcc-specs-pie; then
544 filter-flags -fPIC -fPIE
545 append-ldflags -nopie
546 fi
547
548 ###########################
549 # X enabled configuration #
550 ###########################
551 myconf+=" --disable-gui"
552 myconf+=" --disable-vesa"
553 uses="dxr3 ggi vdpau xinerama xv"
554 for i in ${uses}; do
555 use ${i} || myconf+=" --disable-${i}"
556 done
557 use dga || myconf+=" --disable-dga1 --disable-dga2"
558 use opengl || myconf+=" --disable-gl"
559 use osdmenu && myconf+=" --enable-menu"
560 use vidix || myconf+=" --disable-vidix --disable-vidix-pcidb"
561 use xscreensaver || myconf+=" --disable-xss"
562 use X || myconf+=" --disable-x11"
563 if use xvmc; then
564 myconf+=" --enable-xvmc --with-xvmclib=XvMCW"
565 else
566 myconf+=" --disable-xvmc"
567 fi
568
569 ############################
570 # OSX (aqua) configuration #
571 ############################
572 if use aqua; then
573 myconf+="
574 --enable-macosx-finder
575 --enable-macosx-bundle
576 "
577 fi
578
579 ./configure \
580 --cc="$(tc-getCC)" \
581 --host-cc="$(tc-getBUILD_CC)" \
582 --prefix="${EPREFIX}/usr" \
583 --bindir="${EPREFIX}/usr/bin" \
584 --libdir="${EPREFIX}/usr/$(get_libdir)" \
585 --confdir="${EPREFIX}/etc/mplayer" \
586 --datadir="${EPREFIX}/usr/share/mplayer${namesuf}" \
587 --mandir="${EPREFIX}/usr/share/man" \
588 --disable-ffmpeg_a \
589 ${myconf} || die
590 }
591
592 src_compile() {
593 base_src_compile
594 # Build only user-requested docs if they're available.
595 if use doc ; then
596 # select available languages from $LINGUAS
597 LINGUAS=${LINGUAS/zh/zh_CN}
598 local ALLOWED_LINGUAS="cs de en es fr hu it pl ru zh_CN"
599 local BUILT_DOCS=""
600 for i in ${LINGUAS} ; do
601 has ${i} ${ALLOWED_LINGUAS} && BUILT_DOCS+=" ${i}"
602 done
603 if [[ -z $BUILT_DOCS ]]; then
604 emake -j1 html-chunked
605 else
606 for i in ${BUILT_DOCS}; do
607 emake -j1 html-chunked-${i}
608 done
609 fi
610 fi
611 }
612
613 src_install() {
614 local i
615
616 emake \
617 DESTDIR="${D}" \
618 INSTALLSTRIP="" \
619 install
620
621 dodoc AUTHORS Changelog Copyright README etc/codecs.conf
622
623 docinto tech/
624 dodoc DOCS/tech/{*.txt,MAINTAINERS,mpsub.sub,playtree,TODO,wishlist}
625 docinto TOOLS/
626 dodoc -r TOOLS
627 if use real; then
628 docinto tech/realcodecs/
629 dodoc DOCS/tech/realcodecs/*
630 fi
631 docinto tech/mirrors/
632 dodoc DOCS/tech/mirrors/*
633
634 if use doc; then
635 docinto html/
636 dohtml -r "${S}"/DOCS/HTML/*
637 fi
638
639 if ! use truetype; then
640 dodir /usr/share/mplayer/fonts
641 # Do this generic, as the mplayer people like to change the structure
642 # of their zips ...
643 for i in $(find "${WORKDIR}/" -type d -name 'font-arial-*'); do
644 cp -pPR "${i}" "${ED}/usr/share/mplayer/fonts"
645 done
646 # Fix the font symlink ...
647 rm -rf "${ED}/usr/share/mplayer/font"
648 dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
649 fi
650
651 insinto /etc/mplayer
652 newins "${S}/etc/example.conf" mplayer.conf
653 cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
654 # Config options can be section specific, global
655 # options should go in the default section
656 [default]
657 _EOF_
658 doins "${S}/etc/input.conf"
659 if use osdmenu; then
660 doins "${S}/etc/menu.conf"
661 fi
662
663 if use truetype; then
664 cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
665 fontconfig=1
666 subfont-osd-scale=4
667 subfont-text-scale=3
668 _EOF_
669 fi
670
671 # bug 256203
672 if use rar; then
673 cat >> "${ED}/etc/mplayer/mplayer.conf" << _EOF_
674 unrarexec=${EPREFIX}/usr/bin/unrar
675 _EOF_
676 fi
677
678 dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
679 newbin "${S}/TOOLS/midentify.sh" midentify
680 }
681
682 pkg_preinst() {
683 [[ -d ${EROOT}/usr/share/mplayer/Skin/default ]] && \
684 rm -rf "${EROOT}/usr/share/mplayer/Skin/default"
685 }
686
687 pkg_postrm() {
688 # Cleanup stale symlinks
689 [ -L "${EROOT}/usr/share/mplayer/font" -a \
690 ! -e "${EROOT}/usr/share/mplayer/font" ] && \
691 rm -f "${EROOT}/usr/share/mplayer/font"
692
693 [ -L "${EROOT}/usr/share/mplayer/subfont.ttf" -a \
694 ! -e "${EROOT}/usr/share/mplayer/subfont.ttf" ] && \
695 rm -f "${EROOT}/usr/share/mplayer/subfont.ttf"
696 }