Diff mpv-0.29.1-r1 with a mpv-9999

/usr/portage/media-video/mpv/mpv-9999.ebuild 2019-10-27 11:39:00.000000000 +0300
11 11
inherit eapi7-ver flag-o-matic gnome2-utils pax-utils python-r1 toolchain-funcs waf-utils xdg-utils
12 12

  
13 13
DESCRIPTION="Media player based on MPlayer and mplayer2"
14
HOMEPAGE="https://mpv.io/"
14
HOMEPAGE="https://mpv.io/ https://github.com/mpv-player/mpv"
15 15

  
16 16
if [[ ${PV} != *9999* ]]; then
17 17
	SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
18
	KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ppc ppc64 x86 ~amd64-linux"
18
	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux"
19 19
	DOCS=( RELEASE_NOTES )
20 20
else
21 21
	EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
......
28 28
# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
29 29
LICENSE="LGPL-2.1+ GPL-2+ BSD ISC samba? ( GPL-3+ )"
30 30
SLOT="0"
31
IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda doc drm dvb
32
	dvd +egl gbm +iconv jack javascript jpeg lcms +libass libcaca libmpv +lua
31
IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins cuda debug doc drm dvb
32
	dvd +egl gamepad gbm +iconv jack javascript jpeg lcms +libass libcaca libmpv +lua
33 33
	luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl
34
	selinux test tools +uchardet v4l vaapi vdpau vulkan wayland +X +xv zlib
35
	zsh-completion"
34
	selinux test tools +uchardet vaapi vdpau vulkan wayland +X +xv zlib zimg"
36 35

  
37 36
REQUIRED_USE="
38 37
	|| ( cli libmpv )
39 38
	aqua? ( opengl )
40 39
	cuda? ( opengl )
41 40
	egl? ( || ( gbm X wayland ) )
41
	gamepad? ( sdl )
42 42
	gbm? ( drm egl opengl )
43 43
	lcms? ( opengl )
44 44
	luajit? ( lua )
......
47 47
	test? ( opengl )
48 48
	tools? ( cli )
49 49
	uchardet? ( iconv )
50
	v4l? ( || ( alsa oss ) )
51 50
	vaapi? ( || ( gbm X wayland ) )
52 51
	vdpau? ( X )
53 52
	vulkan? ( || ( X wayland ) )
54 53
	wayland? ( egl )
55 54
	X? ( egl? ( opengl ) )
56 55
	xv? ( X )
57
	zsh-completion? ( cli )
58 56
	${PYTHON_REQUIRED_USE}
59 57
"
60 58

  
59
RESTRICT="!test? ( test )"
60

  
61 61
COMMON_DEPEND="
62 62
	>=media-video/ffmpeg-4.0:0=[encode,threads,vaapi?,vdpau?]
63 63
	alsa? ( >=media-libs/alsa-lib-1.0.18 )
......
70 70
		>=media-libs/libdvdread-4.1.0:=
71 71
	)
72 72
	egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
73
	gamepad? ( media-libs/libsdl2 )
