From a380c65c4944946783bc93993909f26cd5240cb2 Mon Sep 17 00:00:00 2001 From: knotteye Date: Tue, 8 Dec 2020 08:34:12 -0600 Subject: [PATCH] Add OBS plugin for looking-glass --- app-emulation/looking-glass/Manifest | 2 +- .../looking-glass/looking-glass-9999.ebuild | 4 +- media-video/obs-looking-glass-plugin/Manifest | 2 + .../obs-looking-glass-plugin/metadata.xml | 11 ++++ .../obs-looking-glass-plugin-9999.ebuild | 65 +++++++++++++++++++ 5 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 media-video/obs-looking-glass-plugin/Manifest create mode 100644 media-video/obs-looking-glass-plugin/metadata.xml create mode 100644 media-video/obs-looking-glass-plugin/obs-looking-glass-plugin-9999.ebuild diff --git a/app-emulation/looking-glass/Manifest b/app-emulation/looking-glass/Manifest index cb73c18..f323f46 100644 --- a/app-emulation/looking-glass/Manifest +++ b/app-emulation/looking-glass/Manifest @@ -1,2 +1,2 @@ -EBUILD looking-glass-9999.ebuild 1660 BLAKE2B e477ba3a6b344422edeb466dffb483a7960b8bfcda87414762c35edf393e74bee2177c63552d9972c784d48650c986e514bf8253fcb563799b210627ea68764e SHA512 e88648fd97fa5febd4ac0c05c2573277ee620d7873b20b8fe60e2a03c98cd3a188a66aea0c4d5cc485daf0144331da6eca3699e21cb5f0dce2d68855b1ebf242 +EBUILD looking-glass-9999.ebuild 1654 BLAKE2B dbeff6e272ba6c8c129d755aa4c7c54af0a7086d0ec4ab95bc84ed3119c747890adaa7752b037a1399b8d8059e3e0041f7a21d5b339ab7d24fc2275a5899804e SHA512 f7499d1bdb063559e6df65eaf8062e137f990d2d98b5e956234d00ae305a912cb43b435dcbc4203a0118d2b73908c258e8f79a5b583f2d40ae3708939272778c MISC metadata.xml 329 BLAKE2B c613c0d366e5c79b96f4707dd6b2c4d41a627b2b5f5a2a29f58c2ea239b891b9e2f1bf43d2d436127004eecd416dd3d59dcd88e8bfe4c977b3953f55756c528a SHA512 439861039e04a7d9b7b1cf4c1c404698dc2322d7786c8779cf3f24060d7bf4f966b104c94d44fbce72874b8c9fbaac5bc058d33c9e2bea1b2e38adca24df3b64 diff --git a/app-emulation/looking-glass/looking-glass-9999.ebuild b/app-emulation/looking-glass/looking-glass-9999.ebuild index 9e4ef02..a8090ad 100644 --- a/app-emulation/looking-glass/looking-glass-9999.ebuild +++ b/app-emulation/looking-glass/looking-glass-9999.ebuild @@ -63,6 +63,6 @@ src_compile(){ } src_install() { - einstalldocs - dobin client/build/looking-glass-client || die "install failed" + einstalldocs + dobin client/build/looking-glass-client || die "install failed" } diff --git a/media-video/obs-looking-glass-plugin/Manifest b/media-video/obs-looking-glass-plugin/Manifest new file mode 100644 index 0000000..c7bb499 --- /dev/null +++ b/media-video/obs-looking-glass-plugin/Manifest @@ -0,0 +1,2 @@ +EBUILD obs-looking-glass-plugin-9999.ebuild 1511 BLAKE2B ab3f9582d37443d708446c076866bf59a283ac099293d8b7ef95efe93890035f523a48c3e760710dcca9edd6fea0460ff304576e194fef848a23cff109c0c119 SHA512 df6468a79cc45cfaec4384c243afcc0b2c0b443aa98a52c550f9c016b715dd95891b143ba3177d0e7b54e38227bdf2483999dadb557f3c78b17ad7e387ca12ed +MISC metadata.xml 329 BLAKE2B c613c0d366e5c79b96f4707dd6b2c4d41a627b2b5f5a2a29f58c2ea239b891b9e2f1bf43d2d436127004eecd416dd3d59dcd88e8bfe4c977b3953f55756c528a SHA512 439861039e04a7d9b7b1cf4c1c404698dc2322d7786c8779cf3f24060d7bf4f966b104c94d44fbce72874b8c9fbaac5bc058d33c9e2bea1b2e38adca24df3b64 diff --git a/media-video/obs-looking-glass-plugin/metadata.xml b/media-video/obs-looking-glass-plugin/metadata.xml new file mode 100644 index 0000000..79acd3b --- /dev/null +++ b/media-video/obs-looking-glass-plugin/metadata.xml @@ -0,0 +1,11 @@ + + + + + knotteye@airmail.cc + KnottEye + + + gnif/LookingGlass + + diff --git a/media-video/obs-looking-glass-plugin/obs-looking-glass-plugin-9999.ebuild b/media-video/obs-looking-glass-plugin/obs-looking-glass-plugin-9999.ebuild new file mode 100644 index 0000000..f3a1c97 --- /dev/null +++ b/media-video/obs-looking-glass-plugin/obs-looking-glass-plugin-9999.ebuild @@ -0,0 +1,65 @@ +# 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" +}