Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/openrgb/files/, app-misc/openrgb/
Date: Tue, 11 Jan 2022 22:16:02
Message-Id: 1641939343.5be759e46625ccc5f76dfce36ef84de2de9c3ebf.chutzpah@gentoo
1 commit: 5be759e46625ccc5f76dfce36ef84de2de9c3ebf
2 Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
3 AuthorDate: Tue Jan 11 21:43:29 2022 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 11 22:15:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5be759e4
7
8 app-misc/openrgb: version 0.7
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 app-misc/openrgb/Manifest | 1 +
15 app-misc/openrgb/files/OpenRGB-0.7-udev.patch | 16 ++++++
16 app-misc/openrgb/openrgb-0.7.ebuild | 71 +++++++++++++++++++++++++++
17 3 files changed, 88 insertions(+)
18
19 diff --git a/app-misc/openrgb/Manifest b/app-misc/openrgb/Manifest
20 index 319d0a7ed289..7b8c113774cc 100644
21 --- a/app-misc/openrgb/Manifest
22 +++ b/app-misc/openrgb/Manifest
23 @@ -1 +1,2 @@
24 DIST OpenRGB-release_0.6.tar.bz2 24301305 BLAKE2B 20d8f8f7a3189fd5f94b008b11c869d2a8584dc038322e4ac8649c7b57172637133dd18c05ed8eaa6907ba7c097280727a9e7ce2e676250146044bbc2d66921e SHA512 9eb090e1cab121308f3adea8c50feb819a19cb52feff29e45ec24dfbb37013421f53d2ac614496781af1ef4e612dd41c1abafec509430df7d0715aba59ee5a32
25 +DIST OpenRGB-release_0.7.tar.bz2 28053114 BLAKE2B dfab42fca654478ab359e6e46133fc20a4bf32aca35d1b2f475d3e4e5e218f35c7e1f03be15381b0e8d874ea24254b88b8fe21548a4183b29b4c66647aeef516 SHA512 6ee605bfc91da14d34bc89fe75790f99548253e2d6aa088e20d1996577629bf15fe0fae09e65d983aa829f54cfcbd33e13f2c7d493a2776fd1723f8725b62186
26
27 diff --git a/app-misc/openrgb/files/OpenRGB-0.7-udev.patch b/app-misc/openrgb/files/OpenRGB-0.7-udev.patch
28 new file mode 100644
29 index 000000000000..a2feaf1c9378
30 --- /dev/null
31 +++ b/app-misc/openrgb/files/OpenRGB-0.7-udev.patch
32 @@ -0,0 +1,16 @@
33 +Install udev rules to correct dir
34 +
35 +Revert https://gitlab.com/CalcProgrammer1/OpenRGB/-/commit/ccbe83919a70be346eea948fb2c4122ef9f34214
36 +
37 +--- a/OpenRGB.pro
38 ++++ b/OpenRGB.pro
39 +@@ -1246,7 +1246,7 @@ unix:!macx {
40 + icon.files+=qt/OpenRGB.png
41 + metainfo.path=$$PREFIX/share/metainfo/
42 + metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml
43 ++ rules.path=/lib/udev/rules.d/
44 +- rules.path=$$PREFIX/lib/udev/rules.d/
45 + rules.files+=60-openrgb.rules
46 + INSTALLS += target desktop icon metainfo rules
47 + }
48 +GitLab
49
50 diff --git a/app-misc/openrgb/openrgb-0.7.ebuild b/app-misc/openrgb/openrgb-0.7.ebuild
51 new file mode 100644
52 index 000000000000..f9e079015112
53 --- /dev/null
54 +++ b/app-misc/openrgb/openrgb-0.7.ebuild
55 @@ -0,0 +1,71 @@
56 +# Copyright 2020-2022 Gentoo Authors
57 +# Distributed under the terms of the GNU General Public License v2
58 +
59 +EAPI=8
60 +
61 +inherit flag-o-matic qmake-utils
62 +
63 +if [[ ${PV} == *9999* ]]; then
64 + inherit git-r3
65 + EGIT_REPO_URI=${EGIT_REPO_URI:-"https://gitlab.com/CalcProgrammer1/OpenRGB"}
66 +else
67 + SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_${PV}/OpenRGB-release_${PV}.tar.bz2"
68 + S="${WORKDIR}/OpenRGB-release_${PV}"
69 + KEYWORDS="~amd64 ~x86"
70 + PATCHES=(
71 + "${FILESDIR}"/OpenRGB-0.5-build-system.patch
72 + )
73 +fi
74 +
75 +DESCRIPTION="Open source RGB lighting control that doesn't depend on manufacturer software"
76 +HOMEPAGE="https://openrgb.org https://gitlab.com/CalcProgrammer1/OpenRGB/"
77 +LICENSE="GPL-2"
78 +# subslot is OPENRGB_PLUGIN_API_VERSION from https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGBPluginInterface.h
79 +SLOT="0/2"
80 +
81 +RDEPEND="
82 + dev-libs/hidapi
83 + dev-qt/qtcore:5
84 + dev-qt/qtgui:5
85 + dev-qt/qtwidgets:5
86 + net-libs/mbedtls:=
87 + virtual/libusb:1
88 +"
89 +DEPEND="
90 + ${RDEPEND}
91 + dev-cpp/nlohmann_json
92 +"
93 +BDEPEND="
94 + virtual/pkgconfig
95 +"
96 +
97 +PATCHES+=(
98 + "${FILESDIR}"/OpenRGB-0.7-plugins.patch
99 + "${FILESDIR}"/OpenRGB-0.7-udev.patch
100 +)
101 +
102 +src_prepare() {
103 + default
104 + rm -r dependencies/{hidapi,libusb,json,mbedtls}* || die
105 +}
106 +
107 +src_configure() {
108 + # Some plugins require symbols defined in the main binary.
109 + # The official build system bundles OpenRGB as a submodule instead, and
110 + # compiles the .cpp file again.
111 + append-ldflags -Wl,--export-dynamic
112 +
113 + eqmake5 \
114 + INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
115 + DEFINES+="GENTOO_PLUGINS_DIR=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\""
116 +}
117 +
118 +src_install() {
119 + emake INSTALL_ROOT="${ED}" install
120 +
121 + dodoc README.md OpenRGB.patch
122 +
123 + # This is for plugins. Upstream doesn't install any headers at all.
124 + insinto /usr/include/OpenRGB
125 + find . -name '*.h' -exec cp --parents '{}' "${ED}/usr/include/OpenRGB/" ';' || die
126 +}