Skip to content

Commit

Permalink
app-misc/razertool: fix ar call, broken symlink
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/722326
Closes: https://bugs.gentoo.org/726668
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Bernard Cafarelli <[email protected]>
  • Loading branch information
voyageur committed Sep 3, 2020
1 parent b3ac3b6 commit 7f012ff
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
11 changes: 11 additions & 0 deletions app-misc/razertool/files/razertool-0.0.7-ar.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -Naur razertool-0.0.7.orig/configure.in razertool-0.0.7/configure.in
--- razertool-0.0.7.orig/configure.in 2006-08-13 21:57:35.000000000 +0200
+++ razertool-0.0.7/configure.in 2020-09-03 12:53:51.991020189 +0200
@@ -10,6 +10,7 @@
dnl checks for programs
AC_ISC_POSIX
AC_PROG_CC
+AM_PROG_AR
AM_PROG_CC_STDC
AC_PROG_RANLIB
AC_HEADER_STDC
18 changes: 12 additions & 6 deletions app-misc/razertool/razertool-0.0.7-r4.ebuild
Original file line number Diff line number Diff line change
@@ -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/"
Expand All @@ -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() {
Expand All @@ -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() {
Expand Down

0 comments on commit 7f012ff

Please sign in to comment.