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