/[gentoo-x86]/media-video/mpv/mpv-9999.ebuild
Gentoo

Contents of /media-video/mpv/mpv-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.74 - (show annotations) (download)
Sun May 24 04:44:23 2015 UTC (5 years, 1 month ago) by yngwin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.73: +7 -8 lines
merge dvdnav useflag into dvd (bug #549214)

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x4FDF9CFD2FAC514E!)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-video/mpv/mpv-9999.ebuild,v 1.73 2015/05/04 15:21:35 yngwin Exp $
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_7,3_3,3_4} )
7 PYTHON_REQ_USE='threads(+)'
8 inherit eutils python-any-r1 waf-utils pax-utils fdo-mime gnome2-utils
9
10 WAF_V="1.8.4"
11
12 DESCRIPTION="Media player based on MPlayer and mplayer2"
13 HOMEPAGE="http://mpv.io/"
14 SRC_URI="http://ftp.waf.io/pub/release/waf-${WAF_V}"
15 DOCS=( README.md etc/example.conf etc/input.conf )
16
17 if [[ ${PV} == *9999* ]]; then
18 EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
19 inherit git-r3
20 else
21 SRC_URI+=" https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
22 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
23 DOCS+=( RELEASE_NOTES )
24 fi
25
26 # See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC.
27 LICENSE="GPL-2+ BSD ISC"
28 SLOT="0"
29 IUSE="+alsa bluray bs2b cdio +cli doc-pdf drm dvb +dvd egl +enca encode +iconv
30 jack jpeg ladspa lcms +libass libav libcaca libguess libmpv lua luajit openal
31 +opengl oss pulseaudio pvr raspberry-pi rubberband samba sdl selinux v4l vaapi
32 vdpau vf-dlopen wayland +X xinerama +xscreensaver xv"
33
34 REQUIRED_USE="
35 || ( cli libmpv )
36 egl? ( opengl X )
37 enca? ( iconv )
38 lcms? ( opengl )
39 libguess? ( iconv )
40 luajit? ( lua )
41 opengl? ( || ( wayland X ) )
42 pvr? ( v4l )
43 vaapi? ( X )
44 vdpau? ( X )
45 wayland? ( opengl )
46 xinerama? ( X )
47 xscreensaver? ( X )
48 xv? ( X )
49 "
50
51 RDEPEND="
52 libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] )
53 !libav? ( >=media-video/ffmpeg-2.4.0:0=[encode?,threads,vaapi?,vdpau?] )
54 sys-libs/zlib
55 X? (
56 x11-libs/libX11
57 x11-libs/libXext
58 >=x11-libs/libXrandr-1.2.0
59 opengl? (
60 virtual/opengl
61 egl? ( media-libs/mesa[egl] )
62 )
63 lcms? ( >=media-libs/lcms-2.6:2 )
64 vaapi? ( >=x11-libs/libva-0.34.0[X(+)] )
65 vdpau? ( >=x11-libs/libvdpau-0.2 )
66 xinerama? ( x11-libs/libXinerama )
67 xscreensaver? ( x11-libs/libXScrnSaver )
68 xv? ( x11-libs/libXv )
69 )
70 alsa? ( >=media-libs/alsa-lib-1.0.18 )
71 bluray? ( >=media-libs/libbluray-0.3.0 )
72 bs2b? ( media-libs/libbs2b )
73 cdio? (
74 dev-libs/libcdio
75 dev-libs/libcdio-paranoia
76 )
77 drm? ( x11-libs/libdrm )
78 dvb? ( virtual/linuxtv-dvb-headers )
79 dvd? (
80 >=media-libs/libdvdread-4.1.3
81 >=media-libs/libdvdnav-4.2.0
82 )
83 enca? ( app-i18n/enca )
84 iconv? ( virtual/libiconv )
85 jack? ( media-sound/jack-audio-connection-kit )
86 jpeg? ( virtual/jpeg:0 )
87 ladspa? ( media-libs/ladspa-sdk )
88 libass? (
89 >=media-libs/libass-0.12.1:=[enca?,fontconfig]
90 virtual/ttf-fonts
91 )
92 libcaca? ( >=media-libs/libcaca-0.99_beta18 )
93 libguess? ( >=app-i18n/libguess-1.0 )
94 lua? (
95 !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) )
96 luajit? ( dev-lang/luajit:2 )
97 )
98 openal? ( >=media-libs/openal-1.13 )
99 pulseaudio? ( media-sound/pulseaudio )
100 rubberband? ( >=media-libs/rubberband-1.8.0 )
101 samba? ( net-fs/samba )
102 sdl? ( media-libs/libsdl2[threads] )
103 v4l? ( media-libs/libv4l )
104 wayland? (
105 >=dev-libs/wayland-1.6.0
106 media-libs/mesa[egl,wayland]
107 >=x11-libs/libxkbcommon-0.3.0
108 )
109 "
110 DEPEND="${RDEPEND}
111 ${PYTHON_DEPS}
112 virtual/pkgconfig
113 >=dev-lang/perl-5.8
114 dev-python/docutils
115 doc-pdf? ( dev-python/rst2pdf )
116 X? (
117 x11-proto/videoproto
118 xinerama? ( x11-proto/xineramaproto )
119 xscreensaver? ( x11-proto/scrnsaverproto )
120 )
121 "
122 RDEPEND+="
123 selinux? ( sec-policy/selinux-mplayer )
124 "
125
126 pkg_setup() {
127 if ! use libass; then
128 ewarn "You have disabled the libass flag. No OSD or subtitles will be displayed."
129 fi
130
131 if use openal; then
132 ewarn "You have enabled the openal audio output which is a fallback"
133 ewarn "and disabled by upstream."
134 fi
135
136 if use sdl; then
137 ewarn "You have enabled the sdl video and audio outputs which are fallbacks"
138 ewarn "and disabled by upstream."
139 fi
140
141 if use libav; then
142 einfo "You have enabled media-video/libav instead of media-video/ffmpeg."
143 einfo "Upstream recommends media-video/ffmpeg, as some functionality is not"
144 einfo "provided by media-video/libav."
145 fi
146
147 einfo "For additional format support you need to enable the support on your"
148 einfo "libavcodec/libavformat provider:"
149 einfo " media-video/ffmpeg or media-video/libav"
150
151 python-any-r1_pkg_setup
152 }
153
154 src_prepare() {
155 cp "${DISTDIR}"/waf-${WAF_V} "${S}"/waf || die
156 chmod 0755 "${S}"/waf || die
157 epatch_user
158 }
159
160 src_configure() {
161 local mywafargs=(
162 --confdir="${EPREFIX}"/etc/${PN}
163 --docdir="${EPREFIX}"/usr/share/doc/${PF}
164 $(usex cli '' '--disable-cplayer')
165 $(use_enable libmpv libmpv-shared)
166 --disable-libmpv-static
167 --disable-build-date # keep build reproducible
168 --disable-optimize # do not add '-O2' to CFLAGS
169 --disable-debug-build # do not add '-g' to CFLAGS
170 --disable-test # avoid dev-util/cmocka automagic
171 $(use_enable doc-pdf pdf-build)
172 $(use_enable vf-dlopen vf-dlopen-filters)
173 $(use_enable cli zsh-comp)
174
175 # optional features
176 $(use_enable iconv)
177 $(use_enable libguess)
178 $(use_enable samba libsmbclient)
179 $(use_enable lua)
180 $(use_enable libass)
181 $(use_enable libass libass-osd)
182 $(use_enable encode encoding)
183 $(use_enable bluray libbluray)
184 $(use_enable dvd dvdread)
185 $(use_enable dvd dvdnav)
186 $(use_enable cdio cdda)
187 $(use_enable enca)
188 $(use_enable ladspa)
189 $(use_enable rubberband)
190 $(use_enable bs2b libbs2b)
191 $(use_enable lcms lcms2)
192 --disable-vapoursynth # vapoursynth is not packaged
193 --disable-vapoursynth-lazy
194 --enable-libavfilter
195 --enable-libavdevice
196 $(usex luajit '--lua=luajit' '')
197
198 # audio outputs
199 $(use_enable sdl sdl2) # SDL output is fallback for platforms where nothing better is available
200 --disable-sdl1
201 $(use_enable oss oss-audio)
202 --disable-rsound # media-sound/rsound is in pro-audio overlay only
203 $(use_enable pulseaudio pulse)
204 $(use_enable jack)
205 $(use_enable openal)
206 $(use_enable alsa)
207
208 # video outputs
209 $(use_enable wayland)
210 $(use_enable X x11)
211 $(use_enable xscreensaver xss)
212 $(use_enable X xext)
213 $(use_enable xv)
214 $(use_enable xinerama)
215 $(use_enable X xrandr)
216 $(usex X "$(use_enable opengl gl-x11)" '--disable-gl-x11')
217 $(use_enable egl egl-x11)
218 $(usex wayland "$(use_enable opengl gl-wayland)" '--disable-gl-wayland')
219 $(use_enable opengl gl)
220 $(use_enable vdpau)
221 $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
222 $(use_enable vaapi)
223 $(use_enable vaapi vaapi-vpp)
224 $(usex vaapi "$(use_enable opengl vaapi-glx)" '--disable-vaapi-glx')
225 $(use_enable libcaca caca)
226 $(use_enable drm)
227 $(use_enable jpeg)
228 $(use_enable raspberry-pi rpi)
229 $(use_enable raspberry-pi rpi-gles)
230
231 # hwaccels
232 $(use_enable vaapi vaapi-hwaccel)
233 $(use_enable vdpau vdpau-hwaccel)
234
235 # tv features
236 $(use_enable v4l tv)
237 $(use_enable v4l tv-v4l2)
238 $(use_enable v4l libv4l2)
239 $(use_enable pvr)
240 $(use_enable dvb dvbin)
241 )
242 waf-utils_src_configure "${mywafargs[@]}"
243 }
244
245 src_install() {
246 waf-utils_src_install
247
248 if use cli && use luajit; then
249 pax-mark -m "${ED}"usr/bin/mpv
250 fi
251 }
252
253 pkg_preinst() {
254 gnome2_icon_savelist
255 }
256
257 pkg_postinst() {
258 fdo-mime_desktop_database_update
259 gnome2_icon_cache_update
260 }
261
262 pkg_postrm() {
263 fdo-mime_desktop_database_update
264 gnome2_icon_cache_update
265 }

  ViewVC Help
Powered by ViewVC 1.1.20