Personal gentoo overlay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
overlay/media-video/obs-looking-glass-plugin/obs-looking-glass-plugin-99...

65 lines
1.5 KiB

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
MY_PN="Looking-Glass-OBS"
MY_PV="${PV//1_beta/B}"
MY_P="${MY_PN}-${MY_PV}"
inherit cmake git-r3
DESCRIPTION="An OSB-Studio plugin for the Looking Glass KVMFR"
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=""
DEPEND="${RDEPEND}
app-emulation/looking-glass
media-video/obs-studio"
BDEPEND=""
src_unpack(){
mkdir looking-glass-9999
git clone --recursive "https://github.com/gnif/LookingGlass.git" obs-looking-glass-plugin-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}/" \
obs/CMakeLists.txt || die "sed failed for FLAGS and COMMAND"
if ! use debug ; then
sed -i '/CMAKE_C_FLAGS/s/-g //' \
obs/CMakeLists.txt || die "sed failed for debug"
fi
cp obs/CMakeLists.txt .
cmake_src_prepare
}
src_configure() {
einfo "I don't really know what I'm doing"
mkdir obs/build
cd obs/build
cmake ../ || die "cmake failed"
}
src_compile(){
cd obs/build
make || die "make failed"
}
src_install() {
cd obs/build
addwrite /usr/lib64/obs-plugins
install -Dm 0755 liblooking-glass-obs.so /usr/lib64/obs-plugins || die "install failed"
}