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