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