summaryrefslogtreecommitdiff
blob: c853264cb3dd1009490f0f81ad52475a9342214e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit meson

DESCRIPTION="EGLStream-based Wayland external platform (for NVIDIA)"
HOMEPAGE="https://github.com/NVIDIA/egl-wayland"
SRC_URI="https://github.com/NVIDIA/egl-wayland/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	dev-libs/wayland
	!x11-drivers/nvidia-drivers[wayland(-)]"
DEPEND="
	${RDEPEND}
	gui-libs/eglexternalplatform
	media-libs/libglvnd"
BDEPEND="dev-util/wayland-scanner"

PATCHES=(
	"${FILESDIR}"/${P}-remove-werror.patch
)

src_install() {
	meson_src_install

	insinto /usr/share/egl/egl_external_platform.d
	doins "${FILESDIR}"/10_nvidia_wayland.json
}

pkg_postinst() {
	if [[ ! ${REPLACING_VERSIONS} ]]; then
		elog "To use EGLStream with x11-drivers/nvidia-drivers, it is necessary to"
		elog "load the nvidia-drm module with experimental nvidia-drm.modeset=1."
		elog
		elog "Can be accomplished by:"
		elog "  echo 'options nvidia-drm modeset=1' > ${EROOT}/etc/modprobe.d/nvidia-drm.conf"
		elog "...then reloading the module."
	fi
}