Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/utimer/files/, app-misc/utimer/
Date: Mon, 28 Dec 2020 11:50:50
Message-Id: 1609156211.1f02614a2f744c3bc9073a1cc4984a875747bc96.soap@gentoo
1 commit: 1f02614a2f744c3bc9073a1cc4984a875747bc96
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Mon Dec 28 11:50:11 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 28 11:50:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f02614a
7
8 app-misc/utimer: Port to EAPI 7
9
10 * Thanks to Jeroen Roovers for submitting the fno-common patch
11
12 Closes: https://bugs.gentoo.org/717250
13 Closes: https://bugs.gentoo.org/709300
14 Package-Manager: Portage-3.0.9, Repoman-3.0.1
15 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
16 Signed-off-by: David Seifert <soap <AT> gentoo.org>
17
18 app-misc/utimer/files/utimer-0.4-fno-common.patch | 29 +++++++++++++++++++++++
19 app-misc/utimer/files/utimer-0.4-locale.patch | 10 ++++++++
20 app-misc/utimer/utimer-0.4-r1.ebuild | 24 +++++++++----------
21 3 files changed, 50 insertions(+), 13 deletions(-)
22
23 diff --git a/app-misc/utimer/files/utimer-0.4-fno-common.patch b/app-misc/utimer/files/utimer-0.4-fno-common.patch
24 new file mode 100644
25 index 00000000000..a8386fe8e21
26 --- /dev/null
27 +++ b/app-misc/utimer/files/utimer-0.4-fno-common.patch
28 @@ -0,0 +1,29 @@
29 +--- a/src/utimer.h
30 ++++ b/src/utimer.h
31 +@@ -66,9 +66,9 @@
32 + #define TIMER_PRINT_RATE_MSEC 79
33 + #define TIMER_CHECK_RATE_MSEC 500
34 +
35 +-GMainLoop *loop;
36 +-gboolean paused;
37 +-struct termios savedttystate;
38 +-Config ut_config;
39 ++extern GMainLoop *loop;
40 ++extern gboolean paused;
41 ++extern struct termios savedttystate;
42 ++extern Config ut_config;
43 +
44 + #endif /* UTIMER_H */
45 +--- a/src/utils.c
46 ++++ b/src/utils.c
47 +@@ -36,6 +36,10 @@
48 + #include "utils.h"
49 + #include "utimer.h"
50 +
51 ++GMainLoop *loop;
52 ++gboolean paused;
53 ++struct termios savedttystate;
54 ++Config ut_config;
55 +
56 + gulong ul_add (gulong a, gulong b)
57 + {
58
59 diff --git a/app-misc/utimer/files/utimer-0.4-locale.patch b/app-misc/utimer/files/utimer-0.4-locale.patch
60 new file mode 100644
61 index 00000000000..68acdd471a3
62 --- /dev/null
63 +++ b/app-misc/utimer/files/utimer-0.4-locale.patch
64 @@ -0,0 +1,10 @@
65 +--- a/src/utimer.h
66 ++++ b/src/utimer.h
67 +@@ -35,6 +35,7 @@
68 + #include <stdlib.h>
69 + #include <glib.h>
70 + #include <glib/gi18n-lib.h>
71 ++#include <locale.h>
72 +
73 + #include "utils.h"
74 + #include "timer.h"
75
76 diff --git a/app-misc/utimer/utimer-0.4-r1.ebuild b/app-misc/utimer/utimer-0.4-r1.ebuild
77 index bf5c8f9fd36..d3055fbb083 100644
78 --- a/app-misc/utimer/utimer-0.4-r1.ebuild
79 +++ b/app-misc/utimer/utimer-0.4-r1.ebuild
80 @@ -1,7 +1,7 @@
81 -# Copyright 1999-2018 Gentoo Foundation
82 +# Copyright 1999-2020 Gentoo Authors
83 # Distributed under the terms of the GNU General Public License v2
84
85 -EAPI=6
86 +EAPI=7
87
88 DESCRIPTION="A command line timer and stopwatch"
89 HOMEPAGE="http://utimer.codealpha.net/utimer"
90 @@ -12,21 +12,19 @@ SLOT="0"
91 KEYWORDS="amd64 x86"
92 IUSE="debug nls"
93
94 -DEPEND="
95 +RDEPEND="
96 dev-libs/glib:2
97 dev-util/intltool"
98 +DEPEND="${RDEPEND}"
99
100 -RDEPEND="${RDEPEND}"
101 -
102 +PATCHES=(
103 + "${FILESDIR}"/${P}-fno-common.patch
104 + "${FILESDIR}"/${P}-locale.patch
105 +)
106 DOCS=( AUTHORS ChangeLog NEWS README )
107
108 src_configure() {
109 - local myconf=( --enable-debug=no )
110 - use debug || myconf=( --enable-debug=yes )
111 - econf "${myconf[@]}" $(use_enable nls)
112 -}
113 -
114 -src_install() {
115 - emake install DESTDIR="${D}"
116 - einstalldocs
117 + econf \
118 + $(use_enable debug) \
119 + $(use_enable nls)
120 }