summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/openrgb')
-rw-r--r--app-misc/openrgb/Manifest1
-rw-r--r--app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch15
-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.xml29
-rw-r--r--app-misc/openrgb/openrgb-0.9.ebuild93
-rw-r--r--app-misc/openrgb/openrgb-9999.ebuild93
7 files changed, 255 insertions, 0 deletions
diff --git a/app-misc/openrgb/Manifest b/app-misc/openrgb/Manifest
new file mode 100644
index 000000000000..f543fecc55fd
--- /dev/null
+++ b/app-misc/openrgb/Manifest
@@ -0,0 +1 @@
+DIST OpenRGB-release_0.9.tar.bz2 28689813 BLAKE2B 9fcf08d5e4d07ffc0f7867516f09044e18ce488bcdd99c8b44e0afe291b8a21a7ba92d6e7fd683ef22462a262004a992621efb59a5df6ed7551f4e9f75843241 SHA512 fb1bdbc7bcbd3bac888be313cfb6403a13d39de659ac6993858f9c1b17ad40e9c4a7d4c7c90682181841db1659a0ee298363c442a7120d43347aaf4485e7dccf
diff --git a/app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch b/app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch
new file mode 100644
index 000000000000..54646dc66a50
--- /dev/null
+++ b/app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch
@@ -0,0 +1,15 @@
+Don't install udev rules
+
+This is handled by udev eclass instead
+
+--- a/OpenRGB.pro
++++ b/OpenRGB.pro
+@@ -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=$$PREFIX/lib/udev/rules.d/
+- 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
new file mode 100644
index 000000000000..378bcd2df595
--- /dev/null
+++ b/app-misc/openrgb/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <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>
+</pkgmetadata>
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
new file mode 100644
index 000000000000..9fdf9377f299
--- /dev/null
+++ b/app-misc/openrgb/openrgb-9999.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
+}