summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2016-12-27 17:51:30 +0000
committerJustin Lecher <jlec@gentoo.org>2016-12-27 17:58:01 +0000
commita7c94ea7378777be84e57db7f0b3e18f3cf51550 (patch)
treefd0bc1e32673e48c42acb2dc522fd8918856fa97 /app-misc/grc
parentapp-benchmarks/ioping: Version Bump (diff)
downloadgentoo-a7c94ea7378777be84e57db7f0b3e18f3cf51550.tar.gz
gentoo-a7c94ea7378777be84e57db7f0b3e18f3cf51550.tar.bz2
gentoo-a7c94ea7378777be84e57db7f0b3e18f3cf51550.zip
app-misc/grc: Version Bump
Package-Manager: Portage-2.3.3, Repoman-2.3.1 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'app-misc/grc')
-rw-r--r--app-misc/grc/Manifest1
-rw-r--r--app-misc/grc/files/grc-1.9-bash.patch26
-rw-r--r--app-misc/grc/files/grc-1.9-configure.patch46
-rw-r--r--app-misc/grc/files/grc-1.9-domain-match.patch22
-rw-r--r--app-misc/grc/files/grc-1.9-python3.patch41
-rw-r--r--app-misc/grc/grc-1.9.ebuild54
6 files changed, 190 insertions, 0 deletions
diff --git a/app-misc/grc/Manifest b/app-misc/grc/Manifest
index 7ed9f32136da..dd1fa4346e1b 100644
--- a/app-misc/grc/Manifest
+++ b/app-misc/grc/Manifest
@@ -1 +1,2 @@
+DIST grc-1.9.tar.gz 29252 SHA256 269ab717dc105c124f6eb48b4b8d3ab68660c0f1244eaea140f0188cb9af4b80 SHA512 947f4b61a8d4061e99d64e25a7b5ca2bcd042580b537ea07ea6ca609d7b81b1976b301de6036be2c199c7fa25c3f32d41a887f811ad72a1a18dd63d284e61050 WHIRLPOOL de7cc676aa1b73b93be632919293d0e0a38077bee2abfde8b3805886ffb51875851d9169216c711bda24eab34a2460da40d1796bd7ea909df4c9e47874b2c244
DIST grc_1.5.tar.gz 26363 SHA256 a2581f065236868bd8b09536616a588792f60fcba4e54d69e2cad65aae73dddc SHA512 6b95a8db5df0d99b49052deb086ac02b180810ce754c744e145e3e0508562fb632e7fdb38ec4ad039f6e998c4122b065ba53925d73268c589475e36c16aa68d7 WHIRLPOOL 1a4ee3612024c95d296772c43c1ed21ebb9e1d50e1fa4af13a6d09a1d63f59ec7f53084b68dbe0b7a4eb1300269ca714d8b972507d671e973b11822e1b4e82a9
diff --git a/app-misc/grc/files/grc-1.9-bash.patch b/app-misc/grc/files/grc-1.9-bash.patch
new file mode 100644
index 000000000000..5e1dcda299ee
--- /dev/null
+++ b/app-misc/grc/files/grc-1.9-bash.patch
@@ -0,0 +1,26 @@
+From 1d4f9e1ca5a27426da4dcbd3caee1e38b5d272aa Mon Sep 17 00:00:00 2001
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 27 Dec 2016 13:17:27 +0000
+Subject: [PATCH] Use bash internal functionalities for grc detection
+
+which is an external tool, where as type is a bash internal funciton
+and always available
+
+Signed-off-by: Justin Lecher <jlec@gentoo.org>
+---
+ grc.bashrc | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/grc.bashrc b/grc.bashrc
+index e9eba08..54e570d 100644
+--- a/grc.bashrc
++++ b/grc.bashrc
+@@ -1,6 +1,5 @@
+-GRC=`which grc`
+-if [ "$TERM" != dumb ] && [ -n "$GRC" ]
+-then
++GRC="$(type -p grc)"
++if [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
+ alias colourify="$GRC -es --colour=auto"
+ alias configure='colourify ./configure'
+ alias diff='colourify diff'
diff --git a/app-misc/grc/files/grc-1.9-configure.patch b/app-misc/grc/files/grc-1.9-configure.patch
new file mode 100644
index 000000000000..66dc4ceda80d
--- /dev/null
+++ b/app-misc/grc/files/grc-1.9-configure.patch
@@ -0,0 +1,46 @@
+From 6d7ab5f6486c6d30a685605aa5b0ecfda0434e86 Mon Sep 17 00:00:00 2001
+From: Justin Lecher <jlec@gentoo.org>
+Date: Tue, 27 Dec 2016 17:32:48 +0000
+Subject: [PATCH] More advanced regex for configure colouring
+
+Signed-off-by: Justin Lecher <jlec@gentoo.org>
+---
+ conf.configure | 21 +++++++++++++++++----
+ 1 file changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/conf.configure b/conf.configure
+index ac88ec7..e7b5d89 100644
+--- a/conf.configure
++++ b/conf.configure
+@@ -1,14 +1,27 @@
+-regexp=^checking
++# cache functions
++regexp=\b(loading|updating|creating) cache\b
++colours=yellow bold
++.........
++# checking
++regexp=\bchecking\s*(for|if|whether|command|how|that)?(\s*to)?\b
+ colours=bold blue
+ .........
++# result is complex
+ regexp=\.\.\. .*$
+ colours=bold yellow
+ .........
+-regexp=\.\.\. yes$
++# check succeeded
++regexp=\.\.\.( \(cached\))? yes$
+ colours=bold cyan
+ .........
+-regexp=\.\.\. no$
++# check did not succeed
++regexp=\.\.\.( \(cached\))? no$
+ colours=bold red
+ .........
+-regexp=\.\.\.[ ]
++# ... should be normal
++regexp=\.\.\.
+ colours=default
++.........
++# creating stuff
++regexp=\bcreating\b
++colours=green
diff --git a/app-misc/grc/files/grc-1.9-domain-match.patch b/app-misc/grc/files/grc-1.9-domain-match.patch
new file mode 100644
index 000000000000..f00fecd7c67a
--- /dev/null
+++ b/app-misc/grc/files/grc-1.9-domain-match.patch
@@ -0,0 +1,22 @@
+From 2e422109af7094d2787660f7841e7c2ab10bbcc8 Mon Sep 17 00:00:00 2001
+From: Pavel Vishnyakov <djhumster@gmail.com>
+Date: Thu, 17 Dec 2015 18:00:37 +0300
+Subject: [PATCH] Update conf.traceroute
+
+More correct way to match domains with any length.
+Can be checked her https://regex101.com/r/dI3jQ3/1
+---
+ conf.traceroute | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/conf.traceroute b/conf.traceroute
+index b6501a2..983a7cd 100644
+--- a/conf.traceroute
++++ b/conf.traceroute
+@@ -1,5 +1,5 @@
+ # hostname
+-regexp=\s\w+[\w\-\.]+\w+
++regexp=\w+[\w\-\.]+\.[a-z]+
+ colours=bold yellow
+ count=once
+ -
diff --git a/app-misc/grc/files/grc-1.9-python3.patch b/app-misc/grc/files/grc-1.9-python3.patch
new file mode 100644
index 000000000000..9f4db14a2eec
--- /dev/null
+++ b/app-misc/grc/files/grc-1.9-python3.patch
@@ -0,0 +1,41 @@
+ grc | 2 ++
+ grcat | 8 +++-----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/grc b/grc
+index 56a53b4..19afe7c 100755
+--- a/grc
++++ b/grc
+@@ -1,5 +1,7 @@
+ #! /usr/bin/python
+
++from __future__ import print_function
++
+ import os, re, string, sys, getopt, signal
+
+ def version():
+diff --git a/grcat b/grcat
+index a4e6dd9..16586e2 100755
+--- a/grcat
++++ b/grcat
+@@ -1,5 +1,7 @@
+ #! /usr/bin/python
+
++from __future__ import print_function
++
+ import sys, os, string, re, signal, errno
+
+ #some default definitions
+@@ -140,11 +142,7 @@ while not is_last:
+ # do not try to understand the optimized form below :-)
+ if 'colours' in ll:
+ colstrings = list(
+- map(
+- lambda colgroup:
+- ''.join(map(lambda x: get_colour(x), split(colgroup))),
+- split(ll['colours'], ',')
+- )
++ [''.join([get_colour(x) for x in split(colgroup)]) for colgroup in split(ll['colours'], ',')]
+ )
+ ll['colours'] = colstrings
+
diff --git a/app-misc/grc/grc-1.9.ebuild b/app-misc/grc/grc-1.9.ebuild
new file mode 100644
index 000000000000..826963d6d81e
--- /dev/null
+++ b/app-misc/grc/grc-1.9.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_{4,5}} pypy )
+
+inherit eutils python-r1
+
+DESCRIPTION="Generic Colouriser beautifies your logfiles or output of commands"
+HOMEPAGE="http://kassiopeia.juls.savba.sk/~garabik/software/grc.html"
+SRC_URI="https://github.com/garabik/grc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ # https://github.com/garabik/grc/pull/44
+ "${FILESDIR}"/${PN}-1.4-support-more-files.patch
+ # https://github.com/garabik/grc/pull/43
+ "${FILESDIR}"/${PN}-1.4-ipv6.patch
+ # https://github.com/garabik/grc/pull/9
+ "${FILESDIR}"/${P}-domain-match.patch
+ # https://github.com/garabik/grc/pull/45
+ "${FILESDIR}"/${P}-python3.patch
+ # https://github.com/garabik/grc/pull/46
+ "${FILESDIR}"/${P}-bash.patch
+ # https://github.com/garabik/grc/pull/47
+ "${FILESDIR}"/${P}-configure.patch
+)
+
+src_install() {
+ python_foreach_impl python_doscript grc grcat
+
+ insinto /usr/share/grc
+ doins \
+ mrsmith/conf.* \
+ conf.* \
+ grc.bashrc
+
+ insinto /etc
+ doins grc.conf
+
+ dodoc README INSTALL TODO debian/changelog CREDITS Regexp.txt
+ doman *.1
+}