summaryrefslogtreecommitdiff
path: root/app-misc/openrgb/openrgb-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-24 14:47:38 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-24 14:47:38 +0100
commitb4d43e8c611df4a8061b6f88d9e9f6b1e3c83903 (patch)
tree911928b566777494d08ebe2c16cb64f15af71901 /app-misc/openrgb/openrgb-9999.ebuild
parent61f10f985e19dfe20a4d9552902625edd5b6eabb (diff)
gentoo resync : 24.06.2021
Diffstat (limited to 'app-misc/openrgb/openrgb-9999.ebuild')
-rw-r--r--app-misc/openrgb/openrgb-9999.ebuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/app-misc/openrgb/openrgb-9999.ebuild b/app-misc/openrgb/openrgb-9999.ebuild
new file mode 100644
index 000000000000..9ea0dfa538ff
--- /dev/null
+++ b/app-misc/openrgb/openrgb-9999.ebuild
@@ -0,0 +1,76 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic qmake-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"
+ S="${WORKDIR}/OpenRGB-release_${PV}"
+ KEYWORDS="~amd64 ~x86"
+ PATCHES=(
+ "${FILESDIR}"/OpenRGB-0.5-build-system.patch
+ )
+fi
+
+DESCRIPTION="Open source RGB lighting control that doesn't depend on manufacturer software"
+HOMEPAGE="https://openrgb.org https://gitlab.com/CalcProgrammer1/OpenRGB/"
+LICENSE="GPL-2"
+SLOT="0/1"
+
+RDEPEND="
+ dev-libs/hidapi:=
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ net-libs/mbedtls:=
+ virtual/libusb:1
+"
+DEPEND="
+ ${RDEPEND}
+ dev-cpp/nlohmann_json
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+PATCHES+=(
+ "${FILESDIR}"/OpenRGB-0.6-pkgconf.patch
+ "${FILESDIR}"/OpenRGB-0.6-plugins.patch
+)
+
+src_prepare() {
+ default
+ rm -r dependencies/{hidapi,libusb,json,mbedtls}* || die
+}
+
+src_configure() {
+ # Some plugins require symbols defined in the main binary.
+ # The official build system bundles OpenRGB as a submodule instead, and
+ # compiles the .cpp file again.
+ append-ldflags -Wl,--export-dynamic
+
+ eqmake5 \
+ INCLUDEPATH+="${ESYSROOT}/usr/include/nlohmann" \
+ DEFINES+="GENTOO_PLUGINS_DIR=\\\\\"\\\"${EPREFIX}/usr/$(get_libdir)/OpenRGB/plugins\\\\\"\\\""
+}
+
+src_install() {
+ emake INSTALL_ROOT="${ED}" install
+
+ dodoc README.md OpenRGB.patch
+
+ # This is for plugins. Upstream doesn't install any headers at all.
+ insinto /usr/include/OpenRGB
+ doins *.h
+ insinto /usr/include/OpenRGB/RGBController
+ doins RGBController/*.h
+ insinto /usr/include/OpenRGB/i2c_smbus
+ doins i2c_smbus/*.h
+ insinto /usr/include/OpenRGB/net_port
+ doins net_port/*.h
+}