summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Wijsman <tomwij@gentoo.org>2013-12-15 18:56:26 +0000
committerTom Wijsman <tomwij@gentoo.org>2013-12-15 18:56:26 +0000
commita8324a90c4247706bcb41ed9928e13fbd35335f9 (patch)
treebe134bc63ac157fa430110700fd3ebad2a0bb34b /dev-util/visual-regexp
parentVersion bump. (diff)
downloadgentoo-2-a8324a90c4247706bcb41ed9928e13fbd35335f9.tar.gz
gentoo-2-a8324a90c4247706bcb41ed9928e13fbd35335f9.tar.bz2
gentoo-2-a8324a90c4247706bcb41ed9928e13fbd35335f9.zip
Revision bump, several fixes from bug #492700; proxied commit for Quentin Minster (laomaiweng).
(Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
Diffstat (limited to 'dev-util/visual-regexp')
-rw-r--r--dev-util/visual-regexp/ChangeLog12
-rw-r--r--dev-util/visual-regexp/files/visual-regexp-3.0-help-font-fix.patch26
-rw-r--r--dev-util/visual-regexp/files/visual-regexp-3.0-home-conf-fix.patch56
-rw-r--r--dev-util/visual-regexp/files/visual-regexp-3.0-pattern-load-fix.patch31
-rw-r--r--dev-util/visual-regexp/files/visual-regexp-3.0-wish-fix.patch12
-rw-r--r--dev-util/visual-regexp/visual-regexp-3.0-r1.ebuild43
6 files changed, 179 insertions, 1 deletions
diff --git a/dev-util/visual-regexp/ChangeLog b/dev-util/visual-regexp/ChangeLog
index 8a124d847b7b..c418441c51aa 100644
--- a/dev-util/visual-regexp/ChangeLog
+++ b/dev-util/visual-regexp/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for dev-util/visual-regexp
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/visual-regexp/ChangeLog,v 1.13 2013/10/23 08:15:15 tomwij Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/visual-regexp/ChangeLog,v 1.14 2013/12/15 18:56:26 tomwij Exp $
+
+*visual-regexp-3.0-r1 (15 Dec 2013)
+
+ 15 Dec 2013; Tom Wijsman <TomWij@gentoo.org>
+ +files/visual-regexp-3.0-help-font-fix.patch,
+ +files/visual-regexp-3.0-home-conf-fix.patch,
+ +files/visual-regexp-3.0-pattern-load-fix.patch,
+ +files/visual-regexp-3.0-wish-fix.patch, +visual-regexp-3.0-r1.ebuild:
+ Revision bump, several fixes from bug #492700; proxied commit for Quentin
+ Minster (laomaiweng).
23 Oct 2013; Tom Wijsman <TomWij@gentoo.org> metadata.xml:
Added Quentin Minster to metadata.xml whom will proxy maintain this package.
diff --git a/dev-util/visual-regexp/files/visual-regexp-3.0-help-font-fix.patch b/dev-util/visual-regexp/files/visual-regexp-3.0-help-font-fix.patch
new file mode 100644
index 000000000000..ec3763cc9dd1
--- /dev/null
+++ b/dev-util/visual-regexp/files/visual-regexp-3.0-help-font-fix.patch
@@ -0,0 +1,26 @@
+diff -ur a/visual_regexp.tcl b/visual_regexp.tcl
+--- a/visual_regexp.tcl 2013-11-10 01:35:49.959609478 +0100
++++ b/visual_regexp.tcl 2013-11-10 01:34:10.491151352 +0100
+@@ -494,15 +494,18 @@
+ pack .help.l -side top -padx 10 -pady 10
+ # help text
+ if {$tcl_platform(platform) == "windows"} {
+- text .help.t -bd 2 -relief groove -font {Courier 10}
++ set hfont {Courier 10}
++ set hbfont {Courier 10 bold}
+ } else {
+- text .help.t -bd 2 -relief groove
++ set hfont {9x15}
++ set hbfont {9x15bold}
+ }
++ text .help.t -bd 2 -relief groove -font $hfont
+ pack .help.t -side top -padx 20
+- .help.t tag configure bold -font "[.help.t cget -font] bold"
++ .help.t tag configure bold -font $hbfont
+ .help.t insert 1.0 "Version:" bold " $::version
+
+-" normal "Usage:" bold " tkregexp <sampleFile>
++" normal "Usage:" bold " [file tail $::argv0] <sampleFile>
+
+ " normal "Key bindings:" bold " Alt-q exit
+ Alt-a toggle 'all' flag
diff --git a/dev-util/visual-regexp/files/visual-regexp-3.0-home-conf-fix.patch b/dev-util/visual-regexp/files/visual-regexp-3.0-home-conf-fix.patch
new file mode 100644
index 000000000000..c86202ae05fb
--- /dev/null
+++ b/dev-util/visual-regexp/files/visual-regexp-3.0-home-conf-fix.patch
@@ -0,0 +1,56 @@
+diff -ur a/visual_regexp.tcl b/visual_regexp.tcl
+--- a/visual_regexp.tcl 2013-11-12 23:23:59.730171882 +0100
++++ b/visual_regexp.tcl 2013-11-12 23:24:42.134085257 +0100
+@@ -1062,27 +1060,38 @@
+ #==============================================================================================
+
+ # try to get customization from 'visual_regexp.ini'
+-puts "[file exists visual_regexp.ini]"
+-set filename [file dirname [info nameofexecutable]]/visual_regexp.ini
+-if {[file exists $filename]} {
+- source $filename
+-} elseif {[file exists visual_regexp.ini]} {
+- source visual_regexp.ini
++set localfilename visual_regexp.ini
++set homefilename ""
++if {[info exists ::env(HOME)]} {
++ set homefilename [file join $::env(HOME) .visual_regexp visual_regexp.ini]
+ }
+-
+-# try to auto user patterns
+-set filename [file dirname [info nameofexecutable]]/regexp.txt
+-if {[file exists $filename]} {
+- regexp::pattern:load $filename
+-} elseif {[file exists regexp.txt]} {
+- regexp::pattern:load regexp.txt
++set binfilename [file join [file dirname [info nameofexecutable]] visual_regexp.ini]
++foreach filename [list $localfilename $homefilename $binfilename] {
++ if {[file exists $filename]} {
++ source $filename
++ break
++ }
+ }
+
+-# buld the GUI
++# build the GUI
+ regexp::history:init
+ regexp::gui
+ regexp::go
+
++# try to auto user patterns
++set localfilename regexp.txt
++set homefilename ""
++if {[info exists ::env(HOME)]} {
++ set homefilename [file join $::env(HOME) .visual_regexp regexp.txt]
++}
++set binfilename [file join [file dirname [info nameofexecutable]] regexp.txt]
++foreach filename [list $localfilename $homefilename $binfilename] {
++ if {[file exists $filename]} {
++ regexp::pattern:load $filename
++ break
++ }
++}
++
+ if {$argc > 1} {
+ puts "Usage: $argv0 <sampleFile>"
+ } elseif {$argc == 1} {
diff --git a/dev-util/visual-regexp/files/visual-regexp-3.0-pattern-load-fix.patch b/dev-util/visual-regexp/files/visual-regexp-3.0-pattern-load-fix.patch
new file mode 100644
index 000000000000..18dbf509f45a
--- /dev/null
+++ b/dev-util/visual-regexp/files/visual-regexp-3.0-pattern-load-fix.patch
@@ -0,0 +1,31 @@
+diff -ur a/visual_regexp.tcl b/visual_regexp.tcl
+--- a/visual_regexp.tcl 2013-11-12 23:23:59.730171882 +0100
++++ b/visual_regexp.tcl 2013-11-12 23:24:42.134085257 +0100
+@@ -380,19 +380,17 @@
+ }
+ # do it
+ set in [open $file "r"]
+- $data(w:menu) delete [expr 4+[llength $::regexp_db]/2] end
+- while {![eof $in]} {
+- set name [gets $in]
+- while {$name == ""} {
+- set name [gets $in]
+- }
+- set pattern [gets $in]
+- while {$pattern == ""} {
+- set pattern [gets $in]
++ set contents {}
++ foreach line [split [read $in] \n] {
++ if {$line != ""} {
++ lappend contents $line
+ }
+- $data(w:menu) add command -label $name -command "regexp::regexp:insert [list $pattern]"
+ }
+ close $in
++ $data(w:menu) delete [expr 4+[llength $::regexp_db]/2] end
++ foreach {name pattern} $contents {
++ $data(w:menu) add command -label $name -command "regexp::regexp:insert [list $pattern]"
++ }
+ }
+
+
diff --git a/dev-util/visual-regexp/files/visual-regexp-3.0-wish-fix.patch b/dev-util/visual-regexp/files/visual-regexp-3.0-wish-fix.patch
new file mode 100644
index 000000000000..bfb7478d1fec
--- /dev/null
+++ b/dev-util/visual-regexp/files/visual-regexp-3.0-wish-fix.patch
@@ -0,0 +1,12 @@
+diff -ur visual_regexp-3.0/visual_regexp.tcl visual_regexp-current/visual_regexp.tcl
+--- visual_regexp-3.0/visual_regexp.tcl 2002-09-01 08:24:56.000000000 -0500
++++ visual_regexp-current/visual_regexp.tcl 2004-03-29 23:20:43.000000000 -0500
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ #-*-tcl-*-
+ # the next line restarts using wish \
+-exec wish8.3 "$0" -- ${1+"$@"}
++exec wish "$0" -- ${1+"$@"}
+
+
+ set version 3.0
diff --git a/dev-util/visual-regexp/visual-regexp-3.0-r1.ebuild b/dev-util/visual-regexp/visual-regexp-3.0-r1.ebuild
new file mode 100644
index 000000000000..572080404a63
--- /dev/null
+++ b/dev-util/visual-regexp/visual-regexp-3.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/visual-regexp/visual-regexp-3.0-r1.ebuild,v 1.1 2013/12/15 18:56:26 tomwij Exp $
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Type the regexp and visualize it on a sample of your choice"
+HOMEPAGE="http://laurent.riesterer.free.fr/regexp/"
+SRC_URI="
+ http://dev.gentoo.org/~jlec/distfiles/visualregexp-icon.png.tar
+ http://laurent.riesterer.free.fr/regexp/visual_regexp-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-lang/tk-8.3"
+
+S=${WORKDIR}/visual_regexp-${PV}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-wish-fix.patch \
+ "${FILESDIR}"/${P}-help-font-fix.patch \
+ "${FILESDIR}"/${P}-home-conf-fix.patch \
+ "${FILESDIR}"/${P}-pattern-load-fix.patch
+}
+
+src_install() {
+ dodoc README
+
+ newbin visual_regexp.tcl visualregexp
+
+ dosym visualregexp /usr/bin/tkregexp
+
+ doicon "${WORKDIR}"/visualregexp-icon.png
+
+ domenu "${FILESDIR}"/visualregexp.desktop
+}