repo/gentoo:master commit in: app-misc/openrgb/files/, app-misc/openrgb/

Maciej Barć <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786834905.0fc82384cd708aefb3f80e69bbbe7d278d04f61f.xgqt@gentoo>
commit:     0fc82384cd708aefb3f80e69bbbe7d278d04f61f
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sun Jul 12 18:27:34 2026 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 23:01:45 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fc82384

app-misc/openrgb: add 1.0_rc3

Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/1399
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 app-misc/openrgb/Manifest                          |   1 +
 .../openrgb/files/OpenRGB-1.0rc3-mbedtls.patch     |  30 ++++++
 app-misc/openrgb/openrgb-1.0_rc3.ebuild            | 108 +++++++++++++++++++++
 3 files changed, 139 insertions(+)

diff --git a/app-misc/openrgb/Manifest b/app-misc/openrgb/Manifest
index a11f7735cb48..08d78ba95dc2 100644
--- a/app-misc/openrgb/Manifest
+++ b/app-misc/openrgb/Manifest
@@ -1 +1,2 @@
 DIST OpenRGB-release_candidate_1.0rc2.tar.bz2 10326188 BLAKE2B 72188e13dff896815ba65426df0badc36d50180a62c33d341a793ff2530a975ae0ba449fc3c1b82e0fb0829d3e22c1af10d0cf070d52d8049f2142614a3a6a5b SHA512 2d5a1b21ad03b2e5f90a826c4b5ffdc39802fa257bdc8a5e56b18a52c3fd6178bb961d1969c9629a3a5c8dcf5807689d957bd9200ce993e88e7cb1024f3dacbf
+DIST OpenRGB-release_candidate_1.0rc3.tar.bz2 10465021 BLAKE2B 779205152ec6be6e8052e5dac913bd7a19adee1ab4adda7f72b5c274220da58e55e6294167216e9bbfd68fea98e16ee08c730eff45ef4d84bc7f373b5641ac69 SHA512 418791de68f309a39cd832096ba5cc460c914fdbcd26ed015309b968cb0fa0f17eec00ec710d6a8283bede24728c7561e87b058ded5056cd05ae407ab7c507a6

diff --git a/app-misc/openrgb/files/OpenRGB-1.0rc3-mbedtls.patch b/app-misc/openrgb/files/OpenRGB-1.0rc3-mbedtls.patch
new file mode 100644
index 000000000000..93e93a6ceaae
--- /dev/null
+++ b/app-misc/openrgb/files/OpenRGB-1.0rc3-mbedtls.patch
@@ -0,0 +1,30 @@
+Use net-libs/mbedtls:3 instead of :0
+Upstream intended to use 3, but in gentoo the naming is different
+
+https://gitlab.com/CalcProgrammer1/OpenRGB/-/merge_requests/2728
+https://bugs.gentoo.org/963058
+
+--- a/OpenRGB.pro
++++ b/OpenRGB.pro
+@@ -464,6 +464,7 @@ contains(QMAKE_PLATFORM, linux) {
+     CONFIG += link_pkgconfig
+ 
+     PKGCONFIG +=                                                                                \
++    mbedtls-3 mbedx509-3 mbedcrypto-3 \
+     libusb-1.0
+ 
+     TARGET = $$lower($$TARGET)
+@@ -482,13 +483,8 @@ contains(QMAKE_PLATFORM, linux) {
+     INCLUDEPATH +=                                                                              \
+     dependencies/NVFC                                                                           \
+     i2c_smbus/Linux                                                                             \
+-    /usr/include/mbedtls/                                                                       \
+ 
+     LIBS +=                                                                                     \
+-    -L/usr/lib/mbedtls/                                                                         \
+-    -lmbedx509                                                                                  \
+-    -lmbedtls                                                                                   \
+-    -lmbedcrypto                                                                                \
+     -ldl                                                                                        \
+ 
+     COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion")

diff --git a/app-misc/openrgb/openrgb-1.0_rc3.ebuild b/app-misc/openrgb/openrgb-1.0_rc3.ebuild
new file mode 100644
index 000000000000..e9aeb1f7c9f4
--- /dev/null
+++ b/app-misc/openrgb/openrgb-1.0_rc3.ebuild
@@ -0,0 +1,108 @@
+# Copyright 2020-2026 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
+	MY_PV=$(ver_rs 2 "")
+	SRC_URI="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_candidate_${MY_PV}/OpenRGB-release_candidate_${MY_PV}.tar.bz2"
+	S="${WORKDIR}/OpenRGB-release_candidate_${MY_PV}"
+	KEYWORDS="~amd64 ~loong"
+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/4"
+
+RDEPEND="
+	dev-cpp/cpp-httplib:=
+	dev-libs/hidapi
+	dev-qt/qtbase:6[gui,widgets]
+	net-libs/mbedtls:3=
+	virtual/libusb:1
+"
+DEPEND="
+	${RDEPEND}
+	dev-cpp/nlohmann_json
+	dev-libs/mdns
+	dev-libs/stb
+"
+BDEPEND="
+	dev-qt/qttools:6[linguist]
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/OpenRGB-0.7-r1-udev.patch
+	"${FILESDIR}"/OpenRGB-0.9-udev-check.patch
+	"${FILESDIR}"/OpenRGB-1.0rc3-mbedtls.patch
+)
+if [[ ${PV} != *9999* ]]; then
+	PATCHES+=( "${FILESDIR}"/openrgb-0.9_p20250802-build-system.patch )
+fi
+
+CHECKREQS_DISK_BUILD="2G"
+
+src_prepare() {
+	default
+
+	rm -r dependencies/{httplib,hidapi,libusb,mdns,json,mbedtls,stb}* \
+		|| 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
+
+	# cpp-httplib >=0.16.0 changed the library name from "httplib" to "cpp-httplib".
+	# See bug: https://bugs.gentoo.org/934576
+	local -a libs=()
+	if has_version "<dev-cpp/cpp-httplib-0.16.0" ; then
+		libs+=( -lhttplib )
+	else
+		libs+=( -lcpp-httplib )
+	fi
+
+	eqmake6 \
+		INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
+		INCLUDEPATH+="${ESYSROOT}/usr/include/stb" \
+		OPENRGB_SYSTEM_PLUGIN_DIRECTORY="${EPREFIX}/usr/$(get_libdir)/openrgb/plugins" \
+		LIBS+="${libs[@]}" \
+		PREFIX="${EPREFIX}/usr"
+}
+
+src_install() {
+	emake INSTALL_ROOT="${ED}" install
+
+	dodoc README.md
+
+	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
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.