Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/grc/files/, app-misc/grc/
Date: Tue, 27 Dec 2016 17:58:08
Message-Id: 1482861481.a7c94ea7378777be84e57db7f0b3e18f3cf51550.jlec@gentoo
1 commit: a7c94ea7378777be84e57db7f0b3e18f3cf51550
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 27 17:51:30 2016 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 27 17:58:01 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7c94ea7
7
8 app-misc/grc: Version Bump
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 app-misc/grc/Manifest | 1 +
14 app-misc/grc/files/grc-1.9-bash.patch | 26 +++++++++++++
15 app-misc/grc/files/grc-1.9-configure.patch | 46 +++++++++++++++++++++++
16 app-misc/grc/files/grc-1.9-domain-match.patch | 22 +++++++++++
17 app-misc/grc/files/grc-1.9-python3.patch | 41 ++++++++++++++++++++
18 app-misc/grc/grc-1.9.ebuild | 54 +++++++++++++++++++++++++++
19 6 files changed, 190 insertions(+)
20
21 diff --git a/app-misc/grc/Manifest b/app-misc/grc/Manifest
22 index 7ed9f32..dd1fa43 100644
23 --- a/app-misc/grc/Manifest
24 +++ b/app-misc/grc/Manifest
25 @@ -1 +1,2 @@
26 +DIST grc-1.9.tar.gz 29252 SHA256 269ab717dc105c124f6eb48b4b8d3ab68660c0f1244eaea140f0188cb9af4b80 SHA512 947f4b61a8d4061e99d64e25a7b5ca2bcd042580b537ea07ea6ca609d7b81b1976b301de6036be2c199c7fa25c3f32d41a887f811ad72a1a18dd63d284e61050 WHIRLPOOL de7cc676aa1b73b93be632919293d0e0a38077bee2abfde8b3805886ffb51875851d9169216c711bda24eab34a2460da40d1796bd7ea909df4c9e47874b2c244
27 DIST grc_1.5.tar.gz 26363 SHA256 a2581f065236868bd8b09536616a588792f60fcba4e54d69e2cad65aae73dddc SHA512 6b95a8db5df0d99b49052deb086ac02b180810ce754c744e145e3e0508562fb632e7fdb38ec4ad039f6e998c4122b065ba53925d73268c589475e36c16aa68d7 WHIRLPOOL 1a4ee3612024c95d296772c43c1ed21ebb9e1d50e1fa4af13a6d09a1d63f59ec7f53084b68dbe0b7a4eb1300269ca714d8b972507d671e973b11822e1b4e82a9
28
29 diff --git a/app-misc/grc/files/grc-1.9-bash.patch b/app-misc/grc/files/grc-1.9-bash.patch
30 new file mode 100644
31 index 00000000..5e1dcda
32 --- /dev/null
33 +++ b/app-misc/grc/files/grc-1.9-bash.patch
34 @@ -0,0 +1,26 @@
35 +From 1d4f9e1ca5a27426da4dcbd3caee1e38b5d272aa Mon Sep 17 00:00:00 2001
36 +From: Justin Lecher <jlec@g.o>
37 +Date: Tue, 27 Dec 2016 13:17:27 +0000
38 +Subject: [PATCH] Use bash internal functionalities for grc detection
39 +
40 +which is an external tool, where as type is a bash internal funciton
41 +and always available
42 +
43 +Signed-off-by: Justin Lecher <jlec@g.o>
44 +---
45 + grc.bashrc | 5 ++---
46 + 1 file changed, 2 insertions(+), 3 deletions(-)
47 +
48 +diff --git a/grc.bashrc b/grc.bashrc
49 +index e9eba08..54e570d 100644
50 +--- a/grc.bashrc
51 ++++ b/grc.bashrc
52 +@@ -1,6 +1,5 @@
53 +-GRC=`which grc`
54 +-if [ "$TERM" != dumb ] && [ -n "$GRC" ]
55 +-then
56 ++GRC="$(type -p grc)"
57 ++if [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
58 + alias colourify="$GRC -es --colour=auto"
59 + alias configure='colourify ./configure'
60 + alias diff='colourify diff'
61
62 diff --git a/app-misc/grc/files/grc-1.9-configure.patch b/app-misc/grc/files/grc-1.9-configure.patch
63 new file mode 100644
64 index 00000000..66dc4ce
65 --- /dev/null
66 +++ b/app-misc/grc/files/grc-1.9-configure.patch
67 @@ -0,0 +1,46 @@
68 +From 6d7ab5f6486c6d30a685605aa5b0ecfda0434e86 Mon Sep 17 00:00:00 2001
69 +From: Justin Lecher <jlec@g.o>
70 +Date: Tue, 27 Dec 2016 17:32:48 +0000
71 +Subject: [PATCH] More advanced regex for configure colouring
72 +
73 +Signed-off-by: Justin Lecher <jlec@g.o>
74 +---
75 + conf.configure | 21 +++++++++++++++++----
76 + 1 file changed, 17 insertions(+), 4 deletions(-)
77 +
78 +diff --git a/conf.configure b/conf.configure
79 +index ac88ec7..e7b5d89 100644
80 +--- a/conf.configure
81 ++++ b/conf.configure
82 +@@ -1,14 +1,27 @@
83 +-regexp=^checking
84 ++# cache functions
85 ++regexp=\b(loading|updating|creating) cache\b
86 ++colours=yellow bold
87 ++.........
88 ++# checking
89 ++regexp=\bchecking\s*(for|if|whether|command|how|that)?(\s*to)?\b
90 + colours=bold blue
91 + .........
92 ++# result is complex
93 + regexp=\.\.\. .*$
94 + colours=bold yellow
95 + .........
96 +-regexp=\.\.\. yes$
97 ++# check succeeded
98 ++regexp=\.\.\.( \(cached\))? yes$
99 + colours=bold cyan
100 + .........
101 +-regexp=\.\.\. no$
102 ++# check did not succeed
103 ++regexp=\.\.\.( \(cached\))? no$
104 + colours=bold red
105 + .........
106 +-regexp=\.\.\.[ ]
107 ++# ... should be normal
108 ++regexp=\.\.\.
109 + colours=default
110 ++.........
111 ++# creating stuff
112 ++regexp=\bcreating\b
113 ++colours=green
114
115 diff --git a/app-misc/grc/files/grc-1.9-domain-match.patch b/app-misc/grc/files/grc-1.9-domain-match.patch
116 new file mode 100644
117 index 00000000..f00fecd
118 --- /dev/null
119 +++ b/app-misc/grc/files/grc-1.9-domain-match.patch
120 @@ -0,0 +1,22 @@
121 +From 2e422109af7094d2787660f7841e7c2ab10bbcc8 Mon Sep 17 00:00:00 2001
122 +From: Pavel Vishnyakov <djhumster@×××××.com>
123 +Date: Thu, 17 Dec 2015 18:00:37 +0300
124 +Subject: [PATCH] Update conf.traceroute
125 +
126 +More correct way to match domains with any length.
127 +Can be checked her https://regex101.com/r/dI3jQ3/1
128 +---
129 + conf.traceroute | 2 +-
130 + 1 file changed, 1 insertion(+), 1 deletion(-)
131 +
132 +diff --git a/conf.traceroute b/conf.traceroute
133 +index b6501a2..983a7cd 100644
134 +--- a/conf.traceroute
135 ++++ b/conf.traceroute
136 +@@ -1,5 +1,5 @@
137 + # hostname
138 +-regexp=\s\w+[\w\-\.]+\w+
139 ++regexp=\w+[\w\-\.]+\.[a-z]+
140 + colours=bold yellow
141 + count=once
142 + -
143
144 diff --git a/app-misc/grc/files/grc-1.9-python3.patch b/app-misc/grc/files/grc-1.9-python3.patch
145 new file mode 100644
146 index 00000000..9f4db14
147 --- /dev/null
148 +++ b/app-misc/grc/files/grc-1.9-python3.patch
149 @@ -0,0 +1,41 @@
150 + grc | 2 ++
151 + grcat | 8 +++-----
152 + 2 files changed, 5 insertions(+), 5 deletions(-)
153 +
154 +diff --git a/grc b/grc
155 +index 56a53b4..19afe7c 100755
156 +--- a/grc
157 ++++ b/grc
158 +@@ -1,5 +1,7 @@
159 + #! /usr/bin/python
160 +
161 ++from __future__ import print_function
162 ++
163 + import os, re, string, sys, getopt, signal
164 +
165 + def version():
166 +diff --git a/grcat b/grcat
167 +index a4e6dd9..16586e2 100755
168 +--- a/grcat
169 ++++ b/grcat
170 +@@ -1,5 +1,7 @@
171 + #! /usr/bin/python
172 +
173 ++from __future__ import print_function
174 ++
175 + import sys, os, string, re, signal, errno
176 +
177 + #some default definitions
178 +@@ -140,11 +142,7 @@ while not is_last:
179 + # do not try to understand the optimized form below :-)
180 + if 'colours' in ll:
181 + colstrings = list(
182 +- map(
183 +- lambda colgroup:
184 +- ''.join(map(lambda x: get_colour(x), split(colgroup))),
185 +- split(ll['colours'], ',')
186 +- )
187 ++ [''.join([get_colour(x) for x in split(colgroup)]) for colgroup in split(ll['colours'], ',')]
188 + )
189 + ll['colours'] = colstrings
190 +
191
192 diff --git a/app-misc/grc/grc-1.9.ebuild b/app-misc/grc/grc-1.9.ebuild
193 new file mode 100644
194 index 00000000..826963d
195 --- /dev/null
196 +++ b/app-misc/grc/grc-1.9.ebuild
197 @@ -0,0 +1,54 @@
198 +# Copyright 1999-2016 Gentoo Foundation
199 +# Distributed under the terms of the GNU General Public License v2
200 +# $Id$
201 +
202 +EAPI=6
203 +
204 +PYTHON_COMPAT=( python{2_7,3_{4,5}} pypy )
205 +
206 +inherit eutils python-r1
207 +
208 +DESCRIPTION="Generic Colouriser beautifies your logfiles or output of commands"
209 +HOMEPAGE="http://kassiopeia.juls.savba.sk/~garabik/software/grc.html"
210 +SRC_URI="https://github.com/garabik/grc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
211 +
212 +LICENSE="GPL-2"
213 +SLOT="0"
214 +KEYWORDS="~amd64 ~ppc ~x86"
215 +IUSE=""
216 +
217 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
218 +
219 +RDEPEND="${PYTHON_DEPS}"
220 +DEPEND="${RDEPEND}"
221 +
222 +PATCHES=(
223 + # https://github.com/garabik/grc/pull/44
224 + "${FILESDIR}"/${PN}-1.4-support-more-files.patch
225 + # https://github.com/garabik/grc/pull/43
226 + "${FILESDIR}"/${PN}-1.4-ipv6.patch
227 + # https://github.com/garabik/grc/pull/9
228 + "${FILESDIR}"/${P}-domain-match.patch
229 + # https://github.com/garabik/grc/pull/45
230 + "${FILESDIR}"/${P}-python3.patch
231 + # https://github.com/garabik/grc/pull/46
232 + "${FILESDIR}"/${P}-bash.patch
233 + # https://github.com/garabik/grc/pull/47
234 + "${FILESDIR}"/${P}-configure.patch
235 +)
236 +
237 +src_install() {
238 + python_foreach_impl python_doscript grc grcat
239 +
240 + insinto /usr/share/grc
241 + doins \
242 + mrsmith/conf.* \
243 + conf.* \
244 + grc.bashrc
245 +
246 + insinto /etc
247 + doins grc.conf
248 +
249 + dodoc README INSTALL TODO debian/changelog CREDITS Regexp.txt
250 + doman *.1
251 +}