Gentoo Archives: gentoo-commits

From: Daniel Campbell <zlg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/udevil/, sys-apps/udevil/files/
Date: Mon, 02 Jan 2017 15:39:27
Message-Id: 1483371524.36c87cf957dbabcaccada42ba02570e7a7dd61e8.zlg@gentoo
1 commit: 36c87cf957dbabcaccada42ba02570e7a7dd61e8
2 Author: Daniel Campbell <zlg <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 15:38:26 2017 +0000
4 Commit: Daniel Campbell <zlg <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 15:38:44 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36c87cf9
7
8 sys-apps/udevil: revbump, fixes bug 580364
9
10 Upstream is adopting a similar fix and it won't be needed for 0.4.5.
11
12 Gentoo-Bug: 580364
13 Gentoo-Bug-URL: https://bugs.gentoo.org/580364
14
15 Package-Manager: Portage-2.3.3, Repoman-2.3.1
16
17 .../files/udevil-0.4.4-include-sysmacros.patch | 15 +++++
18 sys-apps/udevil/udevil-0.4.4-r2.ebuild | 75 ++++++++++++++++++++++
19 2 files changed, 90 insertions(+)
20
21 diff --git a/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros.patch b/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros.patch
22 new file mode 100644
23 index 00000000..7adda28
24 --- /dev/null
25 +++ b/sys-apps/udevil/files/udevil-0.4.4-include-sysmacros.patch
26 @@ -0,0 +1,15 @@
27 +# Include sysmacros.h, solves Gentoo bug 580364
28 +# Upstream has merged similar changes, should be present
29 +# in 0.4.5
30 +--- a/src/udevil.c 2015-05-04 06:34:32.000000000 -0700
31 ++++ b/src/udevil.c 2017-01-02 07:25:14.744273858 -0800
32 +@@ -33,6 +33,9 @@
33 + #include <netdb.h>
34 + #include <arpa/inet.h>
35 +
36 ++// major/minor, dev_t, needed for glibc>=2.25
37 ++#include <sys/sysmacros.h>
38 ++
39 + // groups
40 + #include <grp.h>
41 +
42
43 diff --git a/sys-apps/udevil/udevil-0.4.4-r2.ebuild b/sys-apps/udevil/udevil-0.4.4-r2.ebuild
44 new file mode 100644
45 index 00000000..864ac30
46 --- /dev/null
47 +++ b/sys-apps/udevil/udevil-0.4.4-r2.ebuild
48 @@ -0,0 +1,75 @@
49 +# Copyright 1999-2017 Gentoo Foundation
50 +# Distributed under the terms of the GNU General Public License v2
51 +# $Id$
52 +
53 +EAPI=6
54 +
55 +inherit eutils autotools user
56 +
57 +DESCRIPTION="mount and unmount removable devices without a password"
58 +HOMEPAGE="https://ignorantguru.github.com/udevil/"
59 +SRC_URI="https://github.com/IgnorantGuru/udevil/archive/${PV}.tar.gz -> ${P}.tar.gz"
60 +
61 +LICENSE="GPL-3"
62 +SLOT="0"
63 +KEYWORDS="~amd64 ~x86"
64 +IUSE=""
65 +
66 +RDEPEND=">=app-shells/bash-4.0:*
67 + dev-libs/glib:2
68 + sys-apps/util-linux
69 + virtual/acl
70 + >=virtual/udev-143"
71 +DEPEND="${RDEPEND}
72 + dev-util/intltool
73 + sys-devel/gettext
74 + virtual/pkgconfig"
75 +
76 +pkg_setup(){
77 + enewgroup plugdev
78 +}
79 +
80 +src_prepare() {
81 + # This works for 0.4.4 too, no sense copying the patch
82 + epatch "${FILESDIR}"/${PN}-0.4.3-flags.patch
83 + epatch "${FILESDIR}"/${P}-stat.patch
84 + epatch "${FILESDIR}"/${P}-include-sysmacros.patch
85 + eapply_user
86 + eautoreconf
87 +}
88 +
89 +src_configure() {
90 + econf \
91 + --with-setfacl-prog="$(type -P setfacl)" \
92 + --enable-systemd
93 +}
94 +
95 +src_install() {
96 + default
97 + fowners root:plugdev /usr/bin/udevil
98 + fperms 4754 /usr/bin/udevil
99 +}
100 +
101 +pkg_postinst() {
102 + einfo
103 + elog "Please add your user to the plugdev group"
104 + elog "to be able to use ${PN} as a user"
105 + elog
106 + elog "Optional dependencies:"
107 + elog " gnome-extra/zenity (devmon popups)"
108 + elog " net-fs/davfs2 (mount WebDAV resources)"
109 + elog " net-fs/cifs-utils (mounting samba shares)"
110 + elog " net-fs/curlftpfs (mounting ftp shares)"
111 + elog " net-fs/nfs-utils (mounting nfs shares)"
112 + elog " net-fs/sshfs (mounting sftp shares)"
113 + elog " virtual/eject (eject via devmon)"
114 + if ! has_version 'sys-fs/udisks' ; then
115 + elog
116 + elog "When using ${PN} without udisks, and without the udisks-daemon running,"
117 + elog "you may need to enable kernel polling for device media changes to be detected."
118 + elog "See https://ignorantguru.github.com/${PN}/#polling"
119 + has_version '<virtual/udev-173' && ewarn "You need at least udev-173"
120 + kernel_is lt 2 6 38 && ewarn "You need at least kernel 2.6.38"
121 + einfo
122 + fi
123 +}