From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DD07B1382C5 for ; Tue, 22 Jun 2021 23:00:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9285E0866; Tue, 22 Jun 2021 23:00:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9547BE0866 for ; Tue, 22 Jun 2021 23:00:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1962933D3C2 for ; Tue, 22 Jun 2021 23:00:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 661147B3 for ; Tue, 22 Jun 2021 23:00:07 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1624402800.65aef5dafc07f7cadbf8d2a9817b9aa4425c294b.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/openrgb/files/, app-misc/openrgb/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/openrgb/files/OpenRGB-0.6-plugins.patch app-misc/openrgb/openrgb-0.6-r1.ebuild app-misc/openrgb/openrgb-9999.ebuild X-VCS-Directories: app-misc/openrgb/files/ app-misc/openrgb/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: 65aef5dafc07f7cadbf8d2a9817b9aa4425c294b X-VCS-Branch: master Date: Tue, 22 Jun 2021 23:00:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2cf58178-cc07-47ca-8f5c-7f1fa1bfb318 X-Archives-Hash: 3ad52e26401d84d11840bc13ce39e055 commit: 65aef5dafc07f7cadbf8d2a9817b9aa4425c294b Author: Alexey Sokolov google com> AuthorDate: Tue Jun 22 21:14:47 2021 +0000 Commit: Patrick McLean gentoo org> CommitDate: Tue Jun 22 23:00:00 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65aef5da app-misc/openrgb: allow installing plugins Package-Manager: Portage-3.0.20, Repoman-3.0.2 Signed-off-by: Alexey Sokolov asokolov.org> Signed-off-by: Patrick McLean gentoo.org> app-misc/openrgb/files/OpenRGB-0.6-plugins.patch | 24 +++++++++++++++++++ .../{openrgb-9999.ebuild => openrgb-0.6-r1.ebuild} | 27 ++++++++++++++++++---- app-misc/openrgb/openrgb-9999.ebuild | 24 ++++++++++++++++--- 3 files changed, 67 insertions(+), 8 deletions(-) diff --git a/app-misc/openrgb/files/OpenRGB-0.6-plugins.patch b/app-misc/openrgb/files/OpenRGB-0.6-plugins.patch new file mode 100644 index 00000000000..ccc83de27eb --- /dev/null +++ b/app-misc/openrgb/files/OpenRGB-0.6-plugins.patch @@ -0,0 +1,24 @@ +Allow installation of plugins not only in ~/.config + +Used by app-misc/openrgb-plugin-* packages + +diff --git a/PluginManager.cpp b/PluginManager.cpp +index b424b8b..991fb75 100644 +--- a/PluginManager.cpp ++++ b/PluginManager.cpp +@@ -15,7 +15,8 @@ void PluginManager::ScanAndLoadPlugins(bool dark_theme) + \*--------------------------------------------------------------------------------------*/ + OpenRGBPluginInterface *OpenRGBPlugin = nullptr; + +- const QDir pluginsDir = QString().fromStdString(ResourceManager::get()->GetConfigurationDirectory()) + "plugins/"; ++ for (const QDir pluginsDir : {QString().fromStdString(ResourceManager::get()->GetConfigurationDirectory()) + "plugins/", ++ QString().fromStdString(GENTOO_PLUGINS_DIR)}) { + + std::vector FileList; + +@@ -54,4 +56,5 @@ void PluginManager::ScanAndLoadPlugins(bool dark_theme) + std::cout << loader.errorString().toStdString() << std::endl; + } + } ++ } + } diff --git a/app-misc/openrgb/openrgb-9999.ebuild b/app-misc/openrgb/openrgb-0.6-r1.ebuild similarity index 55% copy from app-misc/openrgb/openrgb-9999.ebuild copy to app-misc/openrgb/openrgb-0.6-r1.ebuild index c1f1eb4bbcb..9384eedb4eb 100644 --- a/app-misc/openrgb/openrgb-9999.ebuild +++ b/app-misc/openrgb/openrgb-0.6-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit qmake-utils +inherit flag-o-matic qmake-utils if [[ ${PV} == *9999* ]]; then inherit git-r3 @@ -20,14 +20,13 @@ fi DESCRIPTION="Open source RGB lighting control that doesn't depend on manufacturer software" HOMEPAGE="https://gitlab.com/CalcProgrammer1/OpenRGB/" LICENSE="GPL-2" -SLOT="0" +SLOT="0/1" RDEPEND=" dev-libs/hidapi:= dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 - net-libs/mbedtls:= virtual/libusb:1 " DEPEND=" @@ -40,19 +39,37 @@ BDEPEND=" PATCHES+=( "${FILESDIR}"/OpenRGB-0.6-pkgconf.patch + "${FILESDIR}"/OpenRGB-0.6-plugins.patch ) src_prepare() { default - rm -r dependencies/{hidapi,libusb,json,mbedtls}* || die + rm -r dependencies/{hidapi,libusb,json}* || die } src_configure() { - eqmake5 INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" + # Some plugins require symbols defined in the main binary. + # The official build system bundles OpenRGB as a submodule instead, and + # compiles the .cpp file again. + append-ldflags -Wl,--export-dynamic + + eqmake5 \ + INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \ + DEFINES+="GENTOO_PLUGINS_DIR=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" } src_install() { emake INSTALL_ROOT="${ED}" install dodoc README.md OpenRGB.patch + + # This is for plugins. Upstream doesn't install any headers at all. + insinto /usr/include/OpenRGB + doins *.h + insinto /usr/include/OpenRGB/RGBController + doins RGBController/*.h + insinto /usr/include/OpenRGB/i2c_smbus + doins i2c_smbus/*.h + insinto /usr/include/OpenRGB/net_port + doins net_port/*.h } diff --git a/app-misc/openrgb/openrgb-9999.ebuild b/app-misc/openrgb/openrgb-9999.ebuild index c1f1eb4bbcb..853ad8e0414 100644 --- a/app-misc/openrgb/openrgb-9999.ebuild +++ b/app-misc/openrgb/openrgb-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit qmake-utils +inherit flag-o-matic qmake-utils if [[ ${PV} == *9999* ]]; then inherit git-r3 @@ -20,7 +20,7 @@ fi DESCRIPTION="Open source RGB lighting control that doesn't depend on manufacturer software" HOMEPAGE="https://gitlab.com/CalcProgrammer1/OpenRGB/" LICENSE="GPL-2" -SLOT="0" +SLOT="0/1" RDEPEND=" dev-libs/hidapi:= @@ -40,6 +40,7 @@ BDEPEND=" PATCHES+=( "${FILESDIR}"/OpenRGB-0.6-pkgconf.patch + "${FILESDIR}"/OpenRGB-0.6-plugins.patch ) src_prepare() { @@ -48,11 +49,28 @@ src_prepare() { } src_configure() { - eqmake5 INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" + # Some plugins require symbols defined in the main binary. + # The official build system bundles OpenRGB as a submodule instead, and + # compiles the .cpp file again. + append-ldflags -Wl,--export-dynamic + + eqmake5 \ + INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \ + DEFINES+="GENTOO_PLUGINS_DIR=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" } src_install() { emake INSTALL_ROOT="${ED}" install dodoc README.md OpenRGB.patch + + # This is for plugins. Upstream doesn't install any headers at all. + insinto /usr/include/OpenRGB + doins *.h + insinto /usr/include/OpenRGB/RGBController + doins RGBController/*.h + insinto /usr/include/OpenRGB/i2c_smbus + doins i2c_smbus/*.h + insinto /usr/include/OpenRGB/net_port + doins net_port/*.h }