blob: 7e76b7f7a8e24ed20185924f375cb8ec0489f1d5 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
MY_PN=OpenXR-SDK
inherit cmake
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/KhronosGroup/${MY_PN}.git"
SLOT="0"
else
SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/refs/tags/release-${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
S="${WORKDIR}/${MY_PN}-release-${PV}"
SLOT="0/${PV}"
fi
DESCRIPTION="OpenXR loader"
HOMEPAGE="https://github.com/KhronosGroup/OpenXR-SDK"
LICENSE="Apache-2.0"
IUSE="+wayland +X"
REQUIRED_USE="|| ( wayland X )"
DEPEND="
media-libs/vulkan-loader
media-libs/mesa
dev-libs/jsoncpp:=
wayland? (
dev-libs/wayland
dev-libs/wayland-protocols
)
X? (
x11-libs/libxcb
x11-libs/xcb-util-keysyms
x11-libs/libXrandr
x11-libs/libXxf86vm
)
"
RDEPEND="${DEPEND}"
BDEPEND="wayland? ( dev-util/wayland-scanner )"
src_prepare() {
sed -i 's;DESTINATION share/doc/openxr;DESTINATION ${CMAKE_INSTALL_DOCDIR};' CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DBUILD_WITH_SYSTEM_JSONCPP=ON
-DBUILD_WITH_XLIB_HEADERS=$(usex X)
-DBUILD_WITH_XCB_HEADERS=$(usex X)
-DBUILD_WITH_WAYLAND_HEADERS=$(usex wayland)
-DBUILD_WITH_SYSTEM_JSONCPP=YES
-DPRESENTATION_BACKEND=$(usex X xlib wayland)
)
cmake_src_configure
}
|