diff options
author | Alexey Sokolov <alexey+gentoo@asokolov.org> | 2022-08-23 01:00:59 +0100 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2022-08-26 16:57:01 -0700 |
commit | e8d6ff8b97cc3de656480dc68436973c9572e877 (patch) | |
tree | 786fd40d8a4ef6207f7a4a7ad9dd3a8b03b1d9a0 /app-misc/openrgb | |
parent | app-misc/openrgb-plugin-visualmap: drop old (diff) | |
download | gentoo-e8d6ff8b97cc3de656480dc68436973c9572e877.tar.gz gentoo-e8d6ff8b97cc3de656480dc68436973c9572e877.tar.bz2 gentoo-e8d6ff8b97cc3de656480dc68436973c9572e877.zip |
app-misc/openrgb: use udev eclass
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
Closes: https://bugs.gentoo.org/854762
Closes: https://github.com/gentoo/gentoo/pull/26969
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'app-misc/openrgb')
-rw-r--r-- | app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch | 15 | ||||
-rw-r--r-- | app-misc/openrgb/openrgb-0.7-r1.ebuild | 81 | ||||
-rw-r--r-- | app-misc/openrgb/openrgb-9999.ebuild | 13 |
3 files changed, 107 insertions, 2 deletions
diff --git a/app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch b/app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch new file mode 100644 index 000000000000..54646dc66a50 --- /dev/null +++ b/app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch @@ -0,0 +1,15 @@ +Don't install udev rules + +This is handled by udev eclass instead + +--- a/OpenRGB.pro ++++ b/OpenRGB.pro +@@ -1246,7 +1246,5 @@ unix:!macx { + icon.files+=qt/OpenRGB.png + metainfo.path=$$PREFIX/share/metainfo/ + metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml +- rules.path=$$PREFIX/lib/udev/rules.d/ +- rules.files+=60-openrgb.rules + INSTALLS += target desktop icon metainfo rules + } +GitLab diff --git a/app-misc/openrgb/openrgb-0.7-r1.ebuild b/app-misc/openrgb/openrgb-0.7-r1.ebuild new file mode 100644 index 000000000000..f3ee7086508d --- /dev/null +++ b/app-misc/openrgb/openrgb-0.7-r1.ebuild @@ -0,0 +1,81 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic qmake-utils udev + +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" +# subslot is OPENRGB_PLUGIN_API_VERSION from https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/OpenRGBPluginInterface.h +SLOT="0/2" + +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.7-plugins.patch + "${FILESDIR}"/OpenRGB-0.7-r1-udev.patch + "${FILESDIR}"/OpenRGB-0.7-json.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 + 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() { + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/app-misc/openrgb/openrgb-9999.ebuild b/app-misc/openrgb/openrgb-9999.ebuild index f9e079015112..44c450e3c857 100644 --- a/app-misc/openrgb/openrgb-9999.ebuild +++ b/app-misc/openrgb/openrgb-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit flag-o-matic qmake-utils +inherit flag-o-matic qmake-utils udev if [[ ${PV} == *9999* ]]; then inherit git-r3 @@ -41,7 +41,7 @@ BDEPEND=" PATCHES+=( "${FILESDIR}"/OpenRGB-0.7-plugins.patch - "${FILESDIR}"/OpenRGB-0.7-udev.patch + "${FILESDIR}"/OpenRGB-0.7-r1-udev.patch ) src_prepare() { @@ -64,8 +64,17 @@ src_install() { emake INSTALL_ROOT="${ED}" install dodoc README.md OpenRGB.patch + 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() { + udev_reload +} + +pkg_postrm() { + udev_reload +} |