Gentoo Archives: gentoo-commits

From: "Steve Dibb (beandog)" <beandog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/mplayer: ChangeLog mplayer-1.0_rc2_p26753-r2.ebuild
Date: Mon, 26 May 2008 00:52:37
Message-Id: E1K0Qwy-0006y7-NN@stork.gentoo.org
1 beandog 08/05/26 00:52:32
2
3 Modified: ChangeLog
4 Added: mplayer-1.0_rc2_p26753-r2.ebuild
5 Log:
6 Add custom-cpuopts use flag; add dxr2, dxr3 use flag, bug 223587
7 (Portage version: 2.1.5)
8
9 Revision Changes Path
10 1.578 media-video/mplayer/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.578&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?rev=1.578&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/ChangeLog?r1=1.577&r2=1.578
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v
19 retrieving revision 1.577
20 retrieving revision 1.578
21 diff -u -r1.577 -r1.578
22 --- ChangeLog 22 May 2008 17:45:39 -0000 1.577
23 +++ ChangeLog 26 May 2008 00:52:32 -0000 1.578
24 @@ -1,6 +1,12 @@
25 # ChangeLog for media-video/mplayer
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.577 2008/05/22 17:45:39 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.578 2008/05/26 00:52:32 beandog Exp $
29 +
30 +*mplayer-1.0_rc2_p26753-r2 (26 May 2008)
31 +
32 + 26 May 2008; Steve Dibb <beandog@g.o>
33 + +mplayer-1.0_rc2_p26753-r2.ebuild:
34 + Add custom-cpuopts use flag; add dxr2, dxr3 use flag, bug 223587
35
36 22 May 2008; Raúl Porcel <armin76@g.o>
37 mplayer-1.0_rc2_p26753-r1.ebuild:
38
39
40
41 1.1 media-video/mplayer/mplayer-1.0_rc2_p26753-r2.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2_p26753-r2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/mplayer/mplayer-1.0_rc2_p26753-r2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mplayer-1.0_rc2_p26753-r2.ebuild
47 ===================================================================
48 # Copyright 1999-2008 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_rc2_p26753-r2.ebuild,v 1.1 2008/05/26 00:52:32 beandog Exp $
51
52 EAPI="1"
53
54 inherit eutils flag-o-matic multilib
55
56 MPLAYER_REVISION=26753
57
58 IUSE="3dnow 3dnowext +a52 aac -aalib +alsa altivec amrnb amrwb -arts bidi bl
59 bindist cddb cdio cdparanoia cpudetection custom-cflags -custom-cpuopts debug
60 dga doc dts dvb directfb +dvd dv dxr2 dxr3 enca encode esd -fbcon ftp -gif ggi gtk iconv ipv6 jack joystick -jpeg kernel_linux ladspa -libcaca lirc live lzo +mad -md5sum +mmx mmxext mp2 +mp3 musepack nas nemesi unicode +vorbis opengl openal oss -png -pnm pulseaudio quicktime radio -rar real rtc -samba sdl speex srt sse sse2 ssse3 svga teletext tga +theora +truetype v4l v4l2 vidix win32codecs +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
61
62 VIDEO_CARDS="s3virge mga tdfx vesa"
63
64 for x in ${VIDEO_CARDS}; do
65 IUSE="${IUSE} video_cards_${x}"
66 done
67
68 BLUV="1.7"
69 SVGV="1.9.17"
70 AMR_URI="http://www.3gpp.org/ftp/Specs/archive"
71 SRC_URI="mirror://gentoo/${P}.tar.bz2
72 !truetype? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
73 mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
74 mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
75 !iconv? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
76 mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
77 mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
78 gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )
79 svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )"
80
81 DESCRIPTION="Media Player for Linux"
82 HOMEPAGE="http://www.mplayerhq.hu/"
83
84 RDEPEND="sys-libs/ncurses
85 !bindist? (
86 x86? (
87 win32codecs? ( media-libs/win32codecs )
88 real? ( media-libs/win32codecs
89 media-video/realplayer )
90 )
91 amd64? ( real? ( media-libs/amd64codecs ) )
92 )
93 aalib? ( media-libs/aalib )
94 alsa? ( media-libs/alsa-lib )
95 amrnb? ( media-libs/amrnb )
96 amrwb? ( media-libs/amrwb )
97 arts? ( kde-base/arts )
98 openal? ( media-libs/openal )
99 bidi? ( dev-libs/fribidi )
100 cdio? ( dev-libs/libcdio )
101 cdparanoia? ( media-sound/cdparanoia )
102 directfb? ( dev-libs/DirectFB )
103 dga? ( x11-libs/libXxf86dga )
104 dts? ( media-libs/libdca )
105 dv? ( media-libs/libdv )
106 dvb? ( media-tv/linuxtv-dvb-headers )
107 encode? (
108 aac? ( media-libs/faac )
109 mp2? ( media-sound/twolame )
110 mp3? ( media-sound/lame )
111 x264? ( media-libs/x264 )
112 )
113 esd? ( media-sound/esound )
114 enca? ( app-i18n/enca )
115 gif? ( media-libs/giflib )
116 ggi? ( media-libs/libggi
117 media-libs/libggiwmh )
118 gtk? ( media-libs/libpng
119 x11-libs/libXxf86vm
120 x11-libs/libXext
121 x11-libs/libXi
122 =x11-libs/gtk+-2* )
123 jpeg? ( media-libs/jpeg )
124 ladspa? ( media-libs/ladspa-sdk )
125 libcaca? ( media-libs/libcaca )
126 lirc? ( app-misc/lirc )
127 lzo? ( >=dev-libs/lzo-2 )
128 mad? ( media-libs/libmad )
129 musepack? ( >=media-libs/libmpcdec-1.2.2 )
130 nas? ( media-libs/nas )
131 opengl? ( virtual/opengl )
132 png? ( media-libs/libpng )
133 pnm? ( media-libs/netpbm )
134 pulseaudio? ( media-sound/pulseaudio )
135 samba? ( net-fs/samba )
136 sdl? ( media-libs/libsdl )
137 speex? ( >=media-libs/speex-1.1.7 )
138 srt? ( >=media-libs/freetype-2.1
139 media-libs/fontconfig )
140 svga? ( media-libs/svgalib )
141 theora? ( media-libs/libtheora )
142 live? ( >=media-plugins/live-2007.02.20 )
143 truetype? ( >=media-libs/freetype-2.1
144 media-libs/fontconfig )
145 vidix? ( x11-libs/libXxf86vm
146 x11-libs/libXext )
147 xanim? ( media-video/xanim )
148 xinerama? ( x11-libs/libXinerama
149 x11-libs/libXxf86vm
150 x11-libs/libXext )
151 xscreensaver? ( x11-libs/libXScrnSaver )
152 xv? ( x11-libs/libXv
153 x11-libs/libXxf86vm
154 x11-libs/libXext
155 xvmc? ( x11-libs/libXvMC ) )
156 xvid? ( media-libs/xvid )
157 X? ( x11-libs/libXxf86vm
158 x11-libs/libXext
159 )"
160
161 DEPEND="${RDEPEND}
162 doc? ( >=app-text/docbook-sgml-dtd-4.1.2
163 app-text/docbook-xml-dtd
164 >=app-text/docbook-xml-simple-dtd-1.50.0
165 dev-libs/libxslt )
166 dga? ( x11-proto/xf86dgaproto )
167 xinerama? ( x11-proto/xineramaproto )
168 xv? ( x11-proto/videoproto
169 x11-proto/xf86vidmodeproto )
170 gtk? ( x11-proto/xextproto
171 x11-proto/xf86vidmodeproto )
172 X? ( x11-proto/xextproto
173 x11-proto/xf86vidmodeproto )
174 xscreensaver? ( x11-proto/scrnsaverproto )
175 iconv? ( virtual/libiconv )"
176 # Make sure the assembler USE flags are unmasked on amd64
177 # Remove this once default-linux/amd64/2006.1 is deprecated
178 DEPEND="${DEPEND} amd64? ( >=sys-apps/portage-2.1.2 )
179 mp2? ( >=sys-apps/portage-2.1.2 )"
180
181 SLOT="0"
182 LICENSE="GPL-2"
183 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
184
185 pkg_setup() {
186
187 if [[ -n ${LINGUAS} ]]; then
188 elog "For MPlayer's language support, the configuration will"
189 elog "use your LINGUAS variable from /etc/make.conf. If you have more"
190 elog "than one language enabled, then the first one in the list will"
191 elog "be used to output the messages, if a translation is available."
192 elog "man pages will be created for all languages where translations"
193 elog "are also available."
194 fi
195
196 if use x86 || use amd64; then
197 if use custom-cpuopts; then
198 ewarn "You are using the custom-cpuopts flag which will"
199 ewarn "specifically allow you to enable / disable certain"
200 ewarn "CPU optimizations."
201 ewarn ""
202 ewarn "Most desktop users won't need this functionality, but it"
203 ewarn "is included for corner cases like cross-compiling and"
204 ewarn "certain profiles. If unsure, disable this flag and MPlayer"
205 ewarn "will automatically detect and use your available CPU"
206 ewarn "optimizations."
207 ewarn ""
208 ewarn "Using this flag means your build is unsupported, so"
209 ewarn "please make sure your CPU optimization use flags (3dnow"
210 ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set."
211 fi
212 fi
213 }
214
215 src_unpack() {
216 unpack ${A}
217
218 if ! use truetype ; then
219 unpack font-arial-iso-8859-1.tar.bz2 \
220 font-arial-iso-8859-2.tar.bz2 \
221 font-arial-cp1250.tar.bz2
222 fi
223
224 use gtk && unpack "Blue-${BLUV}.tar.bz2"
225
226 use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.bz2"
227
228 cd "${S}"
229
230 # Fix sparc compilation, bug 215006
231 epatch "${FILESDIR}/libswscale-sparc.patch"
232
233 # Fix PPC configure check, but 222447
234 epatch "${FILESDIR}/configure-altivec.patch"
235
236 # Set version #
237 sed -i s/UNKNOWN/${MPLAYER_REVISION}/ "${S}/version.sh"
238
239 # Fix hppa compilation
240 use hppa && sed -i -e "s/-O4/-O1/" "${S}/configure"
241
242 if use svga; then
243 echo
244 einfo "Enabling vidix non-root mode."
245 einfo "(You need a proper svgalib_helper.o module for your kernel"
246 einfo "to actually use this)"
247 echo
248
249 mv "${WORKDIR}/svgalib_helper" "${S}/libdha"
250 fi
251
252 # Fix polish spelling errors
253 [[ -n ${LINGUAS} ]] && sed -e 's:Zarządano:Zażądano:' -i help/help_mp-pl.h
254 }
255
256 src_compile() {
257
258 local myconf=" --disable-tv-bsdbt848 \
259 --disable-faad-external"
260
261 # broken upstream, won't work with recent kernels
262 myconf="${myconf} --disable-ivtv --disable-pvr"
263
264 # MPlayer reads in the LINGUAS variable from make.conf, and sets
265 # the languages accordingly. Some will have to be altered to match
266 # upstream's naming scheme.
267 [[ -n $LINGUAS ]] && LINGUAS=${LINGUAS/da/dk}
268
269 ################
270 #Optional features#
271 ###############
272 use bidi || myconf="${myconf} --disable-fribidi"
273 use bl && myconf="${myconf} --enable-bl"
274 use enca || myconf="${myconf} --disable-enca"
275 use ftp || myconf="${myconf} --disable-ftp"
276 use nemesi || myconf="${myconf} --disable-nemesi"
277 use xscreensaver || myconf="${myconf} --disable-xss"
278
279 # libcdio support: prefer libcdio over cdparanoia
280 # don't check for cddb w/cdio
281 if use cdio; then
282 myconf="${myconf} --disable-cdparanoia"
283 else
284 myconf="${myconf} --disable-libcdio"
285 use cdparanoia || myconf="${myconf} --disable-cdparanoia"
286 use cddb || myconf="${myconf} --disable-cddb"
287 fi
288
289 # DVD support
290 # dvdread and libdvdcss are internal libs
291 # http://www.mplayerhq.hu/DOCS/HTML/en/dvd.html
292 # You can optionally use external dvdread support, but against
293 # upstream's suggestion. We don't.
294 if ! use dvd; then
295 myconf="${myconf} --disable-dvdnav --disable-dvdread"
296 use a52 || myconf="${myconf} --disable-liba52"
297 fi
298
299 if use encode; then
300 use aac || myconf="${myconf} --disable-faac --disable-faac-lavc"
301 use dv || myconf="${myconf} --disable-libdv"
302 use mp3 || myconf="${myconf} --disable-mp3lame --disable-mp3lame-lavc"
303 use x264 || myconf="${myconf} --disable-x264 --disable-x264-lavc"
304 use xvid || myconf="${myconf} --disable-xvid --disable-xvid-lavc"
305 else
306 myconf="${myconf} --disable-mencoder --disable-libdv --disable-x264 \
307 --disable-faac"
308 fi
309
310 # SRT (subtitles) requires freetype support
311 # freetype support requires iconv
312 # iconv optionally can use unicode
313 if ! use srt; then
314 myconf="${myconf} --disable-ass"
315 if ! use truetype; then
316 myconf="${myconf} --disable-freetype"
317 if ! use iconv; then
318 myconf="${myconf} --disable-iconv --charset=noconv"
319 fi
320 fi
321 fi
322 use iconv && use unicode && myconf="${myconf} --charset=UTF-8"
323
324 use lirc || myconf="${myconf} --disable-lirc --disable-lircc"
325 myconf="${myconf} $(use_enable joystick)"
326 use ipv6 || myconf="${myconf} --disable-inet6"
327 use rar || myconf="${myconf} --disable-unrarexec"
328 use rtc || myconf="${myconf} --disable-rtc"
329 use samba || myconf="${myconf} --disable-smb"
330
331 # DVB / Video4Linux / Radio support
332 if { use dvb || use v4l || use v4l2 || use radio; }; then
333 use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead"
334 use v4l || myconf="${myconf} --disable-tv-v4l1"
335 use v4l2 || myconf="${myconf} --disable-tv-v4l2"
336 use teletext || myconf="${myconf} --disable-tv-teletext"
337 if use radio && { use dvb || use v4l || use v4l2; }; then
338 myconf="${myconf} --enable-radio $(use_enable encode radio-capture)"
339 else
340 myconf="${myconf} --disable-radio-v4l2 --disable-radio-bsdbt848"
341 fi
342 else
343 myconf="${myconf} --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 \
344 --disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848 \
345 --disable-dvb --disable-dvbhead --disable-tv-teletext \
346 --disable-v4l2"
347 fi
348
349 #########
350 # Codecs #
351 ########
352 for x in gif jpeg live mad musepack pnm speex tga theora xanim; do
353 use ${x} || myconf="${myconf} --disable-${x}"
354 done
355 use amrnb || myconf="${myconf} --disable-libamr_nb"
356 use amrwb || myconf="${myconf} --disable-libamr_wb"
357 use dts || myconf="${myconf} --disable-libdca"
358 ! use png && ! use gtk && myconf="${myconf} --disable-png"
359 use lzo || myconf="${myconf} --disable-liblzo"
360 use encode && use mp2 || myconf="${myconf} --disable-twolame \
361 --disable-toolame"
362 use mp3 || myconf="${myconf} --disable-mp3lib"
363 use vorbis || myconf="${myconf} --disable-libvorbis"
364 use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods"
365 if use x86 || use amd64; then
366 # Real codec support, only available on x86, amd64
367 if use real && use x86; then
368 myconf="${myconf} --realcodecsdir=/opt/RealPlayer/codecs"
369 elif use real && use amd64; then
370 myconf="${myconf} --realcodecsdir=/usr/$(get_libdir)/codecs"
371 else
372 myconf="${myconf} --disable-real"
373 fi
374 if ! use bindist && ! use real; then
375 myconf="${myconf} $(use_enable win32codecs win32dll)"
376 fi
377 fi
378 # bug 213836
379 if ! use x86 || ! use win32codecs; then
380 use quicktime || myconf="${myconf} --disable-qtx"
381 fi
382
383 #############
384 # Video Output #
385 #############
386 for x in directfb ggi md5sum sdl xinerama; do
387 use ${x} || myconf="${myconf} --disable-${x}"
388 done
389 use aalib || myconf="${myconf} --disable-aa"
390 use dga || myconf="${myconf} --disable-dga1 --disable-dga2"
391 use fbcon || myconf="${myconf} --disable-fbdev"
392 use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb"
393 use libcaca || myconf="${myconf} --disable-caca"
394 use opengl || myconf="${myconf} --disable-gl"
395 use video_cards_vesa || myconf="${myconf} --disable-vesa"
396 use vidix || myconf="${myconf} --disable-vidix-internal \
397 --disable-vidix-external \
398 --disable-vidix-pcidb"
399 use zoran || myconf="${myconf} --disable-zr"
400
401 # MPlayer incorrectly looks for DXR2/3 support, so forcibly enable
402 # if requested. See bug 223587
403 myconf="${myconf} $(use_enable dxr2) $(use_enable dxr3)"
404
405 # GTK gmplayer gui
406 myconf="${myconf} $(use_enable gtk gui)"
407
408 if use xv; then
409 if use xvmc; then
410 myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW"
411 else
412 myconf="${myconf} --disable-xvmc"
413 fi
414 else
415 myconf="${myconf} --disable-xv --disable-xvmc"
416 fi
417
418 if ! use kernel_linux && ! use video_cards_mga; then
419 myconf="${myconf} --disable-mga --disable-xmga"
420 fi
421
422 if use video_cards_tdfx; then
423 myconf="${myconf} $(use_enable video_cards_tdfx tdfxvid) \
424 $(use_enable fbcon tdfxfb)"
425 else
426 myconf="${myconf} --disable-3dfx --disable-tdfxvid --disable-tdfxfb"
427 fi
428
429 #############
430 # Audio Output #
431 #############
432 for x in alsa arts esd jack ladspa nas openal; do
433 use ${x} || myconf="${myconf} --disable-${x}"
434 done
435 use pulseaudio || myconf="${myconf} --disable-pulse"
436 if ! use radio; then
437 use oss || myconf="${myconf} --disable-ossaudio"
438 fi
439 #################
440 # Advanced Options #
441 #################
442 # Platform specific flags, hardcoded on amd64 (see below)
443 if use x86 || use amd64 || use ppc; then
444 if use cpudetection || use bindist; then
445 myconf="${myconf} --enable-runtime-cpudetection"
446 fi
447 fi
448
449 # Turning off CPU optimizations usually will break the build.
450 # However, this use flag, if enabled, will allow users to completely
451 # specify which ones to use. If disabled, mplayer will automatically
452 # enable all CPU optimizations that the host build supports.
453 if use custom-cpuopts; then
454 for x in 3dnow 3dnowext mmx mmxext sse sse2 ssse3; do
455 myconf="${myconf} $(use_enable $x)"
456 done
457 fi
458
459 use debug && myconf="${myconf} --enable-debug=3"
460
461 myconf="${myconf} $(use_enable altivec)"
462
463 if use custom-cflags; then
464 # let's play the filtration game! MPlayer hates on all!
465 strip-flags
466 # ugly optimizations cause MPlayer to cry on x86 systems!
467 if use x86 || use x86-fbsd ; then
468 replace-flags -O* -O2
469 filter-flags -fPIC -fPIE
470
471 use debug || append-flags -fomit-frame-pointer
472 fi
473 append-flags -D__STDC_LIMIT_MACROS
474 else
475 unset CFLAGS CXXFLAGS
476 fi
477
478 myconf="--cc=$(tc-getCC) \
479 --host-cc=$(tc-getBUILD_CC) \
480 --prefix=/usr \
481 --confdir=/etc/mplayer \
482 --datadir=/usr/share/mplayer \
483 --libdir=/usr/$(get_libdir) \
484 --enable-menu \
485 --enable-network \
486 ${myconf}"
487 #echo "CFLAGS=\"${CFLAGS}\" ./configure ${myconf}"
488 CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died"
489
490 emake || die "Failed to build MPlayer!"
491 use doc && make -C DOCS/xml html-chunked
492 }
493
494 src_install() {
495
496 make prefix="${D}/usr" \
497 BINDIR="${D}/usr/bin" \
498 LIBDIR="${D}/usr/$(get_libdir)" \
499 CONFDIR="${D}/etc/mplayer" \
500 DATADIR="${D}/usr/share/mplayer" \
501 MANDIR="${D}/usr/share/man" \
502 install || die "Failed to install MPlayer!"
503
504 dodoc AUTHORS Changelog README
505 # Install the documentation; DOCS is all mixed up not just html
506 if use doc ; then
507 find "${S}/DOCS" -type d | xargs -- chmod 0755
508 find "${S}/DOCS" -type f | xargs -- chmod 0644
509 cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die "cp docs died"
510 fi
511
512 # Copy misc tools to documentation path, as they're not installed directly
513 # and yes, we are nuking the +x bit.
514 find "${S}/TOOLS" -type d | xargs -- chmod 0755
515 find "${S}/TOOLS" -type f | xargs -- chmod 0644
516 cp -r "${S}/TOOLS" "${D}/usr/share/doc/${PF}/" || die "cp docs died"
517
518 # Install the default Skin and Gnome menu entry
519 if use gtk; then
520 dodir /usr/share/mplayer/skins
521 cp -r "${WORKDIR}/Blue" \
522 "${D}/usr/share/mplayer/skins/default" || die "cp skins died"
523
524 # Fix the symlink
525 rm -rf "${D}/usr/bin/gmplayer"
526 dosym mplayer /usr/bin/gmplayer
527
528 # This version of Makefile doesn't call install-gui directly,
529 # leaving out mplayer.{desktop,xpm}, bug 219133
530 emake DESTDIR="${D}" install-gui
531 fi
532
533 if ! use srt && ! use truetype; then
534 dodir /usr/share/mplayer/fonts
535 local x=
536 # Do this generic, as the mplayer people like to change the structure
537 # of their zips ...
538 for x in $(find "${WORKDIR}/" -type d -name 'font-arial-*')
539 do
540 cp -pPR "${x}" "${D}/usr/share/mplayer/fonts"
541 done
542 # Fix the font symlink ...
543 rm -rf "${D}/usr/share/mplayer/font"
544 dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
545 fi
546
547 insinto /etc/mplayer
548 newins "${S}/etc/example.conf" mplayer.conf
549
550 if use srt || use truetype; then
551 cat >> "${D}/etc/mplayer/mplayer.conf" << EOT
552 fontconfig=1
553 subfont-osd-scale=4
554 subfont-text-scale=3
555 EOT
556 fi
557
558 dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
559
560 dobin "${D}/usr/share/doc/${PF}/TOOLS/midentify"
561
562 insinto /usr/share/mplayer
563 doins "${S}/etc/input.conf"
564 doins "${S}/etc/menu.conf"
565 }
566
567 pkg_preinst() {
568
569 if [[ -d ${ROOT}/usr/share/mplayer/Skin/default ]]
570 then
571 rm -rf "${ROOT}/usr/share/mplayer/Skin/default"
572 fi
573 }
574
575 pkg_postrm() {
576
577 # Cleanup stale symlinks
578 if [ -L "${ROOT}/usr/share/mplayer/font" -a \
579 ! -e "${ROOT}/usr/share/mplayer/font" ]
580 then
581 rm -f "${ROOT}/usr/share/mplayer/font"
582 fi
583
584 if [ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \
585 ! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ]
586 then
587 rm -f "${ROOT}/usr/share/mplayer/subfont.ttf"
588 fi
589 }
590
591
592
593 --
594 gentoo-commits@l.g.o mailing list