overlay/app-emulation/looking-glass/looking-glass-9999.ebuild

69 lines
1.6 KiB
Bash

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
MY_PN="LookingGlass"
MY_PV="${PV//1_beta/B}"
MY_P="${MY_PN}-${MY_PV}"
inherit cmake git-r3
DESCRIPTION="A low latency KVM FrameRelay implementation for guests with VGA PCI Passthrough"
HOMEPAGE="https://looking-glass.hostfission.com https://github.com/gnif/LookingGlass/"
EGIT_REPO_URI="https://github.com/gnif/LookingGlass.git"
EGIT_SUBMODULES=()
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"
RDEPEND="app-emulation/spice-protocol"
DEPEND="${RDEPEND}
dev-libs/libconfig:0=
dev-libs/nettle:=[gmp]
media-libs/freetype:2
media-libs/fontconfig:1.0
media-libs/libsdl2:=[gles2]
media-libs/sdl2-ttf
virtual/glu"
BDEPEND="virtual/pkgconfig"
src_unpack(){
mkdir looking-glass-9999
git clone --recursive "https://github.com/gnif/LookingGlass.git" looking-glass-9999 || die "git clone failed"
}
src_prepare() {
default
# Respect FLAGS
sed -i -e '/CMAKE_C_FLAGS/s/-O3 -march=native //' \
-e "/git/s/git describe --always --long --dirty --abbrev=10 --tags/echo ${MY_PV}/" \
client/CMakeLists.txt || die "sed failed for FLAGS and COMMAND"
if ! use debug ; then
sed -i '/CMAKE_C_FLAGS/s/-g //' \
client/CMakeLists.txt || die "sed failed for debug"
fi
cp client/CMakeLists.txt . || die "copy cmakelists failed"
cmake_src_prepare
}
src_configure() {
einfo "I don't really know what I'm doing"
}
src_compile(){
mkdir client/build
cd client/build
cmake ../ -DENABLE_WAYLAND=OFF || die "cmake failed"
make || die "make failed"
}
src_install() {
einstalldocs
dobin client/build/looking-glass-client || die "install failed"
}