mirror of
https://github.com/gentoo-mirror/gentoo-zh.git
synced 2025-04-19 15:58:56 -04:00
app-emulation/looking-glass: A low latency KVMFR application for guests with VGA PCI Passthrough
This commit is contained in:
parent
494aed3e52
commit
6e2b5c3a0e
1
app-emulation/looking-glass/Manifest
Normal file
1
app-emulation/looking-glass/Manifest
Normal file
@ -0,0 +1 @@
|
||||
DIST looking-glass-0_beta6.tar.gz 2774858 BLAKE2B 351d7805447552d9945ae9a4e24cb853eda8f5bbff32d882355aa634ad67912881830dd36e5c48b1796b2f26f83f6db061004bfb6af4dfbc7704162190629efe SHA512 558981d6b32098076ef0775a748da349941551352cbef836e37310e43e5cd6072df3dec6fa2418a9abecc7729ef0c1c6869e3168d05a3d76bea46c6eb8c4e82c
|
@ -0,0 +1 @@
|
||||
f /dev/shm/looking-glass 0660 qemu qemu -
|
132
app-emulation/looking-glass/looking-glass-0_beta6.ebuild
Normal file
132
app-emulation/looking-glass/looking-glass-0_beta6.ebuild
Normal file
@ -0,0 +1,132 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake tmpfiles linux-info
|
||||
|
||||
MY_PV="${PV//0_beta/B}"
|
||||
|
||||
DESCRIPTION="A low latency KVMFR application for guests with VGA PCI Passthrough"
|
||||
HOMEPAGE="https://looking-glass.io"
|
||||
SRC_URI="https://looking-glass.io/artifact/${MY_PV}/source -> ${PN}-${PV}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="X wayland pipewire pulseaudio +backtrace gnome host obs"
|
||||
REQUIRED_USE="|| ( X wayland )
|
||||
|| ( pipewire pulseaudio )"
|
||||
|
||||
DEPEND="gui-libs/egl-wayland
|
||||
media-libs/fontconfig
|
||||
media-libs/libsamplerate
|
||||
dev-libs/nettle[gmp]
|
||||
app-emulation/spice-protocol
|
||||
X? (
|
||||
x11-libs/libX11
|
||||
x11-libs/libXfixes
|
||||
x11-libs/libXi
|
||||
x11-libs/libXScrnSaver
|
||||
x11-libs/libXpresent
|
||||
)
|
||||
wayland? (
|
||||
dev-libs/wayland
|
||||
x11-libs/libxkbcommon
|
||||
gnome? (
|
||||
gui-libs/libdecor
|
||||
)
|
||||
)
|
||||
pipewire? (
|
||||
media-video/pipewire
|
||||
)
|
||||
pulseaudio? (
|
||||
media-sound/pulseaudio
|
||||
)
|
||||
obs? (
|
||||
media-video/obs-studio
|
||||
)"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND=""
|
||||
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
MY_CMAKE_PROJECT="client "
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# add other project
|
||||
if use host; then
|
||||
MY_CMAKE_PROJECT+="host "
|
||||
fi
|
||||
if use obs; then
|
||||
MY_CMAKE_PROJECT+="obs "
|
||||
fi
|
||||
# cmake prepare loop
|
||||
for prj in ${MY_CMAKE_PROJECT}
|
||||
do
|
||||
CMAKE_USE_DIR="${S}/${prj}"
|
||||
cmake_src_prepare "$@"
|
||||
done
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# cmake configure by use flags
|
||||
if ! use X; then
|
||||
local mycmakeargs+=(
|
||||
-DENABLE_X11=no
|
||||
)
|
||||
fi
|
||||
if ! use wayland; then
|
||||
local mycmakeargs+=(
|
||||
-DENABLE_WAYLAND=no
|
||||
)
|
||||
fi
|
||||
if ! use pipewire; then
|
||||
local mycmakeargs+=(
|
||||
-DENABLE_PIPEWIRE=no
|
||||
)
|
||||
fi
|
||||
if ! use pulseaudio; then
|
||||
local mycmakeargs+=(
|
||||
-DENABLE_PULSEAUDIO=no
|
||||
)
|
||||
fi
|
||||
if use gnome && use wayland; then
|
||||
local mycmakeargs+=(
|
||||
-DENABLE_LIBDECOR=yes
|
||||
)
|
||||
fi
|
||||
# cmake configure loop
|
||||
for prj in ${MY_CMAKE_PROJECT}
|
||||
do
|
||||
CMAKE_USE_DIR="${S}/${prj}"
|
||||
BUILD_DIR="${CMAKE_USE_DIR}_build"
|
||||
cmake_src_configure "$@"
|
||||
done
|
||||
set_arch_to_kernel
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# cmake compile loop
|
||||
for prj in ${MY_CMAKE_PROJECT}
|
||||
do
|
||||
CMAKE_USE_DIR="${S}/${prj}"
|
||||
BUILD_DIR="${CMAKE_USE_DIR}_build"
|
||||
cmake_src_compile "$@"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# install cmake projects
|
||||
for prj in ${MY_CMAKE_PROJECT}
|
||||
do
|
||||
CMAKE_USE_DIR="${S}/${prj}"
|
||||
BUILD_DIR="${CMAKE_USE_DIR}_build"
|
||||
cmake_src_install "$@"
|
||||
done
|
||||
# install docs
|
||||
einstalldocs
|
||||
# install tmpfiles config
|
||||
newtmpfiles "${FILESDIR}"/${PN}-tmpfiles.conf ${PN}.conf
|
||||
}
|
17
app-emulation/looking-glass/metadata.xml
Normal file
17
app-emulation/looking-glass/metadata.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<upstream>
|
||||
<remote-id type="github">gnif/LookingGlass</remote-id>
|
||||
</upstream>
|
||||
<maintainer type="person">
|
||||
<email>OriPoin@outlook.com</email>
|
||||
<name>Yachen Wang</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="backtrace">Enable backtrace support</flag>
|
||||
<flag name="host">Build host application</flag>
|
||||
<flag name="obs">Build OBS plugin</flag>
|
||||
<flag name="pipewire">Build with PipeWire support</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user