summaryrefslogtreecommitdiff
path: root/app-misc/openrgb
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/openrgb')
-rw-r--r--app-misc/openrgb/Manifest4
-rw-r--r--app-misc/openrgb/openrgb-0.9-r2.ebuild107
-rw-r--r--app-misc/openrgb/openrgb-9999.ebuild3
3 files changed, 113 insertions, 1 deletions
diff --git a/app-misc/openrgb/Manifest b/app-misc/openrgb/Manifest
index 0d97a097b493..2f2012448efe 100644
--- a/app-misc/openrgb/Manifest
+++ b/app-misc/openrgb/Manifest
@@ -1,7 +1,9 @@
AUX OpenRGB-0.7-r1-udev.patch 410 BLAKE2B 10e4ba5cc32abed1c5c6bf15426033b03c36929d0d54d247235793193d8e0df26dbd10e1a63edb626a88fbbc5b532f00fac997589afb8885205dad2f53022378 SHA512 0714dc6432fa0d75a8867079d6056f6dc35b98dd62da512643df8649cb2e6bf8de85408485e2b47b2707efef8727789549a216c8adf72447fd084320b1a8e931
AUX OpenRGB-0.9-build-system.patch 667 BLAKE2B 905d0c4a73439b0f39bfbebc74fbcb43f7df8f5810869834f2cf72c200d8df5d189843977c359eb50acbba23cedae97f245b74870ee7e200319b911ad05c15c6 SHA512 9348c1cc2474ac2d2cfc7e9c4a215e1692310b53ceb42db927bac31e954f34e6f4b70956cf671cb2fbf49add7a9358373bff11b43cdb11526a4c059d10b80762
AUX OpenRGB-0.9-udev-check.patch 342 BLAKE2B 9778b67d7e99ae0c4fecef5295c248c39784123a413cd4f7c8847642c2d439c1fd985c6bb21302d5a80ef877c3961dd9cf7ee68e273cea9a9e2f9d3135e56cdd SHA512 0949be76e4fed14dff55ce914364d84ed03c0fa851a6372be6eb8554922130fca6bfb55cd4b229f2f5ab62f88b37e107d4b668c0a7c10a8ece40c564b88d3f49
+DIST OpenRGB-0.9-odr.patch 90600 BLAKE2B 1cb0aaab997da90b5cf6fbf1e971cef6848d4372ba021d27efed070ff2c398074d7b79623a1669995bbdaaacae1c5a9ff09344ef0cab7098e9354f95d005b856 SHA512 5f2a5194419d14b97dc2e8ca47a2b9914c01148cfb24d61266a8a9615f6d09509906d7e69d8264ddbde71474955f789925b400f29682d12779c2a3d38a4bd6eb
DIST OpenRGB-release_0.9.tar.bz2 28689813 BLAKE2B 9fcf08d5e4d07ffc0f7867516f09044e18ce488bcdd99c8b44e0afe291b8a21a7ba92d6e7fd683ef22462a262004a992621efb59a5df6ed7551f4e9f75843241 SHA512 fb1bdbc7bcbd3bac888be313cfb6403a13d39de659ac6993858f9c1b17ad40e9c4a7d4c7c90682181841db1659a0ee298363c442a7120d43347aaf4485e7dccf
EBUILD openrgb-0.9-r1.ebuild 2567 BLAKE2B 9dd5201c778581da0f935d8dc51b435d5490c3eee25db4705009a840985dc99785fdc132b1a2b0938df4374275196671c8913482695723081c78d9d36589a31e SHA512 e944832053c687afc194ce669fea2bfb3d1a6bdb0b3cd729d7a7ec483b20d91338fb728c36f2b0e605c142c3d57964930589851b32075d5457c3715e7f32bcc1
-EBUILD openrgb-9999.ebuild 2554 BLAKE2B 5daae296084827b7f12e0f6059b7d0ea178f00032e14c4ff5ef83a82970df54e67b5ffdec6056ed2f92933751b06f1f70215e53864d7c3938e00bef1853a0119 SHA512 f81db894d50137289e32cc1dbfeb1c1fc5369bd66bcf05e0eb8cdd280a9cc0d32802a62e92b79e889a772ddbee8869babd694a28d6a2d0bdda1e31e8308e1197
+EBUILD openrgb-0.9-r2.ebuild 2826 BLAKE2B b3e9c8ac82e1f98a5b425b9f5cb5b1451db103666d32008468e7755df8b0d30aa06ab46d07c787d06c0f63f1f5316c116f0d1a97b16d8fb470230e86a4513b6f SHA512 13a6da3f292857fe873416d80099f506153b58a6e0936169ed25d7096c5f74b7d00dbd43eef64b1f6d9d19cfe092cf15cb1cf9d32d03336e2c4474018680b2a9
+EBUILD openrgb-9999.ebuild 2718 BLAKE2B b26fe493ac0ea5acc36e9c5fbab70067c6bd6d84f3ad47809e4d621320084d64b7f0af61e8c7303381ecdeebd371e38164fb192773b91f0de931b87ef260bd2e SHA512 a87dcd2a0b4696c3ca6ed7bc56f19248c1bba2ebabc0f78ad076d48cde08c78a1edb21b2a51dc889366ec45760f8a7b00c28476d5a00f1ef02160e6b91f0696c
MISC metadata.xml 1228 BLAKE2B b3844d9c8b09d9d976ee41d874675b179a8e38b1eaaaa06e3052d6bac824dfc8c67102de54d9f62a3f24e4cf0157825608c060a56de2cc21bb71f8c7831148ad SHA512 5067cb355010ada60bfe789a511d02bf3d3a26083544104d782b9c08b0c70457f998c91c71f8d99e48f2d73fef07ea029fcc8c7848bdc5d625f5c1a8c9ca9ca3
diff --git a/app-misc/openrgb/openrgb-0.9-r2.ebuild b/app-misc/openrgb/openrgb-0.9-r2.ebuild
new file mode 100644
index 000000000000..2ecef34bd7de
--- /dev/null
+++ b/app-misc/openrgb/openrgb-0.9-r2.ebuild
@@ -0,0 +1,107 @@
+# Copyright 2020-2025 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
+ https://files.asokolov.org/gentoo/OpenRGB-0.9-odr.patch"
+ 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:0=
+ 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
+ "${DISTDIR}"/OpenRGB-0.9-odr.patch
+)
+
+CHECKREQS_DISK_BUILD="2G"
+
+src_prepare() {
+ default
+ rm -r dependencies/{httplib,hidapi,libusb,mdns,json,mbedtls}* \
+ || die "Failed to remove unneded deps"
+
+ rm dependencies/hueplusplus-1.0.0/include/json/json.hpp || die
+ echo "#include <nlohmann/json.hpp>" > dependencies/hueplusplus-1.0.0/include/json/json.hpp || die
+}
+
+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
+
+ eqmake5 \
+ INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
+ DEFINES+="OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\"" \
+ LIBS+="${libs[@]}"
+}
+
+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
index caf2ae3dcb8b..1d00eb21c792 100644
--- a/app-misc/openrgb/openrgb-9999.ebuild
+++ b/app-misc/openrgb/openrgb-9999.ebuild
@@ -52,6 +52,9 @@ src_prepare() {
default
rm -r dependencies/{httplib,hidapi,libusb,mdns,json,mbedtls}* \
|| die "Failed to remove unneded deps"
+
+ rm dependencies/hueplusplus-1.1.0/include/json/json.hpp || die
+ echo "#include <nlohmann/json.hpp>" > dependencies/hueplusplus-1.1.0/include/json/json.hpp || die
}
src_configure() {