summaryrefslogtreecommitdiff
path: root/dev-util/visual-regexp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/visual-regexp
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/visual-regexp')
-rw-r--r--dev-util/visual-regexp/Manifest16
-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/files/visual-regexp-3.1-help-font-fix.patch32
-rw-r--r--dev-util/visual-regexp/files/visual-regexp-3.1-make-regexp-fix.patch12
-rw-r--r--dev-util/visual-regexp/files/visual-regexp-3.1-wish-fix.patch13
-rw-r--r--dev-util/visual-regexp/files/visualregexp.desktop7
-rw-r--r--dev-util/visual-regexp/metadata.xml12
-rw-r--r--dev-util/visual-regexp/visual-regexp-3.0-r1.ebuild42
-rw-r--r--dev-util/visual-regexp/visual-regexp-3.1.ebuild50
12 files changed, 309 insertions, 0 deletions
diff --git a/dev-util/visual-regexp/Manifest b/dev-util/visual-regexp/Manifest
new file mode 100644
index 000000000000..3cc536682d18
--- /dev/null
+++ b/dev-util/visual-regexp/Manifest
@@ -0,0 +1,16 @@
+AUX visual-regexp-3.0-help-font-fix.patch 994 SHA256 3b466db66a9b694ae91d8e9be12c627e1541258f801373369c3b8d13d28588f0 SHA512 806c870cbe76dfb6d5a23a169f5f4e1a79e6d6915ae941c950b9b7f91e30783670276cd247698b176f5a6e21f7eb8147cd1fd71e99e969d720de81d39c36dbd4 WHIRLPOOL 05c28db8228cd30ce37e0d99a825e72be593e1df0d82a85e965de236376f57397a9f7fc74024919167a7cc15bc6a377a67ada62e7ebfaf0ba519c68f2a57c3d0
+AUX visual-regexp-3.0-home-conf-fix.patch 1792 SHA256 01ccae8dd5600e70f208a9f93f178eee87ce33dc77c21d46ac9945e3fcf52482 SHA512 be77ca9ef0d484991a665dbc2f59f1030f69edc9be3e0b3f973afcbb19ea424fdf3c9099797391ac6eb6c4943809394f877949240eefd542791ca43815fb3dc6 WHIRLPOOL 5fc496b808d9076492a865aa676f61d65f12500f95389f0f166bd7d8f75be2cd6101a06a87a1146b4b1b2615782ba55eb279c24df6b36c2673c255e0758133f4
+AUX visual-regexp-3.0-pattern-load-fix.patch 891 SHA256 59608fb6da74c1c4ba6f3ec56f22f39dabd6c8e7f0a045e70644c521f7ce31d6 SHA512 9b9cc5275852ebcb5a68b8583eee75936d871c8bbd931462e14a56db7e71769d58a9934da17e1eaf806ae9eaf1fdc9836dab113911ac65f9f5a13bcb47ecd6df WHIRLPOOL f446f2ffb8d55b18785faa543b19ed8acdfddc1fc65a61b0b329b0b336daba5e11bdb155afcfc102f4c74bb7f9e6b0b87c05e27d48240537ee12118b6d519339
+AUX visual-regexp-3.0-wish-fix.patch 405 SHA256 da55282349b3229b82469d415b7e6821a8f1b8c9f9b6a79ecc795c24e347c0ae SHA512 5e51a9627e86778cca27b37663086c7e80e9d49d1bd53b669b76963e9dcbb42838c7334479efabbd8ca85f980ff4f4cadd2de92e6026586c8bdaa62fd096324c WHIRLPOOL 05cf905c082d56f1a4aa8dc6c95b8cf03702612b1e75d8bbf7f576aea918651707640016bc8df9cbf797c0d51942669bd6d7494cd9f41044cf6b738c7d47eaf2
+AUX visual-regexp-3.1-help-font-fix.patch 1264 SHA256 495f597108c66cea2bf9b7c7a556786e46536071e83f56713746dfd678a63533 SHA512 2ec777e5bd3a401f99fa387bb0b015596fcdcf39c11bb214daaf94f56759320d1d36bd9cd36b2cbd634a1c1eccffba1b1d1fb7736981a31528a7752447c74b13 WHIRLPOOL 2b528533d1076766d0b414de557809b92e0d4cb7edf651c6c03cc952ac80ca7aa6a12809d2c2ad0cf5b4d5df2ff8047dd5787215f50f7b97f2c153f7bbac492f
+AUX visual-regexp-3.1-make-regexp-fix.patch 411 SHA256 ca2f41eff5c474d77706f0f81a0161b3dcb06e8498635388351f76fbc82e3ad3 SHA512 6d8522788a6ddc4d1cac2a66be4b2c24fbd596927303b58be3e3cabe920e4150a574bb53d588618d096a833b063c197498250abe2d12b8997f278d90747cdf58 WHIRLPOOL a06265c52d625fcfb3ac5215a0c4d79aafe16a32a6c71b2d4854b33e7a8ed94dbcd0a2ce72058f1b2165772adca6fc84fe4b9bb3e124e6d5ef2904040000354a
+AUX visual-regexp-3.1-wish-fix.patch 383 SHA256 abb99f359b79a58557ca5b3472b6fd1abdfa8891be66593448b4ba90339f7a1c SHA512 eae72720bf064245b4e1076b7a2e4f02dd42e727ca897bb30a6da0a07305e51bd7571b28e6d1e0e251ec9fc5d9724f0a7e2feac306f89c6e7ef2f313f1c6d78d WHIRLPOOL 466435881f4b86d629c13fb076e93bce8c3f53e22c2faeeba0aa4651bff37c10991f5f1d2e314593c19a5039b6f548ef12afc4a9a10f4cb68777ea8b53798119
+AUX visualregexp.desktop 166 SHA256 ed4527e88f6b81c568a9866d1a500e1aae63c8984721c46555eb6bf5d957f739 SHA512 9f80b55123c781749e078c2c6c0117fcc4dbe8e15536e5b4d98683e67de1f5637a3c1e73b109f661765d042f76f71dcd8e633cc9d363de21b5b3ff27db21c1d1 WHIRLPOOL 974cc1f6cabb0ae97459d3cb93dabd19e4eac29df078415e85eb82554eca6293fbfbbe423d4a3418f1968c3a53e8e6d73c63001433db7f9086204328c5fdb762
+DIST visual_regexp-3.0.tar.gz 25659 SHA256 07a22a498e32476c7ae17b00d131c04a53def4e5f174ffe42ddbc42e44752c0f SHA512 3c8b3e44d20f8cdc69fdb501ac82a44f6b755715c9bd6309bbca01193acc72a97595d6012ad889c957adba587c3f8f1f888c0f42993bb81bf3f730adff42c655 WHIRLPOOL 56be241b1653fbb0b0fa5f4a1b13e755424a2d193b267e68b938ca34dbe636bcf7fdd2bb65611abe9d3e8ebb2080614c1224534424b9a83840f5ade3015a3964
+DIST visual_regexp-3.1.tcl 71183 SHA256 153bccbce71da7b208f95abc7408a126f819e4a0e57ad053866080c82e282752 SHA512 f36729800e0e66ee22339614b47f068eeb440cac501f73898250ddda9865cd5c3cc09bd57a8ea601ef7a3240bddbe524a69b704ae58b8e56decb81b25166818b WHIRLPOOL bdb4f35e8a5fd7267848e43a9eb8ea4d02633ace08bf9336826cecf5c4370857a31d54042f92b4cd79e934c468a07c0ba5f3c4ae8eabf7d98cb5ae8198629bbe
+DIST visualregexp-icon.png.tar 20480 SHA256 8704b626f9318d62fe6bdf7f2b4fb4ef7b72c6b4fe7376e55c486d5dc89fd064 SHA512 af0a5ec63d2d5fa71842ed85a83541b0f1ee72a4b37941e11f4f212874564b0255a97dfa953ea1684b056a4ab6f86ce47b6df9374628551c9cf8e775f7d12fb2 WHIRLPOOL 7dd0e70e4f419e0f4d9a6ad57260267b674b2f2ebe904ec5ec582a539d3cc619eac968e580318b003babf0b36885298b4a7c8d8ff8c4591d61794f83da807834
+EBUILD visual-regexp-3.0-r1.ebuild 935 SHA256 dbb513ba672fa2954d31b34241b92a0b1d55d33b41feabe0a5ead40843231c2b SHA512 19f39420f473fb8a9b049c4fd377abf1ff230c9eeae397d583afb0065851660413ff2c339e9f9b82cd5c62018dc8d9435e0b596f662bc4cbb830071f1de19078 WHIRLPOOL 3633c3e9d7ffcf440c59d305fb519f303f40678e97a93c896e850e1301f7332d33b868592a3e9acd77d6ebf27c1412e513b3a1143b9cc8708416853f9ba1184c
+EBUILD visual-regexp-3.1.ebuild 1237 SHA256 c898a220c8fba11cd0afd69f505e922fb0e2c2156b03f6fda66989d5ee7afbdf SHA512 532ecc703222531147989096acbee3523aa39ce79148bb46a0c2ebcf0b5aa7cfe760fe1773dc4b0837f41f7ced5517373bef2b4d43687f92269834cc1c711dea WHIRLPOOL 9bd3c4c34594752b6c89951dd0e64d9333850600544715cf01173032b1581c8b79507877f516736147d2d7d76b5bead326499262ddd0f3394a457a7c3f4ae0c8
+MISC ChangeLog 2924 SHA256 4107996c7166902b0496fab335be44dd077f6d865c1e390ae2e1cd674a98889b SHA512 f753522b1d9a8542a80ee5c723cc34bed55010f2fff491b6b48362233af9d30c6a7587320bab20f15830f80b2d2ddacf305e83fcec99e60937947ba6b8efbd4a WHIRLPOOL 129774667426f0fb039efec9fce54f3abb36e4db3b046221861ae80617f858161c5da5f387563c62187f99cdfb47420aa4d1f3398abc577403c4b14fffe9a545
+MISC ChangeLog-2015 2718 SHA256 6f40f1ded479d81f59cc9d24b8c31afbaa6283713dc6f34ff4e4c050e23f09fe SHA512 f23dfae9687e86b79717990c08a0b84452e49227950064b50b75d8bd3305b0c1996195d97474d47f405610400ad0b597b863f0999a8b5d2ed7c58d273bc8476c WHIRLPOOL 99f8cc86bd9e4d0aafab8e98d56bf03ac0bc48d854a7cccb99dd49a25481fa611a8c8408c737243d807aae1b34025ac37933df8f1a64d52653d0063fa733435b
+MISC metadata.xml 365 SHA256 d4fac92e622bd537b862ede7619662389ae9d12a17d3fce03f0e1c33e0bdf65f SHA512 9556a7d272b95bfde71df2994d8ac26639f3252cd743f9caeeea8b516a70dfd031dacf42dd56df19394c03223001e09bacb094b68256641764d139b3880e9ff1 WHIRLPOOL d73f08134a91e1bf5fcb38bfcdc7bbb29b149b480124b04f1561f6ccdad14b200a0a7684fce649761747705ff47266ad9e73823a4ccc33223968ee5e30d72340
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/files/visual-regexp-3.1-help-font-fix.patch b/dev-util/visual-regexp/files/visual-regexp-3.1-help-font-fix.patch
new file mode 100644
index 000000000000..1dd7e7021b4f
--- /dev/null
+++ b/dev-util/visual-regexp/files/visual-regexp-3.1-help-font-fix.patch
@@ -0,0 +1,32 @@
+diff -ur a/visual_regexp.tcl b/visual_regexp.tcl
+--- a/visual_regexp.tcl 2013-11-10 01:49:14.987065220 +0100
++++ b/visual_regexp.tcl 2013-11-10 01:49:04.177341077 +0100
+@@ -740,10 +740,13 @@
+ frame .help.text;
+
+ if {$tcl_platform(platform) == "windows"} {
+- text .help.text.t -borderwidth 2 -relief groove -font {Courier 10} -yscrollcommand [list .help.text.sy set];
++ set hfont {Courier 10}
++ set hbfont {Courier 10 bold}
+ } else {
+- text .help.text.t -borderwidth 2 -relief groove -yscrollcommand [list .help.text.sy set];
++ set hfont {9x15}
++ set hbfont {9x15bold}
+ }
++ text .help.text.t -borderwidth 2 -relief groove -font $hfont -yscrollcommand [list .help.text.sy set];
+
+ scrollbar .help.text.sy \
+ -command ".help.text.t yview" \
+@@ -755,10 +758,10 @@
+
+ pack .help.text -side top -fill both -expand 1 -padx 20
+
+- .help.text.t tag configure bold -font "[.help.text.t cget -font] bold"
++ .help.text.t tag configure bold -font $hbfont
+ .help.text.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.1-make-regexp-fix.patch b/dev-util/visual-regexp/files/visual-regexp-3.1-make-regexp-fix.patch
new file mode 100644
index 000000000000..6610b16e76ff
--- /dev/null
+++ b/dev-util/visual-regexp/files/visual-regexp-3.1-make-regexp-fix.patch
@@ -0,0 +1,12 @@
+diff -ur a/visual_regexp.tcl b/visual_regexp.tcl
+--- a/visual_regexp.tcl 2013-11-11 12:11:34.256631106 +0100
++++ b/visual_regexp.tcl 2013-11-11 11:50:46.614881803 +0100
+@@ -1437,7 +1439,7 @@
+ set output [text $f.output \
+ -wrap char \
+ -undo 1 \
+- -background white
++ -background white \
+ -font $::font_regexp \
+ -selectbackground lightblue \
+ -selectborderwidth 0 \
diff --git a/dev-util/visual-regexp/files/visual-regexp-3.1-wish-fix.patch b/dev-util/visual-regexp/files/visual-regexp-3.1-wish-fix.patch
new file mode 100644
index 000000000000..3fae9d095025
--- /dev/null
+++ b/dev-util/visual-regexp/files/visual-regexp-3.1-wish-fix.patch
@@ -0,0 +1,13 @@
+diff -ur a/visual_regexp.tcl b/visual_regexp.tcl
+--- a/visual_regexp.tcl 2013-10-29 03:42:43.443932232 +0100
++++ b/visual_regexp.tcl 2013-10-29 03:35:35.441951822 +0100
+@@ -1,7 +1,6 @@
+-package require starkit
+-starkit::startup
++#!/usr/bin/wish
+
+-set version 3.0
++set version 3.1
+
+ ###############################################################################################
+ #
diff --git a/dev-util/visual-regexp/files/visualregexp.desktop b/dev-util/visual-regexp/files/visualregexp.desktop
new file mode 100644
index 000000000000..1d66181bc2c1
--- /dev/null
+++ b/dev-util/visual-regexp/files/visualregexp.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Exec=visualregexp
+Icon=visualregexp-icon
+Name=Visual Regexp
+Comment=An interactive regular expression editor
+Categories=Development;
diff --git a/dev-util/visual-regexp/metadata.xml b/dev-util/visual-regexp/metadata.xml
new file mode 100644
index 000000000000..61d19ccc4a52
--- /dev/null
+++ b/dev-util/visual-regexp/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>quentin@minster.io</email>
+ <name>Quentin Minster</name>
+ </maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
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..6de44bc09c0e
--- /dev/null
+++ b/dev-util/visual-regexp/visual-regexp-3.0-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="
+ https://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
+}
diff --git a/dev-util/visual-regexp/visual-regexp-3.1.ebuild b/dev-util/visual-regexp/visual-regexp-3.1.ebuild
new file mode 100644
index 000000000000..3920d2a42ab5
--- /dev/null
+++ b/dev-util/visual-regexp/visual-regexp-3.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="
+ https://dev.gentoo.org/~jlec/distfiles/visualregexp-icon.png.tar
+ http://laurent.riesterer.free.fr/regexp/visual_regexp-${PV}.tcl"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=dev-lang/tk-8.5"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ # Manually copy the source file since unpack gets confused by things it can't unpack
+ cp "${DISTDIR}/visual_regexp-${PV}.tcl" "${WORKDIR}/visual_regexp.tcl"
+
+ default
+}
+
+src_prepare() {
+ # File comes with DOS newlines
+ edos2unix visual_regexp.tcl
+
+ epatch \
+ "${FILESDIR}/${P}-wish-fix.patch" \
+ "${FILESDIR}/${P}-help-font-fix.patch" \
+ "${FILESDIR}/${P}-make-regexp-fix.patch" \
+ "${FILESDIR}/${PN}-3.0-home-conf-fix.patch" \
+ "${FILESDIR}/${PN}-3.0-pattern-load-fix.patch"
+
+ epatch_user
+}
+
+src_install() {
+ newbin visual_regexp.tcl visualregexp
+ dosym visualregexp /usr/bin/tkregexp
+ doicon "${WORKDIR}/visualregexp-icon.png"
+ domenu "${FILESDIR}/visualregexp.desktop"
+}