73 74
	iconv? (
74 75
		virtual/libiconv
75 76
		uchardet? ( app-i18n/uchardet )
......
93 94
	rubberband? ( >=media-libs/rubberband-1.8.0 )
94 95
	samba? ( net-fs/samba )
95 96
	sdl? ( media-libs/libsdl2[sound,threads,video] )
96
	v4l? ( media-libs/libv4l )
97 97
	vaapi? ( x11-libs/libva:=[drm?,X?,wayland?] )
98 98
	vdpau? ( x11-libs/libvdpau )
99 99
	vulkan? (
100
		media-libs/libplacebo[vulkan]
100 101
		media-libs/shaderc
101
		media-libs/vulkan-loader[X?,wayland?]
102 102
	)
103 103
	wayland? (
104 104
		>=dev-libs/wayland-1.6.0
......
118 118
		xv? ( x11-libs/libXv )
119 119
	)
120 120
	zlib? ( sys-libs/zlib )
121
	zimg? ( >=media-libs/zimg-2.9.2 )
121 122
"
122 123
DEPEND="${COMMON_DEPEND}
123 124
	${PYTHON_DEPS}
124
	dev-python/docutils
125 125
	virtual/pkgconfig
126 126
	cuda? ( >=media-libs/nv-codec-headers-8.1.24.1 )
127
	doc? ( dev-python/rst2pdf )
127
	doc? (  dev-python/docutils
128
			dev-python/rst2pdf )
128 129
	dvb? ( virtual/linuxtv-dvb-headers )
129 130
	test? ( >=dev-util/cmocka-1.0.0 )
130
	v4l? ( virtual/os-headers )
131
	zsh-completion? ( dev-lang/perl )
132 131
"
133 132
RDEPEND="${COMMON_DEPEND}
134 133
	cuda? ( x11-drivers/nvidia-drivers[X] )
......
136 135
	tools? ( ${PYTHON_DEPS} )
137 136
"
138 137

  
139
PATCHES=(
140
	"${FILESDIR}/${PN}-0.29.0-make-ffmpeg-version-check-non-fatal.patch"
141
	"${FILESDIR}/${PN}-0.29.1-egl-bound.patch"
142
)
143

  
144 138
src_prepare() {
145 139
	cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
146 140
	chmod +x "${S}"/waf || die
147
	default_src_prepare
141
	default
148 142
}
149 143

  
150 144
src_configure() {
......
156 150
		append-ldflags -L"${SYSROOT%/}${EPREFIX}/opt/vc/lib"
157 151
	fi
158 152

  
159
	# Prevent access violations from zsh completion generation.
160
	# See Gentoo bug 656086.
161
	use zsh-completion && addpredict /dev/dri
162

  
163 153
	local mywafargs=(
164 154
		--confdir="${EPREFIX}/etc/${PN}"
165 155
		--docdir="${EPREFIX}/usr/share/doc/${PF}"
......
172 162
		--disable-static-build
173 163
		# See deep down below for build-date.
174 164
		--disable-optimize # Don't add '-O2' to CFLAGS.
175
		--disable-debug-build # Don't add '-g' to CFLAGS.
176
		--enable-html-build
165
		$(use_enable debug debug-build)
177 166

  
167
		$(use_enable doc html-build)
178 168
		$(use_enable doc pdf-build)
169
		$(use_enable doc manpage-build)
179 170
		$(use_enable cplugins)
180
		$(use_enable zsh-completion zsh-comp)
181 171
		$(use_enable test)
182 172

  
183
		--disable-android
184 173
		$(use_enable iconv)
185 174
		$(use_enable samba libsmbclient)
186 175
		$(use_enable lua)
......
190 179
		$(use_enable libass libass-osd)
191 180
		$(use_enable zlib)
192 181
		$(use_enable bluray libbluray)
193
		$(use_enable dvd dvdread)
194 182
		$(use_enable dvd dvdnav)
195 183
		$(use_enable cdda)
196 184
		$(use_enable uchardet)
197 185
		$(use_enable rubberband)
198 186
		$(use_enable lcms lcms2)
199 187
		--disable-vapoursynth # Only available in overlays.
200
		--disable-vapoursynth-lazy
201 188
		$(use_enable archive libarchive)
202 189

  
203 190
		--enable-libavdevice
......
239 226
		$(use_enable vulkan shaderc)
240 227
		$(use_enable raspberry-pi rpi)
241 228
		$(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
242
		--disable-mali-fbdev # Only available in overlays.
243 229
		$(usex opengl '' '--disable-gl')
244 230
		$(use_enable vulkan)
231
		$(use_enable gamepad sdl2-gamepad)
245 232

  
246 233
		# HWaccels:
247 234
		# Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
248 235
		$(use_enable cuda cuda-hwaccel)
249 236

  
250 237
		# TV features:
251
		$(use_enable v4l tv)
252
		$(use_enable v4l tv-v4l2)
253
		$(use_enable v4l libv4l2)
254
		$(use_enable v4l audio-input)
255 238
		$(use_enable dvb dvbin)
256 239

  
257 240
		# Miscellaneous features:
258
		--disable-apple-remote # Needs testing first. See Gentoo bug 577332.
241
		$(use_enable zimg)
259 242
	)
260 243

  
261 244
	if use vaapi && use X; then
262 245
		mywafargs+=(
263
			$(use_enable opengl vaapi-glx)
264 246
			$(use_enable egl vaapi-x-egl)
265 247
		)
266 248
	fi
267 249

  
250
	# Not for us
251
	mywafargs+=(
252
		--disable-android
253
		--disable-egl-android
254
		--disable-uwp
255
		--disable-audiounit
256
		--disable-wasapi
257
		--disable-ios-gl
258
		--disable-apple-remote
259
		--disable-macos-touchbar
260
		--disable-macos-cocoa-cb
261
		--disable-tvos
262
		--disable-egl-angle-win32
263
	)
264

  
268 265
	# Create reproducible non-live builds.
269 266
	[[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
270 267

  
Thank you!