Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/xautolock/files/, x11-misc/xautolock/
Date: Tue, 15 Jan 2019 10:35:08
Message-Id: 1547548497.075f311d7e8913f0a27f2247faac675ebb94d137.jer@gentoo
1 commit: 075f311d7e8913f0a27f2247faac675ebb94d137
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 15 10:34:18 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 15 10:34:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=075f311d
7
8 x11-misc/xautolock: Use waitpid() instead of wait3()
9
10 Fixes: https://bugs.gentoo.org/675242
11 Package-Manager: Portage-2.3.55, Repoman-2.3.12
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 .../files/xautolock-2.2_p5_p1-waitpid.patch | 25 ++++++++++
15 x11-misc/xautolock/metadata.xml | 11 +++++
16 x11-misc/xautolock/xautolock-2.2_p5_p1-r1.ebuild | 54 ++++++++++++++++++++++
17 3 files changed, 90 insertions(+)
18
19 diff --git a/x11-misc/xautolock/files/xautolock-2.2_p5_p1-waitpid.patch b/x11-misc/xautolock/files/xautolock-2.2_p5_p1-waitpid.patch
20 new file mode 100644
21 index 00000000000..98d96b2e2d3
22 --- /dev/null
23 +++ b/x11-misc/xautolock/files/xautolock-2.2_p5_p1-waitpid.patch
24 @@ -0,0 +1,25 @@
25 +--- a/src/engine.c
26 ++++ b/src/engine.c
27 +@@ -210,22 +210,14 @@ evaluateTriggers (Display* d)
28 + #else /* VMS */
29 + if (lockerPid)
30 + {
31 +-#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4)
32 +- union wait status; /* childs process status */
33 +-#else /* !UTEKV && !SYSV && !SVR4 */
34 + int status = 0; /* childs process status */
35 +-#endif /* !UTEKV && !SYSV && !SVR4 */
36 +
37 + if (unlockNow && !disabled)
38 + {
39 + (void) kill (lockerPid, SIGTERM);
40 + }
41 +
42 +-#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4)
43 +- if (wait3 (&status, WNOHANG, 0))
44 +-#else /* !UTEKV && !SYSV && !SVR4 */
45 + if (waitpid (-1, &status, WNOHANG))
46 +-#endif /* !UTEKV && !SYSV && !SVR4 */
47 + {
48 + /*
49 + * If the locker exited normally, we disable any pending kill
50
51 diff --git a/x11-misc/xautolock/metadata.xml b/x11-misc/xautolock/metadata.xml
52 index 2ba8e9e851e..b822c45366a 100644
53 --- a/x11-misc/xautolock/metadata.xml
54 +++ b/x11-misc/xautolock/metadata.xml
55 @@ -5,4 +5,15 @@
56 <email>desktop-misc@g.o</email>
57 <name>Gentoo Desktop Miscellaneous Project</name>
58 </maintainer>
59 +<longdescription lang='en'>
60 +If no user activity is detected after a set timeout, xautolock runs a program
61 +for you. If you want that program (with optional arguments) to be a screen
62 +locker, then one of these packages might fit your purpose:
63 + x11-misc/alock
64 + x11-misc/i3lock
65 + x11-misc/slim
66 + x11-misc/slock
67 + x11-misc/xlockmore
68 + x11-misc/xtrlock
69 +</longdescription>
70 </pkgmetadata>
71
72 diff --git a/x11-misc/xautolock/xautolock-2.2_p5_p1-r1.ebuild b/x11-misc/xautolock/xautolock-2.2_p5_p1-r1.ebuild
73 new file mode 100644
74 index 00000000000..63dd3677304
75 --- /dev/null
76 +++ b/x11-misc/xautolock/xautolock-2.2_p5_p1-r1.ebuild
77 @@ -0,0 +1,54 @@
78 +# Copyright 1999-2019 Gentoo Authors
79 +# Distributed under the terms of the GNU General Public License v2
80 +
81 +EAPI=6
82 +inherit toolchain-funcs versionator
83 +
84 +DESCRIPTION="An automatic X screen-locker/screen-saver"
85 +HOMEPAGE="http://www.ibiblio.org/pub/Linux/X11/screensavers/"
86 +
87 +DEB_REV_MAJ="$(get_version_component_range 3)"
88 +DEB_REV_MIN="$(get_version_component_range 4)"
89 +DEB_REVISION="${DEB_REV_MAJ/p}.${DEB_REV_MIN/p}"
90 +SRC_URI="
91 + ${HOMEPAGE}/${P/_p*/}.tgz
92 + mirror://debian/pool/main/x/${PN}/${PN}_${PV/_p*/}-${DEB_REVISION}.debian.tar.xz
93 +"
94 +LICENSE="GPL-2"
95 +SLOT="0"
96 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
97 +
98 +RDEPEND="
99 + x11-libs/libXScrnSaver
100 +"
101 +DEPEND="
102 + ${RDEPEND}
103 + app-text/rman
104 + x11-base/xorg-proto
105 + x11-misc/imake
106 +"
107 +PATCHES=(
108 + "${WORKDIR}"/debian/patches/10-fix-memory-corruption.patch
109 + "${WORKDIR}"/debian/patches/11-fix-no-dpms.patch
110 + "${WORKDIR}"/debian/patches/12-fix-manpage.patch
111 + "${WORKDIR}"/debian/patches/13-fix-hppa-build.patch
112 + "${FILESDIR}"/${PN}-2.2_p5_p1-waitpid.patch
113 +)
114 +S=${WORKDIR}/${P/_p*}
115 +
116 +src_configure() {
117 + xmkmf || die
118 +}
119 +
120 +src_compile() {
121 + emake \
122 + CC="$(tc-getCC)" \
123 + CDEBUGFLAGS="${CFLAGS}" \
124 + EXTRA_LDOPTIONS="${LDFLAGS}"
125 +}
126 +
127 +src_install () {
128 + dobin xautolock
129 + newman xautolock.man xautolock.1
130 + dodoc Changelog Readme Todo
131 +}