commit:     e8d6ff8b97cc3de656480dc68436973c9572e877
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Tue Aug 23 00:00:59 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 23:57:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8d6ff8b

app-misc/openrgb: use udev eclass

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Closes: https://bugs.gentoo.org/854762
Closes: https://github.com/gentoo/gentoo/pull/26969
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 app-misc/openrgb/files/OpenRGB-0.7-r1-udev.patch          | 15 +++++++++++++++
 .../{openrgb-9999.ebuild => openrgb-0.7-r1.ebuild}        | 14 ++++++++++++--
 app-misc/openrgb/openrgb-9999.ebuild                      | 13 +++++++++++--
 3 files changed, 38 insertions(+), 4 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-9999.ebuild 
b/app-misc/openrgb/openrgb-0.7-r1.ebuild
similarity index 89%
copy from app-misc/openrgb/openrgb-9999.ebuild
copy to app-misc/openrgb/openrgb-0.7-r1.ebuild
index f9e079015112..f3ee7086508d 100644
--- a/app-misc/openrgb/openrgb-9999.ebuild
+++ b/app-misc/openrgb/openrgb-0.7-r1.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,8 @@ BDEPEND="
 
 PATCHES+=(
        "${FILESDIR}"/OpenRGB-0.7-plugins.patch
-       "${FILESDIR}"/OpenRGB-0.7-udev.patch
+       "${FILESDIR}"/OpenRGB-0.7-r1-udev.patch
+       "${FILESDIR}"/OpenRGB-0.7-json.patch
 )
 
 src_prepare() {
@@ -64,8 +65,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
+}

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
+}

Reply via email to