mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
app-misc/OpenRGB: New package
Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
This commit is contained in:
1
app-misc/OpenRGB/Manifest
Normal file
1
app-misc/OpenRGB/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST OpenRGB-0.2.tar.bz2 2064388 BLAKE2B 0001a4f66576cd26e04a87abb2f7d36df243c5d45b449f689a51d7523f6f26079622d58aa1f33166f52634326552ba1788344ff5f6034ceb9123dbc1eadb992b SHA512 06b5026c014674097c5f6b9ad54b1232f9aaa192663dd6324a402be8d12169e648b8ed4e748b4aebd970538519a88203621b45d8cb794fc0e6bae562e15c5f2b
|
||||
55
app-misc/OpenRGB/OpenRGB-0.2.ebuild
Normal file
55
app-misc/OpenRGB/OpenRGB-0.2.ebuild
Normal file
@@ -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;'
|
||||
}
|
||||
14
app-misc/OpenRGB/files/OpenRGB-0.2-build-system.patch
Normal file
14
app-misc/OpenRGB/files/OpenRGB-0.2-build-system.patch
Normal file
@@ -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\\"\"\" \
|
||||
23
app-misc/OpenRGB/files/OpenRGB-0.2-install.patch
Normal file
23
app-misc/OpenRGB/files/OpenRGB-0.2-install.patch
Normal file
@@ -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
|
||||
57
app-misc/OpenRGB/files/OpenRGB-0.2-use-system-hidapi.patch
Normal file
57
app-misc/OpenRGB/files/OpenRGB-0.2-use-system-hidapi.patch
Normal file
@@ -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 \
|
||||
8
app-misc/OpenRGB/metadata.xml
Normal file
8
app-misc/OpenRGB/metadata.xml
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user