app-emulation/looking-glass: sync live

Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
Takuya Wakazono
2024-01-08 12:41:36 +09:00
parent 1b195185cc
commit 38fdbcf7a7

View File

@@ -1,20 +1,31 @@
# Copyright 1999-2023 Gentoo Authors # Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
inherit cmake git-r3 desktop xdg-utils inherit cmake desktop xdg
MY_PV="${PV/1_beta/B}"
EGIT_REPO_URI="https://github.com/gnif/LookingGlass.git"
DESCRIPTION="A low latency KVM FrameRelay implementation for guests with VGA PCI Passthrough" DESCRIPTION="A low latency KVM FrameRelay implementation for guests with VGA PCI Passthrough"
HOMEPAGE="https://looking-glass.io https://github.com/gnif/LookingGlass" HOMEPAGE="https://looking-glass.io https://github.com/gnif/LookingGlass"
if [[ "${PV}" == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/gnif/LookingGlass.git"
else
SRC_URI="https://looking-glass.io/artifact/${MY_PV}/source -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"
KEYWORDS="~amd64"
fi
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
IUSE="binutils gnome pipewire pulseaudio wayland X" IUSE="binutils gnome pipewire pulseaudio wayland X"
REQUIRED_USE="|| ( binutils gnome pipewire pulseaudio wayland X ) pipewire? ( !pulseaudio ) pulseaudio? ( !pipewire ) " REQUIRED_USE="|| ( wayland X )"
RDEPEND="dev-libs/libconfig RDEPEND="
dev-libs/libconfig
dev-libs/nettle dev-libs/nettle
media-libs/freetype media-libs/freetype
media-libs/fontconfig media-libs/fontconfig
@@ -23,39 +34,44 @@ RDEPEND="dev-libs/libconfig
virtual/glu virtual/glu
media-libs/libsamplerate media-libs/libsamplerate
binutils? ( sys-devel/binutils ) binutils? ( sys-devel/binutils )
X? ( x11-libs/libX11 x11-libs/libXfixes x11-libs/libXi x11-libs/libXScrnSaver x11-libs/libXpresent ) X? (
x11-libs/libX11
x11-libs/libXfixes
x11-libs/libXi
x11-libs/libXinerama
x11-libs/libXScrnSaver
x11-libs/libXpresent
)
wayland? ( dev-libs/wayland ) wayland? ( dev-libs/wayland )
media-libs/libpulse media-libs/libpulse
pipewire? ( media-video/pipewire ) pipewire? ( media-video/pipewire )
gnome? ( gui-libs/libdecor ) gnome? ( gui-libs/libdecor )
" "
DEPEND="${RDEPEND} DEPEND="
${RDEPEND}
app-emulation/spice-protocol app-emulation/spice-protocol
wayland? ( dev-libs/wayland-protocols ) wayland? ( dev-libs/wayland-protocols )
" "
BDEPEND="virtual/pkgconfig" BDEPEND="
virtual/pkgconfig
wayland? ( dev-util/wayland-scanner )
"
CMAKE_USE_DIR="${S}"/client CMAKE_USE_DIR="${S}"/client
src_prepare () { src_configure () {
default
# Base on build.rst from the project # Base on build.rst from the project
# doc/build.rst # doc/build.rst
MYCMAKEARGS=( local mycmakeargs=(
-DENABLE_BACKTRACE=$(usex binutils) \ -DENABLE_BACKTRACE=$(usex binutils)
-DENABLE_X11=$(usex X) -DENABLE_WAYLAND=$(usex wayland) \ -DENABLE_X11=$(usex X)
-DENABLE_PIPEWIRE=$(usex pipewire) \ -DENABLE_WAYLAND=$(usex wayland)
-DENABLE_PULSEAUDIO=$(usex pulseaudio) \ -DENABLE_PIPEWIRE=$(usex pipewire)
-DENABLE_PULSEAUDIO=$(usex pulseaudio)
-DENABLE_LIBDECOR=$(usex gnome) -DENABLE_LIBDECOR=$(usex gnome)
) )
cmake_src_configure
cmake_src_prepare
}
src_compile() {
cmake_src_compile
} }
src_install() { src_install() {
@@ -74,12 +90,13 @@ src_install() {
} }
pkg_postinst() { pkg_postinst() {
xdg_icon_cache_update xdg_pkg_postinst
if use X && ! use wayland || ! use X && use wayland; then if use X && ! use wayland || ! use X && use wayland; then
ewarn "The desktop file located located at /usr/share/applications/LookingGlass.desktop" ewarn "The desktop file located at /usr/share/applications/LookingGlass.desktop"
fi fi
if use X && use wayland; then if use X && use wayland; then
ewarn "The desktop files located located at /usr/share/applications/LookingGlass-X.desktop /usr/share/applications/LookingGlass-Wayland.desktop" ewarn "The desktop files located at /usr/share/applications/LookingGlass-X.desktop /usr/share/applications/LookingGlass-Wayland.desktop"
fi fi
ewarn "Use the Right Control (Control_R) as the modifier key to control the action in LookingGlass" ewarn "Use the Right Control (Control_R) as the modifier key to control the action in LookingGlass"
ewarn "Note: Key was change because my laptop dosent have ScrLk" ewarn "Note: Key was change because my laptop dosent have ScrLk"