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