summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2020-07-19 21:30:59 -0700
committerPatrick McLean <chutzpah@gentoo.org>2020-07-19 21:31:10 -0700
commit676d261eac853b090a1fd184fb0b1fb68453a9a2 (patch)
tree9bad9035a5a4aa6cf05c2adf7cc21091e459562c /app-misc/OpenRGB
parentdev-erlang/idna: x86 keyworded (bug #717366) (diff)
downloadgentoo-676d261eac853b090a1fd184fb0b1fb68453a9a2.tar.gz
gentoo-676d261eac853b090a1fd184fb0b1fb68453a9a2.tar.bz2
gentoo-676d261eac853b090a1fd184fb0b1fb68453a9a2.zip
app-misc/OpenRGB: New package
Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'app-misc/OpenRGB')
-rw-r--r--app-misc/OpenRGB/Manifest1
-rw-r--r--app-misc/OpenRGB/OpenRGB-0.2.ebuild55
-rw-r--r--app-misc/OpenRGB/files/OpenRGB-0.2-build-system.patch14
-rw-r--r--app-misc/OpenRGB/files/OpenRGB-0.2-install.patch23
-rw-r--r--app-misc/OpenRGB/files/OpenRGB-0.2-use-system-hidapi.patch57
-rw-r--r--app-misc/OpenRGB/metadata.xml8
6 files changed, 158 insertions, 0 deletions
diff --git a/app-misc/OpenRGB/Manifest b/app-misc/OpenRGB/Manifest
new file mode 100644
index 000000000000..951fffac07a9
--- /dev/null
+++ b/app-misc/OpenRGB/Manifest
@@ -0,0 +1 @@
+DIST OpenRGB-0.2.tar.bz2 2064388 BLAKE2B 0001a4f66576cd26e04a87abb2f7d36df243c5d45b449f689a51d7523f6f26079622d58aa1f33166f52634326552ba1788344ff5f6034ceb9123dbc1eadb992b SHA512 06b5026c014674097c5f6b9ad54b1232f9aaa192663dd6324a402be8d12169e648b8ed4e748b4aebd970538519a88203621b45d8cb794fc0e6bae562e15c5f2b
diff --git a/app-misc/OpenRGB/OpenRGB-0.2.ebuild b/app-misc/OpenRGB/OpenRGB-0.2.ebuild
new file mode 100644
index 000000000000..c9b8a8b6db11
--- /dev/null
+++ b/app-misc/OpenRGB/OpenRGB-0.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop qmake-utils
+
+MY_P="${PN}-release_${PV}"
+COMMIT_HASH="13414ec9b84c299631e5100744f2b83923cba3c8"
+
+DESCRIPTION="Open source RGB lighting control that doesn't depend on manufacturer software"
+HOMEPAGE="https://gitlab.com/CalcProgrammer1/OpenRGB/"
+SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_0.2/${P}.tar.bz2"
+S="${WORKDIR}/${MY_P}-${COMMIT_HASH}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/hidapi:=
+ dev-libs/libbsd:=
+ dev-qt/qtcore:5=
+ dev-qt/qtgui:5=
+ dev-qt/qtwidgets:5=
+ virtual/libusb:1
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/OpenRGB-0.2-build-system.patch"
+ "${FILESDIR}/OpenRGB-0.2-use-system-hidapi.patch"
+ "${FILESDIR}/OpenRGB-0.2-install.patch"
+)
+
+src_prepare() {
+ default
+ rm -rf dependencies/{hidapi,libusb}* || die
+}
+
+src_configure() {
+ eqmake5
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+
+ dodoc README.md
+
+ make_desktop_entry ${PN} ${PN} ${PN} 'System;Monitor;HardwareSettings;'
+}
diff --git a/app-misc/OpenRGB/files/OpenRGB-0.2-build-system.patch b/app-misc/OpenRGB/files/OpenRGB-0.2-build-system.patch
new file mode 100644
index 000000000000..b2cd6cbd1d58
--- /dev/null
+++ b/app-misc/OpenRGB/files/OpenRGB-0.2-build-system.patch
@@ -0,0 +1,14 @@
+diff --git a/OpenRGB.pro b/OpenRGB.pro
+index 91e0079..7f279dd 100644
+--- a/OpenRGB.pro
++++ b/OpenRGB.pro
+@@ -8,9 +8,6 @@ TEMPLATE = app
+ VERSION = 0.2
+ win32:BUILDDATE = $$system(date /t)
+ unix:BUILDDATE = $$system(date -R)
+-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.2-install.patch b/app-misc/OpenRGB/files/OpenRGB-0.2-install.patch
new file mode 100644
index 000000000000..745efe57b2c8
--- /dev/null
+++ b/app-misc/OpenRGB/files/OpenRGB-0.2-install.patch
@@ -0,0 +1,23 @@
+diff --git a/OpenRGB.pro b/OpenRGB.pro
+index 9553b1f..fb4e4be 100644
+--- a/OpenRGB.pro
++++ b/OpenRGB.pro
+@@ -389,3 +389,18 @@ unix:SOURCES += \
+ RGBController/OpenRazerDetect.cpp \
+ RGBController/RGBController_Faustus.cpp \
+ RGBController/RGBController_OpenRazer.cpp \
++
++ #-------------------------------------------------------------------#
++ # Set up install paths #
++ # These install paths are used for AppImage and .deb packaging #
++ #-------------------------------------------------------------------#
++ isEmpty(PREFIX) {
++ PREFIX = /usr
++ }
++
++ target.path=$$PREFIX/bin/
++ desktop.path=$$PREFIX/share/applications/
++ desktop.files+=qt/OpenRGB.desktop
++ pixmap.path=$$PREFIX/share/pixmaps/
++ pixmap.files+=qt/OpenRGB.png
++ INSTALLS += target desktop pixmap
diff --git a/app-misc/OpenRGB/files/OpenRGB-0.2-use-system-hidapi.patch b/app-misc/OpenRGB/files/OpenRGB-0.2-use-system-hidapi.patch
new file mode 100644
index 000000000000..51ca8fca5ccf
--- /dev/null
+++ b/app-misc/OpenRGB/files/OpenRGB-0.2-use-system-hidapi.patch
@@ -0,0 +1,57 @@
+diff --git a/OpenRGB.pro b/OpenRGB.pro
+index 91e0079..306085b 100644
+--- a/OpenRGB.pro
++++ b/OpenRGB.pro
+@@ -23,7 +23,6 @@ RC_ICONS = qt/OpenRGB.ico
+
+ INCLUDEPATH += \
+ dependencies/ColorWheel \
+- dependencies/hidapi \
+ dependencies/libe131/src/ \
+ i2c_smbus/ \
+ i2c_tools/ \
+@@ -64,7 +63,6 @@ INCLUDEPATH += \
+
+ SOURCES += \
+ dependencies/ColorWheel/ColorWheel.cpp \
+- dependencies/hidapi/hidapi.c \
+ dependencies/libe131/src/e131.c \
+ main.cpp \
+ cli.cpp \
+@@ -288,6 +286,7 @@ FORMS += \
+ # Windows specific project configuration
+ #-----------------------------------------------
+ win32:INCLUDEPATH += \
++ dependencies/hidapi \
+ dependencies/inpout32_1501/Win32/ \
+ dependencies/libusb-1.0.22/include \
+ dependencies/NVFC \
+@@ -295,6 +294,7 @@ win32:INCLUDEPATH += \
+ wmi/ \
+
+ win32:SOURCES += \
++ dependencies/hidapi/hidapi.c \
+ dependencies/NVFC/nvapi.cpp \
+ i2c_smbus/i2c_smbus_i801.cpp \
+ i2c_smbus/i2c_smbus_nct6775.cpp \
+@@ -369,6 +369,20 @@ unix:LIBS += \
+ -lusb-1.0 \
+ -lstdc++fs \
+
++ #-------------------------------------------------------------------#
++ # Determine which hidapi to use based on availability #
++ #-------------------------------------------------------------------#
++ packagesExist(hidapi-libusb) {
++ LIBS += -lhidapi-libusb
++ } else {
++ packagesExist(hidapi) {
++ LIBS += -lhidapi
++ } else {
++ LIBS += -lhidapi-libusb
++ }
++ }
++
++
+ unix:SOURCES += \
+ i2c_smbus/i2c_smbus_linux.cpp \
+ serial_port/find_usb_serial_port_linux.cpp \
diff --git a/app-misc/OpenRGB/metadata.xml b/app-misc/OpenRGB/metadata.xml
new file mode 100644
index 000000000000..cee379b15409
--- /dev/null
+++ b/app-misc/OpenRGB/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+</pkgmetadata>