remove ia64 keywords
[gentoo-zh.git] / app-emulation / looking-glass / looking-glass-0_beta7_rc1-r1.ebuild
blob75f0af8e3bb33120f34f68cd4c589bc8fa5e25c2
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit cmake tmpfiles linux-info desktop xdg
8 MY_PV="${PV//0_beta/B}"
9 MY_PV="${MY_PV//_/-}"
11 DESCRIPTION="A low latency KVMFR application for guests with VGA PCI Passthrough"
12 HOMEPAGE="https://looking-glass.io"
13 SRC_URI="https://looking-glass.io/artifact/${MY_PV}/source -> ${P}.tar.gz"
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64"
18 IUSE="X wayland pipewire pulseaudio +backtrace gnome host obs"
19 REQUIRED_USE="|| ( X wayland )
20 || ( pipewire pulseaudio )"
22 DEPEND="gui-libs/egl-wayland
23 media-libs/fontconfig
24 media-libs/libsamplerate
25 dev-libs/nettle[gmp]
26 app-emulation/spice-protocol
27 X? (
28 x11-libs/libX11
29 x11-libs/libXfixes
30 x11-libs/libXi
31 x11-libs/libXinerama
32 x11-libs/libXcursor
33 x11-libs/libXScrnSaver
34 x11-libs/libXpresent
36 wayland? (
37 dev-libs/wayland
38 x11-libs/libxkbcommon
39 gnome? (
40 gui-libs/libdecor
43 pipewire? (
44 media-video/pipewire
46 pulseaudio? (
47 media-libs/libpulse
49 obs? (
50 media-video/obs-studio
52 RDEPEND="${DEPEND}"
54 S="${WORKDIR}/${PN}-${MY_PV}"
56 MY_CMAKE_PROJECT="client "
58 src_prepare() {
59 default
60 # add other project
61 if use host; then
62 MY_CMAKE_PROJECT+="host "
64 if use obs; then
65 MY_CMAKE_PROJECT+="obs "
67 # cmake prepare loop
68 for prj in ${MY_CMAKE_PROJECT}
70 CMAKE_USE_DIR="${S}/${prj}"
71 cmake_src_prepare "$@"
72 done
75 src_configure() {
76 # cmake configure by use flags
77 if ! use X; then
78 local mycmakeargs+=(
79 -DENABLE_X11=no
82 if ! use wayland; then
83 local mycmakeargs+=(
84 -DENABLE_WAYLAND=no
87 if ! use pipewire; then
88 local mycmakeargs+=(
89 -DENABLE_PIPEWIRE=no
92 if ! use pulseaudio; then
93 local mycmakeargs+=(
94 -DENABLE_PULSEAUDIO=no
97 if use gnome && use wayland; then
98 local mycmakeargs+=(
99 -DENABLE_LIBDECOR=yes
102 # cmake configure loop
103 for prj in ${MY_CMAKE_PROJECT}
105 CMAKE_USE_DIR="${S}/${prj}"
106 BUILD_DIR="${WORKDIR}/${prj}"
107 cmake_src_configure "$@"
108 done
109 set_arch_to_kernel
112 src_compile() {
113 # cmake compile loop
114 for prj in ${MY_CMAKE_PROJECT}
116 CMAKE_USE_DIR="${S}/${prj}"
117 BUILD_DIR="${WORKDIR}/${prj}"
118 cmake_src_compile "$@"
119 done
122 src_install() {
123 # install cmake projects
124 for prj in ${MY_CMAKE_PROJECT}
126 CMAKE_USE_DIR="${S}/${prj}"
127 BUILD_DIR="${WORKDIR}/${prj}"
128 cmake_src_install "$@"
129 done
130 # install docs
131 einstalldocs
132 # install tmpfiles config
133 newtmpfiles "${FILESDIR}"/${PN}-tmpfiles.conf ${PN}.conf
134 # install desktop
135 domenu "${FILESDIR}/${PN}.desktop"
136 newicon -s 128 "${S}/resources/icon-128x128.png" "${PN}.png"