summaryrefslogtreecommitdiff
path: root/app-misc/razertool/razertool-0.0.7-r4.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/razertool/razertool-0.0.7-r4.ebuild')
-rw-r--r--app-misc/razertool/razertool-0.0.7-r4.ebuild22
1 files changed, 14 insertions, 8 deletions
diff --git a/app-misc/razertool/razertool-0.0.7-r4.ebuild b/app-misc/razertool/razertool-0.0.7-r4.ebuild
index 916571dbd9e0..5255af99c271 100644
--- a/app-misc/razertool/razertool-0.0.7-r4.ebuild
+++ b/app-misc/razertool/razertool-0.0.7-r4.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit eutils
+inherit autotools eutils
DESCRIPTION="Unofficial tool for controlling the Razer Copperhead mouse"
HOMEPAGE="http://razertool.sourceforge.net/"
@@ -13,10 +13,10 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gtk"
-RDEPEND="virtual/libusb:0
+RDEPEND="dev-libs/glib:2
+ virtual/libusb:0
gtk? (
dev-libs/atk
- dev-libs/glib:2
>=gnome-base/librsvg-2.0
>=x11-libs/cairo-1.0.0
x11-libs/gdk-pixbuf
@@ -27,17 +27,21 @@ DEPEND="${RDEPEND}
DOCS=( AUTHORS ChangeLog NEWS README )
+PATCHES=( "${FILESDIR}"/${P}-ar.patch )
+
src_prepare() {
default
sed -i razertool.rules.example \
-e 's:ACTION=="add", ::;s:BUS=:SUBSYSTEMS=:;s:SYSFS{:ATTRS{:g' \
- || die "sed razertool.rules.example action failed"
+ || die
# plugdev group may not exist (created by hal), default to usb
sed -i razertool.rules.example \
-e 's:plugdev:usb:' \
- || die "sed razertool.rules.example plugdev failed"
+ || die
+
+ eautoreconf
}
src_configure() {
@@ -51,8 +55,10 @@ src_install() {
newins razertool.rules.example 90-razertool.rules
# Icon and desktop entry
- dosym ../razertool/pixmaps/razertool-icon.png /usr/share/pixmaps/razertool-icon.png
- make_desktop_entry "razertool-gtk" "RazerTool" ${PN}-icon "GTK;Settings;HardwareSettings"
+ if use gtk; then
+ dosym ../razertool/pixmaps/razertool-icon.png /usr/share/pixmaps/razertool-icon.png
+ make_desktop_entry "razertool-gtk" "RazerTool" ${PN}-icon "GTK;Settings;HardwareSettings"
+ fi
}
pkg_postinst() {