Annotation of /branches/R11-stable/extras/mplayer/mplayer-1.1.1_git20140919-r1.smage2
Parent Directory | Revision Log
Revision 22974 -
(hide annotations)
(download)
Tue Oct 28 09:26:54 2014 UTC (9 years, 7 months ago) by niro
File size: 5870 byte(s)
Tue Oct 28 09:26:54 2014 UTC (9 years, 7 months ago) by niro
File size: 5870 byte(s)
-release branches/R11-stable
1 | niro | 22319 | # $Id$ |
2 | |||
3 | PNAME="mplayer" | ||
4 | PVER="1.1.1_git20140919" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="media-video" | ||
8 | |||
9 | DESCRIPTION="MPlayer is a movie player for linux supporting many codecs." | ||
10 | HOMEPAGE="http://www.mplayerhq.hu/" | ||
11 | |||
12 | DEPEND=">= sys-libs/ncurses-5.9 | ||
13 | >= virtual/opengl | ||
14 | >= x11-libs/libXxf86vm-1 | ||
15 | >= x11-libs/libXext-1 | ||
16 | >= x11-libs/libXi-1 | ||
17 | >= x11-libs/libXinerama-1 | ||
18 | >= x11-libs/libXxf86vm-1 | ||
19 | >= x11-libs/libXv-1 | ||
20 | >= x11-libs/libXxf86vm-1 | ||
21 | >= x11-libs/libXvMC-1 | ||
22 | >= x11-libs/libXxf86vm-1 | ||
23 | >= x11-libs/libvdpau-0.8 | ||
24 | >= x11-libs/libva-1.3 | ||
25 | >= media-libs/mplayer-codecs-2011 | ||
26 | >= media-libs/libmad-0.15 | ||
27 | >= media-libs/libvorbis-1.3 | ||
28 | >= media-sound/lame-3.99 | ||
29 | >= media-sound/libpulse-5.0 | ||
30 | >= media-libs/giflib-5 | ||
31 | >= x11-libs/gtk2+-2.24 | ||
32 | >= dev-libs/glib2-2.40 | ||
33 | >= media-libs/alsa-lib-1.0.28 | ||
34 | >= media-sound/cdparanoia-3.10 | ||
35 | >= media-libs/xvid-1.3 | ||
36 | >= media-libs/x264-20140918 | ||
37 | >= media-video/x264-encoder-20140918 | ||
38 | >= media-video/ffmpeg-2.4 | ||
39 | >= media-libs/libtheora-1.1 | ||
40 | >= media-libs/speex-1.2_rc1 | ||
41 | >= media-libs/nas-1.9 | ||
42 | >= media-libs/openal-1.16 | ||
43 | >= media-sound/twolame-0.3.13 | ||
44 | >= media-libs/libfaac-1.28 | ||
45 | >= media-libs/libfaad2-2.7 | ||
46 | >= dev-libs/fribidi-0.19 | ||
47 | >= media-libs/libdvdread-4.2 | ||
48 | >= media-libs/libdvdnav-4.2 | ||
49 | >= media-libs/libdvdcss-1.2.10 | ||
50 | >= media-libs/freetype-2.5 | ||
51 | >= media-libs/fontconfig-2.11 | ||
52 | >= media-libs/a52dec-0.7.4 | ||
53 | >= media-libs/libass-0.11 | ||
54 | >= media-libs/libbluray-0.6 | ||
55 | >= media-libs/libmpeg2-0.5 | ||
56 | >= dev-libs/lzo-2" | ||
57 | |||
58 | SDEPEND=">= dev-lang/nasm-2 | ||
59 | >= virtual/sed | ||
60 | >= x11-proto/xf86dgaproto-1 | ||
61 | >= x11-proto/xineramaproto-1 | ||
62 | >= x11-proto/videoproto-1 | ||
63 | >= x11-proto/xextproto-1 | ||
64 | >= x11-proto/xf86vidmodeproto-1" | ||
65 | |||
66 | case "${PVER}" in | ||
67 | *git*) | ||
68 | SRCFILE="${PNAME}-${PVER}.tar.bz2" | ||
69 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
70 | ;; | ||
71 | *) | ||
72 | SRCFILE="MPlayer-${PVER}.tar.xz" | ||
73 | SRCDIR="${BUILDDIR}/MPlayer-${PVER}" | ||
74 | ;; | ||
75 | esac | ||
76 | |||
77 | FFMPEG_VERSION="2.2.4" | ||
78 | FFMPEG_SRCFILE="ffmpeg-${FFMPEG_VERSION}.tar.bz2" | ||
79 | FFMPEG_SRCDIR="${BUILDDIR}/ffmpeg-${FFMPEG_VERSION}" | ||
80 | |||
81 | SKINNAME1="Blue" | ||
82 | SKINFILE1="${SKINNAME1}-1.10.tar.bz2" | ||
83 | |||
84 | SKINNAME2="Clearlooks" | ||
85 | SKINFILE2="${SKINNAME2}-1.6.tar.bz2" | ||
86 | |||
87 | SKINNAME3="new-age" | ||
88 | SKINFILE3="${SKINNAME3}-1.0.tar.bz2" | ||
89 | |||
90 | DEFAULTSKIN="${SKINNAME2}" | ||
91 | |||
92 | sminclude mtools xdg | ||
93 | |||
94 | SRC_URI=( | ||
95 | http://www1.mplayerhq.hu/MPlayer/releases/${SRCFILE} | ||
96 | http://www.mplayerhq.hu/MPlayer/skins/${SKINFILE1} | ||
97 | http://www.mplayerhq.hu/MPlayer/skins/${SKINFILE2} | ||
98 | http://www.mplayerhq.hu/MPlayer/skins/${SKINFILE3} | ||
99 | mirror://${PNAME}/${SRCFILE} | ||
100 | http://ffmpeg.org/releases/${FFMPEG_SRCFILE} | ||
101 | mirror://ffmpeg/${FFMPEG_SRCFILE} | ||
102 | mirror://${PNAME}/${SKINFILE1} | ||
103 | mirror://${PNAME}/${SKINFILE2} | ||
104 | mirror://${PNAME}/${SKINFILE3} | ||
105 | ) | ||
106 | |||
107 | # fake, using svn versions | ||
108 | UP2DATE="echo ${PVER}" | ||
109 | |||
110 | src_prepare() | ||
111 | { | ||
112 | munpack ${SRCFILE} || die | ||
113 | munpack ${FFMPEG_SRCFILE} || die | ||
114 | mv ${FFMPEG_SRCDIR} ${SRCDIR}/ffmpeg || die | ||
115 | munpack ${SKINFILE1} || die | ||
116 | munpack ${SKINFILE2} || die | ||
117 | munpack ${SKINFILE3} || die | ||
118 | cd ${SRCDIR} | ||
119 | |||
120 | # only for svn/git versions | ||
121 | if [[ ${PVER/svn/} != ${PVER} ]] || [[ ${PVER/git/} != ${PVER} ]] | ||
122 | then | ||
123 | # fix mplayer version (displays UNKOWN) | ||
124 | sed "s:UNKOWN:SVN-r${PVER#*svn}:g" version.sh || die | ||
125 | fi | ||
126 | } | ||
127 | |||
128 | src_compile() | ||
129 | { | ||
130 | cd ${SRCDIR} | ||
131 | local myconf | ||
132 | |||
133 | # mplayer don't like any optimations | ||
134 | unset CFLAGS CXXFLAGS || die | ||
135 | |||
136 | # disable internal ffmpeg, use external dso | ||
137 | myconf="--disable-ffmpeg_a" | ||
138 | |||
139 | # do not enable --target=${CHOST}, it breaks vcd support ! | ||
140 | # added ldflags for X11, Xext, x264 to fix breakage with --as-needed | ||
141 | ./configure \ | ||
142 | --prefix=/usr \ | ||
143 | --confdir=/etc/mplayer \ | ||
144 | --libdir=/usr/$(mlibdir) \ | ||
145 | --enable-runtime-cpudetection \ | ||
146 | --enable-menu \ | ||
147 | --codecsdir=/usr/$(mlibdir)/win32 \ | ||
148 | --enable-gui \ | ||
149 | --enable-x11 \ | ||
150 | --enable-xv \ | ||
151 | --enable-vm \ | ||
152 | --enable-vdpau \ | ||
153 | --enable-png \ | ||
154 | --language=all \ | ||
155 | --enable-alsa \ | ||
156 | --disable-arts \ | ||
157 | --disable-esd \ | ||
158 | --enable-freetype \ | ||
159 | --enable-gl \ | ||
160 | --disable-ossaudio \ | ||
161 | --enable-pulse \ | ||
162 | --enable-3dnow \ | ||
163 | --enable-3dnowext \ | ||
164 | --enable-sse \ | ||
165 | --enable-sse2 \ | ||
166 | --enable-mmx \ | ||
167 | --enable-mmxext \ | ||
168 | --disable-mga \ | ||
169 | --disable-xmga \ | ||
170 | --enable-mencoder \ | ||
171 | --disable-tv-v4l2 \ | ||
172 | --enable-dvdread \ | ||
173 | --disable-dvdread-internal \ | ||
174 | --disable-ass-internal \ | ||
175 | --disable-libmpeg2-internal \ | ||
176 | --disable-real \ | ||
177 | --enable-xinerama \ | ||
178 | --disable-sdl \ | ||
179 | --disable-smb \ | ||
180 | --disable-aa \ | ||
181 | --disable-ggi \ | ||
182 | --disable-svga \ | ||
183 | --disable-directfb \ | ||
184 | --disable-fbdev \ | ||
185 | --disable-lirc \ | ||
186 | --disable-joystick \ | ||
187 | --enable-theora \ | ||
188 | --enable-nas \ | ||
189 | --disable-tdfxfb \ | ||
190 | --disable-xmms \ | ||
191 | --enable-inet6 \ | ||
192 | --disable-live \ | ||
193 | --enable-cdparanoia \ | ||
194 | --enable-faad \ | ||
195 | --enable-x264 \ | ||
196 | --enable-xvmc \ | ||
197 | --with-xvmclib=XvMCW \ | ||
198 | --charset=UTF-8 \ | ||
199 | --disable-static \ | ||
200 | ${myconf} \ | ||
201 | --extra-ldflags="-lX11 -lXext -lx264" \ | ||
202 | || die | ||
203 | |||
204 | # does not like optimations >= -j1 | ||
205 | mmake -j1 || die | ||
206 | } | ||
207 | |||
208 | src_install() | ||
209 | { | ||
210 | cd ${SRCDIR} | ||
211 | |||
212 | # mplayer don't like any optimations | ||
213 | unset CFLAGS CXXFLAGS || die | ||
214 | |||
215 | # needed directories | ||
216 | minstalldir /etc || die | ||
217 | minstalldir /usr/share/{applications,mplayer/skins} || die | ||
218 | |||
219 | mmake DESTDIR=${BINDIR} MANDIR=${BINDIR}/usr/share/man install || die | ||
220 | |||
221 | # codec config file | ||
222 | minstallfile etc/codecs.conf /etc/mplayer || die | ||
223 | |||
224 | # default config | ||
225 | minstallfile etc/example.conf /etc/mplayer/mplayer.conf || die | ||
226 | |||
227 | # install some skins | ||
228 | mcopy -r ${BUILDDIR}/${SKINNAME1} /usr/share/mplayer/skins/${SKINNAME1} || die | ||
229 | mcopy -r ${BUILDDIR}/${SKINNAME2} /usr/share/mplayer/skins/${SKINNAME2} || die | ||
230 | mcopy -r ${BUILDDIR}/${SKINNAME3} /usr/share/mplayer/skins/${SKINNAME3} || die | ||
231 | # set default skin | ||
232 | mlink ${DEFAULTSKIN} /usr/share/mplayer/skins/default || die | ||
233 | |||
234 | # enable truetype fonts | ||
235 | MCONFIG="/etc/mplayer/mplayer.conf" | ||
236 | maddconfig 'fontconfig=1' | ||
237 | maddconfig 'subfont-osd-scale=4' | ||
238 | maddconfig 'subfont-text-scale=3' | ||
239 | |||
240 | # desktop icon | ||
241 | minstallpixmap etc/mplayer48x48.png || die | ||
242 | minstallfile etc/mplayer.desktop /usr/share/applications || die | ||
243 | |||
244 | # install docs | ||
245 | minstalldocs AUTHORS ChangeLog Copyright LICENSE README || die | ||
246 | } |