summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/openrgb')
-rw-r--r--app-misc/openrgb/Manifest3
-rw-r--r--app-misc/openrgb/files/OpenRGB-0.5-build-system.patch13
-rw-r--r--app-misc/openrgb/files/OpenRGB-0.6-pkgconf.patch11
-rw-r--r--app-misc/openrgb/files/OpenRGB-0.6-plugins.patch24
-rw-r--r--app-misc/openrgb/files/OpenRGB-0.7-plugins.patch24
-rw-r--r--app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch (renamed from app-misc/openrgb/files/OpenRGB-0.7-udev.patch)9
-rw-r--r--app-misc/openrgb/files/OpenRGB-0.9-build-system.patch12
-rw-r--r--app-misc/openrgb/files/OpenRGB-0.9-udev-check.patch12
-rw-r--r--app-misc/openrgb/metadata.xml14
-rw-r--r--app-misc/openrgb/openrgb-0.6-r1.ebuild75
-rw-r--r--app-misc/openrgb/openrgb-0.7.ebuild71
-rw-r--r--app-misc/openrgb/openrgb-0.9.ebuild93
-rw-r--r--app-misc/openrgb/openrgb-9999.ebuild52
13 files changed, 173 insertions, 240 deletions
diff --git a/app-misc/openrgb/Manifest b/app-misc/openrgb/Manifest
index 7b8c113774cc..f543fecc55fd 100644
--- a/app-misc/openrgb/Manifest
+++ b/app-misc/openrgb/Manifest
@@ -1,2 +1 @@
-DIST OpenRGB-release_0.6.tar.bz2 24301305 BLAKE2B 20d8f8f7a3189fd5f94b008b11c869d2a8584dc038322e4ac8649c7b57172637133dd18c05ed8eaa6907ba7c097280727a9e7ce2e676250146044bbc2d66921e SHA512 9eb090e1cab121308f3adea8c50feb819a19cb52feff29e45ec24dfbb37013421f53d2ac614496781af1ef4e612dd41c1abafec509430df7d0715aba59ee5a32
-DIST OpenRGB-release_0.7.tar.bz2 28053114 BLAKE2B dfab42fca654478ab359e6e46133fc20a4bf32aca35d1b2f475d3e4e5e218f35c7e1f03be15381b0e8d874ea24254b88b8fe21548a4183b29b4c66647aeef516 SHA512 6ee605bfc91da14d34bc89fe75790f99548253e2d6aa088e20d1996577629bf15fe0fae09e65d983aa829f54cfcbd33e13f2c7d493a2776fd1723f8725b62186
+DIST OpenRGB-release_0.9.tar.bz2 28689813 BLAKE2B 9fcf08d5e4d07ffc0f7867516f09044e18ce488bcdd99c8b44e0afe291b8a21a7ba92d6e7fd683ef22462a262004a992621efb59a5df6ed7551f4e9f75843241 SHA512 fb1bdbc7bcbd3bac888be313cfb6403a13d39de659ac6993858f9c1b17ad40e9c4a7d4c7c90682181841db1659a0ee298363c442a7120d43347aaf4485e7dccf
diff --git a/app-misc/openrgb/files/OpenRGB-0.5-build-system.patch b/app-misc/openrgb/files/OpenRGB-0.5-build-system.patch
deleted file mode 100644
index fe805988af5d..000000000000
--- a/app-misc/openrgb/files/OpenRGB-0.5-build-system.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/OpenRGB.pro b/OpenRGB.pro
-index 91e0079..7f279dd 100644
---- a/OpenRGB.pro
-+++ b/OpenRGB.pro
-@@ -26,8 +26,5 @@ TEMPLATE = app
- win32:BUILDDATE = $$system(date /t)
- unix:BUILDDATE = $$system(date -R -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}")
--GIT_COMMIT_ID = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse HEAD)
--GIT_COMMIT_DATE = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ show -s --format=%ci HEAD)
--GIT_BRANCH = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse --abbrev-ref HEAD)
-
- DEFINES += \
- VERSION_STRING=\\"\"\"$$VERSION\\"\"\" \
diff --git a/app-misc/openrgb/files/OpenRGB-0.6-pkgconf.patch b/app-misc/openrgb/files/OpenRGB-0.6-pkgconf.patch
deleted file mode 100644
index 380b1091d225..000000000000
--- a/app-misc/openrgb/files/OpenRGB-0.6-pkgconf.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/OpenRGB.pro 2021-06-06 22:51:12.022561718 +0100
-+++ b/OpenRGB.pro 2021-06-06 22:51:24.466105358 +0100
-@@ -837,7 +837,7 @@ unix:!macx {
- # hidapi-hidraw >= 0.10.1 supports USAGE/USAGE_PAGE #
- # Define USE_HID_USAGE if hidapi-hidraw supports it #
- #---------------------------------------------------------------------------------------#
-- HIDAPI_HIDRAW_VERSION = $$system(pkgconf --modversion hidapi-hidraw)
-+ HIDAPI_HIDRAW_VERSION = $$system(pkg-config --modversion hidapi-hidraw)
- if(versionAtLeast(HIDAPI_HIDRAW_VERSION, "0.10.1")) {
- DEFINES += USE_HID_USAGE
- }
diff --git a/app-misc/openrgb/files/OpenRGB-0.6-plugins.patch b/app-misc/openrgb/files/OpenRGB-0.6-plugins.patch
deleted file mode 100644
index ccc83de27ebe..000000000000
--- a/app-misc/openrgb/files/OpenRGB-0.6-plugins.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-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<std::string> FileList;
-
-@@ -54,4 +56,5 @@ void PluginManager::ScanAndLoadPlugins(bool dark_theme)
- std::cout << loader.errorString().toStdString() << std::endl;
- }
- }
-+ }
- }
diff --git a/app-misc/openrgb/files/OpenRGB-0.7-plugins.patch b/app-misc/openrgb/files/OpenRGB-0.7-plugins.patch
deleted file mode 100644
index b9a6fb2cd16a..000000000000
--- a/app-misc/openrgb/files/OpenRGB-0.7-plugins.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Allow installation of plugins not only in ~/.config
-
-Used by app-misc/openrgb-plugin-* packages
-
---- a/PluginManager.cpp
-+++ b/PluginManager.cpp
-@@ -35,7 +35,8 @@ void PluginManager::ScanAndLoadPlugins()
- | The plugins directory is a directory named "plugins" in |
- | the configuration directory |
- \*---------------------------------------------------------*/
-- const QDir plugins_dir = QString().fromStdString(ResourceManager::get()->GetConfigurationDirectory()) + "plugins/";
-+ for (const QDir plugins_dir : {QString().fromStdString(ResourceManager::get()->GetConfigurationDirectory()) + "plugins/",
-+ QString().fromStdString(GENTOO_PLUGINS_DIR)}) {
-
- /*---------------------------------------------------------*\
- | Get a list of all files in the plugins directory |
-@@ -56,6 +57,7 @@ void PluginManager::ScanAndLoadPlugins()
-
- AddPlugin(plugin_path);
- }
-+ }
- }
-
- void PluginManager::AddPlugin(std::string path)
diff --git a/app-misc/openrgb/files/OpenRGB-0.7-udev.patch b/app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch
index a2feaf1c9378..54646dc66a50 100644
--- a/app-misc/openrgb/files/OpenRGB-0.7-udev.patch
+++ b/app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch
@@ -1,16 +1,15 @@
-Install udev rules to correct dir
+Don't install udev rules
-Revert https://gitlab.com/CalcProgrammer1/OpenRGB/-/commit/ccbe83919a70be346eea948fb2c4122ef9f34214
+This is handled by udev eclass instead
--- a/OpenRGB.pro
+++ b/OpenRGB.pro
-@@ -1246,7 +1246,7 @@ unix:!macx {
+@@ -1246,7 +1246,5 @@ unix:!macx {
icon.files+=qt/OpenRGB.png
metainfo.path=$$PREFIX/share/metainfo/
metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml
-+ rules.path=/lib/udev/rules.d/
- rules.path=$$PREFIX/lib/udev/rules.d/
- rules.files+=60-openrgb.rules
+- rules.files+=60-openrgb.rules
INSTALLS += target desktop icon metainfo rules
}
GitLab
diff --git a/app-misc/openrgb/files/OpenRGB-0.9-build-system.patch b/app-misc/openrgb/files/OpenRGB-0.9-build-system.patch
new file mode 100644
index 000000000000..567e60787b72
--- /dev/null
+++ b/app-misc/openrgb/files/OpenRGB-0.9-build-system.patch
@@ -0,0 +1,12 @@
+--- a/OpenRGB.pro
++++ b/OpenRGB.pro
+@@ -46,9 +46,6 @@ TEMPLATE = app
+ #-----------------------------------------------------------------------------------------------#
+ win32:BUILDDATE = $$system(date /t)
+ unix:BUILDDATE = $$system(date -R -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}")
+-GIT_COMMIT_ID = $$system(git log -n 1 --pretty=format:"%H")
+-GIT_COMMIT_DATE = $$system(git log -n 1 --pretty=format:"%ci")
+-GIT_BRANCH = $$system(git branch --show-current)
+
+ DEFINES += \
+ VERSION_STRING=\\"\"\"$$VERSION\\"\"\" \
diff --git a/app-misc/openrgb/files/OpenRGB-0.9-udev-check.patch b/app-misc/openrgb/files/OpenRGB-0.9-udev-check.patch
new file mode 100644
index 000000000000..e3525c116baf
--- /dev/null
+++ b/app-misc/openrgb/files/OpenRGB-0.9-udev-check.patch
@@ -0,0 +1,12 @@
+We install udev to /lib/udev instead, which it doesn't check
+
+--- a/ResourceManager.cpp
++++ b/ResourceManager.cpp
+@@ -895,7 +895,6 @@ void ResourceManager::DetectDevicesThreadFunction()
+ {
+ if(access("/usr/lib/udev/rules.d/60-openrgb.rules", F_OK) != 0)
+ {
+- udev_not_exist = true;
+ }
+ }
+ else
diff --git a/app-misc/openrgb/metadata.xml b/app-misc/openrgb/metadata.xml
index 05db5934398f..378bcd2df595 100644
--- a/app-misc/openrgb/metadata.xml
+++ b/app-misc/openrgb/metadata.xml
@@ -5,10 +5,24 @@
<email>chutzpah@gentoo.org</email>
<name>Patrick McLean</name>
</maintainer>
+ <maintainer type="person">
+ <email>xgqt@gentoo.org</email>
+ <name>Maciej Barć</name>
+ </maintainer>
<maintainer type="person" proxied="yes">
<email>alexey+gentoo@asokolov.org</email>
<name>Alexey Sokolov</name>
</maintainer>
+ <longdescription lang="en">
+ One of the biggest complaints about RGB is the software ecosystem surrounding it.
+ Every manufacturer has their own app, their own brand, their own style.
+ If you want to mix and match devices, you end up with a ton of conflicting,
+ functionally identical apps competing for your background resources.
+ On top of that, these apps are proprietary and Windows-only.
+ Some even require online accounts. What if there was a way to control all of your
+ RGB devices from a single app, on both Windows and Linux, without any nonsense?
+ That is what OpenRGB sets out to achieve. One app to rule them all.
+ </longdescription>
<upstream>
<remote-id type="gitlab">CalcProgrammer1/OpenRGB</remote-id>
</upstream>
diff --git a/app-misc/openrgb/openrgb-0.6-r1.ebuild b/app-misc/openrgb/openrgb-0.6-r1.ebuild
deleted file mode 100644
index b53579dca202..000000000000
--- a/app-misc/openrgb/openrgb-0.6-r1.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 2020-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic qmake-utils
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI=${EGIT_REPO_URI:-"https://gitlab.com/CalcProgrammer1/OpenRGB"}
-else
- SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_${PV}/OpenRGB-release_${PV}.tar.bz2"
- S="${WORKDIR}/OpenRGB-release_${PV}"
- KEYWORDS="~amd64 ~x86"
- PATCHES=(
- "${FILESDIR}"/OpenRGB-0.5-build-system.patch
- )
-fi
-
-DESCRIPTION="Open source RGB lighting control that doesn't depend on manufacturer software"
-HOMEPAGE="https://openrgb.org https://gitlab.com/CalcProgrammer1/OpenRGB/"
-LICENSE="GPL-2"
-SLOT="0/1"
-
-RDEPEND="
- dev-libs/hidapi:=
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtwidgets:5
- virtual/libusb:1
-"
-DEPEND="
- ${RDEPEND}
- dev-cpp/nlohmann_json
-"
-BDEPEND="
- virtual/pkgconfig
-"
-
-PATCHES+=(
- "${FILESDIR}"/OpenRGB-0.6-pkgconf.patch
- "${FILESDIR}"/OpenRGB-0.6-plugins.patch
-)
-
-src_prepare() {
- default
- rm -r dependencies/{hidapi,libusb,json}* || die
-}
-
-src_configure() {
- # 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-0.7.ebuild b/app-misc/openrgb/openrgb-0.7.ebuild
deleted file mode 100644
index f9e079015112..000000000000
--- a/app-misc/openrgb/openrgb-0.7.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 2020-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic qmake-utils
-
-if [[ ${PV} == *9999* ]]; then
- inherit git-r3
- EGIT_REPO_URI=${EGIT_REPO_URI:-"https://gitlab.com/CalcProgrammer1/OpenRGB"}
-else
- SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_${PV}/OpenRGB-release_${PV}.tar.bz2"
- S="${WORKDIR}/OpenRGB-release_${PV}"
- KEYWORDS="~amd64 ~x86"
- PATCHES=(
- "${FILESDIR}"/OpenRGB-0.5-build-system.patch
- )
-fi
-
-DESCRIPTION="Open source RGB lighting control that doesn't depend on manufacturer software"
-HOMEPAGE="https://openrgb.org https://gitlab.com/CalcProgrammer1/OpenRGB/"
-LICENSE="GPL-2"
-# subslot is OPENRGB_PLUGIN_API_VERSION from https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGBPluginInterface.h
-SLOT="0/2"
-
-RDEPEND="
- dev-libs/hidapi
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtwidgets:5
- net-libs/mbedtls:=
- virtual/libusb:1
-"
-DEPEND="
- ${RDEPEND}
- dev-cpp/nlohmann_json
-"
-BDEPEND="
- virtual/pkgconfig
-"
-
-PATCHES+=(
- "${FILESDIR}"/OpenRGB-0.7-plugins.patch
- "${FILESDIR}"/OpenRGB-0.7-udev.patch
-)
-
-src_prepare() {
- default
- rm -r dependencies/{hidapi,libusb,json,mbedtls}* || die
-}
-
-src_configure() {
- # 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
- find . -name '*.h' -exec cp --parents '{}' "${ED}/usr/include/OpenRGB/" ';' || die
-}
diff --git a/app-misc/openrgb/openrgb-0.9.ebuild b/app-misc/openrgb/openrgb-0.9.ebuild
new file mode 100644
index 000000000000..9c15691b3b6b
--- /dev/null
+++ b/app-misc/openrgb/openrgb-0.9.ebuild
@@ -0,0 +1,93 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit check-reqs flag-o-matic qmake-utils udev xdg-utils
+
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI=${EGIT_REPO_URI:-"https://gitlab.com/CalcProgrammer1/OpenRGB"}
+else
+ SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_${PV}/OpenRGB-release_${PV}.tar.bz2"
+ S="${WORKDIR}/OpenRGB-release_${PV}"
+ KEYWORDS="amd64 ~loong ~x86"
+ PATCHES=( "${FILESDIR}"/OpenRGB-0.9-build-system.patch )
+fi
+
+DESCRIPTION="Open source RGB lighting control"
+HOMEPAGE="https://openrgb.org https://gitlab.com/CalcProgrammer1/OpenRGB/"
+LICENSE="GPL-2"
+# subslot is OPENRGB_PLUGIN_API_VERSION from
+# https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGBPluginInterface.h
+SLOT="0/3"
+
+RDEPEND="
+ dev-cpp/cpp-httplib:=
+ dev-libs/hidapi
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ net-libs/mbedtls:=
+ virtual/libusb:1
+"
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/nlohmann_json
+ dev-libs/mdns
+"
+BDEPEND="
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig
+"
+
+PATCHES+=(
+ "${FILESDIR}"/OpenRGB-0.7-r1-udev.patch
+ "${FILESDIR}"/OpenRGB-0.9-udev-check.patch
+)
+
+CHECKREQS_DISK_BUILD="2G"
+
+src_prepare() {
+ default
+ rm -r dependencies/{httplib,hidapi,libusb,mdns,json,mbedtls}* \
+ || die "Failed to remove unneded deps"
+}
+
+src_configure() {
+ # Some plugins require symbols defined in the main binary.
+ # The upstream build system of plugins bundles OpenRGB as a submodule
+ # instead, and compiles the .cpp file again.
+ append-ldflags -Wl,--export-dynamic
+
+ # > warning: ‘-pipe’ ignored because ‘-save-temps’ specified
+ filter-flags -pipe
+
+ eqmake5 \
+ INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
+ DEFINES+="OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" \
+ LIBS+=-lhttplib
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED}" install
+
+ dodoc README.md OpenRGB.patch
+
+ rm -r "${ED}"/usr/lib/udev/ || die
+ udev_dorules 60-openrgb.rules
+
+ # This is for plugins. Upstream doesn't install any headers at all.
+ insinto /usr/include/OpenRGB
+ find . -name '*.h' -exec cp --parents '{}' "${ED}/usr/include/OpenRGB/" ';' || die
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+ udev_reload
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+ udev_reload
+}
diff --git a/app-misc/openrgb/openrgb-9999.ebuild b/app-misc/openrgb/openrgb-9999.ebuild
index f9e079015112..9fdf9377f299 100644
--- a/app-misc/openrgb/openrgb-9999.ebuild
+++ b/app-misc/openrgb/openrgb-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2020-2022 Gentoo Authors
+# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit flag-o-matic qmake-utils
+inherit check-reqs flag-o-matic qmake-utils udev xdg-utils
if [[ ${PV} == *9999* ]]; then
inherit git-r3
@@ -11,19 +11,19 @@ if [[ ${PV} == *9999* ]]; then
else
SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_${PV}/OpenRGB-release_${PV}.tar.bz2"
S="${WORKDIR}/OpenRGB-release_${PV}"
- KEYWORDS="~amd64 ~x86"
- PATCHES=(
- "${FILESDIR}"/OpenRGB-0.5-build-system.patch
- )
+ KEYWORDS="~amd64 ~loong ~x86"
+ PATCHES=( "${FILESDIR}"/OpenRGB-0.9-build-system.patch )
fi
-DESCRIPTION="Open source RGB lighting control that doesn't depend on manufacturer software"
+DESCRIPTION="Open source RGB lighting control"
HOMEPAGE="https://openrgb.org https://gitlab.com/CalcProgrammer1/OpenRGB/"
LICENSE="GPL-2"
-# subslot is OPENRGB_PLUGIN_API_VERSION from https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGBPluginInterface.h
-SLOT="0/2"
+# subslot is OPENRGB_PLUGIN_API_VERSION from
+# https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGBPluginInterface.h
+SLOT="0/3"
RDEPEND="
+ dev-cpp/cpp-httplib:=
dev-libs/hidapi
dev-qt/qtcore:5
dev-qt/qtgui:5
@@ -34,30 +34,39 @@ RDEPEND="
DEPEND="
${RDEPEND}
dev-cpp/nlohmann_json
+ dev-libs/mdns
"
BDEPEND="
+ dev-qt/linguist-tools:5
virtual/pkgconfig
"
PATCHES+=(
- "${FILESDIR}"/OpenRGB-0.7-plugins.patch
- "${FILESDIR}"/OpenRGB-0.7-udev.patch
+ "${FILESDIR}"/OpenRGB-0.7-r1-udev.patch
+ "${FILESDIR}"/OpenRGB-0.9-udev-check.patch
)
+CHECKREQS_DISK_BUILD="2G"
+
src_prepare() {
default
- rm -r dependencies/{hidapi,libusb,json,mbedtls}* || die
+ rm -r dependencies/{httplib,hidapi,libusb,mdns,json,mbedtls}* \
+ || die "Failed to remove unneded deps"
}
src_configure() {
# 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.
+ # The upstream build system of plugins bundles OpenRGB as a submodule
+ # instead, and compiles the .cpp file again.
append-ldflags -Wl,--export-dynamic
+ # > warning: ‘-pipe’ ignored because ‘-save-temps’ specified
+ filter-flags -pipe
+
eqmake5 \
INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
- DEFINES+="GENTOO_PLUGINS_DIR=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\""
+ DEFINES+="OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" \
+ LIBS+=-lhttplib
}
src_install() {
@@ -65,7 +74,20 @@ src_install() {
dodoc README.md OpenRGB.patch
+ rm -r "${ED}"/usr/lib/udev/ || die
+ udev_dorules 60-openrgb.rules
+
# This is for plugins. Upstream doesn't install any headers at all.
insinto /usr/include/OpenRGB
find . -name '*.h' -exec cp --parents '{}' "${ED}/usr/include/OpenRGB/" ';' || die
}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+ udev_reload
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+ udev_reload
+}