summaryrefslogtreecommitdiff
path: root/dev-tcltk
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-tcltk
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-tcltk')
-rw-r--r--dev-tcltk/anigif/Manifest5
-rw-r--r--dev-tcltk/anigif/anigif-1.3-r1.ebuild25
-rw-r--r--dev-tcltk/anigif/metadata.xml8
-rw-r--r--dev-tcltk/blt/Manifest16
-rw-r--r--dev-tcltk/blt/blt-2.4z-r13.ebuild125
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-aclocal.patch79
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-darwin.patch72
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-gbsd.patch54
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-ldflags.patch30
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-linking.patch21
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile2.patch18
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile3.patch14
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-tcl8.5-fixpkgruntime.patch66
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-tcl8.6.patch86
-rw-r--r--dev-tcltk/blt/files/blt-2.4z-tk8.6.patch20
-rw-r--r--dev-tcltk/blt/files/blt2.4z-64bit.patch24
-rw-r--r--dev-tcltk/blt/metadata.xml11
-rw-r--r--dev-tcltk/bwidget/Manifest8
-rw-r--r--dev-tcltk/bwidget/bwidget-1.9.8.ebuild42
-rw-r--r--dev-tcltk/bwidget/bwidget-1.9.9.ebuild42
-rw-r--r--dev-tcltk/bwidget/files/bwidget-1.9.8-test.patch16
-rw-r--r--dev-tcltk/bwidget/metadata.xml11
-rw-r--r--dev-tcltk/ck/Manifest7
-rw-r--r--dev-tcltk/ck/ck-8.0-r4.ebuild48
-rw-r--r--dev-tcltk/ck/files/ck-8.0-gentoo.patch133
-rw-r--r--dev-tcltk/ck/metadata.xml8
-rw-r--r--dev-tcltk/combobox/Manifest5
-rw-r--r--dev-tcltk/combobox/combobox-2.3-r1.ebuild25
-rw-r--r--dev-tcltk/combobox/metadata.xml8
-rw-r--r--dev-tcltk/expect-lite/Manifest39
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.0.3.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.1.0.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.1.2.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.2.0.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.2.1.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.2.2.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.3.0.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.3.1.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.3.2.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.3.3.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.4.0.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.4.1.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.5.0.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.6.0.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.6.1.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.6.2.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.7.2.ebuild28
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.8.0.ebuild30
-rw-r--r--dev-tcltk/expect-lite/metadata.xml17
-rw-r--r--dev-tcltk/expect/Manifest14
-rw-r--r--dev-tcltk/expect/expect-5.45.ebuild83
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15-expectk.patch14
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15-gfbsd.patch17
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15-headers.patch86
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15-ldflags.patch13
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15_with-tk-no.patch117
-rw-r--r--dev-tcltk/expect/files/expect-5.45-darwin-install_name.patch13
-rw-r--r--dev-tcltk/expect/files/expect-5.45-format-security.patch18
-rw-r--r--dev-tcltk/expect/files/expect-5.45-gfbsd.patch26
-rw-r--r--dev-tcltk/expect/files/expect-5.45-headers.patch92
-rw-r--r--dev-tcltk/expect/metadata.xml11
-rw-r--r--dev-tcltk/itcl/Manifest7
-rw-r--r--dev-tcltk/itcl/itcl-3.4.1.ebuild44
-rw-r--r--dev-tcltk/itcl/itcl-4.0.3.ebuild65
-rw-r--r--dev-tcltk/itcl/metadata.xml11
-rw-r--r--dev-tcltk/itk/Manifest9
-rw-r--r--dev-tcltk/itk/itk-3.4.1.ebuild59
-rw-r--r--dev-tcltk/itk/itk-4.0.0.ebuild58
-rw-r--r--dev-tcltk/itk/itk-4.0.1.ebuild59
-rw-r--r--dev-tcltk/itk/metadata.xml11
-rw-r--r--dev-tcltk/iwidgets/Manifest8
-rw-r--r--dev-tcltk/iwidgets/files/4.0.1-path.patch63
-rw-r--r--dev-tcltk/iwidgets/iwidgets-4.0.1-r3.ebuild64
-rw-r--r--dev-tcltk/iwidgets/iwidgets-4.0.1.ebuild39
-rw-r--r--dev-tcltk/iwidgets/metadata.xml11
-rw-r--r--dev-tcltk/metadata.xml36
-rw-r--r--dev-tcltk/mysqltcl/Manifest8
-rw-r--r--dev-tcltk/mysqltcl/files/mysqltcl-3.05-ldflags.patch16
-rw-r--r--dev-tcltk/mysqltcl/metadata.xml8
-rw-r--r--dev-tcltk/mysqltcl/mysqltcl-3.05.ebuild34
-rw-r--r--dev-tcltk/mysqltcl/mysqltcl-3.052.ebuild29
-rw-r--r--dev-tcltk/scwoop/Manifest5
-rw-r--r--dev-tcltk/scwoop/metadata.xml8
-rw-r--r--dev-tcltk/scwoop/scwoop-4.1.ebuild23
-rw-r--r--dev-tcltk/snack/Manifest8
-rw-r--r--dev-tcltk/snack/files/alsa-undef-sym.patch49
-rw-r--r--dev-tcltk/snack/files/snack-2.2.10-CVE-2012-6303-fix.patch19
-rw-r--r--dev-tcltk/snack/files/snack-2.2.10-darwin.patch28
-rw-r--r--dev-tcltk/snack/metadata.xml8
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r6.ebuild97
-rw-r--r--dev-tcltk/tablelist/Manifest5
-rw-r--r--dev-tcltk/tablelist/metadata.xml8
-rw-r--r--dev-tcltk/tablelist/tablelist-5.8.ebuild30
-rw-r--r--dev-tcltk/tcl-mccp/Manifest6
-rw-r--r--dev-tcltk/tcl-mccp/files/tcl-mccp-0.6-flags.patch18
-rw-r--r--dev-tcltk/tcl-mccp/metadata.xml11
-rw-r--r--dev-tcltk/tcl-mccp/tcl-mccp-0.6.ebuild20
-rw-r--r--dev-tcltk/tcl3d/Manifest9
-rw-r--r--dev-tcltk/tcl3d/files/tcl3d-0.5.0-include-tk-dir-and-permissive.patch72
-rw-r--r--dev-tcltk/tcl3d/metadata.xml26
-rw-r--r--dev-tcltk/tcl3d/tcl3d-0.4.0-r1.ebuild57
-rw-r--r--dev-tcltk/tcl3d/tcl3d-0.4.0.ebuild57
-rw-r--r--dev-tcltk/tcl3d/tcl3d-0.5.0.ebuild70
-rw-r--r--dev-tcltk/tcllib/Manifest14
-rw-r--r--dev-tcltk/tcllib/files/tcllib-1.15-XSS-vuln.patch907
-rw-r--r--dev-tcltk/tcllib/files/tcllib-1.15-tcl8.6-test.patch411
-rw-r--r--dev-tcltk/tcllib/files/tcllib-1.15-test.patch81
-rw-r--r--dev-tcltk/tcllib/files/tcllib-1.16-XSS-vuln.patch572
-rw-r--r--dev-tcltk/tcllib/files/tcllib-1.16-test.patch81
-rw-r--r--dev-tcltk/tcllib/metadata.xml11
-rw-r--r--dev-tcltk/tcllib/tcllib-1.15-r2.ebuild54
-rw-r--r--dev-tcltk/tcllib/tcllib-1.16.ebuild58
-rw-r--r--dev-tcltk/tclperl/Manifest5
-rw-r--r--dev-tcltk/tclperl/metadata.xml8
-rw-r--r--dev-tcltk/tclperl/tclperl-3.2-r1.ebuild41
-rw-r--r--dev-tcltk/tclpython/Manifest7
-rw-r--r--dev-tcltk/tclpython/files/tclpython-4.1-python-3.patch229
-rw-r--r--dev-tcltk/tclpython/metadata.xml8
-rw-r--r--dev-tcltk/tclpython/tclpython-4.1-r4.ebuild54
-rw-r--r--dev-tcltk/tclpython/tclpython-4.1-r6.ebuild55
-rw-r--r--dev-tcltk/tclreadline/Manifest11
-rw-r--r--dev-tcltk/tclreadline/files/tclreadline-2.1.0-alloc-free.patch121
-rw-r--r--dev-tcltk/tclreadline/files/tclreadline-2.1.0-gold.patch15
-rw-r--r--dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-executing-macro.patch128
-rw-r--r--dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-history-expand.patch35
-rw-r--r--dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-prompt.patch12
-rw-r--r--dev-tcltk/tclreadline/metadata.xml11
-rw-r--r--dev-tcltk/tclreadline/tclreadline-2.1.0-r4.ebuild68
-rw-r--r--dev-tcltk/tclx/Manifest7
-rw-r--r--dev-tcltk/tclx/files/tclx-8.4-ldflags.patch13
-rw-r--r--dev-tcltk/tclx/files/tclx-8.4-varinit.patch11
-rw-r--r--dev-tcltk/tclx/metadata.xml12
-rw-r--r--dev-tcltk/tclx/tclx-8.4.1.ebuild54
-rw-r--r--dev-tcltk/tclxml/Manifest7
-rw-r--r--dev-tcltk/tclxml/files/tclxml-3.2-fix-implicit-declarations.patch12
-rw-r--r--dev-tcltk/tclxml/files/tclxml-3.2-format-security.patch16
-rw-r--r--dev-tcltk/tclxml/metadata.xml11
-rw-r--r--dev-tcltk/tclxml/tclxml-3.2-r2.ebuild52
-rw-r--r--dev-tcltk/tdom/Manifest10
-rw-r--r--dev-tcltk/tdom/files/tdom-0.8.2-tnc.patch73
-rw-r--r--dev-tcltk/tdom/files/tdom-0.8.2.patch52
-rw-r--r--dev-tcltk/tdom/files/tdom-0.8.3-expat.patch84
-rw-r--r--dev-tcltk/tdom/files/tdom-0.8.3-soname.patch26
-rw-r--r--dev-tcltk/tdom/files/tdom-0.8.3-tcl8.6.patch21
-rw-r--r--dev-tcltk/tdom/metadata.xml15
-rw-r--r--dev-tcltk/tdom/tdom-0.8.3-r4.ebuild87
-rw-r--r--dev-tcltk/thread/Manifest5
-rw-r--r--dev-tcltk/thread/metadata.xml11
-rw-r--r--dev-tcltk/thread/thread-2.7.1.ebuild49
-rw-r--r--dev-tcltk/tix/Manifest8
-rw-r--r--dev-tcltk/tix/files/tix-8.4.3-link.patch11
-rw-r--r--dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch190
-rw-r--r--dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch18
-rw-r--r--dev-tcltk/tix/metadata.xml11
-rw-r--r--dev-tcltk/tix/tix-8.4.3-r1.ebuild60
-rw-r--r--dev-tcltk/tkTheme/Manifest8
-rw-r--r--dev-tcltk/tkTheme/files/1.0-Makefile.in.diff29
-rw-r--r--dev-tcltk/tkTheme/files/1.0-cflags.patch18
-rw-r--r--dev-tcltk/tkTheme/files/1.0-configure.diff12
-rw-r--r--dev-tcltk/tkTheme/metadata.xml8
-rw-r--r--dev-tcltk/tkTheme/tkTheme-1.0-r2.ebuild49
-rw-r--r--dev-tcltk/tkXwin/Manifest7
-rw-r--r--dev-tcltk/tkXwin/files/1.0-Makefile.in.diff21
-rw-r--r--dev-tcltk/tkXwin/files/tkXwin-1.0-configure.patch93
-rw-r--r--dev-tcltk/tkXwin/metadata.xml11
-rw-r--r--dev-tcltk/tkXwin/tkXwin-1.0-r3.ebuild48
-rw-r--r--dev-tcltk/tkcon/Manifest5
-rw-r--r--dev-tcltk/tkcon/metadata.xml18
-rw-r--r--dev-tcltk/tkcon/tkcon-2.5.ebuild29
-rw-r--r--dev-tcltk/tkdnd/Manifest7
-rw-r--r--dev-tcltk/tkdnd/metadata.xml11
-rw-r--r--dev-tcltk/tkdnd/tkdnd-2.2.ebuild40
-rw-r--r--dev-tcltk/tkdnd/tkdnd-2.6.ebuild40
-rw-r--r--dev-tcltk/tkimg/Manifest7
-rw-r--r--dev-tcltk/tkimg/files/tkimg-1.4-png2.patch36
-rw-r--r--dev-tcltk/tkimg/metadata.xml14
-rw-r--r--dev-tcltk/tkimg/tkimg-1.4-r9.ebuild89
-rw-r--r--dev-tcltk/tklib/Manifest6
-rw-r--r--dev-tcltk/tklib/metadata.xml8
-rw-r--r--dev-tcltk/tklib/tklib-0.6-r1.ebuild36
-rw-r--r--dev-tcltk/tklib/tklib-0.6-r2.ebuild36
-rw-r--r--dev-tcltk/tkpiechart/Manifest5
-rw-r--r--dev-tcltk/tkpiechart/metadata.xml8
-rw-r--r--dev-tcltk/tkpiechart/tkpiechart-6.5-r1.ebuild26
-rw-r--r--dev-tcltk/tkpng/Manifest5
-rw-r--r--dev-tcltk/tkpng/metadata.xml11
-rw-r--r--dev-tcltk/tkpng/tkpng-0.9.ebuild33
-rw-r--r--dev-tcltk/tktable/Manifest5
-rw-r--r--dev-tcltk/tktable/metadata.xml11
-rw-r--r--dev-tcltk/tktable/tktable-2.10.ebuild31
-rw-r--r--dev-tcltk/tktray/Manifest6
-rw-r--r--dev-tcltk/tktray/files/1.1-ldflags.patch13
-rw-r--r--dev-tcltk/tktray/metadata.xml8
-rw-r--r--dev-tcltk/tktray/tktray-1.3.9.ebuild41
-rw-r--r--dev-tcltk/tktreectrl/Manifest10
-rw-r--r--dev-tcltk/tktreectrl/files/2.2.9-as-needed.patch11
-rw-r--r--dev-tcltk/tktreectrl/metadata.xml13
-rw-r--r--dev-tcltk/tktreectrl/tktreectrl-2.2.10.ebuild41
-rw-r--r--dev-tcltk/tktreectrl/tktreectrl-2.2.9.ebuild42
-rw-r--r--dev-tcltk/tktreectrl/tktreectrl-2.4.1.ebuild41
-rw-r--r--dev-tcltk/tkzinc/Manifest7
-rw-r--r--dev-tcltk/tkzinc/files/3.3.6-ldflags.patch14
-rw-r--r--dev-tcltk/tkzinc/files/tkzinc-3.3.4-latex.patch12
-rw-r--r--dev-tcltk/tkzinc/metadata.xml8
-rw-r--r--dev-tcltk/tkzinc/tkzinc-3.3.6.ebuild57
-rw-r--r--dev-tcltk/tls/Manifest9
-rw-r--r--dev-tcltk/tls/metadata.xml11
-rw-r--r--dev-tcltk/tls/tls-1.6-r3.ebuild44
-rw-r--r--dev-tcltk/tls/tls-1.6.7.ebuild44
-rw-r--r--dev-tcltk/tls/tls-1.7.11.ebuild44
-rw-r--r--dev-tcltk/togl/Manifest5
-rw-r--r--dev-tcltk/togl/metadata.xml31
-rw-r--r--dev-tcltk/togl/togl-2.0-r2.ebuild46
-rw-r--r--dev-tcltk/vtcl/Manifest5
-rw-r--r--dev-tcltk/vtcl/metadata.xml11
-rw-r--r--dev-tcltk/vtcl/vtcl-1.6.0-r1.ebuild27
216 files changed, 8711 insertions, 0 deletions
diff --git a/dev-tcltk/anigif/Manifest b/dev-tcltk/anigif/Manifest
new file mode 100644
index 000000000000..241d41b95cae
--- /dev/null
+++ b/dev-tcltk/anigif/Manifest
@@ -0,0 +1,5 @@
+DIST anigif-1.3.zip 18270 SHA256 3ed2fdf42c7d4e64faee27fc2e35eca01e05f7d6f7b200d7cd8ad9f8e38c33e3 SHA512 d9611319461cd4a956eaacbbd63104594fc20752731a9dc314934409a1705d822738f266f4dd4419cd966ce4161148a74e9607be4ed734cb6b715ad00b4743ab WHIRLPOOL 2dbc09b193e70196bbf5230d2a22a85a9cfefbb04218ae90b4dd7a270a4c04f2d132fb4514ec1435e0488a9b9c685a592e75163e11533c68eceb3e2d8519fd66
+EBUILD anigif-1.3-r1.ebuild 490 SHA256 d9eaa298d2857677f7fe21d555f6d35b7dc522a80cd5043300509e49d075a2f2 SHA512 ea21283209cd69e8fa1b0c87e3e8e75a6e7f099cd6117d60ca67cd9e697898de5e9fd80c39a7c612ff19c94772b74e0b6d4ca1d07ec68b974925191ce5b10f09 WHIRLPOOL 64e5fd10730d85096c204ebd713d3d23d50de12aee8d74c660bdf344e9e89db688962716bb1f6386a627840e15a33b8eecf698393b0051c3a90661939496cf1b
+MISC ChangeLog 2915 SHA256 b892db379938f0fe9e698957a6d87059f3204da193a01b69e8dfbf8fe1edfcec SHA512 d16910c786a722bb3694d79e20015984202e59a87bd7b7f392c5d95a3d222348c802f3e824482b73cb7fb88b1090c3c5d2bb5eaaec09fdadbee3f914da3f6c7b WHIRLPOOL b9c91974d9261c58a3dfb5b66dcbc436ad3aa946c270d9a4025902a6fcb19692a92a1cef4fa8fd06e9ca47d15e6c63e2bcd63fa881632f92023f59a5c3c41550
+MISC ChangeLog-2015 1541 SHA256 4b2f1c360af8406d01c3a9b685eb65c3a709ab69b1fa4e562d8a70aa57156ee7 SHA512 6cad7b735454ccf29bd7f5cf0310487a26563f78d788ef6f6f9b5422b2e58f1fa542ccd857cdc874acbe1e1111140ef1d635b97a7c98a1f07639c370b06005cb WHIRLPOOL 188e11c6bb197a65e3813c9f7e5fe90b188cfa2be25e948a47781773316fe829fbe6343e1fe5b692916b7891ca49756e1b67a6631cd0e6c21fcfca076b34569c
+MISC metadata.xml 251 SHA256 e2d301cf95e93dc0de022015887f3abed3fc4685902bdc767aaf4db28633ea4c SHA512 41c00844e2a94c1a10e3e18e835452e4eb171b62606f850305a8b24bcae57c201ab093ac7fc330e39c796e08a648cb8de98a0ca95a0dfc063ec5bafaa93f0790 WHIRLPOOL 7ee39e64c911cb37927aeafc33ec8926d49d505459c1cfe31e4d6dd96cbaef6f0cb4364fd9fd51816966bd65f83da50433981a96c8a68dd2fc4bce6a5767d71f
diff --git a/dev-tcltk/anigif/anigif-1.3-r1.ebuild b/dev-tcltk/anigif/anigif-1.3-r1.ebuild
new file mode 100644
index 000000000000..21f658b0bee9
--- /dev/null
+++ b/dev-tcltk/anigif/anigif-1.3-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Image rotation package"
+HOMEPAGE="http://cardtable.sourceforge.net/tcltk/"
+SRC_URI="https://dev.gentoo.org/~jlec/distfiles/${P}.zip"
+
+LICENSE="tcltk"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-lang/tcl:0"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_install() {
+ insinto /usr/$(get_libdir)/${P}
+ doins *
+}
diff --git a/dev-tcltk/anigif/metadata.xml b/dev-tcltk/anigif/metadata.xml
new file mode 100644
index 000000000000..a8cd1c3ffe87
--- /dev/null
+++ b/dev-tcltk/anigif/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">cardtable</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/blt/Manifest b/dev-tcltk/blt/Manifest
new file mode 100644
index 000000000000..28d843911f45
--- /dev/null
+++ b/dev-tcltk/blt/Manifest
@@ -0,0 +1,16 @@
+AUX blt-2.4z-aclocal.patch 1705 SHA256 7b9b496f68ee8215b7404e1750955cb03e9188d19a523495c5ac33074500fc7e SHA512 dfc4eb375b12d8ae87a65c039bae6445b70008ff1681cf1a40028a04685bbfcbb5dc841b25b475285679aac9303e0807f88c061f983a26a3de66fc1e1dc2ad12 WHIRLPOOL 824a80c2b05ab023c5a4e5321aa29ea793212db311ffa817f2fb6b711480561fd226a6e3d0341c00e90dd8ec2b8d9b31d9a57935e9a8b49d07380560d4288aeb
+AUX blt-2.4z-darwin.patch 1186 SHA256 3cbdbbf123aeb4b4a727704c2daabddb7a4a44e23c2d0bd7652c0b0b0aa8d297 SHA512 31941da432004eec1837fda164365327e39f44345581c8f87d6c37e95ed609b61ee6420e832c67b91277418ff232cc1b6c7ee85cd5e9a8859bf8530e16d354c5 WHIRLPOOL 33a3fce0e6066e975ee2d564ae7176cfb4220f3371576531e4be3821a7cc43c96cd80892bb138006f5ce4dc38e1c970e68640b0e565a45634cc12427454730ac
+AUX blt-2.4z-gbsd.patch 1980 SHA256 b020b0043847bc05bda1b5c4c96c888dc0075ba3ef397bbb4af8181c20c69ce9 SHA512 9e3b833445f998af5c070d755c4c6904d78175640b771abc020289c857bb12ab82fdd504eebc16771c3b057b94643d20acf4eb5952184ca2d2f9233ecd55f92c WHIRLPOOL f2c43489ee0edf9fda259e4d9f03deac98432ece74fb01c9d97ef2b294d0d52b86d7601a754e004b859a0f0965a403ff98f657f360a06b07b75a51f72872da6a
+AUX blt-2.4z-ldflags.patch 1086 SHA256 20245d45dfb0e96afe1127fa40209a7881fbd3f3880ef04af9496809a308f06e SHA512 d2e19fc9caab2ae013c01e66c9674906bda2f01190bf6e9da93c2d22cb4a36a167f7de34649e6d3efc84b0094b1710fc3380347367830dc012873c3845716445 WHIRLPOOL bd0564162e27c97ecca7c8c017345d005871aec2f97bebf8f4a7b2667f4163f051df58379649e40b8c200b4155d2b6049cdf3e2db15753b715a2aa4adabd8467
+AUX blt-2.4z-linking.patch 684 SHA256 cd19df698ca40ce743c81fe2c18dce615a6db385c6a973b9a14201f45e5467a2 SHA512 09ad0d4b43d51b33020a13ecbe31d04d5ddcdf2134d0c0e1275b4de3127adad624d222f492a6d9b0a4f198537afb30d9af70f8685668bf7eba966f020c34368e WHIRLPOOL a5a993a06467a81e1987c04bd709859c725f438b5aa334b2eb1c3806567447dbc290f9a464800919d7fdb5ca0832053d1da9fc91346dc4455ea18ec353e10875
+AUX blt-2.4z-r4-fix-makefile2.patch 728 SHA256 aece52e1771d097498cf88bb1fe286ac698a46af0d07163c4b9d184440ab7d39 SHA512 5f9b5ab26101bf89bb7161bd4bfb4974144c61ae692f67b7598fe0c42929f84b14ac459fdfc29a1436b64924085b8047c90a84501c031f9d8575d4dc38c22681 WHIRLPOOL d76b7c2e350e562401a4b247b6f29e4286c35c2ca100e8b28892d63bf5874bfe1e3d8ef817bde66a43c3b2c2d81d6af8b08a87622d97d783c1e1480bb472ce87
+AUX blt-2.4z-r4-fix-makefile3.patch 509 SHA256 0ac21b9e7fc3e9e5bb7a44d195d8d6cdba05216cf2d9d09709bfc4628d371de1 SHA512 77f432a8ae319ae552a0803c949e4de3e4d1ce258d1f41347481f162d084668c125971ccea5e4fc53dd806054596a4d620786aca41275789c393cf499c9a93b4 WHIRLPOOL e16dc72e20e83de59684a0936c2571fa5ea00c7b20e91e54abc6eb3a7e5fdd7c328e9ea2a16a48fa7288dc8642d33b245fad3a4113a14770bc95349f08a2d76a
+AUX blt-2.4z-tcl8.5-fixpkgruntime.patch 1976 SHA256 a44ed43bbb946d8fc11bb8f416680a536ffc7c0d78faf33030ec378d67d3d287 SHA512 036cc9672c6c5f7554ab883d89602f8ead92c7533fb45742a082b97162f32d6442ac52e1e4f7154d669d917915b840cc6191ae544e1261e430222e0a293c0f41 WHIRLPOOL b3089b7ca520990ebd7fd1160342538e086a5414a049f6affa8a67020df889579ef4d0c5c683b75e0cbfc99deb7ca823c96396ddaac024f4ffde8c3ddc02b5c4
+AUX blt-2.4z-tcl8.6.patch 3281 SHA256 efbda5f49d61ac0cc7c03f9fc6990015bfea696e8a50189b9e8ef2b00d6f251f SHA512 38aa7a7f38e4ae98adda97948b3a0adb0747e4b8966b493efb87268717636c47a79ccd31caa73f44fb7e673e3d51b4552a23ad1b1a0360327fb678327814840c WHIRLPOOL 49e578f8a385c3ab7330cf646f8e8609334399063acbb0ea4b670e8a9de1cca10e638f9aa813007ecffd481e1adcb6dd34c5988a90596a6fd1042525277942a5
+AUX blt-2.4z-tk8.6.patch 781 SHA256 3d9b1c70c1b347dd9406993fe99c371c95dae42848ab8f9ec573e585545070da SHA512 429d24edf55668827e638647e51131083b879d068d65c6d5d4f4665b42d7e02b26760bc78b8aaee5e089fa48b674a81d8cf861220493a7390aadba814a789602 WHIRLPOOL 898235c52cb2dab35ece7930d9f8339941cde63e76aca8fb10a4667d1a6d6c5d518aa736e03b75d46d6f47b1bf89aa9d73aeb8d7ef9b6128cc0ee009c6153880
+AUX blt2.4z-64bit.patch 891 SHA256 a0a3da1016eea86279d1648f4390b38083484582bdb5b7e460435408000ca2f5 SHA512 fee84b20e3cf8491567c11ed1cff3955963b68deda2d4d8a91b48691aa50d83db45a6aa4d86f80f8dd38b0b6bb1f68a1324e9f6805cc10fde2bcfb45f03f71e4 WHIRLPOOL 0140bbb6431cc958eb053d1483ede5a8599fb25c2cc6e7fa6674821eeb3e327b3082933c225b62c9d5f29090cc8f0602bc21068f51f9f447b9cf410b2416346f
+DIST blt2.4z-8.5.2.tar.gz 2326234 SHA256 e4e60628f79e1899175b51a3398133131fac52021b9b9019b4483525c48d6d16 SHA512 afc465ba47ae43a0c6be17400d0a572dccd8c2a8adfd8fc3ed50f9ec28d02129f069d88096c1428c4b242550131092b4141035d7ce90c9e7181ccf712502f09a WHIRLPOOL a00a029e075916dd7656ca85acb308a48e6d80563a91ada9e9e7df7518ef0d4de2200b54e5d9c8a9602520c03472e73968956c0df30afb8ef7f7b364fdd5524f
+EBUILD blt-2.4z-r13.ebuild 3568 SHA256 716319b7055b881a0415a9fb91d276fb93d80ede8e3a3a550cf6ec584f687462 SHA512 6436495728e939b9ea22e5b6b2071a1ebaa7e08760ec263c41bc4ee9563e10f6b45fb26f54811d7647a8ad4a2880cf6737f6a2bd0020905a64a23145062b02a2 WHIRLPOOL 733a67dcd4917f806ceb3aa080b7a4fd7224a580208f7ce67a8ee9ac413f8b396ea9d9587aa843b575d2512061eb9b3d1b7f4f410c4169a7eedab2a0704f2572
+MISC ChangeLog 4873 SHA256 6f6f13978b4e97792c1505a81ae2381c1637e47df7466263f33cbb5464351150 SHA512 3acb6d14b77cecf0965ac1ec9c249d7746e75b99fa9e55cc1afa6cd6ae5e63a4d19fb2a06794159d56938c60d541d1ef9355b8847fbb140be4208d2f00dfd17f WHIRLPOOL bbbb5b595a7100940e5f90c989f4879b0682515eab56d7a623d81ac7f94f42474c128ecb5926839fa132c29727ef941991cccf5362dbab3911b8f243b75d71b4
+MISC ChangeLog-2015 9780 SHA256 eabc6cf58a6b7c6cf43dd7547ddfc3a047569ee5b86e42c90d6029c2458cf61b SHA512 5f4b2289de6975b5df86c3dab472f9a58d3e83e40001c43b4823e93f804ca9401b407e974b04ba141add86c474ab2449020e69772c1cae33cc1b1792b9d768a1 WHIRLPOOL f0bc5d587dd6de751825c52c4352ea6cae5db29f92add6f4ff9274815a0a5b6fdc285bb039481af90f035e1018e54569f28bc6d0fbbb90796de1eeed7ab0f47c
+MISC metadata.xml 336 SHA256 dd2e2ac7956ad676fd393d73c5575c01871056df0f3f457dca0a176386818bf5 SHA512 32593908c71225b7869b03d96dde6b7ed0d3db25f921257cf5027c80830cca794d0ed30b73c3189edd34553d6766ae57daf8caceb106bc49398fb519fd95d28c WHIRLPOOL 0a1ed9322636fc56557487c8c81469205d49136adaf01e8e5b575c37b55d2e810822655d7c137a771247f8f6c0200de7497b614128c854dfe1825a360f62b03e
diff --git a/dev-tcltk/blt/blt-2.4z-r13.ebuild b/dev-tcltk/blt/blt-2.4z-r13.ebuild
new file mode 100644
index 000000000000..cda1412a7420
--- /dev/null
+++ b/dev-tcltk/blt/blt-2.4z-r13.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib toolchain-funcs
+
+MY_V_SUFFIX="-8.5.2"
+
+DESCRIPTION="Extension to Tk, adding new widgets, geometry managers, and misc commands"
+HOMEPAGE="
+ http://blt.sourceforge.net/
+ http://jos.decoster.googlepages.com/bltfortk8.5.2"
+SRC_URI="
+ https://dev.gentoo.org/~jlec/distfiles/${PN}${PV}${MY_V_SUFFIX}.tar.gz
+ http://jos.decoster.googlepages.com/${PN}${PV}${MY_V_SUFFIX}.tar.gz"
+
+IUSE="jpeg static-libs X"
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+DEPEND="
+ dev-lang/tk:0=
+ jpeg? ( virtual/jpeg:0= )
+ X? ( x11-libs/libX11 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}${MY_V_SUFFIX}"
+
+MAKEOPTS+=" -j1"
+
+src_prepare() {
+ epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile2.patch"
+ epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile3.patch"
+ # From blt-2.4z-6mdk.src.rpm
+ epatch "${FILESDIR}"/blt2.4z-64bit.patch
+
+ epatch "${FILESDIR}"/blt-2.4z-tcl8.5-fixpkgruntime.patch
+
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+
+ # Set the correct libdir and drop RPATH
+ sed \
+ -e "s:\(^libdir=\${exec_prefix}/\)lib:\1$(get_libdir):" \
+ -e 's:LD_RUN_PATH=.*$:LD_RUN_PATH="":g' \
+ -e "/RANLIB/s:ranlib:$(tc-getRANLIB):g" \
+ -i configure* || die "sed configure* failed"
+ sed \
+ -e "/^scriptdir =/s:lib:$(get_libdir):" \
+ -i Makefile.in demos/Makefile.in || die "sed Makefile.in failed"
+
+ sed \
+ -e "/AR/s:ar:$(tc-getAR):g" \
+ -e 's:0444:0644:g' \
+ -i src/Makefile.in || die
+
+ epatch \
+ "${FILESDIR}"/${P}-linking.patch \
+ "${FILESDIR}"/${P}-darwin.patch \
+ "${FILESDIR}"/${P}-gbsd.patch \
+ "${FILESDIR}"/${P}-tk8.6.patch \
+ "${FILESDIR}"/${P}-tcl8.6.patch \
+ "${FILESDIR}"/${P}-aclocal.patch
+
+ append-cflags -fPIC
+
+ mv configure.{in,ac} || die
+
+ eautoreconf
+}
+
+src_configure() {
+ LC_ALL=C \
+ econf \
+ --x-includes="${EPREFIX}/usr/include" \
+ --x-libraries="${EPREFIX}/usr/$(get_libdir)" \
+ --with-blt="${EPREFIX}/usr/$(get_libdir)" \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" \
+ --with-tk="${EPREFIX}/usr/$(get_libdir)" \
+ --with-tclincls="${EPREFIX}/usr/include" \
+ --with-tkincls="${EPREFIX}/usr/include" \
+ --with-tcllibs="${EPREFIX}/usr/$(get_libdir)" \
+ --with-tklibs="${EPREFIX}/usr/$(get_libdir)" \
+ --with-cc="$(tc-getCC)" \
+ --with-cflags="${CFLAGS}" \
+ --with-gnu-ld \
+ $(use_enable jpeg) \
+ $(use_with X x)
+}
+
+src_compile() {
+ emake LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ sed \
+ -e "s:\.\./src/bltwish:${EPREFIX}/usr/bin/bltwish:g" \
+ -e "s:\.\./bltwish:${EPREFIX}/usr/bin/bltwish:g" \
+ -e "s:/usr/local/bin/bltwish:${EPREFIX}/usr/bin/bltwish:g" \
+ -e "s:/usr/local/bin/tclsh:${EPREFIX}/usr/bin/tclsh:g" \
+ -i demos/{,scripts/}*.tcl || die
+
+ dodir \
+ /usr/bin \
+ /usr/$(get_libdir)/blt2.4/demos/bitmaps \
+ /usr/share/man/mann \
+ /usr/include
+
+ emake INSTALL_ROOT="${D}" install
+
+ dodoc NEWS PROBLEMS README
+ dohtml html/*.html
+ for f in `ls "${ED}"/usr/share/man/mann` ; do
+ mv "${ED}"/usr/share/man/mann/${f} "${ED}"/usr/share/man/mann/${f/.n/.nblt} || die
+ done
+
+ # fix for linking against shared lib with -lBLT or -lBLTlite
+ dosym libBLT24$(get_libname) /usr/$(get_libdir)/libBLT$(get_libname)
+ dosym libBLTlite24$(get_libname) /usr/$(get_libdir)/libBLTlite$(get_libname)
+
+ use static-libs || \
+ find "${ED}"/usr/$(get_libdir) -name "*.a" -print0 | \
+ xargs -r -0 rm -fv
+}
diff --git a/dev-tcltk/blt/files/blt-2.4z-aclocal.patch b/dev-tcltk/blt/files/blt-2.4z-aclocal.patch
new file mode 100644
index 000000000000..e7c62b5de7f3
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-aclocal.patch
@@ -0,0 +1,79 @@
+ aclocal.m4 | 6 +++---
+ configure.in | 38 +++-----------------------------------
+ 2 files changed, 6 insertions(+), 38 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 7441d3d..b86a6b2 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -11,11 +11,11 @@ if test "$cross_compiling" = yes; then
+ else
+ cat > conftest.$ac_ext <<EOF
+ [#]line __oline__ "configure"
+-#include "confdefs.h"
+-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
++[#include "confdefs.h"
++#ifdef __cplusplus
+ extern "C" void exit(int);
+ #endif
+-])dnl
++]dnl
+ [$2]
+ EOF
+ eval $ac_link
+diff --git a/configure.in b/configure.in
+index adde26d..b57eaa9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -83,35 +83,9 @@ PWD=`pwd`
+ #
+ # -----------------------------------------------------------------------
+
+-BLT_ENV_CC=$CC
+-
+-#
+-# CC search order
+-#
+-# 1. command line (--with-cc)
+-# 2. environment variable ($CC)
+-# 3. cached variable ($blt_cv_prog_cc)
+-# 4. check for program (AC_PROG_CC)
+-# 4. default to cc
+-#
+-
+-AC_MSG_CHECKING([which C compiler])
+-if test "x${blt_with_cc}" != "x" ; then
+- CC=${blt_with_cc}
+- unset ac_cv_prog_CPP
+- unset ac_cv_prog_CC
+-elif test "x${BLT_ENV_CC}" != "x" ; then
+- unset ac_cv_prog_CPP
+- unset ac_cv_prog_CC
+-elif test "x${blt_cv_prog_cc}" != "x" ; then
+- CC=${blt_cv_prog_cc}
+- unset ac_cv_prog_CC
+-else
+- AC_PROG_CC
+-fi
+-if test "x${CC}" = "x" ; then
+- CC=cc
+-fi
++AC_PROG_CC
++AC_PROG_CPP
++AC_PROG_EGREP
+
+ case $target in
+ *-*-cygwin*|*-*-mingw*)
+@@ -121,12 +95,6 @@ case $target in
+ ;;
+ esac
+
+-AC_MSG_RESULT([$CC])
+-
+-unset blt_cv_prog_cc
+-AC_CACHE_VAL(blt_cv_prog_cc, blt_cv_prog_cc=$CC)
+-AC_SUBST(CC)
+-AC_PROG_CPP
+ if test "x${GCC}" != "x" ; then
+ blt_have_gcc="yes"
+ else
diff --git a/dev-tcltk/blt/files/blt-2.4z-darwin.patch b/dev-tcltk/blt/files/blt-2.4z-darwin.patch
new file mode 100644
index 000000000000..0d766fe5e17f
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-darwin.patch
@@ -0,0 +1,72 @@
+--- configure.in
++++ configure.in
+@@ -183,9 +183,6 @@
+ blt_lib_prefix=""
+ fi
+ ;;
+- *-*-macosx)
+- blt_platform="macosx"
+- ;;
+ *)
+ blt_platform="unix"
+ ;;
+@@ -728,6 +725,9 @@
+ *-hpux*)
+ SHLIB_SUFFIX="sl"
+ ;;
++ *-darwin*)
++ SHLIB_SUFFIX="dylib"
++ ;;
+ *)
+ SHLIB_SUFFIX="so"
+ ;;
+@@ -1145,6 +1145,13 @@
+ LDFLAGS=""
+ ;;
+
++ *-darwin*)
++ SHLIB_CFLAGS=""
++ SHLIB_LD="${CC}"
++ SHLIB_LD_FLAGS='-dynamiclib -install_name $(libdir)/$@'
++ SHLIB_SUFFIX=".dylib"
++ ;;
++
+ *-dgux*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc"
+--- configure
++++ configure
+@@ -1279,9 +1279,6 @@
+ blt_lib_prefix=""
+ fi
+ ;;
+- *-*-macosx)
+- blt_platform="macosx"
+- ;;
+ *)
+ blt_platform="unix"
+ ;;
+@@ -3396,6 +3393,9 @@
+ *-hpux*)
+ SHLIB_SUFFIX="sl"
+ ;;
++ *-darwin*)
++ SHLIB_SUFFIX="dylib"
++ ;;
+ *)
+ SHLIB_SUFFIX="so"
+ ;;
+@@ -3943,6 +3943,13 @@
+ LDFLAGS=""
+ ;;
+
++ *-darwin*)
++ SHLIB_CFLAGS=""
++ SHLIB_LD="${CC}"
++ SHLIB_LD_FLAGS='-dynamiclib -install_name $(libdir)/$@'
++ SHLIB_SUFFIX=".dylib"
++ ;;
++
+ *-dgux*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc"
diff --git a/dev-tcltk/blt/files/blt-2.4z-gbsd.patch b/dev-tcltk/blt/files/blt-2.4z-gbsd.patch
new file mode 100644
index 000000000000..ffdadf1746e5
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-gbsd.patch
@@ -0,0 +1,54 @@
+Detect correctly Gentoo/*BSD CHOSTS:
+- *-*-freebsd* means tcl/tk libs will be like libtcl85.so, instead of
+ libtcl8.5.so
+- *-gentoo-*bsd means this is a Gentoo/*BSD system which uses the same toolchain
+ as linux, so we link in the same way.
+
+--- blt2.4z-8.5.2/configure.old 2012-05-06 18:11:45.000000000 -0400
++++ blt2.4z-8.5.2/configure 2012-05-06 18:15:25.000000000 -0400
+@@ -3376,7 +3376,7 @@
+ fi
+
+ case $target in
+- *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|OpenBSD-*|*-*-cygwin*|*-*-mingw*)
++ *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|*-*-freebsd*|OpenBSD-*|*-*-cygwin*|*-*-mingw*)
+ TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}"
+ TK_LIB_NAME="tk${TK_MAJOR_VERSION}${TK_MINOR_VERSION}"
+ ;;
+@@ -4079,6 +4079,12 @@
+ EXTRA_LIB_SPECS="-ldl"
+ ;;
+
++ *-gentoo-netbsd*|*-gentoo-freebsd*|*-gentoo-openbsd*)
++ SHLIB_CFLAGS="-fPIC"
++ SHLIB_LD="${CC}"
++ SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
++ ;;
++
+ *-netbsd*|*-freebsd*|*-openbsd*)
+ # Not available on all versions: check for include file.
+ ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
+--- blt2.4z-8.5.2/configure.in.old 2012-05-06 18:11:47.000000000 -0400
++++ blt2.4z-8.5.2/configure.in 2012-05-06 18:15:08.000000000 -0400
+@@ -708,7 +708,7 @@
+ fi
+
+ case $target in
+- *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|OpenBSD-*|*-*-cygwin*|*-*-mingw*)
++ *-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|*-*-freebsd*|OpenBSD-*|*-*-cygwin*|*-*-mingw*)
+ TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}"
+ TK_LIB_NAME="tk${TK_MAJOR_VERSION}${TK_MINOR_VERSION}"
+ ;;
+@@ -1241,6 +1241,12 @@
+ EXTRA_LIB_SPECS="-ldl"
+ ;;
+
++ *-gentoo-netbsd*|*-gentoo-freebsd*|*-gentoo-openbsd*)
++ SHLIB_CFLAGS="-fPIC"
++ SHLIB_LD="${CC}"
++ SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@'
++ ;;
++
+ *-netbsd*|*-freebsd*|*-openbsd*)
+ # Not available on all versions: check for include file.
+ AC_CHECK_HEADER(dlfcn.h, test_ok=yes, test_ok=no)
diff --git a/dev-tcltk/blt/files/blt-2.4z-ldflags.patch b/dev-tcltk/blt/files/blt-2.4z-ldflags.patch
new file mode 100644
index 000000000000..bc795d060de8
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-ldflags.patch
@@ -0,0 +1,30 @@
+diff --git a/src/shared/Makefile.in b/src/shared/Makefile.in
+index 5d93e82..db14156 100644
+--- a/src/shared/Makefile.in
++++ b/src/shared/Makefile.in
+@@ -18,7 +18,7 @@ SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@ @LD_RUN_PATH@
+ SHLIB_TCL_ONLY_LIB_SPECS = @SHLIB_TCL_ONLY_LIB_SPECS@
+ SHLIB_LIB_SPECS = @SHLIB_LIB_SPECS@
+ SHLIB_LD = @SHLIB_LD@
+-LDFLAGS = @LDFLAGS@ @LD_RUN_PATH@
++LDFLAGS += @LDFLAGS@
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -144,14 +144,14 @@ $(lib_so): $(OBJS)
+ $(CC) -c $(CC_SWITCHES) -DBLT_LIBRARY=\"$(scriptdir)\" \
+ $(srcdir)/bltInit.c
+ $(RM) $@
+- $(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ bltInit.o $(OBJS) \
++ $(SHLIB_LD) $(SHLIB_LD_FLAGS) $(LDFLAGS) -o $@ bltInit.o $(OBJS) \
+ $(SHLIB_LIB_SPECS)
+
+ $(tcl_only_lib_so): $(TCL_ONLY_OBJS)
+ $(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY=\"$(scriptdir)\" \
+ $(srcdir)/bltInit.c
+ $(RM) $@
+- $(SHLIB_LD) $(SHLIB_LD_FLAGS) -o $@ bltInit.o $(TCL_ONLY_OBJS) \
++ $(SHLIB_LD) $(SHLIB_LD_FLAGS) $(LDFLAGS) -o $@ bltInit.o $(TCL_ONLY_OBJS) \
+ $(SHLIB_TCL_ONLY_LIB_SPECS)
+
+ install: mkdirs install-lib install-demo
diff --git a/dev-tcltk/blt/files/blt-2.4z-linking.patch b/dev-tcltk/blt/files/blt-2.4z-linking.patch
new file mode 100644
index 000000000000..b5a5359171d3
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-linking.patch
@@ -0,0 +1,21 @@
+diff --git a/src/shared/Makefile.in b/src/shared/Makefile.in
+index db14156..a06111f 100644
+--- a/src/shared/Makefile.in
++++ b/src/shared/Makefile.in
+@@ -145,14 +145,14 @@ $(lib_so): $(OBJS)
+ $(srcdir)/bltInit.c
+ $(RM) $@
+ $(SHLIB_LD) $(SHLIB_LD_FLAGS) $(LDFLAGS) -o $@ bltInit.o $(OBJS) \
+- $(SHLIB_LIB_SPECS)
++ $(SHLIB_LIB_SPECS) $(LIBS)
+
+ $(tcl_only_lib_so): $(TCL_ONLY_OBJS)
+ $(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY=\"$(scriptdir)\" \
+ $(srcdir)/bltInit.c
+ $(RM) $@
+ $(SHLIB_LD) $(SHLIB_LD_FLAGS) $(LDFLAGS) -o $@ bltInit.o $(TCL_ONLY_OBJS) \
+- $(SHLIB_TCL_ONLY_LIB_SPECS)
++ $(SHLIB_TCL_ONLY_LIB_SPECS) $(LIBS)
+
+ install: mkdirs install-lib install-demo
+
diff --git a/dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile2.patch b/dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile2.patch
new file mode 100644
index 000000000000..1ff4fed5f51b
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile2.patch
@@ -0,0 +1,18 @@
+Source: mescalinum
+Upstream: N/A
+Reason: fix broken $DESTDIR support in Makefile
+--- Makefile.in.orig 2008-10-26 14:36:22.000000000 +0100
++++ Makefile.in 2008-10-26 14:37:04.000000000 +0100
+@@ -47,9 +47,9 @@ install-all:
+ (cd library; $(MAKE) install)
+ (cd man; $(MAKE) install)
+ (cd demos; $(MAKE) install)
+- $(INSTALL_DATA) $(srcdir)/README $(INSTALL_DIR)$(scriptdir)
+- $(INSTALL_DATA) $(srcdir)/PROBLEMS $(INSTALL_DIR)$(scriptdir)
+- $(INSTALL_DATA) $(srcdir)/NEWS $(INSTALL_DIR)$(scriptdir)
++ $(INSTALL_DATA) $(srcdir)/README $(INSTALL_ROOT)$(scriptdir)
++ $(INSTALL_DATA) $(srcdir)/PROBLEMS $(INSTALL_ROOT)$(scriptdir)
++ $(INSTALL_DATA) $(srcdir)/NEWS $(INSTALL_ROOT)$(scriptdir)
+
+ mkdirs:
+ @for i in $(instdirs) ; do \
diff --git a/dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile3.patch b/dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile3.patch
new file mode 100644
index 000000000000..c7065df39753
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile3.patch
@@ -0,0 +1,14 @@
+Source: mescalinum
+Upstream: N/A
+Reason: fix broken $DESTDIR support in library/Makefile
+--- library/Makefile.in.orig 2008-10-26 14:30:28.000000000 +0100
++++ library/Makefile.in 2008-10-26 14:31:40.000000000 +0100
+@@ -58,7 +58,7 @@ install: mkdirs pkgIndex
+ for i in $(miscFiles) ; do \
+ $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_ROOT)$(scriptdir) ; \
+ done
+- $(INSTALL_DATA) pkgIndex.tcl $(scriptdir)
++ $(INSTALL_DATA) pkgIndex.tcl $(INSTALL_ROOT)$(scriptdir)
+
+ mkdirs:
+ @for i in $(instdirs) ; do \
diff --git a/dev-tcltk/blt/files/blt-2.4z-tcl8.5-fixpkgruntime.patch b/dev-tcltk/blt/files/blt-2.4z-tcl8.5-fixpkgruntime.patch
new file mode 100644
index 000000000000..c8637b9c7c45
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-tcl8.5-fixpkgruntime.patch
@@ -0,0 +1,66 @@
+--- src/bltInit.c.orig 2008-05-29 00:05:10.000000000 +0200
++++ src/bltInit.c 2008-05-29 00:26:40.000000000 +0200
+@@ -413,7 +413,7 @@ Blt_Init(interp)
+ * Check that the versions of Tcl that have been loaded are
+ * the same ones that BLT was compiled against.
+ */
+- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, EXACT) == NULL) {
++ if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
+ return TCL_ERROR;
+ }
+ /* Set the "blt_version", "blt_patchLevel", and "blt_libPath" Tcl
+@@ -458,16 +458,23 @@ Blt_Init(interp)
+ register Tcl_AppInitProc **p;
+ Tcl_Namespace *nsPtr;
+
++ if (Tk_InitStubs(interp, TK_VERSION, 1) == NULL) {
++ return TCL_OK;
++ }
++
++#if 0
+ #if (TCL_VERSION_NUMBER >= _VERSION(8,1,0))
+ if (Tcl_PkgPresent(interp, "Tk", TK_VERSION, EXACT) == NULL) {
+ return TCL_OK;
+- }
++ }
+ #else
+ if (Tcl_PkgRequire(interp, "Tk", TK_VERSION, EXACT) == NULL) {
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+ }
+ #endif
++#endif
++
+ nsPtr = Tcl_CreateNamespace(interp, "blt::tile", NULL,
+ (Tcl_NamespaceDeleteProc *) NULL);
+ if (nsPtr == NULL) {
+@@ -507,7 +514,7 @@ Blt_Init(interp)
+ * Check that the versions of Tcl that have been loaded are
+ * the same ones that BLT was compiled against.
+ */
+- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, EXACT) == NULL) {
++ if (Tcl_InitStubs(interp, TCL_VERSION, EXACT) == NULL) {
+ return TCL_ERROR;
+ }
+ /* Set the "blt_version", "blt_patchLevel", and "blt_libPath" Tcl
+@@ -543,6 +550,11 @@ Blt_Init(interp)
+ if (!tkLoaded) {
+ register Tcl_AppInitProc **p;
+
++ if (Tk_InitStubs(interp, TK_VERSION, 1) == NULL) {
++ return TCL_OK;
++ }
++
++#if 0
+ #if (TCL_VERSION_NUMBER >= _VERSION(8,1,0))
+ if (Tcl_PkgPresent(interp, "Tk", TK_VERSION, EXACT) == NULL) {
+ return TCL_OK;
+@@ -553,6 +565,8 @@ Blt_Init(interp)
+ return TCL_OK;
+ }
+ #endif
++#endif
++
+ /* Initialize the BLT commands that use Tk too. */
+ for (p = tkCmds; *p != NULL; p++) {
+ if ((**p) (interp) != TCL_OK) {
diff --git a/dev-tcltk/blt/files/blt-2.4z-tcl8.6.patch b/dev-tcltk/blt/files/blt-2.4z-tcl8.6.patch
new file mode 100644
index 000000000000..8721940af2c3
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-tcl8.6.patch
@@ -0,0 +1,86 @@
+ src/bltScrollbar.c | 2 +-
+ src/bltTed.c | 6 +++---
+ src/bltVecMath.c | 8 ++++----
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/bltScrollbar.c b/src/bltScrollbar.c
+index 69662de..731e37b 100644
+--- a/src/bltScrollbar.c
++++ b/src/bltScrollbar.c
+@@ -534,7 +534,7 @@ ScrollbarWidgetCmd(clientData, interp, argc, argv)
+ } else {
+ fraction = ((double)pixels / (double)barWidth);
+ }
+- sprintf(interp->result, "%g", fraction);
++ sprintf(Tcl_GetStringResult(interp), "%g", fraction);
+ } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) {
+ int x, y, pos, barWidth;
+ double fraction;
+diff --git a/src/bltTed.c b/src/bltTed.c
+index 64c43e8..832ef9c 100644
+--- a/src/bltTed.c
++++ b/src/bltTed.c
+@@ -1504,7 +1504,7 @@ EditOp(dataPtr, interp, argc, argv)
+ tablePtr->flags |= ARRANGE_PENDING;
+ Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
+ }
+- interp->result = Tk_PathName(tedPtr->tkwin);
++ Tcl_SetResult(interp, (char*)Tk_PathName(tedPtr->tkwin), TCL_VOLATILE);
+ tedPtr->flags |= LAYOUT_PENDING;
+ EventuallyRedraw(tedPtr);
+ return TCL_OK;
+@@ -1678,7 +1678,7 @@ SelectOp(dataPtr, interp, argc, argv)
+ tedPtr->activeRectArr[4].width = grip - 1;
+ tedPtr->activeRectArr[4].height = grip - 1;
+
+- interp->result = Tk_PathName(entryPtr->tkwin);
++ Tcl_SetResult(interp, (char*)Tk_PathName(entryPtr->tkwin), TCL_VOLATILE);
+ active = 1;
+ break;
+ }
+@@ -1751,7 +1751,7 @@ RepOp(dataPtr, interp, argc, argv)
+ tablePtr->flags |= ARRANGE_PENDING;
+ Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr);
+ }
+- interp->result = Tk_PathName(tedPtr->tkwin);
++ Tcl_SetResult(interp, (char*)Tk_PathName(tedPtr->tkwin), TCL_VOLATILE);
+ tedPtr->flags |= LAYOUT_PENDING;
+ EventuallyRedraw(tedPtr);
+ return TCL_OK;
+diff --git a/src/bltVecMath.c b/src/bltVecMath.c
+index dc37af8..5117f63 100644
+--- a/src/bltVecMath.c
++++ b/src/bltVecMath.c
+@@ -764,20 +764,20 @@ MathError(interp, value)
+ if ((errno == EDOM) || (value != value)) {
+ Tcl_AppendResult(interp, "domain error: argument not in valid range",
+ (char *)NULL);
+- Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", interp->result,
++ Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", Tcl_GetStringResult(interp),
+ (char *)NULL);
+ } else if ((errno == ERANGE) || IS_INF(value)) {
+ if (value == 0.0) {
+ Tcl_AppendResult(interp,
+ "floating-point value too small to represent",
+ (char *)NULL);
+- Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", interp->result,
++ Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", Tcl_GetStringResult(interp),
+ (char *)NULL);
+ } else {
+ Tcl_AppendResult(interp,
+ "floating-point value too large to represent",
+ (char *)NULL);
+- Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", interp->result,
++ Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", Tcl_GetStringResult(interp),
+ (char *)NULL);
+ }
+ } else {
+@@ -786,7 +786,7 @@ MathError(interp, value)
+ sprintf(buf, "%d", errno);
+ Tcl_AppendResult(interp, "unknown floating-point error, ",
+ "errno = ", buf, (char *)NULL);
+- Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", interp->result,
++ Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", Tcl_GetStringResult(interp),
+ (char *)NULL);
+ }
+ }
diff --git a/dev-tcltk/blt/files/blt-2.4z-tk8.6.patch b/dev-tcltk/blt/files/blt-2.4z-tk8.6.patch
new file mode 100644
index 000000000000..f956c098138e
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-tk8.6.patch
@@ -0,0 +1,20 @@
+--- src/tkButton.c.orig 2013-01-04 23:24:45.000000000 -0500
++++ src/tkButton.c 2013-01-04 23:28:29.000000000 -0500
+@@ -526,8 +526,6 @@
+ static Blt_TileChangedProc TileChangedProc;
+ static Tcl_CmdProc ButtonCmd, LabelCmd, CheckbuttonCmd, RadiobuttonCmd;
+
+-EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp, char *script));
+-
+ #if (TK_MAJOR_VERSION > 4)
+ EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin,
+ int padX, int padY, int innerWidth, int innerHeight, int *xPtr,
+@@ -1890,7 +1888,7 @@
+ }
+ }
+ if ((butPtr->type != TYPE_LABEL) && (butPtr->command != NULL)) {
+- return TkCopyAndGlobalEval(butPtr->interp, butPtr->command);
++ return Tcl_EvalObjEx(butPtr->interp, butPtr->command, TCL_EVAL_GLOBAL);
+ }
+ return TCL_OK;
+ }
diff --git a/dev-tcltk/blt/files/blt2.4z-64bit.patch b/dev-tcltk/blt/files/blt2.4z-64bit.patch
new file mode 100644
index 000000000000..9f1c3c975eef
--- /dev/null
+++ b/dev-tcltk/blt/files/blt2.4z-64bit.patch
@@ -0,0 +1,24 @@
+--- blt2.4z/src/bltTree.c.64bit-fixes 2002-09-29 07:44:12.000000000 +0200
++++ blt2.4z/src/bltTree.c 2003-07-31 12:22:53.000000000 +0200
+@@ -95,17 +95,16 @@ static Value *TreeNextValue _ANSI_ARGS_(
+ */
+
+ #define REBUILD_MULTIPLIER 3
++#define START_LOGSIZE 5 /* Initial hash table size is 32. */
++#define MAX_LIST_VALUES 20 /* Convert to hash table when node
++ * value list gets bigger than this
++ * many values. */
+
+ #if (SIZEOF_VOID_P == 8)
+ #define RANDOM_INDEX(i) HashOneWord(mask, downshift, i)
+ #define BITSPERWORD 64
+ #else
+
+-#define START_LOGSIZE 5 /* Initial hash table size is 32. */
+-#define MAX_LIST_VALUES 20 /* Convert to hash table when node
+- * value list gets bigger than this
+- * many values. */
+-
+ /*
+ * The following macro takes a preliminary integer hash value and
+ * produces an index into a hash tables bucket list. The idea is
diff --git a/dev-tcltk/blt/metadata.xml b/dev-tcltk/blt/metadata.xml
new file mode 100644
index 000000000000..549667e75d56
--- /dev/null
+++ b/dev-tcltk/blt/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">blt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/bwidget/Manifest b/dev-tcltk/bwidget/Manifest
new file mode 100644
index 000000000000..34db915194f1
--- /dev/null
+++ b/dev-tcltk/bwidget/Manifest
@@ -0,0 +1,8 @@
+AUX bwidget-1.9.8-test.patch 499 SHA256 a6997e4d34e8f5fadd63cc5dee43d8b7d89e41bee9590ae89d60709ea5e25817 SHA512 cea568ef4c932b2b7dff5f8afd0d47e7c000c368d53cd23826f76e9f0446aa789df4391197662e8623d03381fd477928beb5f4bf687ddb48646cfdc9017cb064 WHIRLPOOL 65ef3332330c4b110216fbb9d16e250d51bcfca00eadfeaad8a4e43a00168946db94835abf24dd74231d274f8318f54aad2ecfabd628497fd2258c7312889196
+DIST bwidget-1.9.8.tar.gz 252668 SHA256 545016e3ee998991308f54d8ef26bbf16144ee50fa432b9100d37ef806bdb314 SHA512 437958871809c8ce285cbf4521ff08720d106dca708183ff94234015da2b04ccb3a7b05df13d8e3f46466106c91418607c5983fc4ed8d9c4285ae0a0b1071262 WHIRLPOOL 4ee88816e8abab426c846ccc8a688a347ba9bdc43288b10ec56fec3f695f7733140441a686f321035cb1aebfc100178c263945c8a36c4b15b1ad227af72ee844
+DIST bwidget-1.9.9.tar.gz 243001 SHA256 b0e943b31b3513e9cc9a49e3f71d8b895ab55f5c8dfeaf849c8c308697f13573 SHA512 6374c9127ab37dd2cc3ede30fc525a7d0f226a995e44f7b1c9751e1c5520090bfbbae5cfcb5cbeec4d1c89eb8f4cd7eb2e453ac055d4ae5ef4b7b77512d2e042 WHIRLPOOL 8801d61696deaed01ab10f18aa421db9e4d2db95b150be222c40fd57174526c472644ac8cdc089c05975becade45cfc53633609611b36510004f4813341e59cb
+EBUILD bwidget-1.9.8.ebuild 806 SHA256 d3b009ac7d8521d36ab98ae5009c0ede59129aa0feb28417a897647d1e58f9ef SHA512 385c1991d0b8e76dacf9aefbdd92ad3ffcbd3adffdf305db2ea006587ab21aa57f56642c04eae8ccab0590e247f7497dece02183315e5c1326d50780964aad2e WHIRLPOOL 9c599f241cce57058fec96bd300d1261c3c4468cf7ca17d5e1389f7075949e7760d4c852c7718de1f6071a8d43e6548b047e8ded701dc9d51648b4c96cf20fa2
+EBUILD bwidget-1.9.9.ebuild 829 SHA256 84392855ab6e5b5107563ac0b62c0a2a5386926fd6abc20520f18113554d80ea SHA512 a7b07e56b344bdc6336e0c7c2ca24c2afe2135838058cab0c1b3c34d71ea2d67b367e294ffcf7bde861b1e23dfa3335fc580cabd78f7bf068db07af6584240d5 WHIRLPOOL 078f7afc97d64b27e6cdf4ae6b39c947a57250c33a48485766879420bcfad3eb98dbc464cb11378dc42111a64494abd40c11c47ef79ca1b0ace5c67c228ef3f9
+MISC ChangeLog 2801 SHA256 aaa313a22f54c0520d9863ff4fbbaf3a4729529229875b5e5536037415adf971 SHA512 21329cdac3eb8f8207cfa4bcb95e201d1d14861c21dd3d38cef6e3802ff7ea7d82f0c4dffe305a6da0c71eb81ecdefcbf71bf4d5544fb24dc9a73fb108c2d210 WHIRLPOOL 27c5a5742aceb9696dda84e95350518c8cd6965f0a7ccd77a14b0e96c7b41c145bfcbcef9be5a99942d4fd3071b4a3a1ec0dd8df44e79825417187ea64c3000b
+MISC ChangeLog-2015 5523 SHA256 40e014ac4c41308e3bf35ed233cb891650b6ad75e787bed629f850aa9093271f SHA512 4742d46aa0f96029abbb9bddef5911127f02f7726b3b7f07dcbb9136c3d027bff523930f5ae5ec9a25a298563fb7dfc7dac196b805e5c237bd4751756015fc3f WHIRLPOOL c389b3f6d121345e3d02ad344c1e7471abecb32d48d596587fdbde4483fee175ed648513028585213310bd16add2af413ecd9d4dbafd89a84d1d0d687b9a9d73
+MISC metadata.xml 329 SHA256 71788a64c142cb63fd9274317a1507c6eedf850715a16ab111edbf441af58823 SHA512 c16db3fedc73cc41391e15f198396908ebd047c165c2bbe3c465f126dfb8266818d79f11ec343a2880058850a8164801616632f361b69db914e7d66823bb1851 WHIRLPOOL 31ca88d7d8cabf6167504446b3fbc97e7f883163468a07939a9a1107cc67cc87edf25ee19f15414c189e750a7af3365f70df93dab6d8fae4721e45b1c11dc4e9
diff --git a/dev-tcltk/bwidget/bwidget-1.9.8.ebuild b/dev-tcltk/bwidget/bwidget-1.9.8.ebuild
new file mode 100644
index 000000000000..f2838cb8f07f
--- /dev/null
+++ b/dev-tcltk/bwidget/bwidget-1.9.8.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib virtualx
+
+MY_PN=${PN/bw/BW}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="High-level widget set for Tcl/Tk"
+HOMEPAGE="http://tcllib.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/tcllib/${MY_PN}/${PV}/${P}.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE="doc"
+
+DEPEND="dev-lang/tk:0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-test.patch
+}
+
+src_test() {
+ VIRTUALX_COMMAND=tclsh
+ virtualmake tests/entry.test
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/${P}
+ doins *.tcl
+ doins -r images lang
+
+ insinto /usr/share/doc/${PF}/
+ doins -r demo
+ dodoc ChangeLog README.txt
+
+ use doc && dohtml BWman/*
+}
diff --git a/dev-tcltk/bwidget/bwidget-1.9.9.ebuild b/dev-tcltk/bwidget/bwidget-1.9.9.ebuild
new file mode 100644
index 000000000000..c7518e156e9c
--- /dev/null
+++ b/dev-tcltk/bwidget/bwidget-1.9.9.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib virtualx
+
+MY_PN=${PN/bw/BW}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="High-level widget set for Tcl/Tk"
+HOMEPAGE="http://tcllib.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/tcllib/${MY_PN}/${PV}/${P}.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc"
+
+DEPEND="dev-lang/tk:0"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.9.8-test.patch
+}
+
+src_test() {
+ VIRTUALX_COMMAND=tclsh
+ virtualmake tests/entry.test
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/${P}
+ doins *.tcl
+ doins -r images lang
+
+ insinto /usr/share/doc/${PF}/
+ doins -r demo
+ dodoc ChangeLog README.txt
+
+ use doc && dohtml BWman/*
+}
diff --git a/dev-tcltk/bwidget/files/bwidget-1.9.8-test.patch b/dev-tcltk/bwidget/files/bwidget-1.9.8-test.patch
new file mode 100644
index 000000000000..077abf308b88
--- /dev/null
+++ b/dev-tcltk/bwidget/files/bwidget-1.9.8-test.patch
@@ -0,0 +1,16 @@
+ tests/entry.test | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/entry.test b/tests/entry.test
+index 4bc3a5f..727a7d8 100644
+--- a/tests/entry.test
++++ b/tests/entry.test
+@@ -65,7 +65,7 @@ destroy .e
+
+ test Entry-2.1 {Entry} {
+ list [catch {Entry} msg] $msg
+-} {1 {wrong # args: should be "Entry path ..."}}
++} {1 {wrong # args: should be "Entry path ?arg ...?"}}
+ test Entry-2.2 {Entry} {
+ list [catch {Entry gorp} msg] $msg
+ } {1 {bad window path name "gorp"}}
diff --git a/dev-tcltk/bwidget/metadata.xml b/dev-tcltk/bwidget/metadata.xml
new file mode 100644
index 000000000000..f5ca0ddf0adf
--- /dev/null
+++ b/dev-tcltk/bwidget/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tcllib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/ck/Manifest b/dev-tcltk/ck/Manifest
new file mode 100644
index 000000000000..7a624b9f136d
--- /dev/null
+++ b/dev-tcltk/ck/Manifest
@@ -0,0 +1,7 @@
+AUX ck-8.0-gentoo.patch 4453 SHA256 f8abdb09449549750a5d1aef70f6575661da5bfd992b6fccd39589fa3bdf834d SHA512 cfe65801f1c91f123b580cc08759959be6060799721e688a4d2b11e73879f1b3c41d0b8f8192dff1a0e93d921f38737b283a272f92e7b740cc10ec7bd19c19d6 WHIRLPOOL a526c0f30a976258da6ca582d09f514e9331f15b7fabe1282192aa1ab23b70f915e89a189de261ed58d6229b1212b70b40b19f29c3531fd82ae21ce0881b9428
+DIST ck-8.0-tcl8.6.patch.xz 12836 SHA256 e414eb16f1905738474e2d1c773c369c54a219ede311289e1edbe1a22c53116b SHA512 55682b9490ac5470ef14213f0dac3fa10139a13a7e3d915773c50285038b3b566c140fcc5f4721a091744e45bbef405c2ee3ee22daf71a3a82148acba28b0dde WHIRLPOOL d5317abce4eaf875b9980a9e2051465df1f3a70b1edb764632623784a287d8096e36c4cf8b42a7d5f879a822dc9e273215ba438f1b865fb7a62b5bc1e2cc0147
+DIST ck8.0.tar.gz 400262 SHA256 11588244fcbbb1e19658357194ade5ad3877e6315a04530e6a41c18ee99babdf SHA512 68d92be354e5ec24830cc9a20d1cbb5a27d4e04369ceecf6fdad7759da3d9b4909970bf54abdf5f5b015fd0d08b8680a33cdcdf468b9007afc21e69c7381b262 WHIRLPOOL 69926cee3b4879d47f762425ca39ca08ca9bad2021162b7540af1edd1770fa4eeafe2e5be0c923787945779c7fc92cb7a168fe160bc75151b56182c45092f4cd
+EBUILD ck-8.0-r4.ebuild 920 SHA256 5595d24d1f3530262cb9f0f80cbb0dd4f90dca7dfe2d91868964257b2bec2720 SHA512 7d8b412006a4ee28fefaa2521684db3fafd52b885a4fff19349168dbe51ab1bac1e4c863e2d1c93cc19949adb3076b4d7d3c8f50a78ac4c50de72ce71f7a8ad2 WHIRLPOOL 32ef02284532de287f7cd48549130ae3f59d2dc85ea6d850bf75f003d77b6d207a37a917491065eafe68e99867555fe28cba2eff4f9e117a67ae48cfcf5954d7
+MISC ChangeLog 2461 SHA256 416332b3c7ebb27a8ba8857ac05066386d7b56efe2fc2a247e32985805306ea2 SHA512 aa5221e7938afaccf7070d34e8b94b598f884f47c2cd39a947c920c749a4ef9fd73b34c29d86ec9f2d2f9b655039525c9778925ff7634ebac0aa898342b2fe66 WHIRLPOOL ebb0d8964b406f46c471dceb7832376bd82bf760bac1bfc8a781be2e399149f2b174983706da980505df1dbd2ae03e8b714cd88eaa39c0f0ae4788a8598a7733
+MISC ChangeLog-2015 1893 SHA256 2884dd412eeaf8d8c4d1a677cdf8f2a143ba7fd0a2b897568580b45e64ac093c SHA512 1b51adacd711dc146e69b3ad5be3952c89d9ba556e89e14f39a7d0271f35180c3ea489dcb22972dc65e5affdd056561792deff7dd1a824eeb843e2a7510104c5 WHIRLPOOL e6d1fd13d62d4704dd262f3d9d3aa549e6ebf29f44d4fbc4bc4f6d64baa0f8c2647b0d08c6312333a83b15c879b8281e495b25cf04ed14cbb01136a174b948a3
+MISC metadata.xml 259 SHA256 f3ad7890286839b12dc011613c2ba3df199a206c295ba8c433a8fe7f0dcc5815 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639 WHIRLPOOL f5ad746e91e08e44d2d857057d7203fe515cbdd295f69a2d3ce2cb35343d2dc3f2879b57d00e8782bd416bfd36ce4504a7a91bbcf325eabe71075d0726e2bece
diff --git a/dev-tcltk/ck/ck-8.0-r4.ebuild b/dev-tcltk/ck/ck-8.0-r4.ebuild
new file mode 100644
index 000000000000..78193f8a902b
--- /dev/null
+++ b/dev-tcltk/ck/ck-8.0-r4.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+MY_P=${PN}${PV}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="A curses based toolkit for tcl"
+HOMEPAGE="http://www.ch-werner.de/ck/"
+SRC_URI="
+ http://www.ch-werner.de/ck/${MY_P}.tar.gz
+ https://dev.gentoo.org/~jlec/distfiles/${P}-tcl8.6.patch.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ dev-lang/tk
+ sys-libs/ncurses[gpm]
+ sys-libs/gpm
+ "
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${WORKDIR}"/${P}-tcl8.6.patch
+ sed \
+ -e "/^LIB_INSTALL_DIR/s:lib$:$(get_libdir):g" \
+ -i Makefile.in || die
+}
+
+src_configure() {
+ econf \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" \
+ --enable-shared
+}
+
+src_compile() {
+ emake \
+ CURSES_LIB_SWITCHES="$($(tc-getPKG_CONFIG) --libs ncursesw) -lgpm"
+}
diff --git a/dev-tcltk/ck/files/ck-8.0-gentoo.patch b/dev-tcltk/ck/files/ck-8.0-gentoo.patch
new file mode 100644
index 000000000000..727f7e8b5356
--- /dev/null
+++ b/dev-tcltk/ck/files/ck-8.0-gentoo.patch
@@ -0,0 +1,133 @@
+ Makefile.in | 40 ++++++++++++++++------------------------
+ 1 files changed, 16 insertions(+), 24 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 00960d9..16d4123 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -29,9 +29,9 @@ exec_prefix = @exec_prefix@
+ # The following definition can be set to non-null for special systems
+ # like AFS with replication. It allows the pathnames used for installation
+ # to be different than those used for actually reference files at
+-# run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
++# run-time. DESTDIR is prepended to $prefix and $exec_prefix
+ # when installing files.
+-INSTALL_ROOT =
++DESTDIR =
+
+ # Directory from which applications will reference the library of Tcl
+ # scripts (note: you can set the CK_LIBRARY environment variable at
+@@ -39,22 +39,22 @@ INSTALL_ROOT =
+ CK_LIBRARY = $(prefix)/lib/ck$(VERSION)
+
+ # Path name to use when installing library scripts:
+-SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(CK_LIBRARY)
++SCRIPT_INSTALL_DIR = $(DESTDIR)$(CK_LIBRARY)
+
+ # Directory in which to install the archive libck*:
+-LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
++LIB_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/lib
+
+ # Directory in which to install the program cwsh:
+-BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
++BIN_INSTALL_DIR = $(DESTDIR)$(exec_prefix)/bin
+
+ # Directory from which the program cwsh should be referenced by scripts:
+ BIN_DIR = $(exec_prefix)/bin
+
+ # Directory in which to install the include file ck.h:
+-INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
++INCLUDE_INSTALL_DIR = $(DESTDIR)$(prefix)/include
+
+ # Top-level directory for manual entries:
+-MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
++MAN_INSTALL_DIR = $(DESTDIR)$(prefix)/share/man
+
+ # Directory in which to install manual entry for cwsh:
+ MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1
+@@ -96,7 +96,7 @@ LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(CURSES_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@
+
+ # To change the compiler switches, for example to change from -O
+ # to -g, change the following line:
+-CFLAGS = -O
++#CFLAGS = -O
+
+ # To disable ANSI-C procedure prototypes reverse the comment characters
+ # on the following lines:
+@@ -231,14 +231,14 @@ configInfo: Makefile
+ @echo "CK_CURSES_INCLUDES = ${CURSES_INCLUDES}" >> configInfo
+ @echo "CK_LIBS = ${CURSES_LIB_SWITCHES} @LIBS@" >> configInfo
+
+-install: install-binaries install-libraries
++install: install-man install-binaries install-libraries
+
+ install-binaries: $(CK_LIB_FILE) cwsh
+ @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
+ do \
+ if [ ! -d $$i ] ; then \
+ echo "Making directory $$i"; \
+- mkdir $$i; \
++ mkdir -p $$i; \
+ chmod 755 $$i; \
+ else true; \
+ fi; \
+@@ -251,12 +251,12 @@ install-binaries: $(CK_LIB_FILE) cwsh
+ @$(INSTALL_PROGRAM) cwsh $(BIN_INSTALL_DIR)/cwsh
+
+ install-libraries:
+- @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
++ @for i in $(DESTDIR)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
+ $(SCRIPT_INSTALL_DIR) ; \
+ do \
+ if [ ! -d $$i ] ; then \
+ echo "Making directory $$i"; \
+- mkdir $$i; \
++ mkdir -p $$i; \
+ chmod 755 $$i; \
+ else true; \
+ fi; \
+@@ -270,13 +270,13 @@ install-libraries:
+ done;
+
+ install-demos:
+- @for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \
++ @for i in $(DESTDIR)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \
+ $(SCRIPT_INSTALL_DIR)/demos \
+ $(SCRIPT_INSTALL_DIR)/demos/images ; \
+ do \
+ if [ ! -d $$i ] ; then \
+ echo "Making directory $$i"; \
+- mkdir $$i; \
++ mkdir -p $$i; \
+ chmod 755 $$i; \
+ else true; \
+ fi; \
+@@ -301,11 +301,11 @@ install-demos:
+ done;
+
+ install-man:
+- @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
++ @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR); \
+ do \
+ if [ ! -d $$i ] ; then \
+ echo "Making directory $$i"; \
+- mkdir $$i; \
++ mkdir -p $$i; \
+ chmod 755 $$i; \
+ else true; \
+ fi; \
+@@ -326,14 +326,6 @@ install-man:
+ $$i > $(MAN3_INSTALL_DIR)/$$i; \
+ chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
+ done;
+- @cd $(SRC_DIR)/doc; for i in *.n; \
+- do \
+- echo "Installing doc/$$i"; \
+- rm -f $(MANN_INSTALL_DIR)/$$i; \
+- sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
+- $$i > $(MANN_INSTALL_DIR)/$$i; \
+- chmod 444 $(MANN_INSTALL_DIR)/$$i; \
+- done;
+
+ Makefile: $(SRC_DIR)/Makefile.in
+ $(SHELL) config.status
diff --git a/dev-tcltk/ck/metadata.xml b/dev-tcltk/ck/metadata.xml
new file mode 100644
index 000000000000..227dda5ba584
--- /dev/null
+++ b/dev-tcltk/ck/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/combobox/Manifest b/dev-tcltk/combobox/Manifest
new file mode 100644
index 000000000000..0992340a97e4
--- /dev/null
+++ b/dev-tcltk/combobox/Manifest
@@ -0,0 +1,5 @@
+DIST combobox-2.3.tar.gz 37327 SHA256 05d03337730c9a5b5bc509fca2abf50d755bb6f9b752f0d0454870070f1587c6 SHA512 6c85ed671ad64d671630bba09cbcbbcecee91d0ed77a63eee60b1b1ae12caf6312ab1da9a1cbb8ac949136ac37889c20f4dbd0097e41c8eeb3b018ebbafcf36e WHIRLPOOL 8833afd426c7befd99930a425d8f1785f5c21640b57598a9964c36d9fe33a3d6b197d68708ade17f41559258bfea1207781d70a5e65ac5d59f07705d70e42a7e
+EBUILD combobox-2.3-r1.ebuild 533 SHA256 b21da4a9754dd24ebd9227d2558024d47d05349c8ceda6a51825e50e0dded801 SHA512 793158090b58f4ec89cc41c7b8493a96883d71c548d542bc9b0d7d62a9f7c4030afb72ca7e35214412a522ea3fa2dd53d16071e43374e10ef21882b64e6e2893 WHIRLPOOL d25f90f82ac19557e660d42a76e4066131058da4eb113326e25f557be6c39a7364f817121d9483c95962d45500a0ceeabd28c58694a43a832f9dcbc3dfa8b20c
+MISC ChangeLog 2573 SHA256 49d6aec14787034745bf317cfad94d2868699f87d4710333356b898d54cb82bc SHA512 4d2d028c40cb02553269bdb7de9cdb50cde516b140f420419f75f260c7d069952f9399fec99f09eb36be3125c550fe9428de6aaec9e73d75a7f0b2d010eacdc7 WHIRLPOOL 9b9092ad09333cc72e473c3cef37cb59c775f8313831ff8d6e85321b28eab0476cf4b9375c2041046cb7bea0068cd275e2b24dc76470f5ebd328e81aa9028e9a
+MISC ChangeLog-2015 1366 SHA256 8b7c139a921827078208314ed7526fee6fc4ff925d42d876b84cc255cc0a2a24 SHA512 989c8562b58aa55c3a4ee875748d8bfbf5e93494bcd7e56ff605530df12890b425c98bedfa2abbda707c5430734b9073edd5e985bcbea9e885221b21e2f720f0 WHIRLPOOL 9414dbdf4a106a09c27277ec9e0d6637b3b92579dbb211da5c9fccefb884d6b82462b07ed0cc79b687e6e9a486aeac4fb0a09ab08e3d1d5b7ac064009291d7f2
+MISC metadata.xml 259 SHA256 bbfbeb80ffccffa8e7f837d2c93e994bbe024d565ae3a31d30c6646e80a684c8 SHA512 19fb78cf4029c154954a40df40e28fc8d98a8b7e6b42f97259f664d44c29b284feffb9d073cadc7f90b5654a64b2466e186cb677d3a11830206f173eb9057706 WHIRLPOOL 75b8dd1a97dde63f9cc9f73b5951eaf54579460763ef7cbe6f3a9a0739070601d762152ea00df8b476b80e92e5c29b611a494bac5ab747298942530cabe0ee84
diff --git a/dev-tcltk/combobox/combobox-2.3-r1.ebuild b/dev-tcltk/combobox/combobox-2.3-r1.ebuild
new file mode 100644
index 000000000000..18deabbbf549
--- /dev/null
+++ b/dev-tcltk/combobox/combobox-2.3-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="A combobox megawidget"
+HOMEPAGE="http://www1.clearlight.com/~oakley/tcl/combobox/index.html"
+SRC_URI="http://www1.clearlight.com/~oakley/tcl/combobox/${P}.tar.gz"
+
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="dev-lang/tcl:0="
+DEPEND=""
+
+src_install() {
+ insinto /usr/$(get_libdir)/${P}
+ doins *tcl *tmml *n
+ dodoc *txt
+ dohtml *html
+}
diff --git a/dev-tcltk/combobox/metadata.xml b/dev-tcltk/combobox/metadata.xml
new file mode 100644
index 000000000000..8425c0d53cb0
--- /dev/null
+++ b/dev-tcltk/combobox/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/expect-lite/Manifest b/dev-tcltk/expect-lite/Manifest
new file mode 100644
index 000000000000..ec25df9d6001
--- /dev/null
+++ b/dev-tcltk/expect-lite/Manifest
@@ -0,0 +1,39 @@
+DIST expect-lite_4.0.3.tar.gz 99862 SHA256 9f29a03b6e9924476286891ef97099b74a0262f706f7b87fad8e58cdf467a644 SHA512 2dc07be8af649c680c436f1c15f350a56684d6126e243f75c0b3ad1d39d962680b6b482d92b78c91fa28ab5e22c09d9f53c1393a08b97361a46ebec821d1afc3 WHIRLPOOL 004bba356615c92809a4206664eff0ba2e2a90ed76c19c87b54dc56a6d5c5ef028cd7fe02a4323d3fbffec5977f1b308bf3771c6f925c27e85a21852baf84169
+DIST expect-lite_4.1.0.tar.gz 106191 SHA256 fd72d91808641354986e1f86244e1eb51093a321636d2a9f9aaa65676dcd649d SHA512 23af747693d735d0546dad272d61bf96fba6fc7e43d5e2432ce8bb09662f06aaa3c130bf775c8d567982d8f42068e1689779646015baef64a8fb91350e9c9941 WHIRLPOOL c68e384b6932a7e4e9ef70c606f84353d2bbff249e5e62c7045cbb5e73e3ca03e5e6f346e9931d25452ce1733c58da3e37fe6a4488a8236800af1a96030bc59f
+DIST expect-lite_4.1.2.tar.gz 108253 SHA256 cc5c27f1c1f86708dfa19f33dba2f8e4de030a568328778d53c6115ca1bd2102 SHA512 db0f37c88f21d22116cc94085ca50d6dac91e1bd5c7b7b28893a75c2597dbd4f30d82baedcbb2da7cfe504b10ce05f780fd84ea4eb037726a4c27e407ede2e7d WHIRLPOOL 09939aca8a61b374ee303a09d4bd985e5c5c1a3b7b987b3c0003b4d6ce7759b851c7a5e5fef65e7ae9646a1d946d6cc4e6d1ec03a7e5b876666601837082874b
+DIST expect-lite_4.2.0.tar.gz 111827 SHA256 4735511e20b63e975b4e1a241685a70d2dc029e260c7a179b33f3a4b46018312 SHA512 7ad1a85b8f6c74c1e8733440220aab86a721f5a76ea4a09b86a9672cd8cd4ae3dd9ca5f8081a36fca66d785be2b50a8bedd6eec368b84f4007b4974705e3ca9e WHIRLPOOL 4ecae5bb7f6315f4ff16a862c91b09391ebba864bc6836073e5cfef06692ace9e43328e3a6fce4a46889a3d97e7acfaf8890c51a004de5213cce5d19df143b62
+DIST expect-lite_4.2.1.tar.gz 114647 SHA256 f9cb40596efcacb1436010fc7f24594f78ef85a32bedbdf540e440974a843943 SHA512 b8ceca72e754bb803a89155adbbf089803034b8426bc56ac26c3b2a9636b85bee58d73a516fa5a421a900af9066a3bb3ec9631fb4a69ed15bca1510f6a566f6f WHIRLPOOL 5860f2dbc05a3225dd8deda94feed808dfbc9ac8b8507c3d8ca536743909427b2cb8865cd735d8faac1a42217f6e2d778be79621cac7291d4ed721341a979624
+DIST expect-lite_4.2.2.tar.gz 115142 SHA256 c655651f312e31b1de19d09567b4e210f88f5fb6baf4986ec1d92d78702f161b SHA512 7cee9e85c711595159f69d09fd1f1508e2da2a52755a98fe9b00f26467c5ebc6eef9e871452d1efbe505348138ca1a8eb02473e1276c2ad7b25306c70bc5a550 WHIRLPOOL 460a43efc5fae5c5002f90bf3b66b49c2c5f4ee2c29e80a6452d7622fc7d8a46237aca152e8f113fc84ce9ea0800a2414daa4a09d28d79a96f3a527319b56f48
+DIST expect-lite_4.3.0.tar.gz 122260 SHA256 d18189e75013c7b3f59225f98953efcef2eebcec13949f0a005ab3693087ced7 SHA512 a910932322ba691034e7fc07c7aa2a3912dcb1110064d301e28021e4c7c0414c996bfb7933e09f1656b918a47a69ea145da5f7a66102328b82a083334338b417 WHIRLPOOL e329c3a3d6711b080d6f58390838108d7a86eb250e03ffa01fc2fcf4351fda808768456ff9528c50461abc55c39018af36751bbecb304b81fecefde4632459a7
+DIST expect-lite_4.3.1.tar.gz 123263 SHA256 92aef2e72aac7da34030de4f64b2b8ae03a9616c489d8a9e149d10843b4b0205 SHA512 b967dfb0ea310356532c5702f2542eb1f1f45d6089b03c74c895e8e29e09c8cbb6f8dd53f1ee98a8e2e9f2213045cbbdeba1b949e713a12609bb4cd069a87efd WHIRLPOOL fe08d55644d0e24c488930b4cb6895db4eda7932cd9805e279da6608030ef5d5d6b307c79e61ab17d22778df460f4e6c38bf683fbcaef37537b10ae1aef2150a
+DIST expect-lite_4.3.2.tar.gz 123364 SHA256 f1cd31f6adc091bf471963b6c92444200d0997b0b031d10bb8833caf576fc1ff SHA512 c400a091f0fc60a4523d1fd8a72b492c00f786ef0200bc0350432d353f80273ccb1b756002cc0a09363d7b0339304ac115ee5e53d9c3be3be97f948dc7d911af WHIRLPOOL 30dfee9af3091a6bbd9153d64ec246c83e8e2c48f5e60b93c85da02355157ca7b12a43925d682be1a6e2b1c197ce85f96868ec10c05153779e24ad5173486c2e
+DIST expect-lite_4.3.3.tar.gz 124141 SHA256 c73247c60a9046dbe58acc1816ea384dbd5ca3fd9b07aa0a99fde2aff78d61b9 SHA512 b234033c09fa499090ae1ee31e3bbb70cfd498276465b7d76705e0f3b6dca36dea5321bcecd27067db957c1c5e158abe23fe787bf24c46336ae967ece605680d WHIRLPOOL 5f383cac7a54efd978f016c2701fb30544aacf485900a66d456653101c32c053f48737a8b9a10d2efff6113ae7261a168fb8ec9d1abcb739405d14a60fe0403c
+DIST expect-lite_4.4.0.tar.gz 134592 SHA256 ec8aac5ca2c3313b59d096114e7ee70368d021b82035878de63e5dbfc16c234a SHA512 b5fe25cb39d30fe0e65441e1510de4d0bd5e8374dfe4505d982d8778d4fa747d679fc5251ce330db0308a9795b8628270aabc1d52c453db648ae0bb9d7c9a922 WHIRLPOOL e73a8d13db5daed2d716a6df4e9e531daf252e39a4f3bdfb58255537b7def013339b11d90534b7ddf0a7955e03edb40129db4273d52bf6d3db3e06b7a0abf2e4
+DIST expect-lite_4.4.1.tar.gz 134671 SHA256 0bec63a13b197acb1c803a3cab8f0aba56c5f5dc248a301644b30919a0fddaea SHA512 683d054f6e557ba114684de327a9c01fd27c5f2fdc6324a7f5b80846674e78bf8343b2ce804523df5a72ab4b77a973b571e9073aabf30f60ce4ba3a8946b6267 WHIRLPOOL 18c6180c9f5af73e93a0ffa29460a6a5a6c468e9734c78e34cc27c6509f4c0d91ee6cf5da072dfd78a0590582810eb3ce2ecfbe5c2df4188905eb15cd8d2bd2a
+DIST expect-lite_4.5.0.tar.gz 138091 SHA256 94b04307a4bb7e3feb6b042579743b02f09bff21f45740241004bde889f4a308 SHA512 6e94337b5438135117c1c2d863548b7a3bc1020a304ed510aa23f69b4dd2085db2ef57a2133d7dd374b16bf5b6ae24a58451655169e3d779fce59b98c9baf279 WHIRLPOOL 2d2cdb014ffb7e1bb5ee2c9e78fec274d8481d0a8539a2d25ed4cb6abd1214ef46d2ff1e6b2c8bc7bac8e8501a8d141e3b252588242121323d2debc4951d2869
+DIST expect-lite_4.6.0.tar.gz 142367 SHA256 1a094f42f8775190300309ac9cfa617c73e896cbc52614c1f5a770afe7dc9bd0 SHA512 b9c3e27503cf5b368cd3b6e4ce2006de67ea7779f40463c37f9eee23d1e54fcbbc3fda2bd236b97efe64f513d166a9c90f08e54f8e0f0147b4caa425ada231db WHIRLPOOL d8052531c122c83870bb86e11b66f82022e633d648bfe74604c603abd8f25ca3e6a41c033e98dd57bea3104531935cc20a0086c04efe8930bdd282f300473aff
+DIST expect-lite_4.6.1.tar.gz 142875 SHA256 10d963ab1eeb27ec51d494958e1050493e2448e90192e5f26191240a8dc375d4 SHA512 a250f34472dad6c44149edf85d35f7ea159e0673aa5619864a71eb78003d0c1a2ec3d25505618f616d12d82d50bda8039a239b443014b43b2387059e6b6eb7d6 WHIRLPOOL c9429bc11506c0547b5e2dbdaf70298b65e4f13c4a7511d484da6723649d53aa4713c769bfd5f27fb824479d9078b6751dfa521058f32780f80ab510a56d3fcc
+DIST expect-lite_4.6.2.tar.gz 143721 SHA256 ad17fccbfdd43c4324a5bd712aca9979e1c08feb67eae7b52d7e27c6f4f906e2 SHA512 573658e32d64643e7cdddc98b3bd4f393ce926c9362bacdf3cd52ab59df4cc68953be9b972c29f5d3d115f67437a050871edd366b1e6ffbf39ba28216c360f69 WHIRLPOOL 0aa77adc6e5aa7c0286acfb413a485f3652e62c87e8676fa3814097ef1eb275c49622afa95e50f7f57f1e54e36e72c917ffcc0b93394775462430d9ff004a1b8
+DIST expect-lite_4.7.2.tar.gz 145084 SHA256 641b62b9273241fc30e7b45719933ab076845e282b9972f05fde12a6c099a553 SHA512 1f635f87fb53624f687477bae41edd37474c5358de368af8065d4222181ed4a5efdb55c8fda47e1f1b4c163fa2a423e7d84a7da8415b17cd250417432ee0fc5b WHIRLPOOL e7cfebe43a377b05fd62b67963ea6e240c21e0feba270136861399672a2da89104f5ef29862d3d8891d61e6aa75dbac584b1d70ba7c9e0a152d5d6f355e3d717
+DIST expect-lite_4.8.0.tar.gz 148917 SHA256 150d87e7ee9aacf01ba3a7d9c7afd06f3ce49ad6c3ff833c8064ec62b17ab0af SHA512 b4956dbcdde1e5648a51be99069069be6ff2ae6fb7a67116a35bbbb8786228920e9177bd1b14d0ac3dd0a8ebdd6fa523c62bb7f23c84407ebe73abe3523e43c0 WHIRLPOOL 80fbe5f94027d057fec00d45c40a3902a946ba09690d11957014ce73ec550a37b967f50123006ebd265f1f3f8edb32b764f00cee80a44ac03420e13130993185
+EBUILD expect-lite-4.0.3.ebuild 618 SHA256 3e0c05ae06608d3678e22219b1981ca4b94289ed976c0f18a8772414089bfac1 SHA512 d1f01677200540ad29f3a50f374362e624954ff93b95ecf19c244ecb11967e00d288ac94d7e43a15d0dd629ea44b6a5d7f0d7b36cdb610a0489432f8ca30999d WHIRLPOOL 33b2d74f144add5664dc0e79d90eaf53f0e6209f2615b113b1c961a5c74056ec50af126f49a5744bd085291262c69f9d7ae7d9150d750dc3a48efec3ea278691
+EBUILD expect-lite-4.1.0.ebuild 620 SHA256 da9aeab9cdf436267dcc852b4b393a3014baf6f7d66baa8e0ea5f925a6ae4f1e SHA512 39ba1c20348eb2597d071c573e6526b3a8fa3b753f62d9ea558fd9f3f0e7fe1a020bd9b8fcdad8e79cfbb756ed8cac1bb0369504cdd9892631d0d19e3ef7dc33 WHIRLPOOL 693493294000eb8fcbf7ed1c75a1927d876ce8860e087887afc7b930a8eb77f902bb45103dcb5aef3083367a322b3e8aa1cc1f50e42014efe95cb0d809eed099
+EBUILD expect-lite-4.1.2.ebuild 620 SHA256 da9aeab9cdf436267dcc852b4b393a3014baf6f7d66baa8e0ea5f925a6ae4f1e SHA512 39ba1c20348eb2597d071c573e6526b3a8fa3b753f62d9ea558fd9f3f0e7fe1a020bd9b8fcdad8e79cfbb756ed8cac1bb0369504cdd9892631d0d19e3ef7dc33 WHIRLPOOL 693493294000eb8fcbf7ed1c75a1927d876ce8860e087887afc7b930a8eb77f902bb45103dcb5aef3083367a322b3e8aa1cc1f50e42014efe95cb0d809eed099
+EBUILD expect-lite-4.2.0.ebuild 620 SHA256 da9aeab9cdf436267dcc852b4b393a3014baf6f7d66baa8e0ea5f925a6ae4f1e SHA512 39ba1c20348eb2597d071c573e6526b3a8fa3b753f62d9ea558fd9f3f0e7fe1a020bd9b8fcdad8e79cfbb756ed8cac1bb0369504cdd9892631d0d19e3ef7dc33 WHIRLPOOL 693493294000eb8fcbf7ed1c75a1927d876ce8860e087887afc7b930a8eb77f902bb45103dcb5aef3083367a322b3e8aa1cc1f50e42014efe95cb0d809eed099
+EBUILD expect-lite-4.2.1.ebuild 620 SHA256 da9aeab9cdf436267dcc852b4b393a3014baf6f7d66baa8e0ea5f925a6ae4f1e SHA512 39ba1c20348eb2597d071c573e6526b3a8fa3b753f62d9ea558fd9f3f0e7fe1a020bd9b8fcdad8e79cfbb756ed8cac1bb0369504cdd9892631d0d19e3ef7dc33 WHIRLPOOL 693493294000eb8fcbf7ed1c75a1927d876ce8860e087887afc7b930a8eb77f902bb45103dcb5aef3083367a322b3e8aa1cc1f50e42014efe95cb0d809eed099
+EBUILD expect-lite-4.2.2.ebuild 620 SHA256 e3afffa841a4b9c9e6c6462f394ec95a526ed4964dafbb0fa493c9506068e092 SHA512 f7d83648c1d5dff0c6d92302fc5880478d1a4be277627c74d9cca778dd2906ad49a3e9e806a4bf298395af1540e1bb33c21fca92ae469ed298b7cb457623a1ae WHIRLPOOL de4a5c5bd8b32a37ba2bf6936b93a42ed19fb5feaea86f7a245dd98b7900a16f0e9432ae5b5f2c067f4781ab41274a582105db99d92e1a427644b7ef9d83f964
+EBUILD expect-lite-4.3.0.ebuild 618 SHA256 9aa107f1905fdfa16106aa8ab3af87fbc8a6cb026027f69b655faeb60f8951c7 SHA512 9463d822ee3a2a912b7e9d10bc80647cfeae69abd2e73ba22148f7654e275c3c4ffa555a50bcb2280d409c5c12b852b533473664fc5dcd672cc96fe263088ab3 WHIRLPOOL a1c3ee947ce1cb9a31d04bafcf840c6aa900f7d2f49c74594c9f7b648de41c54733aa68b545d241625810660f7aa3fc8747f418ed7ebef014599745a4cf545e1
+EBUILD expect-lite-4.3.1.ebuild 618 SHA256 9aa107f1905fdfa16106aa8ab3af87fbc8a6cb026027f69b655faeb60f8951c7 SHA512 9463d822ee3a2a912b7e9d10bc80647cfeae69abd2e73ba22148f7654e275c3c4ffa555a50bcb2280d409c5c12b852b533473664fc5dcd672cc96fe263088ab3 WHIRLPOOL a1c3ee947ce1cb9a31d04bafcf840c6aa900f7d2f49c74594c9f7b648de41c54733aa68b545d241625810660f7aa3fc8747f418ed7ebef014599745a4cf545e1
+EBUILD expect-lite-4.3.2.ebuild 618 SHA256 12371be3ec714954a472bcfa197072fddaaf3218858c24d3eb079da00f3c91df SHA512 5f0672d787b2f87c14dfa3081551334fb53d97c33578fe2bcc73d041a89d5f7841225b0ecdc0a01de3ebe6ff1a786314021558ccd04b1adbd12a281ec2239e7b WHIRLPOOL 059b705919d6411fcc49419861ad1f1c37b70466cda190a17257bf55cf1c362657e5c383aa2d3d7176b9392d87a89ad6539beb3feebb0c557476ae639f18d091
+EBUILD expect-lite-4.3.3.ebuild 618 SHA256 12371be3ec714954a472bcfa197072fddaaf3218858c24d3eb079da00f3c91df SHA512 5f0672d787b2f87c14dfa3081551334fb53d97c33578fe2bcc73d041a89d5f7841225b0ecdc0a01de3ebe6ff1a786314021558ccd04b1adbd12a281ec2239e7b WHIRLPOOL 059b705919d6411fcc49419861ad1f1c37b70466cda190a17257bf55cf1c362657e5c383aa2d3d7176b9392d87a89ad6539beb3feebb0c557476ae639f18d091
+EBUILD expect-lite-4.4.0.ebuild 620 SHA256 c4199a0567300078c3956fe854c482cbbd9cf6b21a55668fd4106ef69e5cc7a3 SHA512 6f05ef1932c14cd34df357862f99120c19d59f7bc408f916c68eb9dd7449c7cd81c23d7133129c34ee9f9b46a80ce2e6ef9c00e86771480423c7f8e52a20d461 WHIRLPOOL 4af698fd95ad13d30a18d473ed6c666537e57b058828421af4857fe8957356401b11f99194f393a90e9f02049fda5f96a6f72a2021e746ffbb7021b5aed6de42
+EBUILD expect-lite-4.4.1.ebuild 618 SHA256 12371be3ec714954a472bcfa197072fddaaf3218858c24d3eb079da00f3c91df SHA512 5f0672d787b2f87c14dfa3081551334fb53d97c33578fe2bcc73d041a89d5f7841225b0ecdc0a01de3ebe6ff1a786314021558ccd04b1adbd12a281ec2239e7b WHIRLPOOL 059b705919d6411fcc49419861ad1f1c37b70466cda190a17257bf55cf1c362657e5c383aa2d3d7176b9392d87a89ad6539beb3feebb0c557476ae639f18d091
+EBUILD expect-lite-4.5.0.ebuild 618 SHA256 12371be3ec714954a472bcfa197072fddaaf3218858c24d3eb079da00f3c91df SHA512 5f0672d787b2f87c14dfa3081551334fb53d97c33578fe2bcc73d041a89d5f7841225b0ecdc0a01de3ebe6ff1a786314021558ccd04b1adbd12a281ec2239e7b WHIRLPOOL 059b705919d6411fcc49419861ad1f1c37b70466cda190a17257bf55cf1c362657e5c383aa2d3d7176b9392d87a89ad6539beb3feebb0c557476ae639f18d091
+EBUILD expect-lite-4.6.0.ebuild 620 SHA256 c4199a0567300078c3956fe854c482cbbd9cf6b21a55668fd4106ef69e5cc7a3 SHA512 6f05ef1932c14cd34df357862f99120c19d59f7bc408f916c68eb9dd7449c7cd81c23d7133129c34ee9f9b46a80ce2e6ef9c00e86771480423c7f8e52a20d461 WHIRLPOOL 4af698fd95ad13d30a18d473ed6c666537e57b058828421af4857fe8957356401b11f99194f393a90e9f02049fda5f96a6f72a2021e746ffbb7021b5aed6de42
+EBUILD expect-lite-4.6.1.ebuild 618 SHA256 12371be3ec714954a472bcfa197072fddaaf3218858c24d3eb079da00f3c91df SHA512 5f0672d787b2f87c14dfa3081551334fb53d97c33578fe2bcc73d041a89d5f7841225b0ecdc0a01de3ebe6ff1a786314021558ccd04b1adbd12a281ec2239e7b WHIRLPOOL 059b705919d6411fcc49419861ad1f1c37b70466cda190a17257bf55cf1c362657e5c383aa2d3d7176b9392d87a89ad6539beb3feebb0c557476ae639f18d091
+EBUILD expect-lite-4.6.2.ebuild 618 SHA256 12371be3ec714954a472bcfa197072fddaaf3218858c24d3eb079da00f3c91df SHA512 5f0672d787b2f87c14dfa3081551334fb53d97c33578fe2bcc73d041a89d5f7841225b0ecdc0a01de3ebe6ff1a786314021558ccd04b1adbd12a281ec2239e7b WHIRLPOOL 059b705919d6411fcc49419861ad1f1c37b70466cda190a17257bf55cf1c362657e5c383aa2d3d7176b9392d87a89ad6539beb3feebb0c557476ae639f18d091
+EBUILD expect-lite-4.7.2.ebuild 620 SHA256 8e4f9fffae300966894cdc3c1719ae0a946999f781b6bae6a626c86baf519cb7 SHA512 009e07a6806916ad41c3d7198a5b9a047d765c28578e9acade53a38646076807bfa3a79ffba5dfa870f30833f0f33d3c9efd9cd33d261bec3b9566c7a36e7e5a WHIRLPOOL 651134d51f79b280caeb5176970525880effd0b1130fb1ebc57b35151a615d41776e1db1d96a05b9910bdda31b2d8c18a0a1473ccf768648fc185ad2751c5b39
+EBUILD expect-lite-4.8.0.ebuild 609 SHA256 7258712c869dfa44fdf6c609a111a36c1def3001e7c36a26eeb0922509791c5e SHA512 659555ec0eb741831fd52046fd335c297046033111102b37591bcc87118a263e1b77649af5ec9fa30db0c81ad32fd74058f7fb50a61e46e4c319ed4acf165b67 WHIRLPOOL 0c38b81f85694a71ea2cb6bd63e8439ca621ef8b45a62ed5b2bb7d2d6f08a4d673d7588f025453d14a17e4ef8f053f9f3507ea568adaf1a2be6df3ff7f1f915f
+MISC ChangeLog 3476 SHA256 3254bebed6d9b71a4b9050d5b2a496fa4984fde7a960b6e57bd79201e2826a2f SHA512 f8eedda1d573deab8b20b2b43f0f1143536869afa23093fad2c0ccc3e48bc2ca8af1bf9e858b6b40078467fcb5bc97fab0551295f41caf664c366c8a4f93b250 WHIRLPOOL 1562f3159e9f8615eb14161a8d4e3fde6c9274e372f3831e3e6460f6d5d8b71a8b6a26705714ec8d773373ad1c4e3398e8b14c7c6fdb14d60cff8fe447186965
+MISC ChangeLog-2015 4807 SHA256 8d9ca190322d0827df0a59799b2c7ddcf3e11ce27ef42b30ddf2a680b1dafbb5 SHA512 3f16791ade1135b0e5a0d264dcf0d3c03a9a94a7a7b9f48039609a8e30f080c418d90b3f50d3a0cad27e44bc512cc36b087e4e3d023fca990d6d038909564c2f WHIRLPOOL 4fd7b251a38648bb4634304ea8fd45df6401e0efacedc9c170644ba5f3c859107191f80eebd96d68746ec669b6b555d832bdb82b9d24a0eb5ca1d592b66a058d
+MISC metadata.xml 512 SHA256 46cc506e2356c2ed4da01af3145e3830059e77fc817b9c1c7c555f556b66807d SHA512 9d84c6b6cbeaa7e8e1019c9a9f248a21a9674272c579676e498fa67fde373f2a21685b09982ee59cdd77b0ee48688cd654ed4a23d341ad6b33a2d7f11e9f122f WHIRLPOOL 89742d448f902c62503b23444917d13ed6d10bd993450db970e5966ff7985577d73a03ac7c48921903668a9223f1ea0cb4611093823aa7d9dbc71f0f4d52e60d
diff --git a/dev-tcltk/expect-lite/expect-lite-4.0.3.ebuild b/dev-tcltk/expect-lite/expect-lite-4.0.3.ebuild
new file mode 100644
index 000000000000..eb4209a282c6
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.0.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc Examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.1.0.ebuild b/dev-tcltk/expect-lite/expect-lite-4.1.0.ebuild
new file mode 100644
index 000000000000..5ff8529d488c
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.1.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc Examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.1.2.ebuild b/dev-tcltk/expect-lite/expect-lite-4.1.2.ebuild
new file mode 100644
index 000000000000..5ff8529d488c
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.1.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc Examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.2.0.ebuild b/dev-tcltk/expect-lite/expect-lite-4.2.0.ebuild
new file mode 100644
index 000000000000..5ff8529d488c
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.2.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc Examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.2.1.ebuild b/dev-tcltk/expect-lite/expect-lite-4.2.1.ebuild
new file mode 100644
index 000000000000..5ff8529d488c
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.2.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc Examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.2.2.ebuild b/dev-tcltk/expect-lite/expect-lite-4.2.2.ebuild
new file mode 100644
index 000000000000..aa61c8a922aa
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.2.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc Examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.3.0.ebuild b/dev-tcltk/expect-lite/expect-lite-4.3.0.ebuild
new file mode 100644
index 000000000000..dc74ed9efda0
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.3.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc Examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.3.1.ebuild b/dev-tcltk/expect-lite/expect-lite-4.3.1.ebuild
new file mode 100644
index 000000000000..dc74ed9efda0
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.3.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc Examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.3.2.ebuild b/dev-tcltk/expect-lite/expect-lite-4.3.2.ebuild
new file mode 100644
index 000000000000..f71be14b1530
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.3.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.3.3.ebuild b/dev-tcltk/expect-lite/expect-lite-4.3.3.ebuild
new file mode 100644
index 000000000000..f71be14b1530
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.3.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.4.0.ebuild b/dev-tcltk/expect-lite/expect-lite-4.4.0.ebuild
new file mode 100644
index 000000000000..c68fc97a171a
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.4.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.4.1.ebuild b/dev-tcltk/expect-lite/expect-lite-4.4.1.ebuild
new file mode 100644
index 000000000000..f71be14b1530
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.4.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.5.0.ebuild b/dev-tcltk/expect-lite/expect-lite-4.5.0.ebuild
new file mode 100644
index 000000000000..f71be14b1530
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.5.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.6.0.ebuild b/dev-tcltk/expect-lite/expect-lite-4.6.0.ebuild
new file mode 100644
index 000000000000..c68fc97a171a
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.6.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.6.1.ebuild b/dev-tcltk/expect-lite/expect-lite-4.6.1.ebuild
new file mode 100644
index 000000000000..f71be14b1530
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.6.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.6.2.ebuild b/dev-tcltk/expect-lite/expect-lite-4.6.2.ebuild
new file mode 100644
index 000000000000..f71be14b1530
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.6.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.7.2.ebuild b/dev-tcltk/expect-lite/expect-lite-4.7.2.ebuild
new file mode 100644
index 000000000000..21370a6918fc
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.7.2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN} || die
+ doman man/* || die
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/* || die
+ fi
+}
diff --git a/dev-tcltk/expect-lite/expect-lite-4.8.0.ebuild b/dev-tcltk/expect-lite/expect-lite-4.8.0.ebuild
new file mode 100644
index 000000000000..37fb9d98e18b
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.8.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+DESCRIPTION="quick and easy command line automation tool built on top of expect"
+HOMEPAGE="http://expect-lite.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug examples"
+
+RDEPEND="dev-tcltk/expect
+ debug? ( dev-tcltk/tclx )"
+
+S=${WORKDIR}/${PN}.proj
+
+src_install() {
+ dobin ${PN}
+ doman man/*
+ dodoc bashrc ChangeLog README
+ dohtml Docs/*
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*
+ fi
+}
diff --git a/dev-tcltk/expect-lite/metadata.xml b/dev-tcltk/expect-lite/metadata.xml
new file mode 100644
index 000000000000..821306cf86b2
--- /dev/null
+++ b/dev-tcltk/expect-lite/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>vapier@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <use>
+ <flag name="debug">pull in packages needed for runtime interactive debugger</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">expect-lite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/expect/Manifest b/dev-tcltk/expect/Manifest
new file mode 100644
index 000000000000..b257169c4be5
--- /dev/null
+++ b/dev-tcltk/expect/Manifest
@@ -0,0 +1,14 @@
+AUX expect-5.44.1.15-expectk.patch 450 SHA256 3a90b1816ecc78b726287fe554d2c1deedff168734ee9cfc22efe020503f969c SHA512 7b31f6fa05a2294627287481e7fbc104c18446ca55550ddbcf0afb8e7d9bc85e90411c17c3ce8b4268c4227c8f597afcbe72535b14e5ea2a4b842728c735586d WHIRLPOOL 0b458ff43f3d55b818734878ec8a5fe3378a81c8e4acde9d79b575cf1f41a910db2e186aa8a1f9bdd21348d62038c938eaa33bd5e03fa35fd31712507e348891
+AUX expect-5.44.1.15-gfbsd.patch 659 SHA256 0b40a0798b7851a97b2e67043e1346d76c97b9f1084ca1d51d57f2d3f129fb01 SHA512 5b7316dcc275a243b3b4c4eed62eb845f28d9b558182333895e8c3323b256c4f331feb04c5d60cd833d07d1f21c7cedfbd415feeb5b918ceededbef86ae5e6e9 WHIRLPOOL b42444ee5427f723a7eadbb0e78cc13a2076c1582385ed9dc7a966f42a17d93b4ad3176e727e277d665707312851341c11ed2e21dc9f1d63083b4b288ad89bb9
+AUX expect-5.44.1.15-headers.patch 1879 SHA256 98f6b9607679b81da4d80b00e73c0f4550bfa8ba2c516e109092c42ff705696b SHA512 99559893044535f2619a2a2a02c59196dd9391915286cf9b532bf349f22c9adb9422d9ad80ae2a25610f2d1d77aca151b007f4272b26c577a750301d9848bc8a WHIRLPOOL 84afcc77660c7d827e5d151fa1ebd7c80b2dd82aae912f0e938917fa089913d2a987531c2550c9b3706f8084f617cb5d2a99e45739206ac5b9888f642760eb77
+AUX expect-5.44.1.15-ldflags.patch 360 SHA256 2e9d3a614edc020044480ba78802696880be638f5b5dcb0fff02c632e0e738d2 SHA512 36c62ec8043249ae0b9b0c4470937cc99b31c4845d5e67e37403f7e9d97be9edb37dc0a5c8abd2df50cace62b0d87303dbc62fdd2a3e87b501d2b983460ab75f WHIRLPOOL 4418e0497f4ab4385261f036bb6bc6836b3be401da943efbb2869018154168768014a6757e17fdee0cca47bfcd48aece8f55510df1c400e5d52ac92c4bc4eeaf
+AUX expect-5.44.1.15_with-tk-no.patch 3471 SHA256 41e889fc40d1a501285fe0acb1324d8be016654ee92b2a9dcdfe7bd2f3df06a0 SHA512 f0fbf901ce8a1f05282ddf6e33a4c153129a994f6e959e6c28e7b08ee75bee8fd906ed4182b85b355aa8c1415a4680f1278dec9dcd6dd152fbb3706d46f7bc45 WHIRLPOOL 7645718b9ca2ccc8e471e1b7668246dc02fcb245f719b773b436bcd7ab6e98c5f1fe5e07097f9f4ca9d9b0c623f118a709f1261cf56fb11da18c2bb6852698a6
+AUX expect-5.45-darwin-install_name.patch 727 SHA256 40673730c4c47fa9a8284e6d0ebbcda4b2df891bf47668f3a31f923f70ca2ba6 SHA512 886d378caa8d63add7d4ac73c90b53b4b30d642a2a5cf06c80aad87f57d49a3362bf506fe12f6aade77c56b8b4c83ffe18138143cdf0fe5d7e9e2d673f2bc6d5 WHIRLPOOL 44d6f4a1814ebf1c1da0b277488b4277dfc391d4aec7cbb07eec19134ca18be664ba2471c91326feab4f75a4ec933549319421a89a13370e901383d8aa011a89
+AUX expect-5.45-format-security.patch 428 SHA256 bec8125e223f014e99fe5e967bc3c8e18d3e9fbfd8fbc3c083532a5f1055402d SHA512 b85f0985b908f72d960eeb00567caab048874806c68d259835dc4564e33032524e9026e07ece3ad5f8669d67f7976019efb5dd763ba84b4cc13571ca999c7f06 WHIRLPOOL 874111389800e7d2a46113db2c9cfbcf057087e7ba2b91a8cb97d5de48bcf9ee5178498829fbfc3783eac563d7576af5625b4b21a9994852fd46d84fb18f687f
+AUX expect-5.45-gfbsd.patch 996 SHA256 5126942c16a7186e7d68b47db80949696f4d53c5fe1c643a68d0f3cd5f939dca SHA512 4fa7c4723c9ad2f5811c5762abe202f1d7584a6050c75cab277fe1b6c697809204a9adcf6f6f6c3c215c8df32f3ac9b083da907777b1ea02e1a4e64b8bf91242 WHIRLPOOL 4e88af63d192340578c85f6636035220f1ed5f665e17638d03d930a1017baa55cb5461b6eb2d5712229a65ff851b78f246c112019491b5e3e671c22468893907
+AUX expect-5.45-headers.patch 2280 SHA256 a1c49b2491b0d8d5650afa938521e36e4738a2d486ca1b95df05b084113c493f SHA512 ac55ec9d65e87d5c64327d802fa16eab9f218f71e760090b2afc00b5fdb791859e6d1f35b0d1a5f52e7ff6ffb21e538581a1782976754fe8ae3ca5950c8db55c WHIRLPOOL 6e55f50364cb86e879b935a449c9f4b7e1ded54922fdc6f28e2a57aefdb7ab7f17dff0279da32a8ecd9a9696c6fa142d3ddc559ceebfbab23e84e233beb62fe9
+DIST expect5.45.tar.gz 628808 SHA256 b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040 SHA512 be991c68241e607b3a689eae7e7966056dbfb577e857331d54a4911bd178c1816425217603b43918ad1b6d2e966271a0f01e79d7028a22e223562d59d10c8c51 WHIRLPOOL e28a5019036d20260f76b13cbd47d2e56661b0107592ead296118c12ed28157a1300a091730820e088d2fa6f86396e7244e844c7bc2e942fc6cf995e4194f10f
+EBUILD expect-5.45.ebuild 2312 SHA256 d9537c1fecc7efb5bb0299effba9d255a33cf766cb723ba9253859c1a8f91d5c SHA512 a9a2eeace95cddb6af90cb238458056fcb4956d76d7861e8eba1cb09901c6ab3f83608669783edd59b3c01b63523648d6e77726e4c49ff1ea64865b972862b08 WHIRLPOOL cfbab4ed11283f6635b410bc8f5413ab6c19f55b4b11e29d2534c20bdff2986f87a190192038a485d1c569892545d8b01a45439723e9ebd4eb6171699753937d
+MISC ChangeLog 4061 SHA256 003e05d17287ad41f0d3713689f37b39f19ce71e4323030787577b320c4e4200 SHA512 f35544348b3028431766d32683d1bb21ba6abd730395a92fba5a2f843f34c2964d6fa5ebccee772abfe24ceed2bec97c05a07471167228a38a90259faa76e84f WHIRLPOOL 6bfb1eefa15cfd001e33b20854f058ce742ee406c6f4036d25a7a648c7fc0c18f36b0404cf574cc3ff9ae0ceb1b9c05c30b05ce65ba23511edbb55593769ee64
+MISC ChangeLog-2015 13891 SHA256 1c8eb5f59080851f31b5743481e7ebf29972702957e3496d243cb2af3937b65f SHA512 9500afee5923d853058d6e1bc5a5509616fa060eecd322e6500c06550cf42b51a2e5c7f6c42759b1a7aab9f862021b29d12510d5fff1611624285db5a00d2c42 WHIRLPOOL 6581631895f77c2e51372786399be5ceccdbdafa5ed8d2597e6ba42d4e5e5eb3d6c7ead374380ff3f5441dff6f28cb0c1c54b217be92570027ab94b1940c0f60
+MISC metadata.xml 329 SHA256 eddb2cab033479731a524d904fb5848eb3942d1fb1d22b44ae154354db0b688e SHA512 cd5b6144b39381b2b69791171489dd907c3d779ae488b361f744ffacb2459b0c72cb70a72a85dce6bd7a25774e1a42da511dd0d041b25580bf243a515095f3d1 WHIRLPOOL 8eca01b95f446bab157f26b942bb4515bdd46ca70e4d55442b87d942d80c83d001a324434bf2893f3f5a5126067e8e7c409cbc1c7a87be1d2e0dae010facb623
diff --git a/dev-tcltk/expect/expect-5.45.ebuild b/dev-tcltk/expect/expect-5.45.ebuild
new file mode 100644
index 000000000000..336914daa558
--- /dev/null
+++ b/dev-tcltk/expect/expect-5.45.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+MY_P="${PN}${PV}"
+DESCRIPTION="tool for automating interactive applications"
+HOMEPAGE="http://expect.nist.gov/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~m68k-mint ~x86-solaris"
+IUSE="debug doc threads"
+
+# We need dejagnu for src_test, but dejagnu needs expect
+# to compile/run, so we cant add dejagnu to DEPEND :/
+DEPEND=">=dev-lang/tcl-8.2:0[threads?]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i "s:/usr/local/bin:${EPREFIX}/usr/bin:" expect.man || die
+ # stops any example scripts being installed by default
+ sed -i \
+ -e 's/^SCRIPT_LIST[[:space:]]*=/_&/' \
+ -e 's/^SCRIPTS[[:space:]]*=/_&/' \
+ -e 's/^SCRIPTS_MANPAGES[[:space:]]*=/_&/' \
+ Makefile.in || die
+
+ epatch "${FILESDIR}"/${PN}-5.45-gfbsd.patch
+ epatch "${FILESDIR}"/${PN}-5.44.1.15-ldflags.patch
+ epatch "${FILESDIR}"/${PN}-5.45-headers.patch #337943
+ epatch "${FILESDIR}"/${PN}-5.45-format-security.patch
+ sed -i 's:ifdef HAVE_SYS_WAIT_H:ifndef NO_SYS_WAIT_H:' *.c
+
+ # fix install_name on darwin
+ [[ ${CHOST} == *-darwin* ]] && \
+ epatch "${FILESDIR}"/${P}-darwin-install_name.patch
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+}
+
+src_configure() {
+ # the 64bit flag is useless ... it only adds 64bit compiler flags
+ # (like -m64) which the target toolchain should already handle
+ econf \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" \
+ --disable-64bit \
+ --enable-shared \
+ $(use_enable threads) \
+ $(use_enable debug symbols mem)
+}
+
+src_test() {
+ # we need dejagnu to do tests ... but dejagnu needs
+ # expect ... so don't do tests unless we have dejagnu
+ type -p runtest || return 0
+ emake test
+}
+
+expect_make_var() {
+ touch pkgIndex.tcl-hand
+ printf 'all:;echo $('$1')\ninclude Makefile' | emake --no-print-directory -s -f -
+ rm -f pkgIndex.tcl-hand || die
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ docinto examples
+ dodoc \
+ example/README \
+ $(printf 'example/%s ' $(expect_make_var _SCRIPTS)) \
+ $(printf 'example/%s.man ' $(expect_make_var _SCRIPTS_MANPAGES))
+ fi
+}
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15-expectk.patch b/dev-tcltk/expect/files/expect-5.44.1.15-expectk.patch
new file mode 100644
index 000000000000..0c0ba80293e0
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15-expectk.patch
@@ -0,0 +1,14 @@
+expectk is only built when TK_BIN_DIR is defined. the configure script
+takes care of figuring out this value, but then they forgot to actually
+write it out to the Makefile.
+
+--- Makefile.in
++++ Makefile.in
+@@ -24,6 +24,7 @@
+ # SETUID = chmod u+s
+
+ LIB_RUNTIME_DIR = $(DESTDIR)@libdir@
++TK_BIN_DIR = @TK_BIN_DIR@
+
+ # The following Expect scripts are not necessary to have installed as
+ # commands, but are very useful. Edit out what you don't want
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15-gfbsd.patch b/dev-tcltk/expect/files/expect-5.44.1.15-gfbsd.patch
new file mode 100644
index 000000000000..d67de2126a07
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15-gfbsd.patch
@@ -0,0 +1,17 @@
+--- expect-5.44.1.15/tclconfig/tcl.m4.orig 2010-04-08 22:49:51.568043292 -0700
++++ expect-5.44.1.15/tclconfig/tcl.m4 2010-04-08 22:50:28.207915301 -0700
+@@ -1579,12 +1579,12 @@
+ FreeBSD-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+- SHLIB_LD="ld -Bshareable -x"
++ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS="$LDFLAGS -export-dynamic"
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15-headers.patch b/dev-tcltk/expect/files/expect-5.44.1.15-headers.patch
new file mode 100644
index 000000000000..77e4d91f4bf9
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15-headers.patch
@@ -0,0 +1,86 @@
+https://sourceforge.net/tracker/?func=detail&aid=3071706&group_id=13179&atid=113179
+
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -15,6 +15,12 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
+
+ #ifdef TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+--- a/exp_trap.c
++++ b/exp_trap.c
+@@ -13,6 +13,7 @@
+ #include <stdio.h>
+ #include <signal.h>
+ #include <sys/types.h>
++#include <string.h>
+
+ #ifdef HAVE_SYS_WAIT_H
+ #include <sys/wait.h>
+--- a/pty_termios.c
++++ b/pty_termios.c
+@@ -9,6 +9,8 @@
+
+ #include <stdio.h>
+ #include <signal.h>
++#include <string.h>
++#include <pty.h>
+
+ #if defined(SIGCLD) && !defined(SIGCHLD)
+ #define SIGCHLD SIGCLD
+@@ -100,6 +100,7 @@
+
+ #include "exp_tty_in.h"
+ #include "exp_rename.h"
++#include "exp_int.h"
+ #include "exp_pty.h"
+
+ void expDiagLog();
+--- a/exp_chan.c
++++ b/exp_chan.c
+@@ -34,6 +34,7 @@
+ #include "exp_rename.h"
+ #include "exp_prog.h"
+ #include "exp_command.h"
++#include "exp_event.h"
+ #include "exp_log.h"
+ #include "tcldbg.h" /* Dbg_StdinMode */
+
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -1955,6 +1955,7 @@
+
+ #include "expect.h"
+ #include "exp_int.h"
++EXTERN void exp_init_tty _ANSI_ARGS_((void));
+
+ /* exp_glob.c - expect functions for doing glob
+ *
+--- a/exp_tty.h
++++ b/exp_tty.h
+@@ -17,6 +17,7 @@
+
+ void exp_tty_raw(int set);
+ void exp_tty_echo(int set);
++int exp_tty_cooked_echo(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
+ void exp_tty_break(Tcl_Interp *interp, int fd);
+ int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
+ int exp_israw(void);
+--- a/exp_main_tk.c
++++ b/exp_main_tk.c
+@@ -32,6 +32,7 @@
+ static char sccsid[] = "@(#) tkAppInit.c 1.19 95/12/23 17:09:24";
+ #endif /* not lint */
+
++#include <string.h>
+ #include <ctype.h>
+
+ #include "tk.h"
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15-ldflags.patch b/dev-tcltk/expect/files/expect-5.44.1.15-ldflags.patch
new file mode 100644
index 000000000000..be3641c2105c
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index cc2c79b..1083eaf 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -148,7 +148,7 @@ OBJEXT = @OBJEXT@
+ RANLIB = @RANLIB@
+ RANLIB_STUB = @RANLIB_STUB@
+ SHLIB_CFLAGS = @SHLIB_CFLAGS@
+-SHLIB_LD = @SHLIB_LD@
++SHLIB_LD = @SHLIB_LD@ $(LDFLAGS)
+ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+ STLIB_LD = @STLIB_LD@
+ TCL_DEFS = @TCL_DEFS@
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15_with-tk-no.patch b/dev-tcltk/expect/files/expect-5.44.1.15_with-tk-no.patch
new file mode 100644
index 000000000000..cea372daaacb
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15_with-tk-no.patch
@@ -0,0 +1,117 @@
+This is a minimal patch that does not keep indentation consistent in tcl.m4
+Updating indentation would make the patch much bigger and less readable.
+
+Signed-off-by: Gilles Espinasse <g.esp@free.fr>
+
+Index: INSTALL
+===================================================================
+RCS file: /cvsroot/expect/expect/INSTALL,v
+retrieving revision 5.30
+diff -u -r5.30 INSTALL
+--- INSTALL 21 Jun 1999 18:41:41 -0000 5.30
++++ INSTALL 30 May 2009 11:51:21 -0000
+@@ -152,6 +152,7 @@
+
+ --with-tk=... Specifies the directory containing Tk's
+ configure file (tkConfig.sh).
++ --with-tk=no disable Tk usage in expect
+
+ --with-tkinclude=... Specifies the directory containing Tk's
+ private include files (such as tkInt.h)
+Index: Makefile.in
+===================================================================
+RCS file: /cvsroot/expect/expect/Makefile.in,v
+retrieving revision 5.45
+diff -u -r5.45 Makefile.in
+--- Makefile.in 3 Oct 2008 17:05:14 -0000 5.45
++++ Makefile.in 30 May 2009 11:51:21 -0000
+@@ -103,7 +103,11 @@
+ PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
+
+ lib_BINARIES = $(PKG_LIB_FILE)
+-bin_BINARIES = expect expectk
++bin_BINARIES = expect
++ifneq ($(TK_BIN_DIR),)
++ bin_BINARIES += expectk
++endif
++
+ BINARIES = $(lib_BINARIES) $(bin_BINARIES)
+
+ SHELL = @SHELL@
+Index: tclconfig/tcl.m4
+===================================================================
+RCS file: /cvsroot/expect/expect/tclconfig/tcl.m4,v
+retrieving revision 1.3
+diff -u -r1.3 tcl.m4
+--- tclconfig/tcl.m4 25 Jan 2006 21:52:11 -0000 1.3
++++ tclconfig/tcl.m4 30 May 2009 11:51:23 -0000
+@@ -181,10 +181,12 @@
+ #
+ # Adds the following arguments to configure:
+ # --with-tk=...
++# --with-tk=no disable Tk usage
+ #
+ # Defines the following vars:
+ # TK_BIN_DIR Full path to the directory containing
+ # the tkConfig.sh file
++# Empty if Tk is disabled
+ #------------------------------------------------------------------------
+
+ AC_DEFUN(TEA_PATH_TKCONFIG, [
+@@ -201,6 +203,12 @@
+ AC_HELP_STRING([--with-tk],
+ [directory containing tk configuration (tkConfig.sh)]),
+ with_tkconfig=${withval})
++
++ if test x"${with_tkconfig}" = x"no" ; then
++ AC_MSG_RESULT([Tk is disabled by --with-tk=no])
++ unset TK_BIN_DIR
++ else
++
+ AC_MSG_CHECKING([for Tk configuration])
+ AC_CACHE_VAL(ac_cv_c_tkconfig,[
+
+@@ -309,6 +317,7 @@
+ TK_BIN_DIR=${ac_cv_c_tkconfig}
+ AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh])
+ fi
++ fi
+ fi
+ ])
+
+@@ -420,6 +429,7 @@
+ #------------------------------------------------------------------------
+
+ AC_DEFUN(TEA_LOAD_TKCONFIG, [
++ if test x"${with_tkconfig}" != x"no" ; then
+ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
+
+ if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
+@@ -501,6 +511,7 @@
+
+ AC_SUBST(TK_LIBS)
+ AC_SUBST(TK_XINCLUDES)
++ fi
+ ])
+
+ #------------------------------------------------------------------------
+@@ -3528,6 +3539,11 @@
+ #------------------------------------------------------------------------
+
+ AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [
++ if test x"${with_tkconfig}" = x"no" ; then
++ TK_INCLUDES=""
++ AC_SUBST(TK_INCLUDES)
++ else
++
+ AC_MSG_CHECKING([for Tk public headers])
+
+ AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval})
+@@ -3608,6 +3624,7 @@
+ fi
+ AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}])
+ fi
++ fi
+ ])
+
+ #------------------------------------------------------------------------
diff --git a/dev-tcltk/expect/files/expect-5.45-darwin-install_name.patch b/dev-tcltk/expect/files/expect-5.45-darwin-install_name.patch
new file mode 100644
index 000000000000..f5470aadb88e
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-darwin-install_name.patch
@@ -0,0 +1,13 @@
+Add install_name (soname)
+
+--- tclconfig/tcl.m4
++++ tclconfig/tcl.m4
+@@ -1703,7 +1703,7 @@
+ ])
+ # TEA specific: link shlib with current and compatiblity version flags
+ vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
+- SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
++ SHLIB_LD="${SHLIB_LD} -install_name \$(pkglibdir)/\$(PKG_LIB_FILE) -current_version ${vers:-0} -compatibility_version ${vers:-0}"
+ SHLIB_SUFFIX=".dylib"
+ # Don't use -prebind when building for Mac OS X 10.4 or later only:
+ AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
diff --git a/dev-tcltk/expect/files/expect-5.45-format-security.patch b/dev-tcltk/expect/files/expect-5.45-format-security.patch
new file mode 100644
index 000000000000..c623264be27a
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-format-security.patch
@@ -0,0 +1,18 @@
+ exp_clib.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/exp_clib.c b/exp_clib.c
+index 172c05e..c86dda4 100644
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -1476,8 +1476,8 @@ expDiagLogU(str)
+ char *str;
+ {
+ if (exp_is_debugging) {
+- fprintf(stderr,str);
+- if (exp_logfile) fprintf(exp_logfile,str);
++ fprintf(stderr,"%s", str);
++ if (exp_logfile) fprintf(exp_logfile,"%s", str);
+ }
+ }
+
diff --git a/dev-tcltk/expect/files/expect-5.45-gfbsd.patch b/dev-tcltk/expect/files/expect-5.45-gfbsd.patch
new file mode 100644
index 000000000000..5ae9c26adb88
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-gfbsd.patch
@@ -0,0 +1,26 @@
+--- a/tclconfig/tcl.m4
++++ b/tclconfig/tcl.m4
+@@ -1634,20 +1634,15 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD="${CC} -shared"
+ TCL_SHLIB_LD_EXTRAS="-soname \$[@]"
+ SHLIB_SUFFIX=".so"
+- LDFLAGS=""
++ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ AS_IF([test $doRpath = yes], [
+- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
++ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
++ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ AS_IF([test "${TCL_THREADS}" = "1"], [
+ # The -pthread needs to go in the LDFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+- # Version numbers are dot-stripped by system policy.
+- TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
+- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+- TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ Darwin-*)
+ CFLAGS_OPTIMIZE="-Os"
diff --git a/dev-tcltk/expect/files/expect-5.45-headers.patch b/dev-tcltk/expect/files/expect-5.45-headers.patch
new file mode 100644
index 000000000000..98330211b328
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-headers.patch
@@ -0,0 +1,92 @@
+https://sourceforge.net/tracker/?func=detail&aid=3071706&group_id=13179&atid=113179
+--- a/configure.in
++++ b/configure.in
+@@ -133,6 +133,8 @@ AC_CHECK_HEADER(sys/fcntl.h, AC_DEFINE(HAVE_SYS_FCNTL_H))
+ AC_CHECK_HEADER(sys/ptem.h, AC_DEFINE(HAVE_SYS_PTEM_H))
+ AC_CHECK_HEADER(sys/strredir.h, AC_DEFINE(HAVE_STRREDIR_H))
+ AC_CHECK_HEADER(sys/strpty.h, AC_DEFINE(HAVE_STRPTY_H))
++AC_CHECK_HEADER(pty.h, AC_DEFINE(HAVE_PTY_H))
++AC_CHECK_HEADER(libutil.h, AC_DEFINE(HAVE_LIBUTIL_H))
+
+ AC_MSG_CHECKING([for sys/bsdtypes.h])
+ if test "ISC_${ISC}" = "ISC_1" ; then
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -15,6 +15,12 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
+
+ #ifdef TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+--- a/exp_trap.c
++++ b/exp_trap.c
+@@ -13,6 +13,7 @@
+ #include <stdio.h>
+ #include <signal.h>
+ #include <sys/types.h>
++#include <string.h>
+
+ #ifdef HAVE_SYS_WAIT_H
+ #include <sys/wait.h>
+--- a/pty_termios.c
++++ b/pty_termios.c
+@@ -9,6 +9,14 @@
+
+ #include <stdio.h>
+ #include <signal.h>
++#include <string.h>
++#ifdef HAVE_PTY_H
++#include <pty.h>
++#endif
++#ifdef HAVE_LIBUTIL_H
++#include <sys/types.h>
++#include <libutil.h>
++#endif
+
+ #if defined(SIGCLD) && !defined(SIGCHLD)
+ #define SIGCHLD SIGCLD
+@@ -100,6 +100,7 @@
+
+ #include "exp_tty_in.h"
+ #include "exp_rename.h"
++#include "exp_int.h"
+ #include "exp_pty.h"
+
+ void expDiagLog();
+--- a/exp_chan.c
++++ b/exp_chan.c
+@@ -34,6 +34,7 @@
+ #include "exp_rename.h"
+ #include "exp_prog.h"
+ #include "exp_command.h"
++#include "exp_event.h"
+ #include "exp_log.h"
+ #include "tcldbg.h" /* Dbg_StdinMode */
+
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -1955,6 +1955,7 @@
+
+ #include "expect.h"
+ #include "exp_int.h"
++EXTERN void exp_init_tty _ANSI_ARGS_((void));
+
+ /* exp_glob.c - expect functions for doing glob
+ *
+--- a/exp_tty.h
++++ b/exp_tty.h
+@@ -17,6 +17,7 @@
+
+ void exp_tty_raw(int set);
+ void exp_tty_echo(int set);
++int exp_tty_cooked_echo(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
+ void exp_tty_break(Tcl_Interp *interp, int fd);
+ int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
+ int exp_israw(void);
diff --git a/dev-tcltk/expect/metadata.xml b/dev-tcltk/expect/metadata.xml
new file mode 100644
index 000000000000..67378c136485
--- /dev/null
+++ b/dev-tcltk/expect/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">expect</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/itcl/Manifest b/dev-tcltk/itcl/Manifest
new file mode 100644
index 000000000000..706b6d70ccae
--- /dev/null
+++ b/dev-tcltk/itcl/Manifest
@@ -0,0 +1,7 @@
+DIST itcl3.4.1.tar.gz 263316 SHA256 5330832ce72da97610497a58eca904287d0ff91f9ec741a4e4810d5b933c8568 SHA512 288c9b636f1814371bedd33d570a8d46055e136953685a111b76f3b89a6c7aaa1ee9223ceaae1c5ce43198195cb1adc2b178d7c4101d7fd14cb7e756c98bf2b0 WHIRLPOOL c513678bfef5f76b875af68d0bf97fd86b9a9673bb87efbb295dc3faa9a8b011c4c34ed6eddbf648f11b804656e6c99103e8f0ea2c06abc5b1c308b1a5df78cc
+DIST itcl4.0.3.tar.gz 430522 SHA256 bc763f8c666e7f8d59b960816be9e7aa26cbb58531934280ae4f4e5407b4a612 SHA512 9736a08f0f33e0afa677a77eb643454908531786435b73314a80d9ee211c06f037eb0de3c2c2608b728253f9ec613a601d76f16f29964eb06b667ecbb3400df4 WHIRLPOOL c8a971303099139b73d7e72a45e66866811c66b0fa575b57c9ef1600aa02cd322f9d5c685ef285b1cbd03c064665f4504ebd2e549043ede6aecda51d8b88ee91
+EBUILD itcl-3.4.1.ebuild 1031 SHA256 45dd7239a9111f8c121039b6316e792632fe7e37d3881d7c19efbc1adc9e7c6b SHA512 43778440a2847a4d59667a132f70efc2dd73108481a20cb6603d43fed0b77eb58940e800acf065ce031102531a236b47d119f957bc05fd30deae682a55d6de78 WHIRLPOOL 3f65be3ccd414748b198291e0f0219eb14581c0f9cd891685920743ffcf998f2dde293839af409d9c087367cbd12075fbacf456c0772b9f19d262b38b83533fd
+EBUILD itcl-4.0.3.ebuild 1726 SHA256 5945b494fce3c38fe58b9f1bbe7428047f6ff75794bd384dadb1e49a8bbb2664 SHA512 6794f499a6539243e8f899b8de7e39310e30487aaa2b0c8296fa2fe4878d9dccdfbd3f97ebc3f4de2bbe4894a0298712b14ca2db351c7828849748679aa8af0b WHIRLPOOL 95112158c6b6c380a30081e888bf96046c709728274e3533568ae8260eddd4215ed126bfe7835219b28c4f2b6d0ca6b5a446bd7fd9e265d331448c599973df5f
+MISC ChangeLog 2719 SHA256 b65d4e3902943dddb40ee64d673d8f4f980a069011699efac20daf34e5809ccd SHA512 9b097653d5ce7acc1af1753e83f424724680f68bdf3db443858c80f1289861b0847a439acaf3db0960d31d3e82f1016ad778ee803337af46cf73bfb8752d85ee WHIRLPOOL 9b98708a3edb22cf056680b1114623c8dec977f401028d8f61ae6def263b852bd9df453667fff0f007f78a83ad7e4ac7e76393d3e65259725a6929937fe887e9
+MISC ChangeLog-2015 8729 SHA256 dfc336e08652937e30e1db9bfa62089611314dc396b7e10955a2165c02516d30 SHA512 2587f51b54dd1946ccd963746273dd5559748b5903db6a92de0579c3e12ab69d72a32caffbf15a93eaf2e16bb8168a978acbdf29bc56d4e9ebcc954fc8151ec6 WHIRLPOOL ead68fb809ef02d45ab01028136312c5a863480d71c6d7a9ca9bff308b15486b3ad698261a978c6d51230e8d479fdd0c12c749aeff0a9cf42e11ba3bc281eeaf
+MISC metadata.xml 330 SHA256 376c029bea33a6d66f0aea4952f09557e6fdb7b77ff719267ea2f44341e628cf SHA512 404a351da7b77344ba6ad0969162591a9fdc582ca723b43d04ed073bdc164b4df173a3267b333ed4d19aaa48b34c696d485703c85cccd700320e23008ef189b1 WHIRLPOOL fd52a0b54e841f38081d53de6f9fb2e3effaa1aa94f2045481add347954377997e4bc77c99f33e985323a5cdd81c7f144a53458d3e44b82f2c8f104436b39638
diff --git a/dev-tcltk/itcl/itcl-3.4.1.ebuild b/dev-tcltk/itcl/itcl-3.4.1.ebuild
new file mode 100644
index 000000000000..7e388fa77158
--- /dev/null
+++ b/dev-tcltk/itcl/itcl-3.4.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib versionator
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Object Oriented Enhancements for Tcl/Tk"
+HOMEPAGE="http://incrtcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/$(get_version_component_range 1-2)/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE=""
+
+RDEPEND="<dev-lang/tcl-8.6:0="
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}${PV}"
+
+src_compile() {
+ # adjust install_name on darwin
+ if [[ ${CHOST} == *-darwin* ]]; then
+ sed -i \
+ -e 's:^\(SHLIB_LD\W.*\)$:\1 -install_name ${pkglibdir}/$@:' \
+ "${S}"/Makefile || die 'sed failed'
+ fi
+
+ sed 's:-pipe::g' -i Makefile || die
+
+ emake CFLAGS_DEFAULT="${CFLAGS}"
+}
+
+src_install() {
+ default
+
+ cat >> "${T}"/34${PN} <<- EOF
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/${PN}$(get_version_component_range 1-2)/"
+ EOF
+ doenvd "${T}"/34${PN}
+}
diff --git a/dev-tcltk/itcl/itcl-4.0.3.ebuild b/dev-tcltk/itcl/itcl-4.0.3.ebuild
new file mode 100644
index 000000000000..56791fe41ee6
--- /dev/null
+++ b/dev-tcltk/itcl/itcl-4.0.3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib versionator
+
+MY_P="${PN}${PV}"
+TCL_VER="8.6.2"
+
+DESCRIPTION="Object Oriented Enhancements for Tcl/Tk"
+HOMEPAGE="http://incrtcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/itcl%20${PV}/${MY_P}.tar.gz"
+#SRC_URI="mirror://sourceforge/project/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/itcl%204.0.2/itcl4.0.2.tar.gz"
+#SRC_URI="mirror://sourceforge/project/tcl/Tcl/${TCL_VER}/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE=""
+
+RDEPEND=">=dev-lang/tcl-8.6:0="
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}${PV}"
+
+# somehow broken
+#RESTRICT=test
+
+src_configure() {
+ econf \
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tclinclude="${EPREFIX}"/usr/include \
+ --disable-rpath
+}
+
+src_compile() {
+ # adjust install_name on darwin
+ if [[ ${CHOST} == *-darwin* ]]; then
+ sed -i \
+ -e 's:^\(SHLIB_LD\W.*\)$:\1 -install_name ${pkglibdir}/$@:' \
+ "${S}"/Makefile || die 'sed failed'
+ fi
+
+ sed 's:-pipe::g' -i Makefile || die
+
+ emake CFLAGS_DEFAULT="${CFLAGS}"
+}
+
+src_install() {
+ default
+
+ sed \
+ -e "/BUILD_LIB_SPEC/s:-L${S}::g" \
+ -e "/BUILD_STUB_LIB_SPEC/s:-L${S}::g" \
+ -e "/BUILD_STUB_LIB_PATH/s:${S}:${EPREFIX}/usr/$(get_libdir)/${MY_P}/:g" \
+ -e "/INCLUDE_SPEC/s:${S}/generic:${EPREFIX}/usr/include:g" \
+ -e "s:${S}:${EPREFIX}/usr/$(get_libdir)/${MY_P}/:g" \
+ -i "${ED}"/usr/$(get_libdir)/${MY_P}/itclConfig.sh || die
+
+ cat >> "${T}"/34${PN} <<- EOF
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/${PN}$(get_version_component_range 1-3)/"
+ EOF
+ doenvd "${T}"/34${PN}
+}
diff --git a/dev-tcltk/itcl/metadata.xml b/dev-tcltk/itcl/metadata.xml
new file mode 100644
index 000000000000..d3074de5e0e4
--- /dev/null
+++ b/dev-tcltk/itcl/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">incrtcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/itk/Manifest b/dev-tcltk/itk/Manifest
new file mode 100644
index 000000000000..7b23e9ea7440
--- /dev/null
+++ b/dev-tcltk/itk/Manifest
@@ -0,0 +1,9 @@
+DIST itk3.4.1.tar.gz 182311 SHA256 9d14050ffdb711d44c06a9871979adac47564ba5359347ee5a0ca67707c96e44 SHA512 4680db81a0212e695cfe2c40cabe6dceb94520cf3ee06e2e332f12316838726da14c0b925b117ea351aa14fd2d695f361bcb4062743c66099ef783ae31ab37ef WHIRLPOOL 3cb1f894ce67b7cf60f16a7cf2505559e527d58e2271c5f2bf922972eb2bd349b904814ab4eeb23772f173d3f51a671967bd1afa2063d1785e68c8eb9f096883
+DIST itk4.0.0.tar.gz 177838 SHA256 36849f06f551f0a016be4e8f6ae4375483316e6c3e3579c57170e66299525d4d SHA512 4fd993e3683376bd2852a19e8ac63ec20a9319f3987737a32f7af78b645ff27416b18572b7e30fc1e41a5e4e06ac064280fd86d979738ca9906e2605069c51f3 WHIRLPOOL 164dde8a61c6d5d425fc1e98fb0a64f9bf6d268aa134097b6235a0747a85bd3d051cd94f9daa994b76ab97d966c7434c812107758c572dd1fe05fcc5dffd4ab5
+DIST itk4.0.1.tar.gz 182029 SHA256 a18399f4e060e737e19425eb314473ac64aca8ae40f9d6644a0815f6fd469c18 SHA512 d64beeb42949e96b384ef2fd571971813697086df8b18af79399cedbb80eba19dc013677957959ea93dc0dcd7cdc4be012b3f9a5f0eedf0bd743550837bd78fc WHIRLPOOL b4d179b76db89e201d7eebbcb337ce8da07ea1203ae954189c3f5cab32f2674fd08b722fb52dffcf38abd55eea4ef773a58fc98d9409a010714e115de1ad05bc
+EBUILD itk-3.4.1.ebuild 1330 SHA256 1c9bb9cc0208739ce3ec39cc08ce9d9a7b66b7ca5784f573205187246b7dc9e1 SHA512 07d5a24d0e729ee3f80bf06eb9428da7c2ef7ce838fb7a205db54da28561861b44e2eb4b2fcae9b9c283d1666689a56fb0cb9d0dd8a39c66bf881aef867e9751 WHIRLPOOL 88777f9bef64da3a6c16e5807942859c2c92ff2a5fc110c0aebbb477644939cbfac62df7f4150dfd0b3578771a110781819d2a4aef7bba9bc0f0d64329d1e259
+EBUILD itk-4.0.0.ebuild 1467 SHA256 48b4572f494430a6e75fabd03fd756752279f29858bf89d80df8a4d79bfffe15 SHA512 af6ce3adeaaf8da94dae5b9c459c9ab5a13a3f8276127470007ef9ca40147d9727fdcce7db161cf46e8e1a8671aa821118af15c643b8db1454d733a4896ce4fe WHIRLPOOL 7620fb7e664171bd4b8cbab465afe062a553c5e1f5be19680beb49415cad3d14ce1ddd35d5ab03409536598e57e5d829af03bce497f8ea3af44abd7d3b8e112a
+EBUILD itk-4.0.1.ebuild 1468 SHA256 6dad9734b89aa26744b9e44bf864c4ae383f8c4a1c33e0c5f0531b94dae0d8a0 SHA512 0f7947165de490aa43e3902fdea7d2f8d272be30ca43124276f4c6b148a99c96ab5efb0f718acd864676a23e60d388d58803acf22928d26869c427c11ba9c5db WHIRLPOOL b429ccfcb854083196485ff6af971e9729c12ad9b4f74d2551fe66900e11c7042b73d7867ed69e62c85999fd1ecaab2373d99ce229fc09116d26a7b9ddac4a8d
+MISC ChangeLog 3122 SHA256 fc32faa3bf606b16e7d3b88160ecc7e13140f03059abc28ad329cc54c34ad3fc SHA512 d190dcaf5b99a85a49660a45af41ba00a30cabbfbfa620244eda3ceda389f6dec4ddc2182e15ae6aef1019440d2c3dcd0d5f3ccc53698c53cc681b960a2c6bd1 WHIRLPOOL fa433312eee974eda68725e6cd45be8b297a575cbd9a518704e75d55b458416d675763f2a18cb8f7ab131cc4648e4d610977b5927360ccfc265853e79ccd3667
+MISC ChangeLog-2015 6059 SHA256 50d2ed146a23d2401cb3f4da661c15fba4e2b9edb9262e91b80d29b26cf413f9 SHA512 b502a0686ece3fc4400bdd9f8a1e9361eacb02a443ef68ba27cf2d4d4a4d4db981a7c71c0c1713b5955a89efc2016d05040d729b6d6507a513d7a5c2ca3c11c5 WHIRLPOOL 28247ec5447c9043932c4cb4a809c529df987f54fdd5b8da429af41064a93c537a44f3b557c7c190cbd406a6815afc3b75d01ee6fcce7a741ac5a05df3e6fda1
+MISC metadata.xml 330 SHA256 376c029bea33a6d66f0aea4952f09557e6fdb7b77ff719267ea2f44341e628cf SHA512 404a351da7b77344ba6ad0969162591a9fdc582ca723b43d04ed073bdc164b4df173a3267b333ed4d19aaa48b34c696d485703c85cccd700320e23008ef189b1 WHIRLPOOL fd52a0b54e841f38081d53de6f9fb2e3effaa1aa94f2045481add347954377997e4bc77c99f33e985323a5cdd81c7f144a53458d3e44b82f2c8f104436b39638
diff --git a/dev-tcltk/itk/itk-3.4.1.ebuild b/dev-tcltk/itk/itk-3.4.1.ebuild
new file mode 100644
index 000000000000..c3275997968b
--- /dev/null
+++ b/dev-tcltk/itk/itk-3.4.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils multilib versionator virtualx
+
+MY_PV=${PV/_beta/b}
+ITCL_VERSION="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Object Oriented Enhancements for Tcl/Tk"
+HOMEPAGE="http://incrtcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/incrtcl/%5BIncr%20Tcl_Tk%5D-source/${PV}/${PN}${PV}.tar.gz"
+
+IUSE=""
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ <dev-lang/tk-8.6:=
+ =dev-tcltk/itcl-3.4*"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}$(get_version_component_range 1-2)"
+
+src_prepare() {
+ #epatch "${FILESDIR}"/${P}-install_data.patch
+ mv configure.{in,ac} || die
+ AT_M4DIR=.. eautoconf
+ sed 's:-pipe::g' -i configure || die
+}
+
+src_configure() {
+ source "${EPREFIX}"/usr/$(get_libdir)/itclConfig.sh || die
+ econf \
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tk="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tclinclude="${EPREFIX}"/usr/include \
+ --with-tkinclude="${EPREFIX}"/usr/include \
+ --with-x
+}
+
+src_compile() {
+ emake CFLAGS_DEFAULT="${CFLAGS}"
+}
+
+src_test() {
+ Xemake test
+}
+
+src_install() {
+ default
+
+ cat >> "${T}"/34${PN} <<- EOF
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/${PN}${MY_PV}/"
+ EOF
+ doenvd "${T}"/34${PN}
+}
diff --git a/dev-tcltk/itk/itk-4.0.0.ebuild b/dev-tcltk/itk/itk-4.0.0.ebuild
new file mode 100644
index 000000000000..2c400ce80471
--- /dev/null
+++ b/dev-tcltk/itk/itk-4.0.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils multilib versionator
+
+MY_PV=${PV/_beta/b}
+ITCL_VERSION="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Object Oriented Enhancements for Tcl/Tk"
+HOMEPAGE="http://incrtcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/Itcl%20${MY_PV}/${PN}${MY_PV}.tar.gz"
+#SRC_URI="mirror://sourceforge/%5Bincr%20Tcl_Tk%5D-4-source/Itcl%20${MY_PV}/${PN}${MY_PV}.tar.gz"
+
+IUSE=""
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ >=dev-lang/tk-8.6:=
+ =dev-tcltk/itcl-${ITCL_VERSION}*"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${MY_PV}"
+
+src_prepare() {
+# epatch "${FILESDIR}"/${P}-install_data.patch
+ AT_M4DIR=.. eautoconf
+ sed 's:-pipe::g' -i configure || die
+}
+
+src_configure() {
+ source "${EPREFIX}"/usr/$(get_libdir)/itcl${ITCL_VERSION}*/itclConfig.sh || die
+ econf \
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tk="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tclinclude="${EPREFIX}"/usr/include \
+ --with-tkinclude="${EPREFIX}"/usr/include \
+ --with-itcl="${ITCL_SRC_DIR}" \
+ --with-x
+}
+
+src_compile() {
+ emake CFLAGS_DEFAULT="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc license.terms
+
+ cat >> "${T}"/34${PN} <<- EOF
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/${PN}${MY_PV}/"
+ EOF
+ doenvd "${T}"/34${PN}
+}
diff --git a/dev-tcltk/itk/itk-4.0.1.ebuild b/dev-tcltk/itk/itk-4.0.1.ebuild
new file mode 100644
index 000000000000..82252d1377cd
--- /dev/null
+++ b/dev-tcltk/itk/itk-4.0.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils multilib versionator
+
+MY_PV=${PV/_beta/b}
+ITCL_VERSION="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Object Oriented Enhancements for Tcl/Tk"
+HOMEPAGE="http://incrtcl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/incrtcl/%5Bincr%20Tcl_Tk%5D-4-source/itk%20${MY_PV}/${PN}${MY_PV}.tar.gz"
+#SRC_URI="mirror://sourceforge/%5Bincr%20Tcl_Tk%5D-4-source/Itcl%20${MY_PV}/${PN}${MY_PV}.tar.gz"
+
+IUSE=""
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ >=dev-lang/tk-8.6:=
+ =dev-tcltk/itcl-${ITCL_VERSION}*"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${MY_PV}"
+
+src_prepare() {
+# epatch "${FILESDIR}"/${P}-install_data.patch
+ mv configure.{in,ac} || die
+ AT_M4DIR=.. eautoconf
+ sed 's:-pipe::g' -i configure || die
+}
+
+src_configure() {
+ source "${EPREFIX}"/usr/$(get_libdir)/itcl${ITCL_VERSION}*/itclConfig.sh || die
+ econf \
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tk="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tclinclude="${EPREFIX}"/usr/include \
+ --with-tkinclude="${EPREFIX}"/usr/include \
+ --with-itcl="${ITCL_SRC_DIR}" \
+ --with-x
+}
+
+src_compile() {
+ emake CFLAGS_DEFAULT="${CFLAGS}"
+}
+
+src_install() {
+ default
+
+ dodoc license.terms
+
+ cat >> "${T}"/34${PN} <<- EOF
+ LDPATH="${EPREFIX}/usr/$(get_libdir)/${PN}${MY_PV}/"
+ EOF
+ doenvd "${T}"/34${PN}
+}
diff --git a/dev-tcltk/itk/metadata.xml b/dev-tcltk/itk/metadata.xml
new file mode 100644
index 000000000000..d3074de5e0e4
--- /dev/null
+++ b/dev-tcltk/itk/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">incrtcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/iwidgets/Manifest b/dev-tcltk/iwidgets/Manifest
new file mode 100644
index 000000000000..5a4efeaa1fba
--- /dev/null
+++ b/dev-tcltk/iwidgets/Manifest
@@ -0,0 +1,8 @@
+AUX 4.0.1-path.patch 2376 SHA256 496efbba07ca1e62a27129807a569d5d346e1fc68e380b3bec942404d0dd7847 SHA512 1216beb6aad68591026e508827b062bcf2a547b76eac25b731f59ab0cf4b7b2c0a31a3c427e904ca9fec118f2db970d53a7aa81aa73a4b551fce3ec396625cc0 WHIRLPOOL c6ea2b9e1143ee43c42f87624c2b61d82a2601988e446b96a74e8d2d7e33f18744b90e04ef9c6b9767b910b7d8c37c447e21db7e7bb8c8e56eca4fabe4ba4a82
+DIST itcl3.2.1_src.tgz 427026 SHA256 9a225564fc94beef4cc0e627a368d9d2b4425c58b93d5a787c9836d6cceed2ad SHA512 f6b832f20e53bac66c8bcdbf64aa4aad932ee827fb8059ad2e0dca0c61db01affde6b67c1e0acb331a3837eebcb38282fa7bec90f5d6ed4b65799f4424679f3f WHIRLPOOL 2fd96e63c67eee27fcbfdc53c85bc7348befee703e2a77fb55355ac636be1dce733f9c09a8c51255163a09b4eab2cc46f3313a66c12415eee4f1d0d5729041d8
+DIST iwidgets4.0.1.tar.gz 647960 SHA256 b0e9cb74370f863e17a05df81fd70af3a39a1cfb733181c61669b30ad7799426 SHA512 61d1980eb8beb2821fbd8333f5d1f6faa8bf59d98392fee8d166eef213b27c6b66121d42b8eef64d151e5249009be56076a8cf8bb6635072ee6ee4075858182e WHIRLPOOL e77508a8ba30b37aa7c9d565b17c783589bfb694e90bc159fbf1a80683b5bea25c5e3f545404aaa8f286e547f859bedbbb50e3a16ef0a49ac9128ee356702485
+EBUILD iwidgets-4.0.1-r3.ebuild 1419 SHA256 801d606f3ec4fc895511d1d9127cc1ff5e6bed53e7f2272c23010142faf6438e SHA512 4604df9afa1eb983f9ec9c7a580fa244273ab9d98945698587ee629f068dd3b7cc27b9f3e3ae918d1f2bd95ee4d1807eb1fd2d2c972201a0c1f4ed8fe789c1d2 WHIRLPOOL 8f65494dfe896de5e94f8a037d3734dc38f67e46cbddfdc968595906f46a08b129ced6047749f80767a0f31860fffdd2c4e3c8f1bba4a5c2b1d74ca0828ab0c5
+EBUILD iwidgets-4.0.1.ebuild 855 SHA256 fcc5e92408989d52b7d2364cf4233e0ae44c8be4b378c2ca67d027cb295078da SHA512 8220af665ddf84f35a4ad8bbd8d679f56ec1e4c71f36cff426e067e9eff22f524c7e9e76a7e5390e90073a7a4ecfa531c850edf4c4129bf0ea4ea252a1cdfff0 WHIRLPOOL c285b0a9cbc90553067c038d3183b8944186e654da6d501962b74d00f63af59cc09323e1a81fb7e41b71ea8e160f4352297637e825e9f7d24775965244ada162
+MISC ChangeLog 2516 SHA256 9fcb33172d36b329116b4cbb4bdcd8f75bc85ef01598a6e94c20028264667ed6 SHA512 761bbc1c6b092b4edd95180e63867f08f81fc1bd166cb579f7e0551f6bfbb4ceec41bdcfd9b4332ed64824a774b02ee57910a8ad70c5f629d84b9f20f98ce9f2 WHIRLPOOL 57a25da3f2c54f7919411300394746d6023b4f7e2558c5b8f9a1a5578cddb352db47a48e5820aeb152caa6f0e4ba85dd2fe36218e172a9d902498d690dc581e8
+MISC ChangeLog-2015 3169 SHA256 f58fcd045c3127fec9b004f2b4f08a2dd2e807260bf38aeb78262838e244e4ff SHA512 6059455602131e0ab0ced35775d868457e5e5e1ab3ddc214e1babd85747277f27eb9e2dba94072ee24734a2cf94366337cda88c2a5ca8e50a1e47b1fd45ec361 WHIRLPOOL cd89a6d7caf0cd6b973e0dfd5512422a4fb508e38e5f138b240c506c10a38b3d73b35971fc27ff0e4dfd17de7d56e76f6ce94726f415440b2edd671f1ce7bac4
+MISC metadata.xml 330 SHA256 376c029bea33a6d66f0aea4952f09557e6fdb7b77ff719267ea2f44341e628cf SHA512 404a351da7b77344ba6ad0969162591a9fdc582ca723b43d04ed073bdc164b4df173a3267b333ed4d19aaa48b34c696d485703c85cccd700320e23008ef189b1 WHIRLPOOL fd52a0b54e841f38081d53de6f9fb2e3effaa1aa94f2045481add347954377997e4bc77c99f33e985323a5cdd81c7f144a53458d3e44b82f2c8f104436b39638
diff --git a/dev-tcltk/iwidgets/files/4.0.1-path.patch b/dev-tcltk/iwidgets/files/4.0.1-path.patch
new file mode 100644
index 000000000000..095d9ed81e1c
--- /dev/null
+++ b/dev-tcltk/iwidgets/files/4.0.1-path.patch
@@ -0,0 +1,63 @@
+--- iwidgets4.0.1/Makefile.in
++++ iwidgets4.0.1/Makefile.in
+@@ -30,6 +30,7 @@
+
+ srcdir = @srcdir@
+ bindir = @bindir@
++mandir = @mandir@
+
+ # The following definition can be set to non-null for special systems
+ # like AFS with replication. It allows the pathnames used for installation
+@@ -48,7 +49,9 @@
+ BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
+
+ # Top-level directory in which to install manual entries:
+-MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man/mann
++MAN_INSTALL_DIR = $(INSTALL_ROOT)$(mandir)/mann
++
++DATA_DIR = $(INSTALL_ROOT)$(prefix)/share/iwidgets$(IWIDGETS_VERSION)
+
+ # Directory containing Tcl source code (for library used during test):
+ TCL_SRC_DIR = @TCL_SRC_DIR@
+@@ -135,26 +138,26 @@
+ done;
+
+ install-demos:
+- @$(MKINSTALLDIRS) $(SCRIPT_INSTALL_DIR)/demos/images $(SCRIPT_INSTALL_DIR)/demos/html
+- @echo "Installing demos from $(srcdir)/demos into $(SCRIPT_INSTALL_DIR)/demos"
++ @$(MKINSTALLDIRS) $(DATA_DIR)/demos/images $(DATA_DIR)/demos/html
++ @echo "Installing demos from $(srcdir)/demos into $(DATA_DIR)/demos"
+ @for i in $(srcdir)/demos/*; \
+ do \
+ if [ -f $$i ] ; then \
+- $(INSTALL_SCRIPT) $$i $(SCRIPT_INSTALL_DIR)/demos; \
++ $(INSTALL_SCRIPT) $$i $(DATA_DIR)/demos; \
+ fi; \
+ done;
+- @echo "Installing images from $(srcdir)/demos/images into $(SCRIPT_INSTALL_DIR)/demos/images"
++ @echo "Installing images from $(srcdir)/demos/images into $(DATA_DIR)/demos/images"
+ for i in $(srcdir)/demos/images/*; \
+ do \
+ if [ -f $$i ] ; then \
+- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
++ $(INSTALL_DATA) $$i $(DATA_DIR)/demos/images; \
+ fi; \
+ done;
+- @echo "Installing html man pages from $(srcdir)/demos/html into $(SCRIPT_INSTALL_DIR)/demos/html"
++ @echo "Installing html man pages from $(srcdir)/demos/html into $(DATA_DIR)/demos/html"
+ for i in $(srcdir)/demos/html/*; \
+ do \
+ if [ -f $$i ] ; then \
+- $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/html; \
++ $(INSTALL_DATA) $$i $(DATA_DIR)/demos/html; \
+ fi; \
+ done;
+
+@@ -169,7 +172,6 @@
+ $$i > $(MAN_INSTALL_DIR)/`basename iwidgets_$$i`; \
+ chmod 444 $(MAN_INSTALL_DIR)/`basename iwidgets_$$i`; \
+ done;
+- $(INSTALL_DATA) $(srcdir)/license.terms $(SCRIPT_INSTALL_DIR)
+
+ Makefile: $(srcdir)/Makefile.in
+ $(SHELL) config.status
diff --git a/dev-tcltk/iwidgets/iwidgets-4.0.1-r3.ebuild b/dev-tcltk/iwidgets/iwidgets-4.0.1-r3.ebuild
new file mode 100644
index 000000000000..1c42bf9071a0
--- /dev/null
+++ b/dev-tcltk/iwidgets/iwidgets-4.0.1-r3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib
+
+MY_P="${PN}${PV}"
+ITCL_MY_P="itcl3.2.1"
+
+DESCRIPTION="Widget collection for incrTcl/incrTk"
+HOMEPAGE="http://incrtcl.sourceforge.net/itcl/"
+SRC_URI="
+ mirror://sourceforge/incrtcl/${MY_P}.tar.gz
+ mirror://sourceforge/incrtcl/${ITCL_MY_P}_src.tgz"
+
+LICENSE="HPND Old-MIT tcltk"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND="
+ >=dev-tcltk/itcl-3.2.1
+ >=dev-tcltk/itk-3.2.1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-path.patch
+ sed \
+ -e "/^\(LIB\|SCRIPT\)_INSTALL_DIR =/s|lib|$(get_libdir)|" \
+ -i Makefile.in || die
+
+ # Bug 115470
+ rm doc/panedwindow.n
+}
+
+src_configure() {
+ econf \
+ --with-itcl="${WORKDIR}/${ITCL_MY_P}" \
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
+ --with-tk="${EPREFIX}"/usr/$(get_libdir)
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ # parallel borks #177088
+ emake -j1 INSTALL_ROOT="${D}" install
+
+ dodoc CHANGES ChangeLog README
+
+ # bug 247184 - iwidget installs man pages in /usr/man
+# mkdir -p "${ED}"/usr/share/man/mann
+# mv "${ED}"/usr/man/mann/* "${ED}"/usr/share/man/mann/
+# rm -rf "${ED}"/usr/man
+
+ # demos are in the wrong place:
+# mkdir -p "${ED}/usr/share/doc/${PF}"
+# mv "${ED}/usr/$(get_libdir)/${MY_P}/demos" "${ED}/usr/share/doc/${PF}/"
+}
diff --git a/dev-tcltk/iwidgets/iwidgets-4.0.1.ebuild b/dev-tcltk/iwidgets/iwidgets-4.0.1.ebuild
new file mode 100644
index 000000000000..bf1bd6f4d3b7
--- /dev/null
+++ b/dev-tcltk/iwidgets/iwidgets-4.0.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MY_P=${PN}${PV}
+ITCL_MY_PN="itcl"
+ITCL_MY_PV="3.2.1"
+ITCL_MY_P="${ITCL_MY_PN}${ITCL_MY_PV}"
+
+DESCRIPTION="Widget collection for incrTcl/incrTk"
+HOMEPAGE="http://incrtcl.sourceforge.net/itcl/"
+SRC_URI="
+ mirror://sourceforge/incrtcl/${MY_P}.tar.gz
+ mirror://sourceforge/incrtcl/${ITCL_MY_P}_src.tgz"
+
+LICENSE="HPND Old-MIT tcltk"
+SLOT="0"
+KEYWORDS="~alpha amd64 ia64 ppc sparc x86"
+IUSE=""
+
+DEPEND="
+ >=dev-tcltk/itcl-3.2.1
+ >=dev-tcltk/itk-3.3-r1"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ local myconf
+ myconf="${myconf} --with-itcl=${WORKDIR}/${ITCL_MY_P}"
+ econf ${myconf}
+}
+
+src_install() {
+ einstall || die "einstall failed"
+ dodoc CHANGES ChangeLog README || die
+ # Bug 115470
+ rm doc/panedwindow.n
+ doman doc/*.n || die
+}
diff --git a/dev-tcltk/iwidgets/metadata.xml b/dev-tcltk/iwidgets/metadata.xml
new file mode 100644
index 000000000000..d3074de5e0e4
--- /dev/null
+++ b/dev-tcltk/iwidgets/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">incrtcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/metadata.xml b/dev-tcltk/metadata.xml
new file mode 100644
index 000000000000..0fadf10b5e15
--- /dev/null
+++ b/dev-tcltk/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The dev-tcltk category contains Tcl- and Tk-related libraries and tools.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie dev-tcltk enthält Bibliotheken und Werkzeuge für Tcl und Tk.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría dev-tcltk contiene herramientas y librerías referentes
+ a Tcl y Tk.
+ </longdescription>
+ <longdescription lang="ja">
+ dev-tcltkカテゴリーにはTclとTkに関連したライブラリーとツールが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De dev-tcltk categorie bevat bibliotheken en hulpmiddelen voor het gebruik van de
+ programmeertalen Tcl en Tk.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm dev-tcltk chứa các thư viện và tiện ích liên quan
+ đến ngôn ngữ lập trình Tcl/Tk.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria dev-tcltk contiene utilità e librerie per Tcl e Tk.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria dev-tcltk contém bibliotecas e ferramentas
+ referentes a Tcl e Tk.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria dev-tcltk zawiera biblioteki i narzędzia związane z Tcl i Tk.
+ </longdescription>
+</catmetadata>
+
diff --git a/dev-tcltk/mysqltcl/Manifest b/dev-tcltk/mysqltcl/Manifest
new file mode 100644
index 000000000000..99463620e4b9
--- /dev/null
+++ b/dev-tcltk/mysqltcl/Manifest
@@ -0,0 +1,8 @@
+AUX mysqltcl-3.05-ldflags.patch 448 SHA256 3e71891b39624442b8f037c42d52c712a25b28fac18c69385f5850f8eb914a22 SHA512 c253797952c5abe6633e9eb1394a1e5c2d6bd88f3c74f5f367a139b6de71fb22a645717c86d0d61a68b33a01240940e0347d184623ed1b889defea58c3c8ee79 WHIRLPOOL dad5e07aaedb95571895f4da80f2406b5103e76c26d9c823121f341122bc0d6b6c3f966c1b8492deb1406e110e822b21b3e692ac3cbb8feaac74ab47e49d9e79
+DIST mysqltcl-3.05.tar.gz 198755 SHA256 e2346aee4b99b2d91b552718e4be8ec8c4fc4bbbfe12430e4041e9e13d27a245 SHA512 14e0196b2fce08d97b085bcf25357a72797e9566578a6c0674a76e4402a704b43919b1ce8360d55719a6f2a36c6f68f3762dd23a9f737b7cf9f6537a00acb7ef WHIRLPOOL c2dc4d1441c4092f6d12fa2a1890d6dbda4eb822ec7b87106586e9980d331b04f825e4ac9ad08a8b9dd0604fe3547bf5f73251e27d793e73e0f3213114717620
+DIST mysqltcl-3.052.tar.gz 187781 SHA256 5b6e04430b80fd4af54599551503bae681232be0bae3c55c1a93adeb66702007 SHA512 f5af18ad9bbaedb1fdcdbaa326b5c4cc3f754b14ee9bdf9cbfa0e1a44227ec918426022aaa0f26a71fa1a3bce6b6d8d75f8612de7f540f287fd418088c91fddf WHIRLPOOL 2138049c7d51eb737d7ce59c1094d3d8873f641a4b5d25ac5b3e150407ade7463869adc5c9da103f25c757172b7e73ff31dc6a11ff42ab8decd246e4e092d1fd
+EBUILD mysqltcl-3.05.ebuild 660 SHA256 4e24068a260699ab4311ec0dc2182b871a0caec4eb756ebaeb011b0012175d01 SHA512 ec478b9755395e113a8b7345a52414167230f06e28694e443b60df8062152e7bcb248dee197bc9b402c91c4be5ed38fda80410b9814eca1a4abc38d77d585fe0 WHIRLPOOL de954e07c07147c76b8cfaa8b8a8da303b99be8585ca6fa763871e6b074a90a95395bd3a4dd5880d93a260ff3531d13a377a8e3a422347688497c6c4649d11f3
+EBUILD mysqltcl-3.052.ebuild 656 SHA256 9a6f04d9a11f2c900c8746d35012cd692add32a6943128218a06ffcb0106b084 SHA512 c31bdba59fe5b316cf29c54cf34a801614fae431a1b5ac9a6f86690b91d8ed63be692e35dbc27bfb1a08b1f28c9f1a2fd99bb05aab2ca00303b1344d9334975f WHIRLPOOL 15b2a022531a06620c90dbeeb24dba776f8a5ba411fb464f5494de13a3cc0b2418d35d5e38535206eefb9296dc4734fded57befe07e5374187d5feaefd85e10b
+MISC ChangeLog 2465 SHA256 e031f4c73d5de5380eed61fc1acd8afd213830f977e809ba5d60b6b6bb73f81f SHA512 65fa521c9a340ebd0f1a7a8a83ba16cf1e7331f8ae04625e02e0fe1821083c4f8f8cdfb6172f19f681501247f0a4cfcf06a23438fd917b1c628e425f988c6e8b WHIRLPOOL 76484b2e6e499cd78a56e7c804749f2d5450449313bc1f5d2d3fc41bf51538597e8df36fb7db31b95dcd8a7c1475ee5c760085762e24583e03f2819f10c3a3c3
+MISC ChangeLog-2015 2835 SHA256 85da3027c685b3171db9b5ced8810a57b88705bdca933f2cdf563ba38d795458 SHA512 0ce0f5070f8a51f3a6bf6a528f0d83c426c9cb1fe741f9c0c81805262c75ce48552b92d1b443f7a0ccf6d0aa49634337d17ed3bdd286d5bb48b891f3a95b9aad WHIRLPOOL ef000eee4d0be66b09df8e7b48d2b4641dc3a74fd11f235c60a7034e301ec2b705974e8af8fc37766de85f368461e06712127720cf7adbe7a5da084b74c43a92
+MISC metadata.xml 239 SHA256 a35e1476a1677a91f06dd6e4f955fcebc58c3a07f934b5e62fbf801573a5c82b SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b WHIRLPOOL 3ed1945907fa58cbc9997c311d1d0431d481586576ce45b4bc5caf7704ddefe2117305879a97e8021694b86af0d570a34517212b6cc9528224b85e568eee3d75
diff --git a/dev-tcltk/mysqltcl/files/mysqltcl-3.05-ldflags.patch b/dev-tcltk/mysqltcl/files/mysqltcl-3.05-ldflags.patch
new file mode 100644
index 000000000000..5aa440332153
--- /dev/null
+++ b/dev-tcltk/mysqltcl/files/mysqltcl-3.05-ldflags.patch
@@ -0,0 +1,16 @@
+ Makefile.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 0552d56..e32a0b4 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -107,7 +107,7 @@ OBJEXT = @OBJEXT@
+ RANLIB = @RANLIB@
+ RANLIB_STUB = @RANLIB_STUB@
+ SHLIB_CFLAGS = @SHLIB_CFLAGS@
+-SHLIB_LD = @SHLIB_LD@
++SHLIB_LD = @SHLIB_LD@ $(LDFLAGS)
+ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ @MYSQL_LIBS@
+ STLIB_LD = @STLIB_LD@
+ #TCL_DEFS = @TCL_DEFS@
diff --git a/dev-tcltk/mysqltcl/metadata.xml b/dev-tcltk/mysqltcl/metadata.xml
new file mode 100644
index 000000000000..709689b06053
--- /dev/null
+++ b/dev-tcltk/mysqltcl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>mysql-bugs@gentoo.org</email>
+ <name>MySQL</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/mysqltcl/mysqltcl-3.05.ebuild b/dev-tcltk/mysqltcl/mysqltcl-3.05.ebuild
new file mode 100644
index 000000000000..6de346fcd25d
--- /dev/null
+++ b/dev-tcltk/mysqltcl/mysqltcl-3.05.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib
+
+DESCRIPTION="TCL MySQL Interface"
+HOMEPAGE="http://www.xdobry.de/mysqltcl/"
+SRC_URI="http://www.xdobry.de/mysqltcl/${P}.tar.gz"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE=""
+
+DEPEND="
+ dev-lang/tcl:0
+ >=virtual/mysql-4.1"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ sed -i 's/-pipe//g;s/-O2//g;s/-fomit-frame-pointer//g' configure || die
+}
+
+src_configure() {
+ econf --with-mysql-lib=/usr/$(get_libdir)/mysql
+}
+
+src_install() {
+ default
+ dohtml doc/mysqltcl.html
+}
diff --git a/dev-tcltk/mysqltcl/mysqltcl-3.052.ebuild b/dev-tcltk/mysqltcl/mysqltcl-3.052.ebuild
new file mode 100644
index 000000000000..3dd15444e78b
--- /dev/null
+++ b/dev-tcltk/mysqltcl/mysqltcl-3.052.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="TCL MySQL Interface"
+HOMEPAGE="http://www.xdobry.de/mysqltcl/"
+SRC_URI="http://www.xdobry.de/mysqltcl/${P}.tar.gz"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="
+ dev-lang/tcl:0=
+ virtual/mysql:0="
+RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}"/${PN}-3.05-ldflags.patch )
+HTML_DOCS=( doc/mysqltcl.html )
+
+src_prepare() {
+ default_src_prepare
+ sed -i 's/-pipe//g;s/-O2//g;s/-fomit-frame-pointer//g' configure || die
+}
+
+src_configure() {
+ econf --with-mysql-lib=$(mysql_config --variable=pkglibdir)
+}
diff --git a/dev-tcltk/scwoop/Manifest b/dev-tcltk/scwoop/Manifest
new file mode 100644
index 000000000000..7d112db97f65
--- /dev/null
+++ b/dev-tcltk/scwoop/Manifest
@@ -0,0 +1,5 @@
+DIST scwoop-4.1.tar.gz 86368 SHA256 f1598ecf2be44de6c97ad648faab010000e905c781877cd1b493220054c42a57 SHA512 8fd3fc01bd133aa155b45dcc5a821986aa72115fe248e0382611604f9e23596506f0d34ac331c4824bfd84dce7958b7a10186551604a0614572ee4e84fa3be21 WHIRLPOOL e1d75da7b7c29e505c9f7a92a52ae13f8afdcabfbbf6b4371ef005f0472ee4d3f3ee1247606fefe98a4b04fc2fe1ffbb2ba62ed209d3eaf368416aff0d5f0422
+EBUILD scwoop-4.1.ebuild 542 SHA256 89d39b5a961741c91e73a2d00463b2ad388947af44920c1659b93cdc78dba5f6 SHA512 c94b9a7d6b575fd63153006a4c27d695846656aee433cb558f8aa53b211133b5844cffcf30b3e16faf5f29b372df651648b9ac6d460bce67102545575d6a2e22 WHIRLPOOL 5d5d5fbd336af7c9729e1d2e55c343246a2aa9de56495225f8c552625cb512cac01948287fa38680b9b9e7ccd6cd469c39ababb9a1fdf8bcb240be7ba4c197e9
+MISC ChangeLog 2421 SHA256 14d689b2bc877a91f22576deb30e00e9545766216675f308abf3f47614cd9390 SHA512 9c351aca22b34f789e5d4f8834eb16755451634684a5c77bc8f9dca796f1c5a69bbecb955eb3a3a75ce1d122c9851be7ab1c4ebcb88e1e79a48835a3625a2c90 WHIRLPOOL 81ab98ba56d389e9865df2653312e642ec3efd8732006c5fafd9f393ff6af6b18dc1d834d455945a8aa2d421ffd924fa00b9f02117f77dd72f31e366cc585e7b
+MISC ChangeLog-2015 843 SHA256 02d53442dd18e5b4ba163b7381892cc6d6deb5f63da2c87949af68feacd6b7dd SHA512 9e926a117782d44d1aeedff7286bdac0be92944a74e7af324290f89cf7e533b10b1cba3516eb0929b119a27f94e4b818ddae161c6b1dfd032cd6034207e49aab WHIRLPOOL 0769a82064b80b034482bcff15d5670d28bfc141bc44adc80549e355893cf690011e9741ecc6dfc568e3ab1868a3325298aa32fd625aeec5b173efa8b535c23d
+MISC metadata.xml 249 SHA256 b0f74d8b723073d3fc9417e8e6ed1ed0cadec16a609c40abf9a977ebc93c32a5 SHA512 e0b0007b4cfb9cb2af7a9bd33d578bc2bf1819985fa37d2dc8ec14cc1ae2987583d4054ad7497d9cf6c603b33f502bc6ee579ff990daa341b2e0572d585fbea6 WHIRLPOOL 4d36385654fa737b131ab83f5ae030c87f04e442052c7618f855d4124991c5fe7fc737b8f69c2eb5ab1a614093c599729f3c0bc9b595ddbb63df7eb351786f70
diff --git a/dev-tcltk/scwoop/metadata.xml b/dev-tcltk/scwoop/metadata.xml
new file mode 100644
index 000000000000..d836ed383e14
--- /dev/null
+++ b/dev-tcltk/scwoop/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/scwoop/scwoop-4.1.ebuild b/dev-tcltk/scwoop/scwoop-4.1.ebuild
new file mode 100644
index 000000000000..e0e201a97c20
--- /dev/null
+++ b/dev-tcltk/scwoop/scwoop-4.1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Simple Composite Widget Object Oriented Package"
+HOMEPAGE="http://jfontain.free.fr/scwoop41.htm"
+SRC_URI="http://jfontain.free.fr/${P}.tar.gz"
+
+LICENSE="jfontain"
+KEYWORDS="x86 amd64 ~ppc"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-tcltk/tcllib"
+
+src_install() {
+ dodir /usr/lib/scwoop
+ ./instapkg.tcl "${D}"/usr/lib/scwoop || die
+
+ dodoc CHANGES CONTENTS COPYRIGHT INSTALL README TODO
+ dohtml scwoop.htm
+ docinto demo
+ dodoc demo*
+}
diff --git a/dev-tcltk/snack/Manifest b/dev-tcltk/snack/Manifest
new file mode 100644
index 000000000000..49ac0c9f537a
--- /dev/null
+++ b/dev-tcltk/snack/Manifest
@@ -0,0 +1,8 @@
+AUX alsa-undef-sym.patch 1225 SHA256 98ea274e8d6bd63e7ac785c65dcbd7d45fd7f904af974ffb3792c1b7917141f9 SHA512 2f925029ca7ebcf0028beb2c303d07831879d9750b5f4f463a8d463964301d0182650b9ad50b103be6c0e5eb4cb58a19e02496b7afee8531dcb2c132a292ff97 WHIRLPOOL 8942c4daa55a918a5ef7739dac76e4facb9137d3b60b1a2e84c55fa0e92d6aaae27ee98f679b6a61c755fa71a136c81ac26058f780c3f0b8de9a017bf8c77cad
+AUX snack-2.2.10-CVE-2012-6303-fix.patch 778 SHA256 a3a897ed458484a67af00bc98406a739dfe40e263a01697d4f8aff0b948592f6 SHA512 6e2f7fcf8ca0c2792cf52432340f2319b8c82677a3568c9e382f91758f5e6bf26c3a05939d4a748c4198c4e50f27141ebd2cb298d8363765ed6582192d64d3e8 WHIRLPOOL 2e14c1b276e5a01015a9c2288a1d2e81add3e0bec367b64a9a382a1e0a47ba72c78b2958822ae3c0ed8fa1d95cc21a7138060cc234522a21be4aac368d47f76e
+AUX snack-2.2.10-darwin.patch 1108 SHA256 8ea2ae5fba07018cf457df25e008e0013bcfdcde46bd16f9aa8c26caa8d64445 SHA512 0d82270d830c8b7d15dcbead05d80c15666d1bac164f26c045859f7f4dc4c098961b48272ecd0b059a1b36ba8d560c563fe8e40add822f311026faf5f7eeaf0a WHIRLPOOL 0ea35f68784c18d1a95034a8810e95b3dbb2288e162122d3ecfc2689b9209802b356f6b1683cc4fdaea028004549d524269261e837b4185b848e4e923835c969
+DIST snack2.2.10.tar.gz 1798252 SHA256 4bfe764547ab92ba58f43b77366dbb7c7b3512d65a27cdbf9e585a9cb64ce81e SHA512 c17ad332fa4f3ded006b97ceca85cada079e4c7cd933768b289c13dadca1b8803fccaf709ec2def5af4abe92c307f25597ebfa6f94df2d681e40815cd7eccb9b WHIRLPOOL 8374d482041a60443fff3c28614d08b97390648367088d37b7c9a140355e8481e444f09f0c0c9fd7370903b33a2f46eae7c96ec5dbce532bb47f06537ce799ee
+EBUILD snack-2.2.10-r6.ebuild 2013 SHA256 93cbfb1c1dc3ed880f9b35742673cf0db46a37347a6d51e50657001dd73bd0d3 SHA512 df22e4c06dc2c38dd29f1c937e3732e89da2ac20645657e01d830ddd789cd156f233edfae0a05fe0311798bda9877ff20db6a20e01d5956045d180a6247fa2d5 WHIRLPOOL e05e29b6ec8e01bd7e4f75d69f601622ee715d1fc326a1ce8b9c1b2568004e766786ae78255a54aa5f89b59f74614402b7b3067d0ec185a8c60d9582f676f448
+MISC ChangeLog 2865 SHA256 459af468016f5cfd8c67969ad9e2bd25ae8dec45375c66f5d3d49bfcac3e3a02 SHA512 1d3f907579992357c140868749b4b1a31949491fe1f6ffd585f1c66ebf1d7e65344f2089503e05431da2b5ee0b77185cf9927da82be3eaece7ac6d7049afad27 WHIRLPOOL bc3ee0f96e6e4b8683c46c5dbffe5479fe774a6b34e7572ac985335f20531aa4d50f92286f998cebe95e18955123c5d01f4b108a30bd29b416d235e8836e7ba4
+MISC ChangeLog-2015 7878 SHA256 f0fbddd5616e1051017dddc2f6701ed157ca1ac68fa080f7484c8391b0782ec4 SHA512 f3cb8b8322c0b28d42fac803f44f7d2494b990412f6a0ee774412c6d9f9b754e22b586021499c85a3cbd6cf6f3f5fae3fc87486debb205dafbca254b855d1e05 WHIRLPOOL ce36edc976688f2a8d898321267475e864ff01b18f5bcb936705aa89ac61bc869e769a28ed7d8d8d6d97fd2eeba89b963e0b9521641bca60ce1c77ab4c93155b
+MISC metadata.xml 259 SHA256 f3ad7890286839b12dc011613c2ba3df199a206c295ba8c433a8fe7f0dcc5815 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639 WHIRLPOOL f5ad746e91e08e44d2d857057d7203fe515cbdd295f69a2d3ce2cb35343d2dc3f2879b57d00e8782bd416bfd36ce4504a7a91bbcf325eabe71075d0726e2bece
diff --git a/dev-tcltk/snack/files/alsa-undef-sym.patch b/dev-tcltk/snack/files/alsa-undef-sym.patch
new file mode 100644
index 000000000000..77a222754fe1
--- /dev/null
+++ b/dev-tcltk/snack/files/alsa-undef-sym.patch
@@ -0,0 +1,49 @@
+--- unix/jkAudIO_alsa.c 2005-12-14 12:29:38.000000000 +0100
++++ unix/jkAudIO_alsa.c 2008-09-01 22:51:20.000000000 +0200
+@@ -49,6 +49,8 @@
+
+ static int minNumChan = 1;
+
++static snd_pcm_uframes_t hw_bufsize = 0;
++
+ int
+ SnackAudioOpen(ADesc *A, Tcl_Interp *interp, char *device, int mode, int freq,
+ int nchannels, int encoding)
+@@ -135,6 +137,9 @@
+ Tcl_AppendResult(interp, "Failed setting HW params.", NULL);
+ return TCL_ERROR;
+ }
++
++ snd_pcm_hw_params_get_buffer_size (hw_params, &hw_bufsize);
++
+ snd_pcm_hw_params_free(hw_params);
+ snd_pcm_prepare(A->handle);
+ if (A->mode == RECORD) {
+@@ -202,6 +207,8 @@
+ int i;
+ static char buf[64];
+
++ return;
++
+ if (A->debug > 1) Snack_WriteLog(" Enter SnackAudioPost\n");
+
+ for (i = 0; i < 1000; i++) {
+@@ -267,12 +274,14 @@
+ long
+ SnackAudioPlayed(ADesc *A)
+ {
+- long avail = _snd_pcm_mmap_hw_ptr(A->handle);
++ // FIX Here, _snd_pcm_mmap_hw_ptr is deprecated in new alsalib
++ long played = A->nWritten - (hw_bufsize - SnackAudioWriteable(A));
++ // long avail = _snd_pcm_mmap_hw_ptr(A->handle);
+
+- if (avail < 0)
+- avail = 0;
++ if (played < 0)
++ return 0;
+
+- return (avail+A->nPlayed);
++ return (played);
+ }
+
+ void \ No newline at end of file
diff --git a/dev-tcltk/snack/files/snack-2.2.10-CVE-2012-6303-fix.patch b/dev-tcltk/snack/files/snack-2.2.10-CVE-2012-6303-fix.patch
new file mode 100644
index 000000000000..6326e8a48d04
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-CVE-2012-6303-fix.patch
@@ -0,0 +1,19 @@
+diff -up snack2.2.10/generic/jkSoundFile.c.CVE20126303 snack2.2.10/generic/jkSoundFile.c
+--- snack2.2.10/generic/jkSoundFile.c.CVE20126303 2013-01-02 11:26:15.496231056 -0500
++++ snack2.2.10/generic/jkSoundFile.c 2013-01-02 11:27:26.134250662 -0500
+@@ -1798,7 +1798,14 @@ static int
+ GetHeaderBytes(Sound *s, Tcl_Interp *interp, Tcl_Channel ch, char *buf,
+ int len)
+ {
+- int rlen = Tcl_Read(ch, &buf[s->firstNRead], len - s->firstNRead);
++ int rlen;
++
++ if (len > max(CHANNEL_HEADER_BUFFER, HEADBUF)){
++ Tcl_AppendResult(interp, "Excessive header size", NULL);
++ return TCL_ERROR;
++ }
++
++ rlen = Tcl_Read(ch, &buf[s->firstNRead], len - s->firstNRead);
+
+ if (rlen < len - s->firstNRead){
+ Tcl_AppendResult(interp, "Failed reading header bytes", NULL);
diff --git a/dev-tcltk/snack/files/snack-2.2.10-darwin.patch b/dev-tcltk/snack/files/snack-2.2.10-darwin.patch
new file mode 100644
index 000000000000..8c6dc5285863
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-darwin.patch
@@ -0,0 +1,28 @@
+* grobian@gentoo.org: need all symbols to be satisfied, need
+ install_name for actual usage
+
+--- unix/Makefile.in
++++ unix/Makefile.in
+@@ -35,7 +35,7 @@
+
+ LIBSO = -lc @ALIB@ @TCL_LIB_SPEC@
+
+-LIBSN = -lc @TK_LIBS@ @ALIB@ @TCL_LIB_SPEC@ @TK_LIB_SPEC@
++LIBSN = -lc -lX11 -ltk @TK_LIBS@ @ALIB@ @TCL_LIB_SPEC@ @TK_LIB_SPEC@
+
+ SHLIB_LD = @SHLIB_LD@
+ SHLIB_SUFFIX = @SHLIB_SUFFIX@
+@@ -158,11 +158,11 @@
+ $(CC) -c $(CFLAGS) $(GENERIC_DIR)/snackStubLib.c
+
+ libsound${SHLIB_SUFFIX}: ${OBJSO}
+- ${SHLIB_LD} ${OBJSO} ${LIBSO} -o libsound${SHLIB_SUFFIX}
++ ${SHLIB_LD} ${OBJSO} ${LIBSO} -install_name $(SNACK_INSTALL_PATH)/snack${VERSION}/libsound${SHLIB_SUFFIX} -o libsound${SHLIB_SUFFIX}
+ sed s/.dll/${SHLIB_SUFFIX}/ < $(UNIX_DIR)/pkgIndex.tcl.dll > pkgIndex.tcl
+
+ libsnack${SHLIB_SUFFIX}: ${OBJSN}
+- ${SHLIB_LD} ${OBJSN} ${LIBSN} -o libsnack${SHLIB_SUFFIX}
++ ${SHLIB_LD} ${OBJSN} ${LIBSN} -install_name $(SNACK_INSTALL_PATH)/snack${VERSION}/libsnack${SHLIB_SUFFIX} -o libsnack${SHLIB_SUFFIX}
+ sed s/.dll/${SHLIB_SUFFIX}/ < $(UNIX_DIR)/pkgIndex.tcl.dll > pkgIndex.tcl
+
+ stublib: ${OBJSNST}
diff --git a/dev-tcltk/snack/metadata.xml b/dev-tcltk/snack/metadata.xml
new file mode 100644
index 000000000000..227dda5ba584
--- /dev/null
+++ b/dev-tcltk/snack/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/snack/snack-2.2.10-r6.ebuild b/dev-tcltk/snack/snack-2.2.10-r6.ebuild
new file mode 100644
index 000000000000..e700af31338d
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r6.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit autotools autotools-utils distutils-r1 multilib
+
+DESCRIPTION="The Snack Sound Toolkit (Tcl)"
+HOMEPAGE="http://www.speech.kth.se/snack/"
+SRC_URI="http://www.speech.kth.se/snack/dist/${PN}${PV}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 hppa ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+SLOT="0"
+IUSE="alsa examples python threads vorbis"
+
+RESTRICT="test" # Bug 78354
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ alsa? ( media-libs/alsa-lib )
+ python? ( ${PYTHON_DEPS} )
+ vorbis? ( media-libs/libvorbis )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}/unix"
+
+#PYTHON_MODNAME="tkSnack.py"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/alsa-undef-sym.patch
+ "${FILESDIR}"/${P}-CVE-2012-6303-fix.patch
+ )
+
+src_prepare() {
+ # adds -install_name (soname on Darwin)
+ [[ ${CHOST} == *-darwin* ]] && PATCHES+=( "${FILESDIR}"/${P}-darwin.patch )
+
+ sed \
+ -e "s:ar cr:$(tc-getAR) cr:g" \
+ -e "s:-O:${CFLAGS}:g" \
+ -i Makefile.in || die
+
+ cd .. || die
+
+ autotools-utils_src_prepare
+
+ sed \
+ -e 's|^\(#define roundf(.*\)|//\1|' \
+ -i generic/jkFormatMP3.c || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ --includedir="${EPREFIX}"/usr/include
+ )
+
+ use alsa && myconf+=( --enable-alsa )
+ use threads && myconf+=( --enable-threads )
+
+ use vorbis && \
+ myconf+=( --with-ogg-include="${EPREFIX}"/usr/include ) && \
+ myconf+=( --with-ogg-lib="${EPREFIX}"/usr/$(get_libdir) )
+
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use python ; then
+ cd "${S}"/../python || die
+ distutils-r1_src_install
+ fi
+
+ cd "${S}"/.. || die
+
+ dohtml doc/*
+
+ if use examples ; then
+ docinto examples
+ sed -i -e 's/wish[0-9.]+/wish/g' demos/tcl/* || die
+ dodoc -r demos/tcl
+
+ use python && dodoc -r demos/python
+ fi
+}
diff --git a/dev-tcltk/tablelist/Manifest b/dev-tcltk/tablelist/Manifest
new file mode 100644
index 000000000000..897bf29b3e49
--- /dev/null
+++ b/dev-tcltk/tablelist/Manifest
@@ -0,0 +1,5 @@
+DIST tablelist5.8.tar.gz 416416 SHA256 4e24d2e2eae368d1a80d063c0682ff936aef1ffb03afc2f4ef221aacb2b06dd8 SHA512 9c8e3577ae0e89291450c7ecccbbb042417d9a24255489e9257eae2b48454cbef4ec759949ddfc8d73123260da3fc506e01acf6c15e113e5112ed15c014d6833 WHIRLPOOL 002b22975e9667b061e8a84b9cb55ab9d73f1317d517749dbb5c7496b3bf406fe49d218ac7ace5fa3de57f10a580f5db9f46a3fd9d48fef3311d575c6ea40c43
+EBUILD tablelist-5.8.ebuild 663 SHA256 6e5b82a3d7e149dd3eac9106c96310eab022489eb2c6e33cb39609ec94e69c6a SHA512 1e9b61a0ede9169eff9a24e54d782a614c6b738afbfdac623d1fdc1b54c9d306699cc426d3fc4b330793a393ca2f27ba2d99b82c401d99b4e45265a7da441047 WHIRLPOOL a18e4841424dbd3d572935da1f6e89efec0d1c182938eb5ba13141e42123e535985df795b4fcda57e05b236c6f91f22d511e65d83248b2850a625a0db42026a9
+MISC ChangeLog 2570 SHA256 d6f2edc543625d9067a906b9111002af0238a52fd422baa9c7cc7b32940048c1 SHA512 0ae6220a972bb56a3d4cbb43136847c22f89c3a36875f60d77eb622d18e43e3daa748363297df111fa2413e8beb444227feb7dddfb71b78c832c4e50add44a3c WHIRLPOOL e7f6a74746f8afcabfc6efce4ce239502e932070855d44b6bdb25d0dd409e39750b825193d5ee8997503aa413f71bba57fd323cb82ff70129ed507c456a1fcb1
+MISC ChangeLog-2015 2972 SHA256 cba2f0a3b204fae2fc586a139f73343130b9b07a089b8864e8c0fe9e08ba5a6b SHA512 721159483b7718f880e4aebb73b5d7b2ff45332e6a83ea38e0ff2c334d21cd47eae76e12e12ba11c43bf7dedf11f28dabefd8872af7bad56380b606c48399c1d WHIRLPOOL ac3a3952bfb5487e6956fc01d98623faa7d5a2a5fb5ff5a874e5a691218eb292d6dec172e6991179886c9045595943763895bf896d981a4bd3337a3119a3a474
+MISC metadata.xml 259 SHA256 bbfbeb80ffccffa8e7f837d2c93e994bbe024d565ae3a31d30c6646e80a684c8 SHA512 19fb78cf4029c154954a40df40e28fc8d98a8b7e6b42f97259f664d44c29b284feffb9d073cadc7f90b5654a64b2466e186cb677d3a11830206f173eb9057706 WHIRLPOOL 75b8dd1a97dde63f9cc9f73b5951eaf54579460763ef7cbe6f3a9a0739070601d762152ea00df8b476b80e92e5c29b611a494bac5ab747298942530cabe0ee84
diff --git a/dev-tcltk/tablelist/metadata.xml b/dev-tcltk/tablelist/metadata.xml
new file mode 100644
index 000000000000..8425c0d53cb0
--- /dev/null
+++ b/dev-tcltk/tablelist/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/tablelist/tablelist-5.8.ebuild b/dev-tcltk/tablelist/tablelist-5.8.ebuild
new file mode 100644
index 000000000000..13227dd19379
--- /dev/null
+++ b/dev-tcltk/tablelist/tablelist-5.8.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Multi-Column Listbox Package"
+HOMEPAGE="http://www.nemethi.de/tablelist/index.html"
+SRC_URI="http://www.nemethi.de/tablelist/${MY_P}.tar.gz"
+
+LICENSE="tablelist"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="examples doc"
+
+RDEPEND="dev-lang/tcl:0"
+DEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ insinto /usr/$(get_libdir)/${MY_P}
+ doins -r ${PN}* pkgIndex.tcl scripts
+ use doc && dohtml doc/*
+ use examples && insinto /usr/share/${PN} && doins -r demos
+ dodoc README.txt
+}
diff --git a/dev-tcltk/tcl-mccp/Manifest b/dev-tcltk/tcl-mccp/Manifest
new file mode 100644
index 000000000000..4231643bc124
--- /dev/null
+++ b/dev-tcltk/tcl-mccp/Manifest
@@ -0,0 +1,6 @@
+AUX tcl-mccp-0.6-flags.patch 542 SHA256 fba02abf8180bb7099b3faccb7322d93fab26e18082920f9105b4b789d38d4d8 SHA512 c89c93b56ad2fc5d30ab79b968e79ac4eb737b1e545108e4f1d76828418f5e5d3f38505ea4a0a2adbbc676f8f7e1e40eda0e6e2c4c79238087096b44cb690886 WHIRLPOOL 1d6cd6c65054d0d3df17346a6f1197a7ed802e98f5948a6183ecfc006b1ad838eb60e4a80b404c0a5e371d31a1c4bc7ad2905e084a216196405e5a65b5de2d02
+DIST tcl-mccp-0.6.tar.gz 167446 SHA256 caf3fe21bc62a8a39e4360eb5ccd9100bdc2c9a04a0dbfd0f6aaea1862042b0c SHA512 d3f77b49454dc4f838b91d95146c71d6f8d46d293743b46b551e9217a92a9f6b03b26400cc21faf9bb22a0a0f92123b25f9b284453f756654e87b82201c395e6 WHIRLPOOL 60b6ebe684a3a2f7558815a8840ff243621968c380e8aa3bd965a4370a517a0d0d5565006c9b00c6cd0cb19782cf950ef2d53c81e20a10ca1172387e287b57d2
+EBUILD tcl-mccp-0.6.ebuild 441 SHA256 2058f5219bde64c6129b32e4a6a7582f5a4232129b5c28aedc7c23e99fac1cab SHA512 631f610b198deeb1df7ca90c39ec0b4ba5d0484e169701bee00ab77b808d89cb36d2807fa04811b0c7bcd882686c379d8956da7838b45389e9df2722b6c5b771 WHIRLPOOL 440ba4552346acc8d9cdfb58ef5b883c4dbd17d651fdbba3eb0a04e2e64bda12922851be080f4c2ffc11e949543d6ad75d4c27b7156bd216c2e5a4954e9a1c5f
+MISC ChangeLog 2460 SHA256 f7e147fab016bb89ba7bb6da0b84031a9efb917dfe98a0b3e9c184ec38e21eb4 SHA512 2acd221ca2ed8a6460b708a98e81413ae6f1fac9579e3818617b392fbcfbe3a3586396e0e892602a55f26325162fa4221d711351649050763ba9c16d57d630ff WHIRLPOOL e551cd3bd21d4583a19770ec8af333efa61a46bec4e0449df9acb54fdde6e1917f16aeb12a31ae18e40555f85ef53a62a7f491ad10f32fe32bc31d0218f188a1
+MISC ChangeLog-2015 982 SHA256 5d4cf5af900d1aa5097e4dc9e69eeb083dcc636eb1d607b02d22f65a9bec28ab SHA512 a5b6d89e6c12aa986096f718db8e8193bf0592b63bc802dddd08474de0cd87985d9d332b0ed2c5035ef5e7bae2316f3491b742b81a5536ab54b482d7ea69d9ae WHIRLPOOL 9aaccceab72e8aa24524a4474c8f927a9cbc50449dd7a1be781bbcbc0529c9d6f60cc7ae76d9e06725c86f2b7df0f27b8e45e02235324c6c4316dd1a8f8b3cf1
+MISC metadata.xml 331 SHA256 065067a3ec89cf13a61a6ba09428e5a41deecfcb38258a27e9c08601a016be66 SHA512 b22d31f4f4502cd2efa5aeee0914277c7b3fe45967ed231b2514f26cad2b86ea03beb19b60e88c2a5fce6c26833bdf50d2b5aafd554af98fc0a7c976942c46d9 WHIRLPOOL 8ba64ca5e4bf2ef97e96a5c32ded8e2fc00bfcaea2b9f973c342093871cc9552276701b14f1d70b8391bf9f69297ff1d19514d1d9abfffb391afa5c1b519fd80
diff --git a/dev-tcltk/tcl-mccp/files/tcl-mccp-0.6-flags.patch b/dev-tcltk/tcl-mccp/files/tcl-mccp-0.6-flags.patch
new file mode 100644
index 000000000000..b3b563d3d7c1
--- /dev/null
+++ b/dev-tcltk/tcl-mccp/files/tcl-mccp-0.6-flags.patch
@@ -0,0 +1,18 @@
+ Makefile.in | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 956887d..4af7a06 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -91,8 +91,8 @@ lib_LTLIBRARIES = libtcl-mccp.la
+ libtcl_mccp_la_SOURCES = MCCP.c mccpDecompress.c
+ lib_DATA = pkgIndex.tcl
+
+-CFLAGS := -Wall -I $(TCL_PREFIX)/include -lz
+-LIBS := $(TCL_STUB_LIB_SPEC)
++CFLAGS += -Wall -I $(TCL_PREFIX)/include
++LIBS += $(TCL_STUB_LIB_SPEC) -lz
+
+ # FIXME: is this the right way to mofify libdir?
+ libdir = @libdir@/tcl-mccp
diff --git a/dev-tcltk/tcl-mccp/metadata.xml b/dev-tcltk/tcl-mccp/metadata.xml
new file mode 100644
index 000000000000..368a0ae4c4a9
--- /dev/null
+++ b/dev-tcltk/tcl-mccp/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tcl-mccp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tcl-mccp/tcl-mccp-0.6.ebuild b/dev-tcltk/tcl-mccp/tcl-mccp-0.6.ebuild
new file mode 100644
index 000000000000..8af98e3f15c7
--- /dev/null
+++ b/dev-tcltk/tcl-mccp/tcl-mccp-0.6.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="mccp extension to TCL"
+HOMEPAGE="http://tcl-mccp.sf.net/"
+SRC_URI="mirror://sourceforge/tcl-mccp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+IUSE="static-libs"
+
+DEPEND="dev-lang/tcl:0="
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-flags.patch )
diff --git a/dev-tcltk/tcl3d/Manifest b/dev-tcltk/tcl3d/Manifest
new file mode 100644
index 000000000000..80cc3d7f13d1
--- /dev/null
+++ b/dev-tcltk/tcl3d/Manifest
@@ -0,0 +1,9 @@
+AUX tcl3d-0.5.0-include-tk-dir-and-permissive.patch 2544 SHA256 858a0bfed002da9f02a78b154f0e5b4b1ff4e8d6924527d8589024594f0abc07 SHA512 ff5bb6df033cfa1ce9d01305cf3346653cc9ff6c144e19609b8cacc659993f0df0a8e0db741e0733e7c3f44aff6ed7f02596e382bd2b813980a8fbbfbbb376e6 WHIRLPOOL 984d05071dee97f9d145fa104e8b26feacc8b2e6a62a7663f3c42aaa429c8b2d499ecf1929e4a8e5d9ae3a2579174b6036e276ded1218fd8dc4861070dbaf6a4
+DIST tcl3d-src-0.4.0.zip 1501305 SHA256 f98bee3c2ca0189780125b683481949e1499018ee56ad1d21b4e3e594e058496 SHA512 a8a525693bc45e9fb9e2167e2121d300ff60534f2bced33bb068a1075cfd8e8281dd97bd7fb432b9d6a95cdb37fc3da03c82dd1ee20e368fb8ac249ea54c30a5 WHIRLPOOL cbc1982df7a28b93249ff7877d0376b06b64261bb33f3df8c64b2c80600684529605b9eeff6f593c2e9f7c64c253066b226f0a0dae9cee21bec980f6782c7777
+DIST tcl3d-src-0.5.0.zip 3936271 SHA256 a2ecccbdb9c87fd02a7b969cc02abbf43aa51e619bd79e08dbffb8e376b6957c SHA512 24f799d5cc0ad9daf060b6b723d1197be678c0716b2099287e004221889c56da03f7368d6cd4c47dbbbbfe936b0bf65366cd452d3d9c2335cdfbae6ff3860a29 WHIRLPOOL b2a1f3d81be1bed6476652bc6fd4ed2dd3bd85a2b895c950a1298f6ed998b05f0ac02937233f352bf794818112e114f22b3d2123c99be7a6458e464ee33e1604
+EBUILD tcl3d-0.4.0-r1.ebuild 1333 SHA256 23720e4697ca7b0d30d88db5698de34fdcb1da61686d864976c47438312a3ffc SHA512 541ab991db6ee8c54838abe091d6574cfa45afc7529d0a6bc2da58370369f0b11bc633ea8ef216a4910a35d4a43e9b6b2b2ebba93bde29e70b01975780a87646 WHIRLPOOL d43c7ca4f7704f308591cedcf7e0da59fc6bf427088c4ee4d84b943bf054403461e81cb2fedeb737b0a5d2ca65b215a13eaad6ed0f1ed28274f6e379f601939e
+EBUILD tcl3d-0.4.0.ebuild 1332 SHA256 9da976b1c042dfa542e2a60895567c7fac843bdb1aa21421f6225ad61ed2ac5f SHA512 7bcb8c5cadb7720734b3b8bf69417840f7af75d300b53c822609207efe1f82ab428c41872218dc0d2efbf20b2df701398c908c2da0d073695a0fbdaaf276bd93 WHIRLPOOL 397a1d716798b528c452b21acc793102df7228043af5c71af41dbed6cc5b813d5f8936b456bd0894672fc227ee8672c8aaea0b5eef22417385281aa5b16b43c8
+EBUILD tcl3d-0.5.0.ebuild 1596 SHA256 401f54cd82769345d3f24528232f605c950c0e4348ea168892a7beac7e1eea17 SHA512 329a86fa856a055bf1a68b9e9c650ccf15da85491a1c64b733009c0bb01af05c2e892fc69890625980e714b5facf205dfc3778361c3dab43fdf7f8511b052899 WHIRLPOOL e63bccde7537fa0c689572c06b37f93e2b4ee81f88bd499262fa22edc877b3b4f443c5b755e3f346b9680a9c5d36927840506cf5498f1f03391843ff6c1a9e86
+MISC ChangeLog 3070 SHA256 d70d168840cd6f92321d4bf9e33f4766d6af07adc16d0f644e37bc107ad7a227 SHA512 38a4a2ede3c0bab2d72634dbe5ef550dd8543df5f33001b409170ef01d154ba5b8fc0022790e33610d512e55b0212dc6fcbb78e24e1185860e8e6e3bd30332d6 WHIRLPOOL 08e5602788d49459aab0748da26a48e24a75f95790e3db9a72d8b2258b93672f11e3b4487e4fa21eb22b6af652aba6d0036070833980f848d09e41c3ae5c0e9e
+MISC ChangeLog-2015 452 SHA256 e47ff3e9b3d79f880d71917d69e9f4d3e236a48de5fa8f586c2ee0867d675bdc SHA512 3099403172178ddb49fa978a0c564287486b85ee41ce1a7f2b2702af01192665d883f1d526b8c8caa88513c4a7c7c5c7ec128d803a641ccf31092aefb1d6fac7 WHIRLPOOL 8e8505d5d46b3de80d9185f70def25b7726593c843b8ea657d5bcd0497e874f35774fa5910742b04616da1d21f2b23056a3fe378cdcd2798c57144dc3744b54f
+MISC metadata.xml 1103 SHA256 2777a849e4e993ba8aa76a630d765676d22d202e997572f585609b52abb19d9d SHA512 8b5a1142c700c1319ce44617f1f4fe81475df16d3be90f5a8774c72cabab5fce196821d95d957bed2009454295edd868ad03c67fe0b8b8953f3338b197c53fa7 WHIRLPOOL faa153aa9871df81d6c9e6866178bb601f5d649f3c9ba4ca9f6aa610c1ed407c99f16b96331cdc163f751c1f0a064a562c565b2b54d45f5afce09b352ddc6ba3
diff --git a/dev-tcltk/tcl3d/files/tcl3d-0.5.0-include-tk-dir-and-permissive.patch b/dev-tcltk/tcl3d/files/tcl3d-0.5.0-include-tk-dir-and-permissive.patch
new file mode 100644
index 000000000000..58efa18acdb2
--- /dev/null
+++ b/dev-tcltk/tcl3d/files/tcl3d-0.5.0-include-tk-dir-and-permissive.patch
@@ -0,0 +1,72 @@
+diff -ru tcl3d/config_Linux tcl3d-m/config_Linux
+--- tcl3d/config_Linux 2010-08-30 15:57:56.000000000 -0400
++++ tcl3d-m/config_Linux 2016-10-30 13:28:34.080601812 -0400
+@@ -74,6 +74,8 @@
+ TKINCDIR = $(TKDIR)/include
+ TCLLIBDIR = $(TCLDIR)/lib
+ TKLIBDIR = $(TKDIR)/lib
++TCLLIBINCDIR = $(TCLLIBDIR)/tcl$(TCLVERSION)/include
++TKLIBINCDIR = $(TCLLIBDIR)/tk$(TCLVERSION)/include
+ TCLSTUBLIBS = $(TKLIBDIR)/libtkstub$(TCLVERSION)$(LIBEXT) $(TCLLIBDIR)/libtclstub$(TCLVERSION)$(LIBEXT)
+ TCLSTDLIBS = $(TKLIBDIR)/libtk$(TCLVERSION)$(LIBEXT) $(TCLLIBDIR)/libtcl$(TCLVERSION)$(LIBEXT)
+ TCLSH = tclsh$(TCLVERSION)
+@@ -84,7 +86,13 @@
+ CPDIR = csh -f cpdir
+ MKDIR = mkdir -p
+
+-INCL = -I. -I$(TCLINCDIR)
++INCL = \
++ -I. \
++ -I$(TCLINCDIR) \
++ -I$(TCLLIBINCDIR)/generic \
++ -I$(TCLLIBINCDIR)/unix \
++ -I$(TKLIBINCDIR)/generic \
++ -I$(TKLIBINCDIR)/unix
+
+ ifdef WITH_STUBS
+ TCLLIBS = $(TCLSTUBLIBS)
+diff -ru tcl3d/config_Linux64 tcl3d-m/config_Linux64
+--- tcl3d/config_Linux64 2010-12-30 16:06:48.000000000 -0500
++++ tcl3d-m/config_Linux64 2016-10-30 13:08:33.326771912 -0400
+@@ -74,6 +74,8 @@
+ TKINCDIR = $(TKDIR)/include
+ TCLLIBDIR = $(TCLDIR)/lib64
+ TKLIBDIR = $(TKDIR)/lib64
++TCLLIBINCDIR = $(TCLLIBDIR)/tcl$(TCLVERSION)/include
++TKLIBINCDIR = $(TCLLIBDIR)/tk$(TCLVERSION)/include
+ TCLSTUBLIBS = $(TKLIBDIR)/libtkstub$(TCLVERSION)$(LIBEXT) $(TCLLIBDIR)/libtclstub$(TCLVERSION)$(LIBEXT)
+ TCLSTDLIBS = $(TKLIBDIR)/libtk$(TCLVERSION)$(SHLIBEXT) $(TCLLIBDIR)/libtcl$(TCLVERSION)$(SHLIBEXT)
+ TCLSH = tclsh$(TCLVERSION)
+@@ -84,7 +86,13 @@
+ CPDIR = csh -f cpdir
+ MKDIR = mkdir -p
+
+-INCL = -I. -I$(TCLINCDIR)
++INCL = \
++ -I. \
++ -I$(TCLINCDIR) \
++ -I$(TCLLIBINCDIR)/generic \
++ -I$(TCLLIBINCDIR)/unix \
++ -I$(TKLIBINCDIR)/generic \
++ -I$(TKLIBINCDIR)/unix
+
+ ifdef WITH_STUBS
+ TCLLIBS = $(TCLSTUBLIBS)
+diff -ru tcl3d/tcl3dOsg/Makefile tcl3d-m/tcl3dOsg/Makefile
+--- tcl3d/tcl3dOsg/Makefile 2010-09-30 16:20:28.000000000 -0400
++++ tcl3d-m/tcl3dOsg/Makefile 2016-10-30 13:12:53.367593401 -0400
+@@ -308,12 +308,13 @@
+ OPT += /Od
+ endif
+ CFLAGS = $(OPT) $(PPDEFS) -I$(GL_INCDIR) -Iinclude $(INCL)
++CXXFLAGS = -fpermissive
+
+ .SUFFIXES: # Delete the default suffixes.
+ .SUFFIXES: .cpp $(OBJEXT) .h # Install our own suffixes.
+
+ .cpp$(OBJEXT):
+- $(CXX) $(CFLAGS) $<
++ $(CXX) $(CFLAGS) $(CXXFLAGS) $<
+
+ all: osg osganimation osgdb osgfx osgga osgmanipulator osgopenthreads \
+ osgparticle osgsim osgshadow osgterrain osgtext osgutil osgviewer \
diff --git a/dev-tcltk/tcl3d/metadata.xml b/dev-tcltk/tcl3d/metadata.xml
new file mode 100644
index 000000000000..851c8cbb0582
--- /dev/null
+++ b/dev-tcltk/tcl3d/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+</maintainer>
+<longdescription>
+Tcl3D offers the 3D functionality of OpenGL and other 3D libraries at the Tcl scripting level.
+The Tcl3D package currently consists of the following modules:
+
+Tcl3D core module
+tcl3dOgl Enhanced Togl widget, a Tk widget for displaying OpenGL content.
+ Wrapper for core OpenGL functionality (GL Version 3.0, GLU Version 1.2) and OpenGL extensions.
+ Tcl3D utility library: Math functions, standard shapes, stop watch, demo support.
+
+Tcl3D optional modules
+tcl3dCg Wrapper for NVidia's Cg shading language. *
+tcl3dSDL Wrapper for the Simple DirectMedia Library.
+tcl3dFTGL Wrapper for the OpenGL Font Rendering Library.
+tcl3dGl2ps Wrapper for the OpenGL To Postscript library. *
+tcl3dOde Wrapper for the Open Dynamics Engine.
+tcl3dOsg Wrapper for OpenSceneGraph
+tcl3dGauges Tcl3D package for displaying gauges.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-tcltk/tcl3d/tcl3d-0.4.0-r1.ebuild b/dev-tcltk/tcl3d/tcl3d-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..c424262b15bb
--- /dev/null
+++ b/dev-tcltk/tcl3d/tcl3d-0.4.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Tcl bindings to OpenGL and other 3D libraries"
+HOMEPAGE="http://www.tcl3d.org"
+SRC_URI="http://www.tcl3d.org/download/${P}.distrib/${PN}-src-${PV}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+RDEPEND="
+ dev-games/ode
+ dev-lang/tk:0=
+ dev-lang/tcl:0=
+ media-libs/libsdl
+ media-libs/ftgl
+ virtual/opengl
+ x11-libs/libXmu
+"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-1.3.19"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ TCL_VERSION=( $(echo 'puts [info tclversion]' | tclsh | tr '.' ' ') )
+ einfo "Configuring for Tcl ${TCL_VERSION[0]}.${TCL_VERSION[1]}"
+ sed -i \
+ -e 's:^\(TCLMAJOR\) *=\(.*\)$:\1 = '${TCL_VERSION[0]}':' \
+ -e 's:^\(TCLMINOR\) *=\(.*\)$:\1 = '${TCL_VERSION[1]}':' \
+ config_Linux* || die
+
+ # fix libSDL link
+ sed -i \
+ -e 's:-lSDL-1\.2:-lSDL:g' \
+ tcl3dSDL/Makefile || die
+}
+
+src_compile() {
+ append-flags -mieee-fp -ffloat-store -fPIC
+ use debug || append-flags -DNDEBUG
+
+ emake \
+ INSTDIR="/usr" OPT="${CFLAGS}" CC="$(tc-getCC) -c" \
+ CXX="$(tc-getCXX) -c" LD="$(tc-getLD)" \
+ WRAP_FTGL=1 WRAP_SDL=1 WRAP_GL2PS=0 WRAP_ODE=1
+}
+
+src_install() {
+ emake INSTDIR="${D}/usr" DESTDIR="${D}" INSTLIB="${D}/usr/$(get_libdir)" install
+}
diff --git a/dev-tcltk/tcl3d/tcl3d-0.4.0.ebuild b/dev-tcltk/tcl3d/tcl3d-0.4.0.ebuild
new file mode 100644
index 000000000000..349309c5a5ad
--- /dev/null
+++ b/dev-tcltk/tcl3d/tcl3d-0.4.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Tcl bindings to OpenGL and other 3D libraries"
+HOMEPAGE="http://www.tcl3d.org"
+SRC_URI="http://www.tcl3d.org/download/${P}.distrib/${PN}-src-${PV}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+RDEPEND="
+ dev-games/ode
+ dev-lang/tk:0=
+ dev-lang/tcl:0=
+ media-libs/libsdl
+ media-libs/ftgl
+ virtual/opengl
+ x11-libs/libXmu
+"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-1.3.19"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ TCL_VERSION=( $(echo 'puts [info tclversion]' | tclsh | tr '.' ' ') )
+ einfo "Configuring for Tcl ${TCL_VERSION[0]}.${TCL_VERSION[1]}"
+ sed -i \
+ -e 's:^\(TCLMAJOR\) *=\(.*\)$:\1 = '${TCL_VERSION[0]}':' \
+ -e 's:^\(TCLMINOR\) *=\(.*\)$:\1 = '${TCL_VERSION[1]}':' \
+ config_Linux* || die
+
+ # fix libSDL link
+ sed -i \
+ -e 's:-lSDL-1\.2:-lSDL:g' \
+ tcl3dSDL/Makefile || die
+}
+
+src_compile() {
+ append-flags -mieee-fp -ffloat-store -fPIC
+ use debug || append-flags -DNDEBUG
+
+ emake \
+ INSTDIR="/usr" OPT="${CFLAGS}" CC="$(tc-getCC) -c" \
+ CXX="$(tc-getCXX) -c" LD="$(tc-getLD)" \
+ WRAP_FTGL=1 WRAP_SDL=1 WRAP_GL2PS=0 WRAP_ODE=1
+}
+
+src_install() {
+ emake INSTDIR="${D}/usr" DESTDIR="${D}" INSTLIB="${D}/usr$(get_libdir)" install
+}
diff --git a/dev-tcltk/tcl3d/tcl3d-0.5.0.ebuild b/dev-tcltk/tcl3d/tcl3d-0.5.0.ebuild
new file mode 100644
index 000000000000..e9a64f8be868
--- /dev/null
+++ b/dev-tcltk/tcl3d/tcl3d-0.5.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Tcl bindings to OpenGL and other 3D libraries"
+HOMEPAGE="http://www.tcl3d.org"
+SRC_URI="http://www.tcl3d.org/download/${P}.distrib/${PN}-src-${PV}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+DEPEND="
+ >=dev-lang/swig-1.3.38:0=
+ dev-lang/tk:0=
+ dev-lang/tcl:0=
+ dev-games/ode
+ dev-games/openscenegraph
+ media-libs/libsdl
+ media-libs/ftgl
+ virtual/opengl
+ x11-libs/libXmu
+"
+
+S="${WORKDIR}/${PN}"
+PATCHES=( "${FILESDIR}/${P}-include-tk-dir-and-permissive.patch" )
+
+src_prepare() {
+ default
+
+ local _TCL_V=( $(echo 'puts [info tclversion]' | tclsh | tr '.' ' ') )
+ local _TCL_FV="${_TCL_V[0]}.${_TCL_V[1]}"
+
+ einfo "Configuring for Tcl ${_TCL_FV}"
+ sed -i \
+ -e 's:^\(TCLMAJOR\) *=\(.*\)$:\1 = '${_TCL_V[0]}':' \
+ -e 's:^\(TCLMINOR\) *=\(.*\)$:\1 = '${_TCL_V[1]}':' \
+ config_Linux* || die
+
+ # Fix libSDL link
+ sed -i -e 's:-lSDL-1\.2:-lSDL:g' tcl3dSDL/Makefile || die
+}
+
+src_compile() {
+ append-flags -fPIC
+ use debug || append-flags -DNDEBUG
+
+ # Restricting build to -j1 since it seems that if we build it in parallel,
+ # it fails with the "tcl3dOsg" project attempting to import glewdefs.i,
+ # and not finding it.
+ emake \
+ -j1 \
+ INSTDIR="/usr" \
+ OPT="${CFLAGS}" \
+ CC="$(tc-getCC) -c" \
+ CXX="$(tc-getCXX) -c" \
+ LD="$(tc-getLD)" \
+ WRAP_FTGL=1 \
+ WRAP_SDL=1 \
+ WRAP_GL2PS=0 \
+ WRAP_ODE=1
+}
+
+src_install() {
+ emake INSTDIR="${D}/usr" DESTDIR="${D}" INSTLIB="${D}/usr/$(get_libdir)" install
+}
diff --git a/dev-tcltk/tcllib/Manifest b/dev-tcltk/tcllib/Manifest
new file mode 100644
index 000000000000..6104c04b7838
--- /dev/null
+++ b/dev-tcltk/tcllib/Manifest
@@ -0,0 +1,14 @@
+AUX tcllib-1.15-XSS-vuln.patch 29465 SHA256 bcb0741c2645137ca22db7fbeb74ba74cf5282dd35a6070ea197ecd77a2f6ddd SHA512 e3df9ae6c6bdf1da78ea7dc239e934608647fef47728de003a0f129d554c612ed4db17f8ed7119c57d4b16a5203a79fd958d399fcdfc8bdccfb7219e73d9ce02 WHIRLPOOL 18fbb0703c661b1caed5e54e3bb1ee155fd65b83f01c3a21b954684b92d2def675c4b4b7da56ce0614444abc863022f116bcaa71a4da1fb35bedce31736a7a97
+AUX tcllib-1.15-tcl8.6-test.patch 12441 SHA256 613fcb1e6a738ee90e5f0fe93604444a8da7cb3c58c5cfd6550ee632f19d81d4 SHA512 76e1a4f3a18a357bbff8e0b1d997842b3a5ba1ab96079bea046cd82c0aa3ca8c8933b63f284ef5a50968a54bd2d31ecbc951f1b6605d359eca0bcfe70955373c WHIRLPOOL f862a9ccf81490a54b2aa22f12ba06a96d495d7bb74dce5bc5cec9f0d0c37ffed891e6e6053b0b15a2b9da2b11d805dee135bca198a0d7523f115e8c27c1ffcc
+AUX tcllib-1.15-test.patch 4150 SHA256 0eba3215d5a8304f3fad0f10ca3bd4fdc80015d46056e24341d5dd636adb4924 SHA512 05660c3f6a0c051addb5a15a20773382119a0482b0f76982a6c5dc3f0ba300c1c963c77e749c49c1c7615cbe3521cd4a467d85ce865684276a8f2ebf9546334f WHIRLPOOL 3f35def949eb85e97d2ae34e7c77f9953a0e82d9ffa49e2864692264c6ddbbe2a5f8d258206b5ef5e822bd3a0551afa42753d8dca1fb8991dc02d8c43aa39cea
+AUX tcllib-1.16-XSS-vuln.patch 17543 SHA256 9301ecdf6a19bd6d1413fdacb994851f50df4aececb496ee51b36388cf3de185 SHA512 d1b60e33d642bf04960078c17962efcb834a4dfe3dc26d2adb6327784435760cb984de34f5ad9769f5bcc27c871f3ef0b23ac3d909312c972d1299bcaed27dad WHIRLPOOL e283850ca1948694352628f4eb93d56e8a54e84a6edf94e23d0e5e1c78df9075315671fccb9e1a34f86c3de73ed542dfa6d8a0f6d6f6465435976384d71aa66f
+AUX tcllib-1.16-test.patch 4150 SHA256 328d69dbfc8500df59bd0419802758fefb5549bf7ea8218073c2486e26f381ed SHA512 ea7c3f59b9423f9df3b37fe1189f51597a0690ed822190e06b89b7f72180f5cc164c7c1a15ab724a99f2bca14593d39e557100d938ee644382131324747cadc0 WHIRLPOOL aacf44de5254fb1c9556611b49b5f0ac5846496e20ba31ba306135004c37dad948c81e4cee123e9d1104f5d91ea5e0ba8496963207f9c9f757f4a13403cb9262
+DIST Tcllib-1.16.tar.bz2 6089076 SHA256 033334306d3ffc499c8830d393bf7528227e49c68077b3e9247c4171b15be012 SHA512 5e0656c178c0fae907c101b5324f04ba1bb5c26f4d1015868194dbb393e88a281ecf66bc4701167db24ddb526b87acfd88223e0e9e6db1f9d0ffb919b3372752 WHIRLPOOL 543f5ef8b337eb2c34f90201c829f20cfd3beb0f7dcf146f4d27b66f0b8796bf518d44dad31e2be66857b50a515b5a10ae8e394d6b393e1b202903b6b68f04aa
+DIST tcllib-1.15-manpage-rename.patch.xz 3188 SHA256 d86f60e98013fe35a1038247e1992a0afc9314462d693ee10ee30ded501e1869 SHA512 9bcdb6c7dcb492a58e767529a8bb5a2c83912577ae124fec40f3bbd6fb283a4befb2dfc3d7a986b287ba9709bba7261b676d78441c8be0f614f31bc123d81126 WHIRLPOOL 1ac9fd5fddba5adab9560cabb0a5df9a3e0c2bafda861cabb6519bcef2a94c54f2dcd2e04e3b3892cda2c374c0186d7e21e4e435f109a8915eaa507019a53db8
+DIST tcllib-1.15-test.patch.xz 3208 SHA256 16fbf7d564f3b0f338d3f21774199738ca0014e4d689b053bef8840023cf8889 SHA512 8b9de181cdc39e0f9361694fb1bb9ee42b3fba269d13e91be31643ce3509c34e3e6b74b043e067dda49d75b6f4a009a79361f7a9ecf4613a509decb3eacf8447 WHIRLPOOL 1b138a1d742e8b7aeb574ec1eb1d7688b9a7bcf469269b4b27004f23f9d7947b9dd4828322739606bd3a9aecc11202d3712f15cd459448f18f6e9a2896911a12
+DIST tcllib-1.15.tar.bz2 5030648 SHA256 7a1e27f6d2e625af15d13df6117958815c8482e662a914fc1cbd7f0b0e780e71 SHA512 544b1193266e860eb59a4c313645376bba8488711b2afc629d99d0e719252db79caae73022ae1dc21dc123f949fa8930f81112c3f80328fc83952b64f93ca3c4 WHIRLPOOL 75ef40710859c0f669fdac96ee7ed5d76d6a10081649d890cadc970c21478b2daddd8289853e38239d68ad9aae0dd9ee5ee94827f1bf0e4b5b511134024e062c
+EBUILD tcllib-1.15-r2.ebuild 1134 SHA256 661b6977d993906a016362ef2831a05f0dcdf5ca0e32922a6c92f400e176d21b SHA512 e9d5b31f783a1bf7a273813befd9968219372ae11f0efeaee4ef3c5f3988d7ab8114e7fbcd1107d3815e09dd04f627be1b06a8bc17144722ed8fbd1a88d0f09c WHIRLPOOL 00309c4e1dcc68281dbdfcaa05dec06324d5a996c1deb13786d5ba5488dd869b0af4dea9249003e9aa354733f3f2ccacbeb45e6ad4212549dc01c1cc7693a963
+EBUILD tcllib-1.16.ebuild 1061 SHA256 feadbb965e315c2503941db246657438e51661721229c3f570e535577549dd55 SHA512 3fa48d32141bd0a1295ce497b372d80fee47685451bad915ad456ffaf6e59cca8cbc41f079ddd3179347b6a1900ebc7b00f528983fe9cc50f7ec6e79a33ac1ea WHIRLPOOL 1c1d3b0c665ae5308676d2b5b5f4cc74b1604cab1479abb0750038579e54e41a3c4e6add74ea8ed775db6cf9b1b24936d7e928e634165b87541e4f6d25996f75
+MISC ChangeLog 3105 SHA256 89efe4f4882cbb59fad301afb92ac9bace9fe990ba2f740bd87d39ca571192b4 SHA512 5e87adeaf4636ced2e275b99752f4cbd38168d6c46ba8220cfc513b97c72eb2b56059aa0e19a9e7662acbc74c7fede0aec5c349100452cc6273d6e586e5b157f WHIRLPOOL 36390111568f1ff0b12211c560a53f63ddaefdb78e5ac71e14650ec162b3abffad6d26829018200a5f60587c31045c6b723741558fbc36a4de9fb04fc7b4a7e1
+MISC ChangeLog-2015 7694 SHA256 4f4a580ccae45f159153145bff028c64232352946bd571c0bdc308c0ef811db1 SHA512 006aae881a8b27b8d88421ca6b340d3008f590cd2b2f38d4c67f30f321234e502d0e9869ac9f03bfd0c8fa4135ad0d2a5183c8b10ce015f092b9f1ce6dfbb5b6 WHIRLPOOL 4ef9079376e6ccfc0d7218289f6570440fa844a2cea67928f9ebc212308b4c25164003a991d85d109a70ab67852247c16249f4bf9a08c7f1f02642d1c3152380
+MISC metadata.xml 329 SHA256 71788a64c142cb63fd9274317a1507c6eedf850715a16ab111edbf441af58823 SHA512 c16db3fedc73cc41391e15f198396908ebd047c165c2bbe3c465f126dfb8266818d79f11ec343a2880058850a8164801616632f361b69db914e7d66823bb1851 WHIRLPOOL 31ca88d7d8cabf6167504446b3fbc97e7f883163468a07939a9a1107cc67cc87edf25ee19f15414c189e750a7af3365f70df93dab6d8fae4721e45b1c11dc4e9
diff --git a/dev-tcltk/tcllib/files/tcllib-1.15-XSS-vuln.patch b/dev-tcltk/tcllib/files/tcllib-1.15-XSS-vuln.patch
new file mode 100644
index 000000000000..4b3502dd86ff
--- /dev/null
+++ b/dev-tcltk/tcllib/files/tcllib-1.15-XSS-vuln.patch
@@ -0,0 +1,907 @@
+ modules/html/html.man | 146 +++++++++++++++++-------------
+ modules/html/html.tcl | 55 +++++++++---
+ modules/html/html.test | 224 +++++++++++++++++++++++++++++++++++-----------
+ modules/html/pkgIndex.tcl | 2 +-
+ 4 files changed, 297 insertions(+), 130 deletions(-)
+
+diff --git a/modules/html/html.man b/modules/html/html.man
+index efb41fc..f18cf4b 100644
+--- a/modules/html/html.man
++++ b/modules/html/html.man
+@@ -1,10 +1,19 @@
+ [comment {-*- tcl -*- doctools manpage}]
+-[manpage_begin html n 1.4]
++[vset HTML_VERSION 1.4.4]
++[manpage_begin html n [vset HTML_VERSION]]
++[see_also htmlparse]
++[see_also ncgi]
++[keywords checkbox]
++[keywords checkbutton]
++[keywords form]
++[keywords html]
++[keywords radiobutton]
++[keywords table]
+ [moddesc {HTML Generation}]
+ [titledesc {Procedures to generate HTML structures}]
+ [category {CGI programming}]
+ [require Tcl 8.2]
+-[require html [opt 1.4]]
++[require html [opt [vset HTML_VERSION]]]
+ [description]
+ [para]
+
+@@ -26,13 +35,11 @@ for HTML tag parameters.
+ define an author for the page. The author is noted in a comment in
+ the HEAD section.
+
+-
+ [call [cmd ::html::bodyTag] [arg args]]
+
+ Generate a [term body] tag. The tag parameters are taken from [arg args] or
+ from the body.* attributes define with [cmd ::html::init].
+
+-
+ [call [cmd ::html::cell] [arg {param value}] [opt [arg tag]]]
+
+ Generate a [term td] (or [term th]) tag, a value, and a closing
+@@ -41,13 +48,11 @@ tag parameters come from [arg param] or TD.* attributes defined with
+ [cmd ::html::init]. This uses [cmd ::html::font] to insert a standard
+ [term font] tag into the table cell. The [arg tag] argument defaults to "td".
+
+-
+ [call [cmd ::html::checkbox] [arg {name value}]]
+
+ Generate a [term checkbox] form element with the specified name and value.
+ This uses [cmd ::html::checkValue].
+
+-
+ [call [cmd ::html::checkSet] [arg {key sep list}]]
+
+ Generate a set of [term checkbox] form elements and associated labels. The
+@@ -56,21 +61,18 @@ This uses [cmd ::html::checkbox]. All the [term checkbox] buttons share the
+ same [arg key] for their name. The [arg sep] is text used to separate
+ the elements.
+
+-
+ [call [cmd ::html::checkValue] [arg name] [opt [arg value]]]
+
+-Generate the "name=[arg name] value=[arg value] for a [term checkbox] form
++Generate the "name=[arg name] value=[arg value]" for a [term checkbox] form
+ element. If the CGI variable [arg name] has the value [arg value],
+ then SELECTED is added to the return value. [arg value] defaults to
+ "1".
+
+-
+ [call [cmd ::html::closeTag]]
+
+ Pop a tag off the stack created by [cmd ::html::openTag] and generate
+ the corresponding close tag (e.g., </body>).
+
+-
+ [call [cmd ::html::default] [arg key] [opt [arg param]]]
+
+ This procedure is used by [cmd ::html::tagParam] to generate the name,
+@@ -83,27 +85,23 @@ identified by [arg key]. The [arg key] has the form "tag.parameter"
+ (e.g., body.bgcolor). Use [cmd ::html::init] to register default
+ values. [arg param] defaults to the empty string.
+
+-
+ [call [cmd ::html::description] [arg description]]
+
+ [emph {Side effect only}]. Call this before [cmd ::html::head] to
+ define a description [term meta] tag for the page. This tag is generated
+ later in the call to [cmd ::html::head].
+
+-
+ [call [cmd ::html::end]]
+
+ Pop all open tags from the stack and generate the corresponding close
+ HTML tags, (e.g., </body></html>).
+
+-
+ [call [cmd ::html::eval] [arg arg] [opt [arg args]]]
+
+ This procedure is similar to the built-in Tcl [cmd eval] command. The
+ only difference is that it returns "" so it can be called from an HTML
+ template file without appending unwanted results.
+
+-
+ [call [cmd ::html::extractParam] [arg {param key}] [opt [arg varName]]]
+
+ This is a parsing procedure that extracts the value of [arg key] from
+@@ -115,13 +113,11 @@ parameter was found in [arg param], otherwise it returns 0. If the
+ [arg varName] is not specified, then [arg key] is used as the variable
+ name.
+
+-
+ [call [cmd ::html::font] [arg args]]
+
+ Generate a standard [term font] tag. The parameters to the tag are taken
+ from [arg args] and the HTML defaults defined with [cmd ::html::init].
+
+-
+ [call [cmd ::html::for] [arg {start test next body}]]
+
+ This procedure is similar to the built-in Tcl [cmd for] control
+@@ -129,7 +125,6 @@ structure. Rather than evaluating the body, it returns the subst'ed
+ [arg body]. Each iteration of the loop causes another string to be
+ concatenated to the result value.
+
+-
+ [call [cmd ::html::foreach] [arg {varlist1 list1}] [opt [arg {varlist2 list2 ...}]] [arg body]]
+
+ This procedure is similar to the built-in Tcl [cmd foreach] control
+@@ -137,7 +132,6 @@ structure. Rather than evaluating the body, it returns the subst'ed
+ [arg body]. Each iteration of the loop causes another string to be
+ concatenated to the result value.
+
+-
+ [call [cmd ::html::formValue] [arg name] [opt [arg defvalue]]]
+
+ Return a name and value pair, where the value is initialized from
+@@ -148,20 +142,17 @@ existing CGI data, if any. The result has this form:
+ name="fred" value="freds value"
+ }]
+
+-
+ [call [cmd ::html::getFormInfo] [arg args]]
+
+ Generate hidden fields to capture form values. If [arg args] is
+ empty, then hidden fields are generated for all CGI values. Otherwise
+ args is a list of string match patterns for form element names.
+
+-
+ [call [cmd ::html::getTitle]]
+
+ Return the title string, with out the surrounding [term title] tag,
+ set with a previous call to [cmd ::html::title].
+
+-
+ [call [cmd ::html::h] [arg {level string}] [opt [arg param]]]
+
+ Generate a heading (e.g., [term h[var level]]) tag. The [arg string] is nested in the
+@@ -191,28 +182,25 @@ Generate an [term h5] tag. See [cmd ::html::h].
+
+ Generate an [term h6] tag. See [cmd ::html::h].
+
+-
+ [call [cmd ::html::hdrRow] [arg args]]
+
+ Generate a table row, including [term tr] and [term th] tags.
+ Each value in [arg args] is place into its own table cell.
+ This uses [cmd ::html::cell].
+
+-
+ [call [cmd ::html::head] [arg title]]
+
+ Generate the [term head] section that includes the page [term title].
+ If previous calls have been made to
+-[cmd ::html::author],
+-[cmd ::html::keywords],
+-[cmd ::html::description],
++[cmd ::html::author],
++[cmd ::html::keywords],
++[cmd ::html::description],
+ or
+ [cmd ::html::meta]
+ then additional tags are inserted into the [term head] section.
+ This leaves an open [term html] tag pushed on the stack with
+ [cmd ::html::openTag].
+
+-
+ [call [cmd ::html::headTag] [arg string]]
+
+ Save a tag for inclusion in the [term head] section generated by
+@@ -220,13 +208,11 @@ Save a tag for inclusion in the [term head] section generated by
+ [cmd ::html::head]. The [arg string] is everything in the tag except
+ the enclosing angle brackets, < >.
+
+-
+ [call [cmd ::html::html_entities] [arg string]]
+
+ This command replaces all special characters in the [arg string] with
+ their HTML entities and returns the modified text.
+
+-
+ [call [cmd ::html::if] [arg {expr1 body1}] [opt "[const elseif] [arg {expr2 body2 ...}]"] [opt "[const else] [arg bodyN]"]]
+
+ This procedure is similar to the built-in Tcl [cmd if] control
+@@ -235,7 +221,6 @@ taken, it returns the subst'ed [arg body]. Note that the syntax is
+ slightly more restrictive than that of the built-in Tcl [cmd if]
+ control structure.
+
+-
+ [call [cmd ::html::init] [opt [arg list]]]
+
+ [cmd ::html::init] accepts a Tcl-style name-value list that defines
+@@ -243,19 +228,16 @@ values for items with a name of the form "tag.parameter". For
+ example, a default with key "body.bgcolor" defines the background
+ color for the [term body] tag.
+
+-
+ [call [cmd ::html::keywords] [arg args]]
+
+ [emph {Side effect only}]. Call this before [cmd ::html::head] to
+ define a keyword [term meta] tag for the page. The [term meta] tag
+ is included in the result of [cmd ::html::head].
+
+-
+ [call [cmd ::html::mailto] [arg email] [opt [arg subject]]]
+
+ Generate a hypertext link to a mailto: URL.
+
+-
+ [call [cmd ::html::meta] [arg args]]
+
+ [emph {Side effect only}]. Call this before [cmd ::html::head] to
+@@ -264,6 +246,50 @@ value list that is used for the name= and value= parameters for the
+ [term meta] tag. The [term meta] tag is included in the result of
+ [cmd ::html::head].
+
++[call [cmd ::html::css] [arg href]]
++
++[emph {Side effect only}]. Call this before [cmd ::html::head] to
++define a [term link] tag for a linked CSS document. The [arg href]
++value is a HTTP URL to a CSS document. The [term link] tag is included
++in the result of [cmd ::html::head].
++
++[para]
++
++Multiple calls of this command are allowed, enabling the use of
++multiple CSS document references. In other words, the arguments
++of multiple calls are accumulated, and do not overwrite each other.
++
++[call [cmd ::html::css-clear]]
++
++[emph {Side effect only}]. Call this before [cmd ::html::head] to
++clear all links to CSS documents.
++[para]
++
++Multiple calls of this command are allowed, doing nothing after the
++first of a sequence with no intervening [cmd ::html::css].
++
++[call [cmd ::html::js] [arg href]]
++
++[emph {Side effect only}]. Call this before [cmd ::html::head] to
++define a [term script] tag for a linked JavaScript document. The
++[arg href] is a HTTP URL to a JavaScript document. The [term script]
++tag is included in the result of [cmd ::html::head].
++
++[para]
++
++Multiple calls of this command are allowed, enabling the use of
++multiple JavaScript document references. In other words, the arguments
++of multiple calls are accumulated, and do not overwrite each other.
++
++
++[call [cmd ::html::js-clear]]
++
++[emph {Side effect only}]. Call this before [cmd ::html::head] to
++clear all links to JavaScript documents.
++[para]
++
++Multiple calls of this command are allowed, doing nothing after the
++first of a sequence with no intervening [cmd ::html::js].
+
+ [call [cmd ::html::minorList] [arg list] [opt [arg ordered]]]
+
+@@ -273,20 +299,17 @@ Tcl-style name, value list of labels and urls for the links.
+ [arg ordered] is a boolean used to choose between an ordered or
+ unordered list. It defaults to [const false].
+
+-
+ [call [cmd ::html::minorMenu] [arg list] [opt [arg sep]]]
+
+ Generate a series of hypertext links. The [arg list] is a Tcl-style
+ name, value list of labels and urls for the links. The [arg sep] is
+ the text to put between each link. It defaults to " | ".
+
+-
+ [call [cmd ::html::nl2br] [arg string]]
+
+ This command replaces all line-endings in the [arg string] with a
+ [term br] tag and returns the modified text.
+
+-
+ [call [cmd ::html::openTag] [arg tag] [opt [arg param]]]
+
+ Push [arg tag] onto a stack and generate the opening tag for
+@@ -295,7 +318,6 @@ stack. The second argument provides any tag arguments, as a
+ list whose elements are formatted to be in the form
+ "[var key]=[const value]".
+
+-
+ [call [cmd ::html::paramRow] [arg list] [opt [arg rparam]] [opt [arg cparam]]]
+
+ Generate a table row, including [term tr] and [term td] tags. Each value in
+@@ -306,25 +328,21 @@ Generate a table row, including [term tr] and [term td] tags. Each value in
+ the [term tr] tag. The value of [arg cparam] is passed to [cmd ::html::cell]
+ as parameter for the [term td] tags.
+
+-
+ [call [cmd ::html::passwordInput] [opt [arg name]]]
+
+ Generate an [term input] tag of type [term password]. The [arg name] defaults to
+ "password".
+
+-
+ [call [cmd ::html::passwordInputRow] [arg label] [opt [arg name]]]
+
+ Format a table row containing a label and an [term input] tag of type
+ [term password]. The [arg name] defaults to "password".
+
+-
+ [call [cmd ::html::quoteFormValue] [arg value]]
+
+ Quote special characters in [arg value] by replacing them with HTML
+ entities for quotes, ampersand, and angle brackets.
+
+-
+ [call [cmd ::html::radioSet] [arg {key sep list}]]
+
+ Generate a set of [term input] tags of type [term radio] and an associated text
+@@ -332,14 +350,12 @@ label. All the radio buttons share the same [arg key] for their name.
+ The [arg sep] is text used to separate the elements. The [arg list]
+ is a Tcl-style label, value list.
+
+-
+ [call [cmd ::html::radioValue] [arg {name value}]]
+
+-Generate the "name=[arg name] value=[arg value] for a [term radio] form
++Generate the "name=[arg name] value=[arg value]" for a [term radio] form
+ element. If the CGI variable [arg name] has the value [arg value],
+ then SELECTED is added to the return value.
+
+-
+ [call [cmd ::html::refresh] [arg {seconds url}]]
+
+ Set up a refresh [term meta] tag. Call this before [cmd ::html::head] and the
+@@ -347,7 +363,6 @@ HEAD section will contain a [term meta] tag that causes the document to
+ refresh in [arg seconds] seconds. The [arg url] is optional. If
+ specified, it specifies a new page to load after the refresh interval.
+
+-
+ [call [cmd ::html::row] [arg args]]
+
+ Generate a table row, including [term tr] and [term td] tags. Each value in
+@@ -355,14 +370,12 @@ Generate a table row, including [term tr] and [term td] tags. Each value in
+ [cmd ::html::cell]. Ignores any default information set up via
+ [cmd ::html::init].
+
+-
+ [call [cmd ::html::select] [arg {name param choices}] [opt [arg current]]]
+
+ Generate a [term select] form element and nested [term option] tags. The [arg name]
+ and [arg param] are used to generate the [term select] tag. The [arg choices]
+ list is a Tcl-style name, value list.
+
+-
+ [call [cmd ::html::selectPlain] [arg {name param choices}] [opt [arg current]]]
+
+ Like [cmd ::html::select] except that [arg choices] is a Tcl list of
+@@ -376,12 +389,10 @@ main difference is that it returns "" so it can be called from an HTML
+ template file without appending unwanted results. The other
+ difference is that it must take two arguments.
+
+-
+ [call [cmd ::html::submit] [arg label] [opt [arg name]]]
+
+ Generate an [term input] tag of type [term submit]. [arg name] defaults to "submit".
+
+-
+ [call [cmd ::html::tableFromArray] [arg arrname] [opt [arg param]] [opt [arg pat]]]
+
+ Generate a two-column [term table] and nested rows to display a Tcl array. The
+@@ -404,7 +415,6 @@ pre-formatted string.
+
+ Generate a [term textarea] tag wrapped around its current values.
+
+-
+ [call [cmd ::html::textInput] [arg {name value args}]]
+
+ Generate an [term input] form tag with type [term text]. This uses
+@@ -412,7 +422,6 @@ Generate an [term input] form tag with type [term text]. This uses
+ [cmd ::html::formValue]. The args is any additional tag attributes
+ you want to put into the [term input] tag.
+
+-
+ [call [cmd ::html::textInputRow] [arg {label name value args}]]
+
+ Generate an [term input] form tag with type [term text] formatted into a table row
+@@ -431,7 +440,6 @@ define the [term title] for a page.
+ This returns 1 if the named variable either does not exist or has the
+ empty string for its value.
+
+-
+ [call [cmd ::html::while] [arg {test body}]]
+
+ This procedure is similar to the built-in Tcl [cmd while] control
+@@ -439,20 +447,30 @@ structure. Rather than evaluating the body, it returns the subst'ed
+ [arg body]. Each iteration of the loop causes another string to be
+ concatenated to the result value.
+
+-[list_end]
+-
+-[section {BUGS, IDEAS, FEEDBACK}]
+-
+-This document, and the package it describes, will undoubtedly contain
+-bugs and other problems.
++[call [cmd ::html::doctype] [arg id]]
+
+-Please report such in the category [emph html] of the
+-[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}].
++This procedure can be used to build the standard DOCTYPE
++declaration string. It will return the standard declaration
++string for the id, or throw an error if the id is not known.
++The following id's are defined:
+
+-Please also report any ideas for enhancements you may have for either
+-package and/or documentation.
++[list_begin enumerated]
++[enum] HTML32
++[enum] HTML40
++[enum] HTML40T
++[enum] HTML40F
++[enum] HTML401
++[enum] HTML401T
++[enum] HTML401F
++[enum] XHTML10S
++[enum] XHTML10T
++[enum] XHTML10F
++[enum] XHTML11
++[enum] XHTMLB
++[list_end]
+
++[list_end]
+
+-[see_also ncgi htmlparse]
+-[keywords html form table checkbox radiobutton checkbutton]
++[vset CATEGORY html]
++[include ../doctools2base/include/feedback.inc]
+ [manpage_end]
+diff --git a/modules/html/html.tcl b/modules/html/html.tcl
+index 77e517e..3c0c443 100644
+--- a/modules/html/html.tcl
++++ b/modules/html/html.tcl
+@@ -15,7 +15,7 @@
+
+ package require Tcl 8.2
+ package require ncgi
+-package provide html 1.4
++package provide html 1.4.4
+
+ namespace eval ::html {
+
+@@ -510,7 +510,7 @@ proc ::html::refresh {content {url {}}} {
+ ::if {[string length $url]} {
+ append html "; url=$url"
+ }
+- append html "\">\n"
++ append html "\">"
+ lappend page(meta) $html
+ return ""
+ }
+@@ -912,7 +912,7 @@ proc ::html::selectPlain {name param choices {current {}}} {
+ # The html fragment
+
+ proc ::html::textarea {name {param {}} {current {}}} {
+- ::set value [ncgi::value $name $current]
++ ::set value [quoteFormValue [ncgi::value $name $current]]
+ return "<[string trimright \
+ "textarea name=\"$name\"\
+ [tagParam textarea $param]"]>$value</textarea>\n"
+@@ -1405,7 +1405,7 @@ proc ::html::html_entities {s} {
+ # The text with <br> in place of line-endings.
+
+ proc ::html::nl2br {s} {
+- return [string map [list \n\r <br> \n <br> \r <br>] $s]
++ return [string map [list \n\r <br> \r\n <br> \n <br> \r <br>] $s]
+ }
+
+ # ::html::doctype
+@@ -1419,9 +1419,10 @@ proc ::html::nl2br {s} {
+
+ proc ::html::doctype {arg} {
+ variable doctypes
+- set code [string toupper $arg]
+- if {![info exists doctypes($code)]} {
+- return -code error "Unknown doctype \"$arg\""
++ ::set code [string toupper $arg]
++ ::if {![info exists doctypes($code)]} {
++ return -code error -errorcode {HTML DOCTYPE BAD} \
++ "Unknown doctype \"$arg\""
+ }
+ return $doctypes($code)
+ }
+@@ -1451,12 +1452,26 @@ namespace eval ::html {
+ # href The location of the css file to include the filename and path
+ #
+ # Results:
+-# HTML for the section
++# None.
+
+ proc ::html::css {href} {
+ variable page
+- set page(css) \
+- "<link rel=\"stylesheet\" type=\"text/css\" href=\"[quoteFormValue $href]\">\n"
++ lappend page(css) "<link rel=\"stylesheet\" type=\"text/css\" href=\"[quoteFormValue $href]\">"
++ return
++}
++
++# ::html::css-clear
++# Drop all text/css references.
++#
++# Arguments:
++# None.
++#
++# Results:
++# None.
++
++proc ::html::css-clear {} {
++ variable page
++ catch { unset page(css) }
+ return
+ }
+
+@@ -1467,11 +1482,25 @@ proc ::html::css {href} {
+ # href The location of the javascript file to include the filename and path
+ #
+ # Results:
+-# HTML for the section
++# None.
+
+ proc ::html::js {href} {
+ variable page
+- set page(js) \
+- "<script language=\"javascript\" type=\"text/javascript\" src=\"[quoteFormValue $href]\"></script>\n"
++ lappend page(js) "<script language=\"javascript\" type=\"text/javascript\" src=\"[quoteFormValue $href]\"></script>"
++ return
++}
++
++# ::html::js-clear
++# Drop all text/javascript references.
++#
++# Arguments:
++# None.
++#
++# Results:
++# None.
++
++proc ::html::js-clear {} {
++ variable page
++ catch { unset page(js) }
+ return
+ }
+diff --git a/modules/html/html.test b/modules/html/html.test
+index 7a03c54..6646fb6 100644
+--- a/modules/html/html.test
++++ b/modules/html/html.test
+@@ -17,8 +17,8 @@ source [file join \
+ [file dirname [file dirname [file join [pwd] [info script]]]] \
+ devtools testutilities.tcl]
+
+-testsNeedTcl 8.2
+-testsNeedTcltest 1.0
++testsNeedTcl 8.4
++testsNeedTcltest 2.0
+
+ testing {
+ useLocal html.tcl html
+@@ -26,45 +26,46 @@ testing {
+
+ # -------------------------------------------------------------------------
+
+-test html-1.1 {html::init} {
++test html-1.1 {html::init} -body {
+ html::init
+- list [array exists html::defaults] \
+- [array size html::defaults] \
+- [info exists html::page]
+-} {1 0 0}
++ list \
++ [array exists html::defaults] \
++ [array size html::defaults] \
++ [info exists html::page]
++} -result {1 0 0}
+
+-test html-1.2 {html::init} {
++test html-1.2 {html::init} -body {
+ html::init {
+ font.face arial
+ body.bgcolor white
+ body.text black
+ }
+ lsort [array names html::defaults]
+-} {body.bgcolor body.text font.face}
++} -result {body.bgcolor body.text font.face}
+
+-test html-1.3 {html::init} {
+- catch {html::init wrong num args}
+-} 1
++test html-1.3 {html::init, too many args} -body {
++ html::init wrong num args
++} -returnCodes error -result {wrong # args: should be "html::init ?nvlist?"}
+
+-test html-1.4 {html::init} {
+- catch {html::init {wrong num args}}
+-} 1
++test html-1.4 {html::init, bad arg, odd-length list} -body {
++ html::init {wrong num args}
++} -returnCodes error -result {list must have an even number of elements}
+
+-test html-2.1 {html::head} {
+- catch {html::head}
+-} 1
++test html-2.1 {html::head, not enough args} -body {
++ html::head
++} -returnCodes error -result {wrong # args: should be "html::head title"}
+
+-test html-2.2 {html::head} {
++test html-2.2 {html::head} -body {
+ html::head "The Title"
+-} "<html><head>\n\t<title>The Title</title>\n</head>\n"
++} -result "<html><head>\n\t<title>The Title</title>\n</head>\n"
+
+-test html-2.3 {html::head} {
++test html-2.3 {html::head} -body {
+ html::description "The Description"
+ html::keywords key word
+ html::author "Cathy Coder"
+ html::meta metakey metavalue
+ html::head "The Title"
+-} {<html><head>
++} -result {<html><head>
+ <title>The Title</title>
+ <!-- Cathy Coder -->
+ <meta name="description" content="The Description">
+@@ -73,24 +74,24 @@ test html-2.3 {html::head} {
+ </head>
+ }
+
+-test html-3.1 {html::title} {
+- catch html::title
+-} 1
++test html-3.1 {html::title, not enough args} -body {
++ html::title
++} -returnCodes error -result {wrong # args: should be "html::title title"}
+
+-test html-3.2 {html::title} {
++test html-3.2 {html::title} -body {
+ html::title "blah blah"
+-} "<title>blah blah</title>\n"
++} -result "<title>blah blah</title>\n"
+
+-test html-4.1 {html::getTitle} {
++test html-4.1 {html::getTitle} -body {
+ html::init
+ html::getTitle
+-} ""
++} -result ""
+
+-test html-4.2 {html::getTitle} {
++test html-4.2 {html::getTitle} -body {
+ html::init
+ html::title "blah blah"
+ html::getTitle
+-} {blah blah}
++} -result {blah blah}
+
+ test html-5.1 {html::meta} {
+ html::init
+@@ -453,6 +454,18 @@ test html-23.2 {html::textarea} {
+ } {<textarea name="info" cols="50" rows="8">The textarea value.</textarea>
+ }
+
++test html-23.3 {html::textarea, dangerous input} {
++ html::init {
++ textarea.cols 50
++ textarea.rows 8
++ }
++ ncgi::reset info=[ncgi::encode "</textarea><script>alert(1)</script>"]
++ ncgi::parse
++ html::textarea info
++} {<textarea name="info" cols="50" rows="8">&lt;/textarea&gt;&lt;script&gt;alert(1)&lt;/script&gt;</textarea>
++}
++
++
+ test html-24.1 {html::submit} {
+ catch {html::submit}
+ } {1}
+@@ -516,7 +529,6 @@ test html-26.4 {html::refresh} {
+ } {<html><head>
+ <title>title</title>
+ <meta http-equiv="Refresh" content="4">
+-
+ </head>
+ }
+ test html-26.5 {html::refresh} {
+@@ -526,7 +538,6 @@ test html-26.5 {html::refresh} {
+ } {<html><head>
+ <title>title</title>
+ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
+-
+ </head>
+ }
+
+@@ -794,6 +805,7 @@ test html-32.1 {single argument} {
+ set result [html::eval {set x [format 22]}]
+ list $result $x
+ } {{} 22}
++
+ test html-32.2 {multiple arguments} {
+ set a {$b}
+ set b xyzzy
+@@ -801,38 +813,146 @@ test html-32.2 {multiple arguments} {
+ set result [html::eval {set x [eval format $a]}]
+ list $result $x
+ } {{} xyzzy}
++
+ test html-32.3 {single argument} {
+ set x [list]
+ set y 1
+ set result [html::eval lappend x a b c d {$y} e f g]
+ list $result $x
+ } {{} {a b c d 1 e f g}}
+-test html-32.4 {error: not enough arguments} {catch html::eval} 1
+-test html-32.5 {error: not enough arguments} {
+- catch html::eval msg
+- set msg
+-} {wrong # args: should be "uplevel ?level? command ?arg ...?"}
+-test html-32.6 {error in eval'ed command} {
+- catch {html::eval {error "test error"}}
+-} 1
+-test html-32.7 {error in eval'ed command} {
+- catch {html::eval {error "test error"}} msg
+- set msg
+-} {test error}
+
++test html-32.4 {error: not enough arguments} -body {
++ html::eval
++} -returnCodes error -result {wrong # args: should be "uplevel ?level? command ?arg ...?"}
+
+-test html-33.0 {html::font} {
++test html-32.6 {error in eval'ed command} -body {
++ html::eval {error "test error"}
++} -returnCodes error -result {test error}
++
++test html-33.0 {html::font} -body {
+ html::font
+-} {}
++} -result {}
+
+-test html-33.1 {html::font} {
++test html-33.1 {html::font} -body {
+ html::font size=18
+-} {<font size=18>}
++} -result {<font size=18>}
+
+-
+-test html-34.0 {html::nl2br} {
++test html-34.0 {html::nl2br} -body {
+ html::nl2br "a\n\rb\nc\rd"
+-} {a<br>b<br>c<br>d}
++} -result {a<br>b<br>c<br>d}
+
++test html-34.1 {html::nl2br, ticket 1742078} -body {
++ html::nl2br "a\r\nb"
++} -result {a<br>b}
+
++# -------------------------------------------------------------------------
++
++test html-tkt3439702-35.0 {html::css, not enough arguments} -body {
++ html::css
++} -returnCodes error -result {wrong # args: should be "html::css href"}
++
++test html-tkt3439702-35.1 {html::css, too many arguments} -body {
++ html::css REF X
++} -returnCodes error -result {wrong # args: should be "html::css href"}
++
++test html-tkt3439702-35.2 {html::css, single ref} -setup {
++ html::css-clear
++} -body {
++ html::css "http://test.css"
++ string trim [html::head T]
++} -cleanup {
++ html::css-clear
++} -result "<html><head>\n\t<title>T</title>\n\t<meta http-equiv=\"Refresh\" content=\"9; url=http://www.scriptics.com\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://test.css\">\n</head>"
++
++test html-tkt3439702-35.3 {html::css, multiple ref} -setup {
++ html::css-clear
++} -body {
++ html::css "http://test1.css"
++ html::css "http://test2.css"
++ string trim [html::head T]
++} -cleanup {
++ html::css-clear
++} -result {<html><head>
++ <title>T</title>
++ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
++ <link rel="stylesheet" type="text/css" href="http://test1.css">
++ <link rel="stylesheet" type="text/css" href="http://test2.css">
++</head>}
++
++# -------------------------------------------------------------------------
++
++test html-tkt3439702-36.0 {html::js, not enough arguments} -body {
++ html::js
++} -returnCodes error -result {wrong # args: should be "html::js href"}
++
++test html-tkt3439702-36.1 {html::js, too many arguments} -body {
++ html::js REF X
++} -returnCodes error -result {wrong # args: should be "html::js href"}
++
++test html-tkt3439702-36.2 {html::js, single ref} -setup {
++ html::js-clear
++} -body {
++ html::js "http://test.js"
++ string trim [html::head T]
++} -cleanup {
++ html::js-clear
++} -result {<html><head>
++ <title>T</title>
++ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
++ <script language="javascript" type="text/javascript" src="http://test.js"></script>
++</head>}
++
++test html-tkt3439702-36.3 {html::js, multiple ref} -setup {
++ html::js-clear
++} -body {
++ html::js "http://test1.js"
++ html::js "http://test2.js"
++ string trim [html::head T]
++} -cleanup {
++ html::js-clear
++} -result {<html><head>
++ <title>T</title>
++ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
++ <script language="javascript" type="text/javascript" src="http://test1.js"></script>
++ <script language="javascript" type="text/javascript" src="http://test2.js"></script>
++</head>}
++
++test html-tkt3439702-37.0 {html::js, html::css, mixed} -setup {
++ html::css-clear
++ html::js-clear
++} -body {
++ html::css "http://test.css"
++ html::js "http://test.js"
++ string trim [html::head T]
++} -cleanup {
++ html::js-clear
++ html::css-clear
++} -result {<html><head>
++ <title>T</title>
++ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
++ <link rel="stylesheet" type="text/css" href="http://test.css">
++ <script language="javascript" type="text/javascript" src="http://test.js"></script>
++</head>}
++
++# -------------------------------------------------------------------------
++# TODO: html::css-clear, html::js-clear
++
++
++test html-tktafe4366e2e-38.0 {html::doctype, not enough args} -body {
++ html::doctype
++} -returnCodes error -result {wrong # args: should be "html::doctype arg"}
++
++test html-tktafe4366e2e-38.1 {html::doctype, too many args} -body {
++ html::doctype HTML401T X
++} -returnCodes error -result {wrong # args: should be "html::doctype arg"}
++
++test html-tktafe4366e2e-38.2 {html::doctype, unknown type} -body {
++ html::doctype HTML401TXXX
++} -returnCodes error -result {Unknown doctype "HTML401TXXX"}
++
++test html-tktafe4366e2e-38.3 {html::doctype} -body {
++ html::doctype HTML401T
++} -result {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">}
++
++# -------------------------------------------------------------------------
+ testsuiteCleanup
+diff --git a/modules/html/pkgIndex.tcl b/modules/html/pkgIndex.tcl
+index 88a71b2..9d91097 100644
+--- a/modules/html/pkgIndex.tcl
++++ b/modules/html/pkgIndex.tcl
+@@ -1,2 +1,2 @@
+ if {![package vsatisfies [package provide Tcl] 8.2]} {return}
+-package ifneeded html 1.4 [list source [file join $dir html.tcl]]
++package ifneeded html 1.4.4 [list source [file join $dir html.tcl]]
diff --git a/dev-tcltk/tcllib/files/tcllib-1.15-tcl8.6-test.patch b/dev-tcltk/tcllib/files/tcllib-1.15-tcl8.6-test.patch
new file mode 100644
index 000000000000..2256c5a50a0d
--- /dev/null
+++ b/dev-tcltk/tcllib/files/tcllib-1.15-tcl8.6-test.patch
@@ -0,0 +1,411 @@
+ modules/clock/iso8601.test | 5 ++---
+ modules/doctools/mpformats/_nroff.tcl | 18 ++++++++++--------
+ modules/doctools/mpformats/fmt.nroff | 4 ++--
+ modules/doctools/tests/nroff/00 | 8 ++++----
+ modules/doctools/tests/nroff/01 | 4 ++--
+ modules/doctools/tests/nroff/02 | 10 +++++-----
+ modules/doctools/tests/nroff/03 | 16 ++++++++--------
+ modules/doctools/tests/nroff/04 | 8 ++++----
+ modules/doctools/tests/nroff/05 | 8 ++++----
+ modules/doctools/tests/nroff/06 | 8 ++++----
+ modules/doctools/tests/nroff/07 | 8 ++++----
+ modules/doctools/tests/nroff/08 | 18 +++++++++---------
+ support/devel/sak/validate/syntax.tcl | 4 +++-
+ support/devel/sak/validate/testsuites.tcl | 4 +++-
+ 14 files changed, 64 insertions(+), 59 deletions(-)
+
+diff --git a/modules/clock/iso8601.test b/modules/clock/iso8601.test
+index 85d6416..6fce938 100644
+--- a/modules/clock/iso8601.test
++++ b/modules/clock/iso8601.test
+@@ -40,9 +40,8 @@ test clock-iso8601-2.0 {parse_date, bad input} -body {
+ } -returnCodes error -result {not an iso8601 date string}
+
+ test clock-iso8601-2.1 {parse_date} -body {
+- clock::iso8601 parse_date 1994-11-05
+- # It is unclear if this is influenced by TZ.
+-} -result 784022400
++ clock format [clock::iso8601 parse_date 1994-11-05] -format %D
++} -result 11/05/1994
+
+ # -------------------------------------------------------------------------
+
+diff --git a/modules/doctools/mpformats/_nroff.tcl b/modules/doctools/mpformats/_nroff.tcl
+index be73a02..7669d07 100644
+--- a/modules/doctools/mpformats/_nroff.tcl
++++ b/modules/doctools/mpformats/_nroff.tcl
+@@ -15,7 +15,7 @@
+
+
+ proc nr_lp {} {return \n\1.LP}
+-proc nr_ta {{text {}}} {return ".ta$text"}
++proc nr_ta {{text {}}} {return "\1.ta$text"}
+ proc nr_bld {} {return \1\\fB}
+ proc nr_bldt {t} {return "\n\1.B $t\n"}
+ proc nr_ul {} {return \1\\fI}
+@@ -75,6 +75,7 @@ set finalMap [list \
+ "\1\\" "\\" \
+ "\1'" "'" \
+ "\1." "." \
++ "." "\\&." \
+ "\\" "\\\\"]
+ global textMap
+ set textMap [list "\\" "\\\\"]
+@@ -103,8 +104,8 @@ proc nroff_postprocess {nroff} {
+ # - Exceptions to the above: Keep empty lines and leading
+ # whitespace when in verbatim sections (no-fill-mode)
+
+- set nfMode [list .nf .CS] ; # commands which start no-fill mode
+- set fiMode [list .fi .CE] ; # commands which terminate no-fill mode
++ set nfMode [list \1.nf \1.CS] ; # commands which start no-fill mode
++ set fiMode [list \1.fi \1.CE] ; # commands which terminate no-fill mode
+ set lines [list] ; # Result buffer
+ set verbatim 0 ; # Automaton mode/state
+
+@@ -139,7 +140,7 @@ proc nroff_postprocess {nroff} {
+ set lines [lreplace $lines end end]
+ set line "$last $line"
+ }
+- } elseif {[string match {['.]*} $line]} {
++ } elseif {[string match {[']*} $line]} {
+ # Apostrophes or periods at the beginning of a line have to
+ # quoted to prevent misinterpretation as comments or directives.
+ # The true comments and directive are quoted with \1
+@@ -166,10 +167,11 @@ proc nroff_postprocess {nroff} {
+ # Remove superfluous .IP commands (empty paragraph). The first
+ # identity mapping is there to avoid smashing a man macro
+ # definition.
+- set lines [string map [list \
+- \n\1.IP\n\1..\n \n\1.IP\n\1..\n \
+- \n\1.IP\n\1. \n\1.] \
+- $lines]
++
++ lappend map \n\1.IP\n\1.\1.\n \n\1.IP\n\1.\1.\n
++ lappend map \n\1.IP\n\1. \n\1.
++
++ set lines [string map $map $lines]
+
+ # Return the modified result buffer
+ return [string map $finalMap $lines]
+diff --git a/modules/doctools/mpformats/fmt.nroff b/modules/doctools/mpformats/fmt.nroff
+index e844dbf..5230688 100644
+--- a/modules/doctools/mpformats/fmt.nroff
++++ b/modules/doctools/mpformats/fmt.nroff
+@@ -269,11 +269,11 @@ proc fmt_image {text {label {}}} {
+
+ set img [dt_imgdata $text {pic}]
+ if {$img ne {}} {
+- return \n.PS\n$img\n.PE\n
++ return \n\1.PS\n$img\n\1.PE\n
+ }
+ set img [dt_imgdata $text {txt}]
+ if {$img ne {}} {
+- return \n.PS\n.nf\n$img\n.fi\n.PE\n
++ return \n\1.PS\n\1.nf\n$img\n\1.fi\n\1.PE\n
+ }
+ if {$label eq {}} {
+ return "IMAGE: $text"
+diff --git a/modules/doctools/tests/nroff/00 b/modules/doctools/tests/nroff/00
+index 8ac0ebf..8f68ee1 100644
+--- a/modules/doctools/tests/nroff/00
++++ b/modules/doctools/tests/nroff/00
+@@ -1,15 +1,15 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+-'\" Copyright (c) .COPYRIGHT.
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
++'\" Copyright (c) \&.COPYRIGHT\&.
+ '\"
+ .so man.macros
+-.TH "TEST" z 3.14.15.926 .MODULE. ""
++.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
+ .BS
+ .SH NAME
+ TEST \-
+ .SH DESCRIPTION
+ .SH COPYRIGHT
+ .nf
+-Copyright (c) .COPYRIGHT.
++Copyright (c) \&.COPYRIGHT\&.
+
+ .fi
+\ No newline at end of file
+diff --git a/modules/doctools/tests/nroff/01 b/modules/doctools/tests/nroff/01
+index 3a4563f..588894a 100644
+--- a/modules/doctools/tests/nroff/01
++++ b/modules/doctools/tests/nroff/01
+@@ -1,9 +1,9 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+ '\" Copyright (c) **Copyright**
+ '\"
+ .so man.macros
+-.TH "TEST" z 3.14.15.926 .MODULE. ""
++.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
+ .BS
+ .SH NAME
+ TEST \-
+diff --git a/modules/doctools/tests/nroff/02 b/modules/doctools/tests/nroff/02
+index 89d6cb7..49fbf18 100644
+--- a/modules/doctools/tests/nroff/02
++++ b/modules/doctools/tests/nroff/02
+@@ -1,12 +1,12 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+-'\" Copyright (c) .COPYRIGHT.
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
++'\" Copyright (c) \&.COPYRIGHT\&.
+ '\"
+ .so man.macros
+-.TH "TEST" z 3.14.15.926 .MODULE. "..THE_MODULE.."
++.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. "\&.\&.THE_MODULE\&.\&."
+ .BS
+ .SH NAME
+-TEST \- ..THE_TITLE..
++TEST \- \&.\&.THE_TITLE\&.\&.
+ .SH SYNOPSIS
+ package require \fBAAA \fR
+ .sp
+@@ -20,6 +20,6 @@ ELSE, OTHER
+ KEYA, KEYZ
+ .SH COPYRIGHT
+ .nf
+-Copyright (c) .COPYRIGHT.
++Copyright (c) \&.COPYRIGHT\&.
+
+ .fi
+\ No newline at end of file
+diff --git a/modules/doctools/tests/nroff/03 b/modules/doctools/tests/nroff/03
+index eb0bdd3..6393ecb 100644
+--- a/modules/doctools/tests/nroff/03
++++ b/modules/doctools/tests/nroff/03
+@@ -1,9 +1,9 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+-'\" Copyright (c) .COPYRIGHT.
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
++'\" Copyright (c) \&.COPYRIGHT\&.
+ '\"
+ .so man.macros
+-.TH "TEST" z 3.14.15.926 .MODULE. ""
++.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
+ .BS
+ .SH NAME
+ TEST \-
+@@ -12,18 +12,18 @@ TEST \-
+ 1
+ .SH BBB
+ 22
+-.SS BBB.CCC
++.SS BBB\&.CCC
+ 333
+-.SS BBB.DDD
++.SS BBB\&.DDD
+ 4444
+ .SH EEE
+ 5555
+ .PP
+-At \fBAaA\fR.
++At \fBAaA\fR\&.
+ .PP
+-At \fB__undefined__\fR.
++At \fB__undefined__\fR\&.
+ .SH COPYRIGHT
+ .nf
+-Copyright (c) .COPYRIGHT.
++Copyright (c) \&.COPYRIGHT\&.
+
+ .fi
+\ No newline at end of file
+diff --git a/modules/doctools/tests/nroff/04 b/modules/doctools/tests/nroff/04
+index ee22d7a..27aa037 100644
+--- a/modules/doctools/tests/nroff/04
++++ b/modules/doctools/tests/nroff/04
+@@ -1,9 +1,9 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+-'\" Copyright (c) .COPYRIGHT.
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
++'\" Copyright (c) \&.COPYRIGHT\&.
+ '\"
+ .so man.macros
+-.TH "TEST" z 3.14.15.926 .MODULE. ""
++.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
+ .BS
+ .SH NAME
+ TEST \-
+@@ -27,6 +27,6 @@ Next Line
+ FERTIG
+ .SH COPYRIGHT
+ .nf
+-Copyright (c) .COPYRIGHT.
++Copyright (c) \&.COPYRIGHT\&.
+
+ .fi
+\ No newline at end of file
+diff --git a/modules/doctools/tests/nroff/05 b/modules/doctools/tests/nroff/05
+index c25c179..3df0180 100644
+--- a/modules/doctools/tests/nroff/05
++++ b/modules/doctools/tests/nroff/05
+@@ -1,9 +1,9 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+-'\" Copyright (c) .COPYRIGHT.
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
++'\" Copyright (c) \&.COPYRIGHT\&.
+ '\"
+ .so man.macros
+-.TH "BASIC" a 5 .MODULE. ""
++.TH "BASIC" a 5 \&.MODULE\&. ""
+ .BS
+ .SH NAME
+ BASIC \-
+@@ -91,6 +91,6 @@ caramel
+ KO
+ .SH COPYRIGHT
+ .nf
+-Copyright (c) .COPYRIGHT.
++Copyright (c) \&.COPYRIGHT\&.
+
+ .fi
+\ No newline at end of file
+diff --git a/modules/doctools/tests/nroff/06 b/modules/doctools/tests/nroff/06
+index e7fee7c..10fed25 100644
+--- a/modules/doctools/tests/nroff/06
++++ b/modules/doctools/tests/nroff/06
+@@ -1,9 +1,9 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+-'\" Copyright (c) .COPYRIGHT.
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
++'\" Copyright (c) \&.COPYRIGHT\&.
+ '\"
+ .so man.macros
+-.TH "TEST" z 3.14.15.926 .MODULE. ""
++.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
+ .BS
+ .SH NAME
+ TEST \-
+@@ -50,6 +50,6 @@ c
+ .PP
+ .SH COPYRIGHT
+ .nf
+-Copyright (c) .COPYRIGHT.
++Copyright (c) \&.COPYRIGHT\&.
+
+ .fi
+\ No newline at end of file
+diff --git a/modules/doctools/tests/nroff/07 b/modules/doctools/tests/nroff/07
+index 696a715..08ff9ee 100644
+--- a/modules/doctools/tests/nroff/07
++++ b/modules/doctools/tests/nroff/07
+@@ -1,9 +1,9 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
+-'\" Copyright (c) .COPYRIGHT.
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
++'\" Copyright (c) \&.COPYRIGHT\&.
+ '\"
+ .so man.macros
+-.TH "TEST" z 3.14.15.926 .MODULE. ""
++.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
+ .BS
+ .SH NAME
+ TEST \-
+@@ -40,6 +40,6 @@ a
+ .PP
+ .SH COPYRIGHT
+ .nf
+-Copyright (c) .COPYRIGHT.
++Copyright (c) \&.COPYRIGHT\&.
+
+ .fi
+\ No newline at end of file
+diff --git a/modules/doctools/tests/nroff/08 b/modules/doctools/tests/nroff/08
+index b1bc4ea..50cecb6 100644
+--- a/modules/doctools/tests/nroff/08
++++ b/modules/doctools/tests/nroff/08
+@@ -1,12 +1,12 @@
+ '\"
+-'\" Generated from file '.FILE.' by tcllib/doctools with format 'nroff'
++'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
+ '\" Copyright (c) **Copyright**
+ '\"
+ .so man.macros
+-.TH "ALL" a 5 .MODULE. "..THE_MODULE.."
++.TH "ALL" a 5 \&.MODULE\&. "\&.\&.THE_MODULE\&.\&."
+ .BS
+ .SH NAME
+-ALL \- ..THE_TITLE..
++ALL \- \&.\&.THE_TITLE\&.\&.
+ .SH SYNOPSIS
+ package require \fBAAA \fR
+ .sp
+@@ -14,11 +14,11 @@ package require \fBBBB VVV\fR
+ .sp
+ package require \fBCCC ?VVV?\fR
+ .sp
+-CMDNAME ...
++CMDNAME \&.\&.\&.
+ .sp
+-CMDNAME ...
++CMDNAME \&.\&.\&.
+ .sp
+-CMDNAME ...
++CMDNAME \&.\&.\&.
+ .sp
+ .BE
+ .SH DESCRIPTION
+@@ -75,7 +75,7 @@ DESCRIPTION ::\fBMethod\fR::
+ TERM
+ DESCRIPTION
+ .TP
+-CMDNAME ...
++CMDNAME \&.\&.\&.
+ DESCRIPTION ::\fBNamespace\fR::
+ .RS
+ .TP
+@@ -96,10 +96,10 @@ DESCRIPTION ::?Optional?::
+ .CE
+ .RE
+ .TP
+-CMDNAME ...
++CMDNAME \&.\&.\&.
+ DESCRIPTION ::\fBPackage\fR::
+ .TP
+-CMDNAME ...
++CMDNAME \&.\&.\&.
+ DESCRIPTION ::\fBSystemCommand\fR::
+ .RS
+ .TP
+diff --git a/support/devel/sak/validate/syntax.tcl b/support/devel/sak/validate/syntax.tcl
+index 20b7d33..24e06d2 100644
+--- a/support/devel/sak/validate/syntax.tcl
++++ b/support/devel/sak/validate/syntax.tcl
+@@ -194,7 +194,9 @@ proc ::sak::validate::syntax::Setup {} {
+ interp eval $ip [list ::rename $c {}]
+ }
+
+- interp eval $ip [list ::namespace delete ::tcl]
++ if {![package vsatisfies [package present Tcl] 8.6]} {
++ interp eval $ip [list ::namespace delete ::tcl]
++ }
+ interp eval $ip [list ::rename namespace {}]
+ interp eval $ip [list ::rename rename {}]
+
+diff --git a/support/devel/sak/validate/testsuites.tcl b/support/devel/sak/validate/testsuites.tcl
+index 7072662..71ea694 100644
+--- a/support/devel/sak/validate/testsuites.tcl
++++ b/support/devel/sak/validate/testsuites.tcl
+@@ -139,7 +139,9 @@ proc ::sak::validate::testsuites::Setup {} {
+ interp eval $ip [list ::rename $c {}]
+ }
+
+- interp eval $ip [list ::namespace delete ::tcl]
++ if {![package vsatisfies [package present Tcl] 8.6]} {
++ interp eval $ip [list ::namespace delete ::tcl]
++ }
+ interp eval $ip [list ::rename namespace {}]
+ interp eval $ip [list ::rename rename {}]
+
diff --git a/dev-tcltk/tcllib/files/tcllib-1.15-test.patch b/dev-tcltk/tcllib/files/tcllib-1.15-test.patch
new file mode 100644
index 000000000000..8692cf2cd2df
--- /dev/null
+++ b/dev-tcltk/tcllib/files/tcllib-1.15-test.patch
@@ -0,0 +1,81 @@
+ modules/clock/iso8601.test | 2 +-
+ modules/multiplexer/multiplexer.test | 2 +-
+ modules/snit/snit.test | 4 ++--
+ modules/struct/sets.testsuite | 2 +-
+ modules/uev/uevent.test | 2 +-
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/modules/clock/iso8601.test b/modules/clock/iso8601.test
+index 85d6416..f1b478e 100644
+--- a/modules/clock/iso8601.test
++++ b/modules/clock/iso8601.test
+@@ -26,7 +26,7 @@ test clock-iso8601-1.0.1 {parse_date wrong\#args} -constraints {tcl8.6plus} -bod
+
+ test clock-iso8601-1.1 {parse_date, bad option} -body {
+ clock::iso8601 parse_date 1994-11-05 -foo x
+-} -returnCodes error -result {bad switch "-foo", must be -base, -format, -gmt, -locale or -timezone}
++} -returnCodes error -result {bad option "-foo", must be -base, -format, -gmt, -locale or -timezone}
+
+ # NOTE: While listed as legal, -format is NOT. This is because the
+ # command simply hands off to clock scan, and we are seeing its error
+diff --git a/modules/multiplexer/multiplexer.test b/modules/multiplexer/multiplexer.test
+index d778253..e5dfeff 100644
+--- a/modules/multiplexer/multiplexer.test
++++ b/modules/multiplexer/multiplexer.test
+@@ -189,7 +189,7 @@ proc DenyAccessFilter {chan clientaddress clientport} {
+ return -1
+ }
+
+-test multiplexer-5.2 {add access filter which denies access} {
++test multiplexer-5.2 {add access filter which denies access} {broken without network} {
+ set ::forever {}
+ set mp [multiplexer::create]
+ ${mp}::Init 37465
+diff --git a/modules/snit/snit.test b/modules/snit/snit.test
+index 66d7bd1..00c0769 100644
+--- a/modules/snit/snit.test
++++ b/modules/snit/snit.test
+@@ -783,7 +783,7 @@ test dtypemethod-1.6a {delegating unknown typemethod to existing typecomponent w
+ snit2
+ } -returnCodes {
+ error
+-} -result {unknown or ambiguous subcommand "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}
++} -result {unknown or ambiguous subcommand "foo": must be bytelength, cat, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}
+
+ test dtypemethod-1.7 {can't delegate local typemethod: order 1} -body {
+ type dog {
+@@ -3339,7 +3339,7 @@ test dmethod-1.6a {delegating unknown method to existing component with error} -
+ error
+ } -cleanup {
+ dog destroy
+-} -result {unknown or ambiguous subcommand "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}
++} -result {unknown or ambiguous subcommand "foo": must be bytelength, cat, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}
+
+ test dmethod-1.7 {can't delegate local method: order 1} -body {
+ type cat {
+diff --git a/modules/struct/sets.testsuite b/modules/struct/sets.testsuite
+index 29fd3ef..28a9dd6 100644
+--- a/modules/struct/sets.testsuite
++++ b/modules/struct/sets.testsuite
+@@ -13,7 +13,7 @@
+ test set-${impl}-1.0 {nothing} {
+ catch {setop} msg
+ set msg
+-} [Nothing]
++} {wrong # args: should be "::struct::set cmd ?arg ...?"}
+
+ test set-${impl}-1.1 {bogus} {
+ catch {setop foo} msg
+diff --git a/modules/uev/uevent.test b/modules/uev/uevent.test
+index 91754a7..6544112 100644
+--- a/modules/uev/uevent.test
++++ b/modules/uev/uevent.test
+@@ -453,7 +453,7 @@ test uevent-10.3 {watch events, watch after bind, glob} {
+ ::uevent::unbind $t4
+ ::uevent::watch::event::remove $tw
+ set res
+-} {bound TAG EX bound TAGX EX bound TAG E bound TAGX E unbound TAGX E unbound TAG E unbound TAGX EX unbound TAG EX}
++} {bound TAGX E bound TAGX EX bound TAG E bound TAG EX unbound TAGX E unbound TAG E unbound TAGX EX unbound TAG EX}
+
+ # -------------------------------------------------------------------------
+ rename EVENT {}
diff --git a/dev-tcltk/tcllib/files/tcllib-1.16-XSS-vuln.patch b/dev-tcltk/tcllib/files/tcllib-1.16-XSS-vuln.patch
new file mode 100644
index 000000000000..4a08e31e330b
--- /dev/null
+++ b/dev-tcltk/tcllib/files/tcllib-1.16-XSS-vuln.patch
@@ -0,0 +1,572 @@
+ modules/html/html.man | 76 +++++++++++++++-
+ modules/html/html.tcl | 55 +++++++++---
+ modules/html/html.test | 224 +++++++++++++++++++++++++++++++++++-----------
+ modules/html/pkgIndex.tcl | 2 +-
+ 4 files changed, 287 insertions(+), 70 deletions(-)
+
+diff --git a/modules/html/html.man b/modules/html/html.man
+index 705a8a2..f18cf4b 100644
+--- a/modules/html/html.man
++++ b/modules/html/html.man
+@@ -1,5 +1,6 @@
+ [comment {-*- tcl -*- doctools manpage}]
+-[manpage_begin html n 1.4]
++[vset HTML_VERSION 1.4.4]
++[manpage_begin html n [vset HTML_VERSION]]
+ [see_also htmlparse]
+ [see_also ncgi]
+ [keywords checkbox]
+@@ -12,7 +13,7 @@
+ [titledesc {Procedures to generate HTML structures}]
+ [category {CGI programming}]
+ [require Tcl 8.2]
+-[require html [opt 1.4]]
++[require html [opt [vset HTML_VERSION]]]
+ [description]
+ [para]
+
+@@ -62,7 +63,7 @@ the elements.
+
+ [call [cmd ::html::checkValue] [arg name] [opt [arg value]]]
+
+-Generate the "name=[arg name] value=[arg value] for a [term checkbox] form
++Generate the "name=[arg name] value=[arg value]" for a [term checkbox] form
+ element. If the CGI variable [arg name] has the value [arg value],
+ then SELECTED is added to the return value. [arg value] defaults to
+ "1".
+@@ -245,6 +246,51 @@ value list that is used for the name= and value= parameters for the
+ [term meta] tag. The [term meta] tag is included in the result of
+ [cmd ::html::head].
+
++[call [cmd ::html::css] [arg href]]
++
++[emph {Side effect only}]. Call this before [cmd ::html::head] to
++define a [term link] tag for a linked CSS document. The [arg href]
++value is a HTTP URL to a CSS document. The [term link] tag is included
++in the result of [cmd ::html::head].
++
++[para]
++
++Multiple calls of this command are allowed, enabling the use of
++multiple CSS document references. In other words, the arguments
++of multiple calls are accumulated, and do not overwrite each other.
++
++[call [cmd ::html::css-clear]]
++
++[emph {Side effect only}]. Call this before [cmd ::html::head] to
++clear all links to CSS documents.
++[para]
++
++Multiple calls of this command are allowed, doing nothing after the
++first of a sequence with no intervening [cmd ::html::css].
++
++[call [cmd ::html::js] [arg href]]
++
++[emph {Side effect only}]. Call this before [cmd ::html::head] to
++define a [term script] tag for a linked JavaScript document. The
++[arg href] is a HTTP URL to a JavaScript document. The [term script]
++tag is included in the result of [cmd ::html::head].
++
++[para]
++
++Multiple calls of this command are allowed, enabling the use of
++multiple JavaScript document references. In other words, the arguments
++of multiple calls are accumulated, and do not overwrite each other.
++
++
++[call [cmd ::html::js-clear]]
++
++[emph {Side effect only}]. Call this before [cmd ::html::head] to
++clear all links to JavaScript documents.
++[para]
++
++Multiple calls of this command are allowed, doing nothing after the
++first of a sequence with no intervening [cmd ::html::js].
++
+ [call [cmd ::html::minorList] [arg list] [opt [arg ordered]]]
+
+ Generate an ordered or unordered list of links. The [arg list] is a
+@@ -306,7 +352,7 @@ is a Tcl-style label, value list.
+
+ [call [cmd ::html::radioValue] [arg {name value}]]
+
+-Generate the "name=[arg name] value=[arg value] for a [term radio] form
++Generate the "name=[arg name] value=[arg value]" for a [term radio] form
+ element. If the CGI variable [arg name] has the value [arg value],
+ then SELECTED is added to the return value.
+
+@@ -401,6 +447,28 @@ structure. Rather than evaluating the body, it returns the subst'ed
+ [arg body]. Each iteration of the loop causes another string to be
+ concatenated to the result value.
+
++[call [cmd ::html::doctype] [arg id]]
++
++This procedure can be used to build the standard DOCTYPE
++declaration string. It will return the standard declaration
++string for the id, or throw an error if the id is not known.
++The following id's are defined:
++
++[list_begin enumerated]
++[enum] HTML32
++[enum] HTML40
++[enum] HTML40T
++[enum] HTML40F
++[enum] HTML401
++[enum] HTML401T
++[enum] HTML401F
++[enum] XHTML10S
++[enum] XHTML10T
++[enum] XHTML10F
++[enum] XHTML11
++[enum] XHTMLB
++[list_end]
++
+ [list_end]
+
+ [vset CATEGORY html]
+diff --git a/modules/html/html.tcl b/modules/html/html.tcl
+index 77e517e..3c0c443 100644
+--- a/modules/html/html.tcl
++++ b/modules/html/html.tcl
+@@ -15,7 +15,7 @@
+
+ package require Tcl 8.2
+ package require ncgi
+-package provide html 1.4
++package provide html 1.4.4
+
+ namespace eval ::html {
+
+@@ -510,7 +510,7 @@ proc ::html::refresh {content {url {}}} {
+ ::if {[string length $url]} {
+ append html "; url=$url"
+ }
+- append html "\">\n"
++ append html "\">"
+ lappend page(meta) $html
+ return ""
+ }
+@@ -912,7 +912,7 @@ proc ::html::selectPlain {name param choices {current {}}} {
+ # The html fragment
+
+ proc ::html::textarea {name {param {}} {current {}}} {
+- ::set value [ncgi::value $name $current]
++ ::set value [quoteFormValue [ncgi::value $name $current]]
+ return "<[string trimright \
+ "textarea name=\"$name\"\
+ [tagParam textarea $param]"]>$value</textarea>\n"
+@@ -1405,7 +1405,7 @@ proc ::html::html_entities {s} {
+ # The text with <br> in place of line-endings.
+
+ proc ::html::nl2br {s} {
+- return [string map [list \n\r <br> \n <br> \r <br>] $s]
++ return [string map [list \n\r <br> \r\n <br> \n <br> \r <br>] $s]
+ }
+
+ # ::html::doctype
+@@ -1419,9 +1419,10 @@ proc ::html::nl2br {s} {
+
+ proc ::html::doctype {arg} {
+ variable doctypes
+- set code [string toupper $arg]
+- if {![info exists doctypes($code)]} {
+- return -code error "Unknown doctype \"$arg\""
++ ::set code [string toupper $arg]
++ ::if {![info exists doctypes($code)]} {
++ return -code error -errorcode {HTML DOCTYPE BAD} \
++ "Unknown doctype \"$arg\""
+ }
+ return $doctypes($code)
+ }
+@@ -1451,12 +1452,26 @@ namespace eval ::html {
+ # href The location of the css file to include the filename and path
+ #
+ # Results:
+-# HTML for the section
++# None.
+
+ proc ::html::css {href} {
+ variable page
+- set page(css) \
+- "<link rel=\"stylesheet\" type=\"text/css\" href=\"[quoteFormValue $href]\">\n"
++ lappend page(css) "<link rel=\"stylesheet\" type=\"text/css\" href=\"[quoteFormValue $href]\">"
++ return
++}
++
++# ::html::css-clear
++# Drop all text/css references.
++#
++# Arguments:
++# None.
++#
++# Results:
++# None.
++
++proc ::html::css-clear {} {
++ variable page
++ catch { unset page(css) }
+ return
+ }
+
+@@ -1467,11 +1482,25 @@ proc ::html::css {href} {
+ # href The location of the javascript file to include the filename and path
+ #
+ # Results:
+-# HTML for the section
++# None.
+
+ proc ::html::js {href} {
+ variable page
+- set page(js) \
+- "<script language=\"javascript\" type=\"text/javascript\" src=\"[quoteFormValue $href]\"></script>\n"
++ lappend page(js) "<script language=\"javascript\" type=\"text/javascript\" src=\"[quoteFormValue $href]\"></script>"
++ return
++}
++
++# ::html::js-clear
++# Drop all text/javascript references.
++#
++# Arguments:
++# None.
++#
++# Results:
++# None.
++
++proc ::html::js-clear {} {
++ variable page
++ catch { unset page(js) }
+ return
+ }
+diff --git a/modules/html/html.test b/modules/html/html.test
+index 7a03c54..6646fb6 100644
+--- a/modules/html/html.test
++++ b/modules/html/html.test
+@@ -17,8 +17,8 @@ source [file join \
+ [file dirname [file dirname [file join [pwd] [info script]]]] \
+ devtools testutilities.tcl]
+
+-testsNeedTcl 8.2
+-testsNeedTcltest 1.0
++testsNeedTcl 8.4
++testsNeedTcltest 2.0
+
+ testing {
+ useLocal html.tcl html
+@@ -26,45 +26,46 @@ testing {
+
+ # -------------------------------------------------------------------------
+
+-test html-1.1 {html::init} {
++test html-1.1 {html::init} -body {
+ html::init
+- list [array exists html::defaults] \
+- [array size html::defaults] \
+- [info exists html::page]
+-} {1 0 0}
++ list \
++ [array exists html::defaults] \
++ [array size html::defaults] \
++ [info exists html::page]
++} -result {1 0 0}
+
+-test html-1.2 {html::init} {
++test html-1.2 {html::init} -body {
+ html::init {
+ font.face arial
+ body.bgcolor white
+ body.text black
+ }
+ lsort [array names html::defaults]
+-} {body.bgcolor body.text font.face}
++} -result {body.bgcolor body.text font.face}
+
+-test html-1.3 {html::init} {
+- catch {html::init wrong num args}
+-} 1
++test html-1.3 {html::init, too many args} -body {
++ html::init wrong num args
++} -returnCodes error -result {wrong # args: should be "html::init ?nvlist?"}
+
+-test html-1.4 {html::init} {
+- catch {html::init {wrong num args}}
+-} 1
++test html-1.4 {html::init, bad arg, odd-length list} -body {
++ html::init {wrong num args}
++} -returnCodes error -result {list must have an even number of elements}
+
+-test html-2.1 {html::head} {
+- catch {html::head}
+-} 1
++test html-2.1 {html::head, not enough args} -body {
++ html::head
++} -returnCodes error -result {wrong # args: should be "html::head title"}
+
+-test html-2.2 {html::head} {
++test html-2.2 {html::head} -body {
+ html::head "The Title"
+-} "<html><head>\n\t<title>The Title</title>\n</head>\n"
++} -result "<html><head>\n\t<title>The Title</title>\n</head>\n"
+
+-test html-2.3 {html::head} {
++test html-2.3 {html::head} -body {
+ html::description "The Description"
+ html::keywords key word
+ html::author "Cathy Coder"
+ html::meta metakey metavalue
+ html::head "The Title"
+-} {<html><head>
++} -result {<html><head>
+ <title>The Title</title>
+ <!-- Cathy Coder -->
+ <meta name="description" content="The Description">
+@@ -73,24 +74,24 @@ test html-2.3 {html::head} {
+ </head>
+ }
+
+-test html-3.1 {html::title} {
+- catch html::title
+-} 1
++test html-3.1 {html::title, not enough args} -body {
++ html::title
++} -returnCodes error -result {wrong # args: should be "html::title title"}
+
+-test html-3.2 {html::title} {
++test html-3.2 {html::title} -body {
+ html::title "blah blah"
+-} "<title>blah blah</title>\n"
++} -result "<title>blah blah</title>\n"
+
+-test html-4.1 {html::getTitle} {
++test html-4.1 {html::getTitle} -body {
+ html::init
+ html::getTitle
+-} ""
++} -result ""
+
+-test html-4.2 {html::getTitle} {
++test html-4.2 {html::getTitle} -body {
+ html::init
+ html::title "blah blah"
+ html::getTitle
+-} {blah blah}
++} -result {blah blah}
+
+ test html-5.1 {html::meta} {
+ html::init
+@@ -453,6 +454,18 @@ test html-23.2 {html::textarea} {
+ } {<textarea name="info" cols="50" rows="8">The textarea value.</textarea>
+ }
+
++test html-23.3 {html::textarea, dangerous input} {
++ html::init {
++ textarea.cols 50
++ textarea.rows 8
++ }
++ ncgi::reset info=[ncgi::encode "</textarea><script>alert(1)</script>"]
++ ncgi::parse
++ html::textarea info
++} {<textarea name="info" cols="50" rows="8">&lt;/textarea&gt;&lt;script&gt;alert(1)&lt;/script&gt;</textarea>
++}
++
++
+ test html-24.1 {html::submit} {
+ catch {html::submit}
+ } {1}
+@@ -516,7 +529,6 @@ test html-26.4 {html::refresh} {
+ } {<html><head>
+ <title>title</title>
+ <meta http-equiv="Refresh" content="4">
+-
+ </head>
+ }
+ test html-26.5 {html::refresh} {
+@@ -526,7 +538,6 @@ test html-26.5 {html::refresh} {
+ } {<html><head>
+ <title>title</title>
+ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
+-
+ </head>
+ }
+
+@@ -794,6 +805,7 @@ test html-32.1 {single argument} {
+ set result [html::eval {set x [format 22]}]
+ list $result $x
+ } {{} 22}
++
+ test html-32.2 {multiple arguments} {
+ set a {$b}
+ set b xyzzy
+@@ -801,38 +813,146 @@ test html-32.2 {multiple arguments} {
+ set result [html::eval {set x [eval format $a]}]
+ list $result $x
+ } {{} xyzzy}
++
+ test html-32.3 {single argument} {
+ set x [list]
+ set y 1
+ set result [html::eval lappend x a b c d {$y} e f g]
+ list $result $x
+ } {{} {a b c d 1 e f g}}
+-test html-32.4 {error: not enough arguments} {catch html::eval} 1
+-test html-32.5 {error: not enough arguments} {
+- catch html::eval msg
+- set msg
+-} {wrong # args: should be "uplevel ?level? command ?arg ...?"}
+-test html-32.6 {error in eval'ed command} {
+- catch {html::eval {error "test error"}}
+-} 1
+-test html-32.7 {error in eval'ed command} {
+- catch {html::eval {error "test error"}} msg
+- set msg
+-} {test error}
+
++test html-32.4 {error: not enough arguments} -body {
++ html::eval
++} -returnCodes error -result {wrong # args: should be "uplevel ?level? command ?arg ...?"}
+
+-test html-33.0 {html::font} {
++test html-32.6 {error in eval'ed command} -body {
++ html::eval {error "test error"}
++} -returnCodes error -result {test error}
++
++test html-33.0 {html::font} -body {
+ html::font
+-} {}
++} -result {}
+
+-test html-33.1 {html::font} {
++test html-33.1 {html::font} -body {
+ html::font size=18
+-} {<font size=18>}
++} -result {<font size=18>}
+
+-
+-test html-34.0 {html::nl2br} {
++test html-34.0 {html::nl2br} -body {
+ html::nl2br "a\n\rb\nc\rd"
+-} {a<br>b<br>c<br>d}
++} -result {a<br>b<br>c<br>d}
+
++test html-34.1 {html::nl2br, ticket 1742078} -body {
++ html::nl2br "a\r\nb"
++} -result {a<br>b}
+
++# -------------------------------------------------------------------------
++
++test html-tkt3439702-35.0 {html::css, not enough arguments} -body {
++ html::css
++} -returnCodes error -result {wrong # args: should be "html::css href"}
++
++test html-tkt3439702-35.1 {html::css, too many arguments} -body {
++ html::css REF X
++} -returnCodes error -result {wrong # args: should be "html::css href"}
++
++test html-tkt3439702-35.2 {html::css, single ref} -setup {
++ html::css-clear
++} -body {
++ html::css "http://test.css"
++ string trim [html::head T]
++} -cleanup {
++ html::css-clear
++} -result "<html><head>\n\t<title>T</title>\n\t<meta http-equiv=\"Refresh\" content=\"9; url=http://www.scriptics.com\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"http://test.css\">\n</head>"
++
++test html-tkt3439702-35.3 {html::css, multiple ref} -setup {
++ html::css-clear
++} -body {
++ html::css "http://test1.css"
++ html::css "http://test2.css"
++ string trim [html::head T]
++} -cleanup {
++ html::css-clear
++} -result {<html><head>
++ <title>T</title>
++ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
++ <link rel="stylesheet" type="text/css" href="http://test1.css">
++ <link rel="stylesheet" type="text/css" href="http://test2.css">
++</head>}
++
++# -------------------------------------------------------------------------
++
++test html-tkt3439702-36.0 {html::js, not enough arguments} -body {
++ html::js
++} -returnCodes error -result {wrong # args: should be "html::js href"}
++
++test html-tkt3439702-36.1 {html::js, too many arguments} -body {
++ html::js REF X
++} -returnCodes error -result {wrong # args: should be "html::js href"}
++
++test html-tkt3439702-36.2 {html::js, single ref} -setup {
++ html::js-clear
++} -body {
++ html::js "http://test.js"
++ string trim [html::head T]
++} -cleanup {
++ html::js-clear
++} -result {<html><head>
++ <title>T</title>
++ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
++ <script language="javascript" type="text/javascript" src="http://test.js"></script>
++</head>}
++
++test html-tkt3439702-36.3 {html::js, multiple ref} -setup {
++ html::js-clear
++} -body {
++ html::js "http://test1.js"
++ html::js "http://test2.js"
++ string trim [html::head T]
++} -cleanup {
++ html::js-clear
++} -result {<html><head>
++ <title>T</title>
++ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
++ <script language="javascript" type="text/javascript" src="http://test1.js"></script>
++ <script language="javascript" type="text/javascript" src="http://test2.js"></script>
++</head>}
++
++test html-tkt3439702-37.0 {html::js, html::css, mixed} -setup {
++ html::css-clear
++ html::js-clear
++} -body {
++ html::css "http://test.css"
++ html::js "http://test.js"
++ string trim [html::head T]
++} -cleanup {
++ html::js-clear
++ html::css-clear
++} -result {<html><head>
++ <title>T</title>
++ <meta http-equiv="Refresh" content="9; url=http://www.scriptics.com">
++ <link rel="stylesheet" type="text/css" href="http://test.css">
++ <script language="javascript" type="text/javascript" src="http://test.js"></script>
++</head>}
++
++# -------------------------------------------------------------------------
++# TODO: html::css-clear, html::js-clear
++
++
++test html-tktafe4366e2e-38.0 {html::doctype, not enough args} -body {
++ html::doctype
++} -returnCodes error -result {wrong # args: should be "html::doctype arg"}
++
++test html-tktafe4366e2e-38.1 {html::doctype, too many args} -body {
++ html::doctype HTML401T X
++} -returnCodes error -result {wrong # args: should be "html::doctype arg"}
++
++test html-tktafe4366e2e-38.2 {html::doctype, unknown type} -body {
++ html::doctype HTML401TXXX
++} -returnCodes error -result {Unknown doctype "HTML401TXXX"}
++
++test html-tktafe4366e2e-38.3 {html::doctype} -body {
++ html::doctype HTML401T
++} -result {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">}
++
++# -------------------------------------------------------------------------
+ testsuiteCleanup
+diff --git a/modules/html/pkgIndex.tcl b/modules/html/pkgIndex.tcl
+index 88a71b2..9d91097 100644
+--- a/modules/html/pkgIndex.tcl
++++ b/modules/html/pkgIndex.tcl
+@@ -1,2 +1,2 @@
+ if {![package vsatisfies [package provide Tcl] 8.2]} {return}
+-package ifneeded html 1.4 [list source [file join $dir html.tcl]]
++package ifneeded html 1.4.4 [list source [file join $dir html.tcl]]
diff --git a/dev-tcltk/tcllib/files/tcllib-1.16-test.patch b/dev-tcltk/tcllib/files/tcllib-1.16-test.patch
new file mode 100644
index 000000000000..8b3c8ca25905
--- /dev/null
+++ b/dev-tcltk/tcllib/files/tcllib-1.16-test.patch
@@ -0,0 +1,81 @@
+ modules/clock/iso8601.test | 2 +-
+ modules/multiplexer/multiplexer.test | 2 +-
+ modules/snit/snit.test | 4 ++--
+ modules/struct/sets.testsuite | 2 +-
+ modules/uev/uevent.test | 2 +-
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/modules/clock/iso8601.test b/modules/clock/iso8601.test
+index 6fce938..a9db5b0 100644
+--- a/modules/clock/iso8601.test
++++ b/modules/clock/iso8601.test
+@@ -26,7 +26,7 @@ test clock-iso8601-1.0.1 {parse_date wrong\#args} -constraints {tcl8.6plus} -bod
+
+ test clock-iso8601-1.1 {parse_date, bad option} -body {
+ clock::iso8601 parse_date 1994-11-05 -foo x
+-} -returnCodes error -result {bad switch "-foo", must be -base, -format, -gmt, -locale or -timezone}
++} -returnCodes error -result {bad option "-foo", must be -base, -format, -gmt, -locale or -timezone}
+
+ # NOTE: While listed as legal, -format is NOT. This is because the
+ # command simply hands off to clock scan, and we are seeing its error
+diff --git a/modules/multiplexer/multiplexer.test b/modules/multiplexer/multiplexer.test
+index d778253..e5dfeff 100644
+--- a/modules/multiplexer/multiplexer.test
++++ b/modules/multiplexer/multiplexer.test
+@@ -189,7 +189,7 @@ proc DenyAccessFilter {chan clientaddress clientport} {
+ return -1
+ }
+
+-test multiplexer-5.2 {add access filter which denies access} {
++test multiplexer-5.2 {add access filter which denies access} {broken without network} {
+ set ::forever {}
+ set mp [multiplexer::create]
+ ${mp}::Init 37465
+diff --git a/modules/snit/snit.test b/modules/snit/snit.test
+index 66d7bd1..00c0769 100644
+--- a/modules/snit/snit.test
++++ b/modules/snit/snit.test
+@@ -783,7 +783,7 @@ test dtypemethod-1.6a {delegating unknown typemethod to existing typecomponent w
+ snit2
+ } -returnCodes {
+ error
+-} -result {unknown or ambiguous subcommand "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}
++} -result {unknown or ambiguous subcommand "foo": must be bytelength, cat, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}
+
+ test dtypemethod-1.7 {can't delegate local typemethod: order 1} -body {
+ type dog {
+@@ -3339,7 +3339,7 @@ test dmethod-1.6a {delegating unknown method to existing component with error} -
+ error
+ } -cleanup {
+ dog destroy
+-} -result {unknown or ambiguous subcommand "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}
++} -result {unknown or ambiguous subcommand "foo": must be bytelength, cat, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}
+
+ test dmethod-1.7 {can't delegate local method: order 1} -body {
+ type cat {
+diff --git a/modules/struct/sets.testsuite b/modules/struct/sets.testsuite
+index 29fd3ef..28a9dd6 100644
+--- a/modules/struct/sets.testsuite
++++ b/modules/struct/sets.testsuite
+@@ -13,7 +13,7 @@
+ test set-${impl}-1.0 {nothing} {
+ catch {setop} msg
+ set msg
+-} [Nothing]
++} {wrong # args: should be "::struct::set cmd ?arg ...?"}
+
+ test set-${impl}-1.1 {bogus} {
+ catch {setop foo} msg
+diff --git a/modules/uev/uevent.test b/modules/uev/uevent.test
+index 91754a7..6544112 100644
+--- a/modules/uev/uevent.test
++++ b/modules/uev/uevent.test
+@@ -453,7 +453,7 @@ test uevent-10.3 {watch events, watch after bind, glob} {
+ ::uevent::unbind $t4
+ ::uevent::watch::event::remove $tw
+ set res
+-} {bound TAG EX bound TAGX EX bound TAG E bound TAGX E unbound TAGX E unbound TAG E unbound TAGX EX unbound TAG EX}
++} {bound TAGX E bound TAGX EX bound TAG E bound TAG EX unbound TAGX E unbound TAG E unbound TAGX EX unbound TAG EX}
+
+ # -------------------------------------------------------------------------
+ rename EVENT {}
diff --git a/dev-tcltk/tcllib/metadata.xml b/dev-tcltk/tcllib/metadata.xml
new file mode 100644
index 000000000000..f5ca0ddf0adf
--- /dev/null
+++ b/dev-tcltk/tcllib/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tcllib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tcllib/tcllib-1.15-r2.ebuild b/dev-tcltk/tcllib/tcllib-1.15-r2.ebuild
new file mode 100644
index 000000000000..38fc5f78a415
--- /dev/null
+++ b/dev-tcltk/tcllib/tcllib-1.15-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils virtualx
+
+DESCRIPTION="Tcl Standard Library"
+HOMEPAGE="http://www.tcl.tk/software/tcllib/"
+SRC_URI="
+ https://dev.gentoo.org/~jlec/distfiles/${P}-manpage-rename.patch.xz
+ https://dev.gentoo.org/~jlec/distfiles/${P}-test.patch.xz
+ mirror://sourceforge/tcllib/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="examples"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="dev-lang/tcl:0="
+DEPEND="${RDEPEND}"
+
+DOCS=( DESCRIPTION.txt STATUS )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-tcl8.6-test.patch
+ "${WORKDIR}"/${P}-test.patch
+ "${WORKDIR}"/${P}-manpage-rename.patch
+ "${FILESDIR}"/${P}-XSS-vuln.patch
+)
+
+src_prepare() {
+ has_version ">=dev-lang/tcl-8.6" && \
+ PATCHES+=( "${FILESDIR}"/${P}-test.patch )
+ epatch "${PATCHES[@]}"
+}
+
+src_test() {
+ Xemake test_batch
+}
+
+src_install() {
+ default
+
+ dodoc devdoc/*.txt
+
+ dohtml devdoc/*.html
+ if use examples ; then
+ for f in $(find examples -type f); do
+ docinto $(dirname $f)
+ dodoc $f
+ done
+ fi
+}
diff --git a/dev-tcltk/tcllib/tcllib-1.16.ebuild b/dev-tcltk/tcllib/tcllib-1.16.ebuild
new file mode 100644
index 000000000000..4232724bc11a
--- /dev/null
+++ b/dev-tcltk/tcllib/tcllib-1.16.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils virtualx
+
+MY_PN=Tcllib
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Tcl Standard Library"
+HOMEPAGE="http://www.tcl.tk/software/tcllib/"
+SRC_URI="mirror://sourceforge//project/${PN}/${PN}/${PV}/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="examples"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="
+ dev-lang/tcl:0=
+ dev-tcltk/tdom
+ "
+DEPEND="${RDEPEND}"
+
+DOCS=( DESCRIPTION.txt STATUS )
+
+S="${WORKDIR}"/${MY_P}
+
+PATCHES=( "${FILESDIR}"/${P}-XSS-vuln.patch )
+
+src_prepare() {
+ has_version ">=dev-lang/tcl-8.6" && \
+ PATCHES+=( "${FILESDIR}"/${P}-test.patch )
+ epatch "${PATCHES[@]}"
+
+ sed \
+ -e '/testsNeedTcl/s:8.5:8.6:g' \
+ -i modules/tar/tar.test || die
+}
+
+src_test() {
+ Xemake test_batch
+}
+
+src_install() {
+ default
+
+ dodoc devdoc/*.txt
+
+ dohtml devdoc/*.html
+ if use examples ; then
+ for f in $(find examples -type f); do
+ docinto $(dirname $f)
+ dodoc $f
+ done
+ fi
+}
diff --git a/dev-tcltk/tclperl/Manifest b/dev-tcltk/tclperl/Manifest
new file mode 100644
index 000000000000..fa4ebeeb81f7
--- /dev/null
+++ b/dev-tcltk/tclperl/Manifest
@@ -0,0 +1,5 @@
+DIST tclperl-3.2.tar.bz2 11765 SHA256 3643915a2f3d51da4d6296d0b57d796163ba0358f65bc97da6c0ef5cccb26173 SHA512 aed6fb4b0275cf75e6024336e81e3cd1502d82ae697e79b6142d2f9b3cfb0891541cc585fa83d6219632f11d6eda43b141d009caf5fe7433b2b2ca92aa875c00 WHIRLPOOL a64d8b043f208cd4a76424920c3510baed0ceecb9b5308463e6d6739df4d89cb7b4bde13b69db0c65e9da653a41fa64ca78986eeabf9631720e18e8fd6571862
+EBUILD tclperl-3.2-r1.ebuild 915 SHA256 73713e2893284f8e420b5947f6a5bb87d7cec5ac434aaf59a2fba9d695173ba5 SHA512 aefa222e5c8b1c3dec21158a955e57bbb344f0aed7af2b07140fe1317beb1814379b563d35ff5fa43e554e107d470254daadadf436cef7da39a3349e883fc0db WHIRLPOOL 1a7c09e368dd0bfe623e3f8921b6f40b5c782fee82c440fa9358547e57867352f9f667346dce107400c030b1b0d0b6d7af48693ab2d2bc30c9e6870f493538e8
+MISC ChangeLog 2430 SHA256 24413bd896aab65620536f09d59109313b9784dab6234873b706bd6d9321c94a SHA512 d43f72a4839343c960526e8731e6e212de27b523540258edc7c998e08d75570c3ceb6fb8a2fcb9aec69f8794c534caddda2b85ff4d113bef7b6dcf49fcb43e45 WHIRLPOOL da33f110958520ae672959d9a715a45264a9097c40ce26003f2dfb9b51bb7f5f6a4c1b91b365ac63e2eabdd36bbc5e33b4a998441fc6afa68272d75686079e39
+MISC ChangeLog-2015 1698 SHA256 79cf6755f69428acafaf1b34a850d1cca3b2941722c8e788a80bae992b652618 SHA512 9e50cf3ac81c04de5ef2c662a51822efdfd860696e1d7ab04cc874721647c0c082f6b66385a04e58aa128c84cfb8c1e778bda640da4fbbfc77b25f0b2b3a701d WHIRLPOOL c57ca7563c1a9905f4349a671f194822033aeb5cafbd131ee88365748ab8b3bf955784087c727cea5bb77282bd52abb685dd86c2760b5da7d32ef67229a379e9
+MISC metadata.xml 259 SHA256 f3ad7890286839b12dc011613c2ba3df199a206c295ba8c433a8fe7f0dcc5815 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639 WHIRLPOOL f5ad746e91e08e44d2d857057d7203fe515cbdd295f69a2d3ce2cb35343d2dc3f2879b57d00e8782bd416bfd36ce4504a7a91bbcf325eabe71075d0726e2bece
diff --git a/dev-tcltk/tclperl/metadata.xml b/dev-tcltk/tclperl/metadata.xml
new file mode 100644
index 000000000000..227dda5ba584
--- /dev/null
+++ b/dev-tcltk/tclperl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/tclperl/tclperl-3.2-r1.ebuild b/dev-tcltk/tclperl/tclperl-3.2-r1.ebuild
new file mode 100644
index 000000000000..b151af67051a
--- /dev/null
+++ b/dev-tcltk/tclperl/tclperl-3.2-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Perl package for Tcl"
+HOMEPAGE="http://jfontain.free.fr/tclperl.htm"
+SRC_URI="http://jfontain.free.fr/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="
+ >=dev-lang/tcl-8.3.3:0
+ >=dev-lang/perl-5.6.0"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ append-flags -fPIC
+
+ # ./build.sh
+ perl Makefile.PL || die
+ emake OPTIMIZE="${CFLAGS}" Tcl.o
+
+ $(tc-getCC) -shared ${LDFLAGS} ${CFLAGS} -o tclperl.so.${PV} -DUSE_TCL_STUBS \
+ tclperl.c tclthread.c `perl -MExtUtils::Embed -e ccopts -e ldopts` \
+ /usr/$(get_libdir)/libtclstub`echo 'puts $tcl_version' | tclsh`.a Tcl.o || die
+}
+
+src_install() {
+ exeinto /usr/$(get_libdir)/${P}
+ doexe tclperl.so.${PV}
+ doexe pkgIndex.tcl
+
+ dodoc CHANGES README
+ dohtml tclperl.htm
+}
diff --git a/dev-tcltk/tclpython/Manifest b/dev-tcltk/tclpython/Manifest
new file mode 100644
index 000000000000..c4bac1205bcb
--- /dev/null
+++ b/dev-tcltk/tclpython/Manifest
@@ -0,0 +1,7 @@
+AUX tclpython-4.1-python-3.patch 8863 SHA256 0a709c1677a9a25d2e0d208b5dacbdc3bbea59e1f60dd3f4d136ee6a876b9d73 SHA512 530d057501ef72e7f28cfff1f0af2076b93739085154fc4d20a5b59b26e33d1418bf694093b05e840055734438232dd9414ba0262720fb4bd2e35249769b24e7 WHIRLPOOL c3873f256891466ada9248fc85e806cf213fa0ed85c1a60d973a86260db6063cace03dc28d975926886341be59b8add95213ab3b501815021e668de7a01c9158
+DIST tclpython-4.1.tar.bz2 10580 SHA256 663e0e9e16875fda8e98fd8c74108475062b5e96dcf7145b46142b16c289db50 SHA512 5f08e7129a7d9afeb1ac6bf1ab1c83ad3bb481593c9516c0653c7b4ba0dfb1b3129a336e64b998cec8ef2d2377a6a366b73c640d25839ab280d5079c0b220d54 WHIRLPOOL a3535555eb314dd19f54628135053c4eac0a9cb79cc1be7cca3b8f861c826438765fa98513fc7f7ac3271fd4fef7f9f70e036421a5b7991035b328b63239ba03
+EBUILD tclpython-4.1-r4.ebuild 1264 SHA256 43c679992eb8eb8d2cd3cc18da39eddead32df1300cd2ab98eeebf76524cbc88 SHA512 7041ef994f59b536fca064a5aaf455ba1a7e67b0a96e9e619b7d47f493f875eed5275816b94f56fe3a82f53dbaaf530cca12b16e9eeca6aae704b2b4e1377900 WHIRLPOOL 131381262b8a3646dd9660ad8ccef840ac68028f111baba20dce3d2652dda8a9d5c50a23f5a311336c4c2095e790e7e1efc6268b9916a63991cf6f441da8ee8c
+EBUILD tclpython-4.1-r6.ebuild 1296 SHA256 d3da02e0d98f721cc1218eee094d864894995d77514a06e8920a16a0b9a1e0fd SHA512 ea7b582fbc1796eaaf6195868f1c31c2fdef6d7fe1c7df87437fafc0a48e86110dda9a80dd34b40347356d0cfe4ec58d2021bdd396f23ddeac8914f1bf216c5c WHIRLPOOL 9c39e973745acb46d35170859d168a427c33cf55632bb75daa3b2d78baf2b15e75ee566c8e68c2152e82a8e46e875b4617627c617ee91e16b9bce4ba23af9044
+MISC ChangeLog 3452 SHA256 b6b423d01ed885ae381de0b096851ab72c9cd0182efd8d6411cb242f5948d085 SHA512 263ba28c1a2d16f0c4197413a7c1619fb89c8404112cba040884ba70fa85928ed13e96ba20c16dfb82694d7f79c71630c666907b94edad8f3f354a3523e4ef5c WHIRLPOOL 5134afbd933fbba070bc40a8bee13671801055647fb3ca4e29385ccc6f7b0229f2a793f8a2924b25820a32f24f88c3ae4ab8014cff286593c34058b04ca37f7e
+MISC ChangeLog-2015 3237 SHA256 196b9fc428edfaeef69d3a9d6a50f51e36b7c2c02084a3f808860df8ff93036c SHA512 7034d0903fb37720b62b0e75b8e13183a0cce6362ded434f395200d526dbd7387114a850907b160f00963cc70fd60d25210abb3fc4fd3296cbcb79a77cee3e99 WHIRLPOOL ed5f4bf9405eb675f773017ba568dae3ab4f47396453d6820d96b54ec17c2799c2c87f47dc31a4f72e7d9c96bfc794d77a53e75bb43a7a412033ab81ca08095f
+MISC metadata.xml 259 SHA256 f3ad7890286839b12dc011613c2ba3df199a206c295ba8c433a8fe7f0dcc5815 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639 WHIRLPOOL f5ad746e91e08e44d2d857057d7203fe515cbdd295f69a2d3ce2cb35343d2dc3f2879b57d00e8782bd416bfd36ce4504a7a91bbcf325eabe71075d0726e2bece
diff --git a/dev-tcltk/tclpython/files/tclpython-4.1-python-3.patch b/dev-tcltk/tclpython/files/tclpython-4.1-python-3.patch
new file mode 100644
index 000000000000..2a26f647c10e
--- /dev/null
+++ b/dev-tcltk/tclpython/files/tclpython-4.1-python-3.patch
@@ -0,0 +1,229 @@
+--- a/tclpython.c 2006-03-07 16:28:03.000000000 +0300
++++ b/tclpython.c 2014-05-06 23:33:41.713623943 +0400
+@@ -19,13 +19,83 @@
+ $ cc -fpic -I/usr/local/include/tcltk/tcl8.3 -c tclthread.c
+ $ ld -o tclpython.so -Bshareable -L/usr/X11R6/lib -L/usr/local/lib -L/usr/local/share/python/config tclpython.o tclthread.o -lpython -lutil -lreadline -ltermcap -lcrypt -lgmp -lgdbm -lpq -lz -ltcl83 -ltk83 -lX11
+
++Patched for Python 3 with respect to https://github.com/facebook/fbthrift/blob/master/thrift/lib/py/protocol/fastbinary.c
++
+ */
+
+ #include <Python.h>
+ #include <tcl.h>
+-#include <cStringIO.h>
++
++#if PY_MAJOR_VERSION >= 3
++ #define PyInt_FromLong PyLong_FromLong
++ #define PyInt_AsLong PyLong_AsLong
++ #define PyString_FromStringAndSize PyBytes_FromStringAndSize
++#else
++ #include <cStringIO.h>
++#endif
++
+ #include "tclpython.h"
+
++// Mostly copied from cStringIO.c
++#if PY_MAJOR_VERSION >= 3
++
++/** io module in python3. */
++static PyObject* Python3IO;
++
++typedef struct {
++ PyObject_HEAD
++ char *buf;
++ Py_ssize_t pos, string_size;
++} IOobject;
++
++#define IOOOBJECT(O) ((IOobject*)(O))
++
++static int
++IO__opencheck(IOobject *self) {
++ if (!self->buf) {
++ PyErr_SetString(PyExc_ValueError,
++ "I/O operation on closed file");
++ return 0;
++ }
++ return 1;
++}
++
++static PyObject *
++IO_cgetval(PyObject *self) {
++ if (!IO__opencheck(IOOOBJECT(self))) return NULL;
++ assert(IOOOBJECT(self)->pos >= 0);
++ return PyBytes_FromStringAndSize(((IOobject*)self)->buf,
++ ((IOobject*)self)->pos);
++}
++#endif
++
++/* -- PYTHON MODULE SETUP STUFF --- */
++
++static PyObject *pythonTclEvaluate(PyObject *self, PyObject *args);
++
++static PyMethodDef tclMethods[] = {
++ {"eval", pythonTclEvaluate, METH_VARARGS, "Evaluate a Tcl script."},
++ {0, 0, 0, 0} /* sentinel */
++};
++
++#if PY_MAJOR_VERSION >= 3
++struct module_state {
++ PyObject *error;
++};
++
++static struct PyModuleDef TclModuleDef = {
++ PyModuleDef_HEAD_INIT,
++ "tcl",
++ NULL,
++ sizeof(struct module_state),
++ tclMethods,
++ NULL,
++ NULL,
++ NULL,
++ NULL
++};
++#endif
++
+ #ifndef WIN32
+ /* George Petasis, 21 Feb 2006:
+ * The following check cannot be handled correctly
+@@ -66,13 +136,13 @@
+
+ static int pythonInterpreter(ClientData clientData, Tcl_Interp *interpreter, int numberOfArguments, Tcl_Obj * CONST arguments[])
+ {
+- int identifier;
++ intptr_t identifier;
+ PyObject *output;
+ PyObject *message;
+ PyObject *result;
+ PyObject *globals;
+ char *string = 0;
+- int length;
++ Py_ssize_t length;
+ Tcl_Obj *object;
+ struct Tcl_HashEntry *entry;
+ unsigned evaluate;
+@@ -111,12 +181,22 @@
+ /* choose start token depending on whether this is an evaluation or an execution: */
+ result = PyRun_String(Tcl_GetString(arguments[2]), (evaluate? Py_eval_input: Py_file_input), globals, globals);
+ if (result == 0) { /* an error occured */
++#if PY_MAJOR_VERSION >= 3
++ output = PyObject_CallMethod(Python3IO, "BytesIO", "()");
++#else
+ output = PycStringIO->NewOutput(1024); /* use a reasonable initial size but big enough to handle most cases */
+- PySys_SetObject("stderr", output); /* capture all interpreter error output */
++#endif
++ PySys_SetObject("sys.stderr", output); /* capture all interpreter error output */
+ PyErr_Print(); /* so that error is printed on standard error, redirected above */
++#if PY_MAJOR_VERSION >= 3
++ message = IO_cgetval(output);
++ string = PyBytes_AsString(message);
++ length = (string == NULL) ? 0 : strlen(string);
++#else
+ message = PycStringIO->cgetvalue(output);
+ string = PyString_AsString(message);
+ length = PyString_Size(message);
++#endif
+ if ((length > 0) && (string[length - 1] == '\n')) length--; /* eventually remove trailing new line character */
+ object = Tcl_NewObj();
+ Tcl_AppendStringsToObj(object, Tcl_GetString(arguments[0]), ": ", 0); /* identify interpreter in error */
+@@ -124,7 +204,11 @@
+ Py_DECREF(output);
+ } else {
+ if (evaluate) {
++#if PY_MAJOR_VERSION >= 3
++ string = PyUnicode_AsUTF8(PyObject_Str(result));
++#else
+ string = PyString_AsString(PyObject_Str(result));
++#endif
+ object = Tcl_NewStringObj(string, -1); /* return evaluation result */
+ } else /* execute */
+ object = Tcl_NewObj(); /* always return an empty result or an error */
+@@ -139,9 +223,9 @@
+
+ Tcl_Interp *tclInterpreter(CONST char *name) /* public function for use in extensions to this extension */
+ {
+- int identifier;
++ intptr_t identifier;
+
+- if ((sscanf(name, "tcl%u", &identifier) == 0) || (identifier != 0)) {
++ if ((sscanf(name, "tcl%lu", &identifier) == 0) || (identifier != 0)) {
+ return 0; /* invalid name */
+ } else {
+ return mainInterpreter; /* sole available interpreter */
+@@ -188,14 +272,9 @@
+ return Py_BuildValue("s", result);
+ }
+
+-static PyMethodDef tclMethods[] = {
+- {"eval", pythonTclEvaluate, METH_VARARGS, "Evaluate a Tcl script."},
+- {0, 0, 0, 0} /* sentinel */
+-};
+-
+ static int newInterpreter(Tcl_Interp *interpreter)
+ {
+- int identifier;
++ intptr_t identifier;
+ Tcl_Obj *object;
+ int created;
+ #ifdef WITH_THREAD
+@@ -214,19 +293,31 @@
+ return TCL_ERROR;
+ } else {
+ Py_Initialize(); /* initialize main interpreter */
++#if PY_MAJOR_VERSION >= 3
++ Python3IO = PyImport_ImportModule("io");
++#else
+ PycString_IMPORT;
++#endif
+ }
+ Tcl_SetHashValue(Tcl_CreateHashEntry(&threadStates, (ClientData)identifier, &created), 0);
+ #else
+ if (existingInterpreters == 0) {
+ Py_Initialize(); /* initialize main interpreter */
+ PyEval_InitThreads(); /* initialize and acquire the global interpreter lock */
++#if PY_MAJOR_VERSION >= 3
++ Python3IO = PyImport_ImportModule("io");
++#else
+ PycString_IMPORT;
++#endif
+ globalState = PyThreadState_Swap(0); /* save the global thread */
+ } else {
+ PyEval_AcquireLock(); /* needed in order to be able to create a new interpreter */
+ }
++#if PY_MAJOR_VERSION >= 3
++ if (Python3IO == 0) { /* make sure string input/output is properly initialized */
++#else
+ if (PycStringIO == 0) { /* make sure string input/output is properly initialized */
++#endif
+ Tcl_SetResult(interpreter, "fatal error: could not initialize Python string input/output module", TCL_STATIC);
+ return TCL_ERROR;
+ }
+@@ -250,7 +341,11 @@
+ newIdentifier++;
+ #endif
+ existingInterpreters++;
++#if PY_MAJOR_VERSION >= 3
++ tcl = PyModule_Create(&TclModuleDef);
++#else
+ tcl = Py_InitModule("tcl", tclMethods); /* add a new 'tcl' module to the python interpreter */
++#endif
+ Py_INCREF(tcl);
+ PyModule_AddObject(PyImport_AddModule("__builtin__"), "tcl", tcl);
+ return TCL_OK;
+@@ -260,7 +355,7 @@
+ {
+ int index;
+ char *name;
+- int identifier;
++ intptr_t identifier;
+ struct Tcl_HashEntry *entry;
+ Tcl_Obj *object;
+ #ifdef WITH_THREAD
+@@ -270,7 +365,7 @@
+ for (index = 0; index < numberOfArguments; index++) {
+ name = Tcl_GetString(arguments[index]); /* interpreter name is "pythonN" */
+ entry = 0;
+- if (sscanf(name, "python%u", &identifier) == 1) {
++ if (sscanf(name, "python%lu", &identifier) == 1) {
+ identifier = atoi(name + 6);
+ entry = Tcl_FindHashEntry(&threadStates, (ClientData)identifier);
+ }
diff --git a/dev-tcltk/tclpython/metadata.xml b/dev-tcltk/tclpython/metadata.xml
new file mode 100644
index 000000000000..227dda5ba584
--- /dev/null
+++ b/dev-tcltk/tclpython/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/tclpython/tclpython-4.1-r4.ebuild b/dev-tcltk/tclpython/tclpython-4.1-r4.ebuild
new file mode 100644
index 000000000000..d76649cf5f20
--- /dev/null
+++ b/dev-tcltk/tclpython/tclpython-4.1-r4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4} )
+
+inherit eutils multilib python-single-r1 toolchain-funcs
+
+DESCRIPTION="Python package for Tcl"
+HOMEPAGE="http://jfontain.free.fr/tclpython.htm"
+SRC_URI="http://jfontain.free.fr/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ dev-lang/tcl:0="
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-python-3.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+}
+
+src_compile() {
+ local cfile="tclpython tclthread"
+ for src in ${cfile}; do
+ compile="$(tc-getCC) -shared -fPIC ${CFLAGS} -I$(python_get_includedir) -c ${src}.c"
+ einfo "${compile}"
+ eval "${compile}" || die
+ done
+
+ link="$(tc-getCC) -fPIC -shared ${LDFLAGS} -o tclpython.so.${PV} tclpython.o tclthread.o -lpthread -lutil $(python_get_LIBS) -ltcl"
+ einfo "${link}"
+ eval "${link}" || die
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/tclpython
+ doins tclpython.so.${PV} pkgIndex.tcl
+ fperms 775 /usr/$(get_libdir)/tclpython/tclpython.so.${PV}
+ dosym tclpython.so.${PV} /usr/$(get_libdir)/tclpython/tclpython.so
+
+ dodoc CHANGES INSTALL README
+ dohtml tclpython.htm
+}
diff --git a/dev-tcltk/tclpython/tclpython-4.1-r6.ebuild b/dev-tcltk/tclpython/tclpython-4.1-r6.ebuild
new file mode 100644
index 000000000000..6359b225c9ff
--- /dev/null
+++ b/dev-tcltk/tclpython/tclpython-4.1-r6.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit eutils multilib python-single-r1 toolchain-funcs
+
+DESCRIPTION="Python package for Tcl"
+HOMEPAGE="http://jfontain.free.fr/tclpython.htm"
+SRC_URI="http://jfontain.free.fr/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ dev-lang/tcl:0=
+ sys-libs/binutils-libs"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-python-3.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+}
+
+src_compile() {
+ local cfile="tclpython tclthread"
+ for src in ${cfile}; do
+ compile="$(tc-getCC) -shared -fPIC ${CFLAGS} -I$(python_get_includedir) -c ${src}.c"
+ einfo "${compile}"
+ eval "${compile}" || die
+ done
+
+ link="$(tc-getCC) -fPIC -shared ${LDFLAGS} -o tclpython.so.${PV} tclpython.o tclthread.o -lpthread -lutil $(python_get_LIBS) -ltcl"
+ einfo "${link}"
+ eval "${link}" || die
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/tclpython
+ doins tclpython.so.${PV} pkgIndex.tcl
+ fperms 775 /usr/$(get_libdir)/tclpython/tclpython.so.${PV}
+ dosym tclpython.so.${PV} /usr/$(get_libdir)/tclpython/tclpython.so
+
+ dodoc CHANGES INSTALL README
+ dohtml tclpython.htm
+}
diff --git a/dev-tcltk/tclreadline/Manifest b/dev-tcltk/tclreadline/Manifest
new file mode 100644
index 000000000000..4beb0e9a555c
--- /dev/null
+++ b/dev-tcltk/tclreadline/Manifest
@@ -0,0 +1,11 @@
+AUX tclreadline-2.1.0-alloc-free.patch 3421 SHA256 41e52a17ab8869dafcb3be290611300853946d5475a8a0ab1ab19698acfa7ed2 SHA512 52456ed9de43f7a6e646ded04a814e895d40db53ec3c7ce28a9be0eba16d52ebdc7e8eaff76ffc6b7db1db29b8bb0d58908c188fdcf2b2689e28db40046d3517 WHIRLPOOL 10b84b79ceb2c42c60e7436ab7fc4d94e1b4c31d73507309ca9c2d0aea72aa7246a5d89871a0e5b530ed12232b8d52ec9555698e7defe2ebfbd316f988ab0d07
+AUX tclreadline-2.1.0-gold.patch 458 SHA256 c36f826c374dfdbe6411d5e13fbd9d90d42f18c0e72f3032ae23bd5348188598 SHA512 91bbf2eb167c33faa02e998bd83da06e3b1e28832700ff79458a2bbc1620920e749985ec6780254a7016e931cca094205224aa3ea3a95effb12dafc1fe9fca45 WHIRLPOOL 09d616f692fd0c9deafc5c6f2508a32d8dfe9169dae4a48474a6301b9ad408305a87204b1785682747a7a8204aaa45330a11833585fce3f95a09dbfa33f4d366
+AUX tclreadline-2.1.0-rl-executing-macro.patch 3788 SHA256 b27758352df46d77829e9aa97883e18f36f548f162ae8ef30266f78b66da8280 SHA512 f7ba38320c7095b4a8450e24a3ed1a75af6dcd7791c17b5546b36faeb5391b00f389a353838f8ea2b81b25f5d9c5ca1b6ccf7db5e6a30d2e304691db42da67dc WHIRLPOOL cd2f78f9987d5c5dba0999861c2d3242f6a43557bc00ad0bf47d7b63b491c057d0823198dc663f868920b9b1fbd2658b9b5a4bd42adb1b6ac38d5616e8aab6b6
+AUX tclreadline-2.1.0-rl-history-expand.patch 969 SHA256 ba37a9354f8ea8f5562d279989248bd6bfa33482b8aeff253fad3d37b360ccb0 SHA512 a015a56413c683e2a41e912891138494f43fd12b5383f9514314d87c9cc353cd95a2ea515978b4d1b0c60d4ab1cc0d1d16d982825949e338c0ac69e84e114304 WHIRLPOOL fd49666ced0c28da88ea80841e9b6f45f6bb719c9c92eed2662a3951a2e2ad27e8146618c90fc44dbeba4d7716e34c84ae2d7ff9bf7fe06827abe36ad7e6e2fc
+AUX tclreadline-2.1.0-rl-prompt.patch 463 SHA256 7dda1f9eebb9be2cf88f141a10d64e91d8dc7a21184d93813e209b77c3f1cd10 SHA512 b547e2077861d39701ed53b485f9758c8e0a636ecba7abfc25aa3fabeaa1337c6e48a08ba51425b95a55bae4021c2aa17e66686ee3836eb31cb6b4d115508073 WHIRLPOOL 1d038a2d5df457cc317bfe6b7f498734d55905b41e6eacb2792dc0fa6f256b855394d5a634048db52ed4c5ab1383588ef5014f21baad8a170a5b110330b005b3
+DIST tclreadline-2.1.0.tar.gz 160541 SHA256 def2325e45e2b7f30b04ad5078481740596599622c253043c503c2285f5672e7 SHA512 bd67a65fe2ec708834fb67fabf2e36e778a6aeeb7a7b69cda298f9e18acc9e03f3a379f81ff7d2d289bfbf1093bc86fecbf96fe5d04a2ca954899cc7df6fe4bf WHIRLPOOL 89680ffcfea123d2032e4948788164d57e7fa90c05b16d838edbd0fd8916b34f934acd785ae8bc5313f4391779f3b15b31924ef8c4e925f6443a3022b00de036
+DIST tclreadline_2.1.0-12.debian.tar.gz 9636 SHA256 3a9144fc6b46834cc7d555b5f05cf29f00132594b137d23a0dc4f8cde976daf4 SHA512 293e9ad14a469891f68b25caa78a99874de87df4c44af4ada7528cf74e898be42b7846fbb6eeabb2dec34995a9ccd9707c61f406b90b90dbca2c24df05f451eb WHIRLPOOL dfb7f739ea9edd98cf01166e38d759eb97d83da554737d5f908025661823eb0ed68beef6b038a2bc4fe14377abcdff7d69d1343c08e7bb1f62a1fdaa4ecb09c7
+EBUILD tclreadline-2.1.0-r4.ebuild 1848 SHA256 7875855d2d8e16a6ef52c012261ae04b1d8b0fe7962c56618554ae0b9e8ab836 SHA512 456559f0eea55eb24fcda7dee42b5fc153ed229869ab846350898cdf2da92c3e3c8776db20f5064665240d1720277b78619b8670bc590da9f25e0f9f4da4bbc0 WHIRLPOOL 537516e574fb778700ccebb142f2d105a2a864eff9819a0d083ef19d990516f8568af5dc7f90fe09b5a69cc3cdfc3e842c265d2afd5e8acc5342666c790df790
+MISC ChangeLog 2679 SHA256 d2c04ed68cdf70e9faf747877a147d1ae59ce8d65498143f3e1bcf270bc48f1e SHA512 1f9048658c834795ae6458a3609e867fc635bbba9352b6c8c464b84a2bb6c3ff4f578ab5fc2aef29ffbda575118de3809d1562c83453af39bdc9bceeb5e70289 WHIRLPOOL 87bdb2e40c7c43b68ab574600bed67e02a54b9d58c41b8d907cf1f467ed208276c56d9abf6bd47a61b29eed7021aaf1af191d1117a170bd527f63ea9e91ec4ae
+MISC ChangeLog-2015 4551 SHA256 ddb1f4dbb017d0188b521eae8224e32320857255a5f282e988f5eb119d16980a SHA512 f85a0a36c3c25960f62b2055f57f7af16ecf626c6d738b3e65a0b50482db421899a4d18e8aa824d629786a2edf461a7c6e8b932185a1c6a602d5de194e86d260 WHIRLPOOL 26e3d64afbc62c8de77f86464c66b7d933078250a24a0c9999005b89bc8be4981b3b34d0d72e925d3188d61c42996458c44e2f64081945f9645c3a2b70dcf4f5
+MISC metadata.xml 334 SHA256 b908cc51f6586a24648b0029eb03dd4784fe521e780e1050ac80c33f4f77ef65 SHA512 23517fbebe1eedf4558ec1c04e10774229762eb7279d0bda99f602fac526afd817968bbff0ba23a1ef433684afda85f830ed7f5643b7c9cca22e7d2f66f71691 WHIRLPOOL ba211c3420da6f22ffb41f68d79da72061b3d2cfc9f2e271d850ffcf5e29f48c7aaa77bb9d0bb01ac4657fba6e32061d92b88c27da5d9c0c4cfc263e1d33c7b6
diff --git a/dev-tcltk/tclreadline/files/tclreadline-2.1.0-alloc-free.patch b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-alloc-free.patch
new file mode 100644
index 000000000000..6694c29f6042
--- /dev/null
+++ b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-alloc-free.patch
@@ -0,0 +1,121 @@
+diff -ur a/tclreadline.c b/tclreadline.c
+--- a/tclreadline.c 2000-09-20 19:44:34.000000000 +0200
++++ b/tclreadline.c 2013-11-18 10:35:13.889610060 +0100
+@@ -343,7 +343,9 @@
+ return TCL_ERROR;
+ } else if (3 == objc) {
+- if (tclrl_custom_completer)
++ if (tclrl_custom_completer) {
+- FREE(tclrl_custom_completer);
++ free(tclrl_custom_completer);
++ tclrl_custom_completer = NULL;
++ }
+ if (!blank_line(Tcl_GetStringFromObj(objv[2], 0)))
+ tclrl_custom_completer =
+ stripwhite(strdup(Tcl_GetStringFromObj(objv[2], 0)));
+@@ -378,7 +380,9 @@
+ return TCL_ERROR;
+ } else if (3 == objc) {
+- if (tclrl_eof_string)
++ if (tclrl_eof_string) {
+- FREE(tclrl_eof_string);
++ free(tclrl_eof_string);
++ tclrl_eof_string = NULL;
++ }
+ if (!blank_line(Tcl_GetStringFromObj(objv[2], 0)))
+ tclrl_eof_string =
+ stripwhite(strdup(Tcl_GetStringFromObj(objv[2], 0)));
+@@ -506,10 +510,16 @@
+ if (status >= 1) {
+ /* TODO: make this a valid tcl output */
+ printf("%s\n", expansion);
++ free(ptr);
++ free(expansion);
++ return;
+ } else if (-1 == status) {
+ Tcl_AppendResult
+ (tclrl_interp, "error in history expansion\n", (char*) NULL);
+ TclReadlineTerminate(TCL_ERROR);
++ free(ptr);
++ free(expansion);
++ return;
+ }
+ /**
+ * TODO: status == 2 ...
+@@ -544,8 +554,8 @@
+ * tell the calling routines to terminate.
+ */
+ TclReadlineTerminate(LINE_COMPLETE);
+- FREE(ptr);
+- FREE(expansion);
++ free(ptr);
++ free(expansion);
+ }
+ }
+
+@@ -673,7 +683,7 @@
+ strcpy(rl_line_buffer, expansion);
+ rl_end = strlen(expansion);
+ rl_point += strlen(expansion) - oldlen;
+- FREE(expansion);
++ free(expansion);
+ /*
+ * TODO:
+ * because we return 0 == matches,
+@@ -682,7 +690,8 @@
+ */
+ return matches;
+ }
+- FREE(expansion);
++ free(expansion);
++ expansion = NULL;
+ }
+
+ if (tclrl_custom_completer) {
+@@ -699,15 +710,19 @@
+ state = Tcl_VarEval(tclrl_interp, tclrl_custom_completer,
+ " \"", quoted_text, "\" ", start_s, " ", end_s,
+ " \"", quoted_rl_line_buffer, "\"", (char*) NULL);
+- FREE(quoted_text);
+- FREE(quoted_rl_line_buffer);
+ if (TCL_OK != state) {
+ Tcl_AppendResult (tclrl_interp, " `", tclrl_custom_completer,
+ " \"", quoted_text, "\" ", start_s, " ", end_s,
+ " \"", quoted_rl_line_buffer, "\"' failed.", (char*) NULL);
+ TclReadlineTerminate(state);
++ free(quoted_text);
++ free(quoted_rl_line_buffer);
+ return matches;
+ }
++ free(quoted_text);
++ quoted_text = NULL;
++ free(quoted_rl_line_buffer);
++ quoted_rl_line_buffer = NULL;
+ obj = Tcl_GetObjResult(tclrl_interp);
+ status = Tcl_ListObjGetElements(tclrl_interp, obj, &objc, &objv);
+ if (TCL_OK != status)
+@@ -715,12 +732,12 @@
+
+ if (objc) {
+ int i, length;
+- matches = (char**) MALLOC(sizeof(char*) * (objc + 1));
++ matches = (char**) malloc(sizeof(char*) * (objc + 1));
+ for (i = 0; i < objc; i++) {
+ matches[i] = strdup(Tcl_GetStringFromObj(objv[i], &length));
+ if (1 == objc && !strlen(matches[i])) {
+- FREE(matches[i]);
++ free(matches[i]);
+- FREE(matches);
++ free(matches);
+ Tcl_ResetResult(tclrl_interp); /* clear result space */
+ return (char**) NULL;
+ }
+@@ -735,7 +752,7 @@
+ */
+ if (2 == objc && !strlen(matches[1])) {
+ i--;
+- FREE(matches[1]);
++ free(matches[1]);
+ rl_completion_append_character = '\0';
+ }
+
diff --git a/dev-tcltk/tclreadline/files/tclreadline-2.1.0-gold.patch b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-gold.patch
new file mode 100644
index 000000000000..5550c89879c8
--- /dev/null
+++ b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-gold.patch
@@ -0,0 +1,15 @@
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 68d78f1..03dbf06 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -20,6 +20,7 @@ include_HEADERS = tclreadline.h
+ INCLUDES = -I$(TCL_INCLUDE_DIR) -I$(READLINE_INCLUDE_DIR)
+
+ ## libtclreadline_la_LIBADD = $(LIBS)
++libtclreadline_la_LIBADD = $(TCL_LIB_SPEC) -lreadline
+ libtclreadline_la_LDFLAGS = -release $(MAJOR).$(MINOR).$(PATCHLEVEL)
+
+ tclrldir = @TCLRL_DIR@
diff --git a/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-executing-macro.patch b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-executing-macro.patch
new file mode 100644
index 000000000000..683622e0d54c
--- /dev/null
+++ b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-executing-macro.patch
@@ -0,0 +1,128 @@
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac 2000-12-08 01:45:45.000000000 +0100
++++ b/configure.ac 2013-11-15 13:37:36.490520853 +0100
+@@ -182,29 +182,36 @@
+ [ --with-readline-library=DIR
+ lib spec to readline (e.g. '-L/usr/local/lib -lreadline')],
+ LIBS="$LIBS $withval",
+- AC_CHECK_LIB(readline, rl_callback_read_char, ,
+- AC_MSG_RESULT([
+- Your readline version does not support readline's alternate interface.
+- Please upgrade to readline >= 2.2 and retry.
+- ])
+- exit
++ AC_SEARCH_LIBS(rl_callback_read_char, readline, ,
++ AC_MSG_RESULT([
++ Your readline version does not support readline's alternate interface.
++ Please upgrade to readline >= 2.2 and retry.
++ ])
++ exit
+ )
+ )
+
+
+
+-# check for readline's (macro.c) private variable
+-# _rl_executing_macro.
++# check for readline's rl_executing_macro
++# (could be macro.c's private variable _rl_executing_macro).
+
+-AC_MSG_CHECKING([for _rl_executing_macro in -lreadline])
+-AC_TRY_LINK(,[
++AC_CHECK_DECL(rl_executing_macro
++, AC_DEFINE(EXECUTING_MACRO_NAME, rl_executing_macro,
++ [ Define the name of the executing macro variable in libreadline. ])
++, AC_MSG_CHECKING([for _rl_executing_macro in -lreadline])
++ AC_TRY_LINK(,[
+ extern char* _rl_executing_macro;
+ _rl_executing_macro = (char*) 0;
+-],
+- AC_MSG_RESULT(yes);
++ ]
++ , AC_MSG_RESULT(yes)
+ AC_DEFINE(EXECUTING_MACRO_HACK, 1,
+- [ Define if _rl_executing_macro is resolved in libreadline. ]),
+- AC_MSG_RESULT(no))
++ [ Define if EXECUTING_MACRO_NAME is resolved in libreadline. ])
++ AC_DEFINE(EXECUTING_MACRO_NAME, _rl_executing_macro,
++ [ Define the name of the executing macro variable in libreadline. ])
++ , AC_MSG_RESULT(no))
++, [AC_INCLUDES_DEFAULT
++#include "$READLINE_INCLUDE_DIR/readline.h"])
+
+ # check for readline's rl_cleanup_after_signal
+
+diff -ur a/tclreadline.c b/tclreadline.c
+--- a/tclreadline.c 2000-09-20 19:44:34.000000000 +0200
++++ b/tclreadline.c 2013-11-15 11:09:42.269771129 +0100
+@@ -41,7 +41,7 @@
+ * We need it here to decide, if we should read more
+ * characters from a macro. Dirty, but it should work.
+ */
+-extern char* _rl_executing_macro;
++extern char* EXECUTING_MACRO_NAME;
+ #endif
+
+ #include "tclreadline.h"
+@@ -249,14 +249,14 @@
+ tclrl_state = LINE_PENDING;
+
+ while (!TclReadlineLineComplete()) {
+-#ifdef EXECUTING_MACRO_HACK
++#ifdef EXECUTING_MACRO_NAME
+ /**
+ * check first, if more characters are
+ * available from _rl_executing_macro,
+ * because Tcl_DoOneEvent() will (naturally)
+ * not detect this `event'.
+ */
+- if (_rl_executing_macro)
++ if (EXECUTING_MACRO_NAME)
+ TclReadlineReadHandler((ClientData) NULL, TCL_READABLE);
+ else
+ #endif
+@@ -468,17 +468,17 @@
+ TclReadlineReadHandler(ClientData clientData, int mask)
+ {
+ if (mask & TCL_READABLE) {
+-#ifdef EXECUTING_MACRO_HACK
++#ifdef EXECUTING_MACRO_NAME
+ do {
+ #endif
+ rl_callback_read_char();
+-#ifdef EXECUTING_MACRO_HACK
++#ifdef EXECUTING_MACRO_NAME
+ /**
+ * check, if we're inside a macro and
+ * if so, read all macro characters
+ * until the next eol.
+ */
+- } while (_rl_executing_macro && !TclReadlineLineComplete());
++ } while (EXECUTING_MACRO_NAME && !TclReadlineLineComplete());
+ #endif
+ }
+ }
+@@ -517,12 +517,12 @@
+
+ Tcl_AppendResult(tclrl_interp, expansion, (char*) NULL);
+
+-#ifdef EXECUTING_MACRO_HACK
++#ifdef EXECUTING_MACRO_NAME
+ /**
+ * don't stuff macro lines
+ * into readline's history.
+ */
+- if(!_rl_executing_macro) {
++ if(!EXECUTING_MACRO_NAME) {
+ #endif
+ /**
+ * don't stuff empty lines
+@@ -537,7 +537,7 @@
+ if (tclrl_last_line)
+ free(tclrl_last_line);
+ tclrl_last_line = strdup(expansion);
+-#ifdef EXECUTING_MACRO_HACK
++#ifdef EXECUTING_MACRO_NAME
+ }
+ #endif
+ /**
diff --git a/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-history-expand.patch b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-history-expand.patch
new file mode 100644
index 000000000000..6e4d5270e41a
--- /dev/null
+++ b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-history-expand.patch
@@ -0,0 +1,35 @@
+diff -ur a/tclreadline.c b/tclreadline.c
+--- a/tclreadline.c 2013-11-16 20:14:28.876272386 +0100
++++ b/tclreadline.c 2013-11-16 20:14:24.191390550 +0100
+@@ -503,25 +503,22 @@
+ char* expansion = (char*) NULL;
+ int status = history_expand(ptr, &expansion);
+
+- if (status >= 1) {
++ if (status >= 2) {
+ /* TODO: make this a valid tcl output */
+ printf("%s\n", expansion);
+ free(ptr);
+ free(expansion);
+ return;
+- } else if (-1 == status) {
++ } else if (status <= -1) {
+ Tcl_AppendResult
+- (tclrl_interp, "error in history expansion\n", (char*) NULL);
++ (tclrl_interp, "error in history expansion: ", expansion, "\n", (char*) NULL);
+ TclReadlineTerminate(TCL_ERROR);
+ free(ptr);
+ free(expansion);
+ return;
+- }
+- /**
+- * TODO: status == 2 ...
+- */
+-
+- Tcl_AppendResult(tclrl_interp, expansion, (char*) NULL);
++ } else {
++ Tcl_AppendResult(tclrl_interp, expansion, (char*) NULL);
++ }
+
+ #ifdef EXECUTING_MACRO_HACK
+ /**
diff --git a/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-prompt.patch b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-prompt.patch
new file mode 100644
index 000000000000..a10a404100d3
--- /dev/null
+++ b/dev-tcltk/tclreadline/files/tclreadline-2.1.0-rl-prompt.patch
@@ -0,0 +1,12 @@
+diff -ur a/tclreadline.c b/tclreadline.c
+--- a/tclreadline.c 2013-11-16 20:14:28.876272386 +0100
++++ b/tclreadline.c 2013-11-16 20:37:47.455986902 +0100
+@@ -234,7 +234,7 @@
+
+ rl_callback_handler_install(
+ objc == 3 ? Tcl_GetStringFromObj(objv[2], 0)
+- : "%", TclReadlineLineCompleteHandler);
++ : "% ", TclReadlineLineCompleteHandler);
+
+ Tcl_CreateFileHandler(0, TCL_READABLE,
+ TclReadlineReadHandler, (ClientData) NULL);
diff --git a/dev-tcltk/tclreadline/metadata.xml b/dev-tcltk/tclreadline/metadata.xml
new file mode 100644
index 000000000000..4d4cdbb530ea
--- /dev/null
+++ b/dev-tcltk/tclreadline/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tclreadline</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tclreadline/tclreadline-2.1.0-r4.ebuild b/dev-tcltk/tclreadline/tclreadline-2.1.0-r4.ebuild
new file mode 100644
index 000000000000..e668266ef24e
--- /dev/null
+++ b/dev-tcltk/tclreadline/tclreadline-2.1.0-r4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils multilib toolchain-funcs
+
+DEBIAN_PATCH=12
+
+DESCRIPTION="Readline extension to TCL"
+HOMEPAGE="http://tclreadline.sf.net/"
+SRC_URI="
+ mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://debian/pool/main/t/${PN}/${PN}_${PV}-${DEBIAN_PATCH}.debian.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="alpha amd64 ppc ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DEPEND="
+ dev-lang/tcl:0=
+ sys-libs/readline:0="
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gold.patch
+ "${FILESDIR}"/${P}-alloc-free.patch
+ "${FILESDIR}"/${P}-rl-executing-macro.patch
+ "${FILESDIR}"/${P}-rl-history-expand.patch
+ "${FILESDIR}"/${P}-rl-prompt.patch
+ "${WORKDIR}"/debian/patches/complete_nontcl.patch
+ "${WORKDIR}"/debian/patches/completion_matches.patch
+ "${WORKDIR}"/debian/patches/completion_pbug.patch
+ "${WORKDIR}"/debian/patches/kfreebsd.patch
+ "${WORKDIR}"/debian/patches/link.patch
+ "${WORKDIR}"/debian/patches/manpage.patch
+ "${WORKDIR}"/debian/patches/memuse.patch
+# "${WORKDIR}"/debian/patches/tclrldir.patch
+ "${WORKDIR}"/debian/patches/tclshpath.patch
+ "${WORKDIR}"/debian/patches/tinfo.patch
+ "${WORKDIR}"/debian/patches/varnames.patch
+
+ )
+
+src_prepare() {
+ sed \
+ -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
+ -e "/^TCLRL_LIBDIR/s:lib:$(get_libdir):g" \
+ -i configure.in || die
+ mv configure.{in,ac} || die
+ sed \
+ -e 's:configure.in:configure.ac:g' \
+ -i "${WORKDIR}"/debian/patches/* || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ --with-tcl-includes="${EPREFIX}/usr/include"
+ --with-readline-includes="${EPREFIX}/usr/include"
+ --with-readline-library="-lreadline"
+ )
+ autotools-utils_src_configure
+}
diff --git a/dev-tcltk/tclx/Manifest b/dev-tcltk/tclx/Manifest
new file mode 100644
index 000000000000..bf7ebc675c2b
--- /dev/null
+++ b/dev-tcltk/tclx/Manifest
@@ -0,0 +1,7 @@
+AUX tclx-8.4-ldflags.patch 359 SHA256 f5efa346f10c8d8ecb1f650d0f9d4fd32c2cea9e24aaf49e8db54913ef04ce36 SHA512 a7fdd81a615222b805ab1dcb85a619b2621a187a39602f5d64dcf36027a1ee6e616328a7463f4cb9b6fe60169c887c925d133dc1df1cb20f9cb419ba13c870f1 WHIRLPOOL b839b1bb459c0ab6ef62b2bbe71a26c6557210eac83ddd4e35231240f53bcca4fedfa1a1ce4451e41869b0b2d7372de46b441f23c1bfa2386f3c329c81e92607
+AUX tclx-8.4-varinit.patch 399 SHA256 3770fea219c9639c53f6380453850e3191b52cc2ff48896aff8658d737df0624 SHA512 68f4e8a1bd1be1f98e286cf4ccba0a97aca2613c13059f8e06e446e376c4ebb8e66d16bbe5e5972e761a58417bb67fcc34b000ef0c95b740a4ad6801f8b43353 WHIRLPOOL 74ed1c52800f872a5fae77928b6cac7d8671f680c4a76c1e56f92cc42bf1ec83f085c13dbc8879d25a546c3003e8adaf6f0bbea02b730a9fa017838c424f92d3
+DIST tclx8.4.1.tar.bz2 330073 SHA256 a9b41f606ec6c1268b9c78512e6e1cb533bd9ae3e786e650d111fc16ffe758ec SHA512 faad58f5d8e0e1e759da639800f354b583fb01418c94f2274924aa07beb0ee9559beb87b3386ed5ae3694700a71dfe5b8ac54ead0ec75c6963507e9d3ead7060 WHIRLPOOL fd65983cdc51935fb8e7917bb4fc77e9a9822173c644dfdb63afc9e034ce41321a2a28a736039fcb18bcfeb1cd7aa9601000879ac1171c11bdeb266d30f0de41
+EBUILD tclx-8.4.1.ebuild 1125 SHA256 fc9ffe160d13321b84a88eda8116a899589ab220d18624e8310da4c40f91dc80 SHA512 5877cc6fcfd3e24effcb33932bd404f29dc7061c3e2144b0f16ea2fb9172e4df040d890f0d72a81136df508ee7f24fcc425aa3a557335fd8a74f3ca147b13d79 WHIRLPOOL 5864f5fc98acec549fdfcc1f40ac6996fea7d5b62caeb7971936a7ac85bedde493c628c639326c81045ed8f97fb127f49d051c8cf7aaf0a7f7bc31e8eaccc4af
+MISC ChangeLog 2611 SHA256 7d688a488b2e00dc5c2daf3f7454a81cd384c773c8ee395d10eb8085716db0b0 SHA512 a49cbd3c4e2ea04b0ad52651eeae1b81748802ba9b06002dcffbbf6a6a708db31970d44ca93d332efc06225b505b59614b0d1004277b087a0e6497d98ad6d619 WHIRLPOOL 1d89308cdc891c04b78c8162066322562181b6d16d9893ee83e1f9485ea67eed0808e82fdca3e62b8ab47cfd5ba8272a6bbb3c57a205928d84277963aee7a43d
+MISC ChangeLog-2015 7414 SHA256 427bfd96c9c737595134531500269be38d6b24d2d5eafb09709f6cedbacc943c SHA512 e3406133940c9139925d03931abc5cc86a139b8e3ca7cc6e5cc296b203aae1f43ca57a9cce5a41a76695b7e3e1e335e39766f8e26c92b391aa8b6e003a70dd8a WHIRLPOOL 9c0885f06cd7356fb94480015da69e2b07c2c476812471d8352cc0e20bee27afcb9c28d8d8063d8e133f2d139dfb9db589d6f96ddd3f22ab46b09d3f6475d904
+MISC metadata.xml 383 SHA256 f2799b08668d458d5b1f55403ad8a7f3c84309b5d3d2b6b0990164a89be2e431 SHA512 61c95be7d0f2dfbae23ea5f0d018fe2e4dc6ab26d9a6041e56b69bb7ee79c65884fda4efa3998fc5a2512ffa61a15817eb0f8a85f13aea4beed523a88a35db38 WHIRLPOOL b35b4ce1748c0e2e90f5dd11e4838aca1371c77c860e73d67189d6ad44df400c56a28a4585f70f444f904a191b13fbce68d49243d242bd71a39a0030d8e109d9
diff --git a/dev-tcltk/tclx/files/tclx-8.4-ldflags.patch b/dev-tcltk/tclx/files/tclx-8.4-ldflags.patch
new file mode 100644
index 000000000000..40acfda25fd9
--- /dev/null
+++ b/dev-tcltk/tclx/files/tclx-8.4-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index b812bbe..069337c 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -123,7 +123,7 @@ OBJEXT = @OBJEXT@
+ RANLIB = @RANLIB@
+ RANLIB_STUB = @RANLIB_STUB@
+ SHLIB_CFLAGS = @SHLIB_CFLAGS@
+-SHLIB_LD = @SHLIB_LD@
++SHLIB_LD = @SHLIB_LD@ @LDFLAGS@
+ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+ STLIB_LD = @STLIB_LD@
+ TCL_DEFS = @TCL_DEFS@
diff --git a/dev-tcltk/tclx/files/tclx-8.4-varinit.patch b/dev-tcltk/tclx/files/tclx-8.4-varinit.patch
new file mode 100644
index 000000000000..08fe7d881191
--- /dev/null
+++ b/dev-tcltk/tclx/files/tclx-8.4-varinit.patch
@@ -0,0 +1,11 @@
+--- tclx8.4/generic/tclXdup.c.varinit 2006-02-03 15:54:38.000000000 -0500
++++ tclx8.4/generic/tclXdup.c 2006-02-03 15:54:53.000000000 -0500
+@@ -202,7 +202,7 @@
+ {
+ Tcl_Channel newChannel;
+ int bindFnum, fnum;
+- char *srcChannelId, *targetChannelId;
++ char *srcChannelId = NULL, *targetChannelId;
+
+ if ((objc < 2) || (objc > 3)) {
+ return TclX_WrongArgs (interp, objv [0],
diff --git a/dev-tcltk/tclx/metadata.xml b/dev-tcltk/tclx/metadata.xml
new file mode 100644
index 000000000000..f3b20f1c9fb8
--- /dev/null
+++ b/dev-tcltk/tclx/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="project">
+ <email>tcltk@gentoo.org</email>
+ <description>TCL / TK herd</description>
+ </maintainer>
+ <longdescription>Extended TCL</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tclx</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tclx/tclx-8.4.1.ebuild b/dev-tcltk/tclx/tclx-8.4.1.ebuild
new file mode 100644
index 000000000000..6ce5cc26795d
--- /dev/null
+++ b/dev-tcltk/tclx/tclx-8.4.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib versionator
+
+DESCRIPTION="A set of extensions to TCL"
+HOMEPAGE="http://tclx.sourceforge.net"
+SRC_URI="mirror://sourceforge/tclx/${PN}${PV}.tar.bz2"
+
+LICENSE="BSD"
+IUSE="tk threads"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+DEPEND="
+ dev-lang/tcl:0=
+ tk? ( dev-lang/tk:0= )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}$(get_version_component_range 1-2)
+
+# tests broken, bug #279283
+RESTRICT="test"
+
+src_prepare() {
+ sed \
+ -e '/CC=/s:-pipe::g' \
+ -i tclconfig/tcl.m4 configure || die
+ epatch \
+ "${FILESDIR}"/${PN}-8.4-varinit.patch \
+ "${FILESDIR}"/${PN}-8.4-ldflags.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable tk) \
+ $(use_enable threads) \
+ --enable-shared \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)/"
+
+ # adjust install_name on darwin
+ if [[ ${CHOST} == *-darwin* ]]; then
+ sed -i \
+ -e 's:^\(SHLIB_LD\W.*\)$:\1 -install_name ${pkglibdir}/$@:' \
+ "${S}"/Makefile || die 'sed failed'
+ fi
+}
+
+src_install() {
+ default
+ doman doc/*.[n3]
+}
diff --git a/dev-tcltk/tclxml/Manifest b/dev-tcltk/tclxml/Manifest
new file mode 100644
index 000000000000..06f4c58e6936
--- /dev/null
+++ b/dev-tcltk/tclxml/Manifest
@@ -0,0 +1,7 @@
+AUX tclxml-3.2-fix-implicit-declarations.patch 488 SHA256 13028681e6a4a272f0fb579c744189b95ca6ae56ab39869421af27e9282f8eec SHA512 9f8a0c55886c01324e318aec70c99b85f845567a486daddbb897900f242d8a9fec99026c8f6ec7d73e5dca8ee22bf851dc64eab2a83a3a2c959828a24e79e4ca WHIRLPOOL 79c3fc4532bfc04317ef6e3d8583ece18ec4668f8999927e6c0823fe66e045cf74494e734c1e332ee47ccea86fae02d1467af9ba2b4e7ee963a09526aa229067
+AUX tclxml-3.2-format-security.patch 647 SHA256 093b73a367804592bce492ff263009e47b9d2a556f635049200e6ae935f90ae8 SHA512 2b76363f015400642f00ce24ef67fd8f7607cd6ed0a63a5768aa343fbe9d6a8af50e15ccebecff813aa0c6d0714d65626c31e2edc860b6b826e52952bb47d435 WHIRLPOOL 87ebea841487a14a7d190da3a22de82836355c9a024318c40ca6596eccbfaf43108ea9ebdbf169bba2ebe93b73914c5066fed4e9543487c7268df30e4c9b3ff5
+DIST tclxml-3.2.tar.gz 757594 SHA256 f4116b6680b249ce74b856a121762361ca09e6256f0c8ad578d1c661b822cb39 SHA512 5e7d45063c1a311d49ecc42f664bf7d88862fc19a46b64f52d038e2adfcc5b6964ae74d61b40bcf8eb4e1440f849339095fd8712bd39f0cb57e279acea58a3da WHIRLPOOL 6b0b04e2a0e27bc73bbcd595642c8ec024a36eb25d12a8f324835de95afd64dd25fa58c3109be1dec03b379852e14a79db81b3ea7f0f1c6896b07054dd9c8d13
+EBUILD tclxml-3.2-r2.ebuild 1125 SHA256 9f55d368ebf522bd83b54bc4aea861259b56ea1e2a2982c893d46e202d446843 SHA512 5c8701ca9bb8deaaefe05d18ead1e727004c2f7fc9464c90c76b28c3c4ed34ee8533cb76dfc30f6eaf84c09a11697e2ebc9a88d14dc541d08d93f3e93b2b74e0 WHIRLPOOL 64bda48c64a5b6cef7908e75c502b09ad94b2a013297d65860e5111f7f55bb82316965983dd409b65a131dcf7b7c347aa1422270fc9f8d1c4555b5135bf21826
+MISC ChangeLog 2797 SHA256 5a1f5630e367dff4add1612b69dad1ad44ea9ed3bc292185b05cf0b0458c95b2 SHA512 918b837e0c9ef9ddd30fbd9ebe9d5b2c6b9198554de92ec41acd443f5a7c47811fa9f9715e69913b133b4e5e5135b1e505e32cc3b6a087a61929aeffd314437f WHIRLPOOL 669fc0a94d01dcca7e372621acc1729ba98566090de4951800f84dbe599744a38907a9d06e81db2c1dccc5a38aa552bbb225b81d9800207926e8ccd10dc6d8be
+MISC ChangeLog-2015 6941 SHA256 8c77ff83d3fa3d73cd2a08d3c3afc140d419c5907eb5e4d8074be880126f11b5 SHA512 8d59fff8656f004b0ec45bf4db070aabe50394a92da41d0b2171d93834a461e2d515f315107492746674a518de6f9ea098d623f68a0dde122d4e84877cb5dd40 WHIRLPOOL 47307da6f289cad9b574c275a47544099c6915ee54a663c57f007f50b429e7ee8807d24b222c602c508ecf662dd752090059bc8081dafb14e678630da2dd6bb0
+MISC metadata.xml 329 SHA256 8d61e95bd2627e3207a204fda48d8b0804c1e90de5e37db43c0e34e4ad608590 SHA512 32f679fcef8e5ad247a7e566ccfe9098116d093ce83e7326e744dbfede0eeb47fbcc3de723e135a1dd3733d337de6648632ab1b5191ec2e9135d48a3b2988e5d WHIRLPOOL 7bb174294e7749a0e33cbb1d7eed352ddcdeb18a5f2fef6966d7a8fc89b11579430847ef027cb9191c14c449e39bbba73e2fcc140b1d8ec37c583c094c6e5e96
diff --git a/dev-tcltk/tclxml/files/tclxml-3.2-fix-implicit-declarations.patch b/dev-tcltk/tclxml/files/tclxml-3.2-fix-implicit-declarations.patch
new file mode 100644
index 000000000000..b463306abf1e
--- /dev/null
+++ b/dev-tcltk/tclxml/files/tclxml-3.2-fix-implicit-declarations.patch
@@ -0,0 +1,12 @@
+diff -urpN tclxml-3.2.orig/tclxml.c tclxml-3.2/tclxml.c
+--- tclxml-3.2.orig/tclxml.c 2009-06-08 12:56:10.000000000 +0200
++++ tclxml-3.2/tclxml.c 2009-06-08 12:57:24.000000000 +0200
+@@ -20,6 +20,8 @@
+ #include <tclxslt/tclxslt.h>
+ #include <string.h>
+
++int Tcldom_libxml2_Init ( Tcl_Interp *interp );
++
+ #define TCL_DOES_STUBS \
+ (TCL_MAJOR_VERSION > 8 || TCL_MAJOR_VERSION == 8 && (TCL_MINOR_VERSION > 1 || \
+ (TCL_MINOR_VERSION == 1 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE)))
diff --git a/dev-tcltk/tclxml/files/tclxml-3.2-format-security.patch b/dev-tcltk/tclxml/files/tclxml-3.2-format-security.patch
new file mode 100644
index 000000000000..2d13c6575ea6
--- /dev/null
+++ b/dev-tcltk/tclxml/files/tclxml-3.2-format-security.patch
@@ -0,0 +1,16 @@
+ tclxslt-libxslt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tclxslt-libxslt.c b/tclxslt-libxslt.c
+index d943bf7..d18f645 100644
+--- a/tclxslt-libxslt.c
++++ b/tclxslt-libxslt.c
+@@ -1506,7 +1506,7 @@ TclXSLTExtFunction(xpathCtxt, nargs)
+ obj = TclXSLT_ConvertTclObjToXPathObj(extinfo->interp, resultPtr);
+ valuePush(xpathCtxt, obj);
+ } else {
+- xmlGenericError(xmlGenericErrorContext,
++ xmlGenericError(xmlGenericErrorContext, "%s",
+ Tcl_GetStringFromObj(resultPtr, NULL));
+ /* Need to define a new error code - this is the closest in meaning */
+ xpathCtxt->error = XPATH_UNKNOWN_FUNC_ERROR;
diff --git a/dev-tcltk/tclxml/metadata.xml b/dev-tcltk/tclxml/metadata.xml
new file mode 100644
index 000000000000..47411252c4c4
--- /dev/null
+++ b/dev-tcltk/tclxml/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tclxml</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tclxml/tclxml-3.2-r2.ebuild b/dev-tcltk/tclxml/tclxml-3.2-r2.ebuild
new file mode 100644
index 000000000000..b0a217d741f6
--- /dev/null
+++ b/dev-tcltk/tclxml/tclxml-3.2-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="Pure Tcl implementation of an XML parser"
+HOMEPAGE="http://tclxml.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tclxml/${P}.tar.gz"
+
+IUSE="debug threads"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc sparc x86"
+
+DEPEND="
+ >=dev-lang/tcl-8.2:0
+ >=dev-libs/libxml2-2.6.9
+ dev-libs/libxslt
+ >=dev-tcltk/tcllib-1.2
+ dev-libs/expat
+ !dev-tcltk/tcldom"
+# test? ( dev-tcltk/tclparser )
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-fix-implicit-declarations.patch \
+ "${FILESDIR}"/${P}-format-security.patch
+}
+
+src_configure() {
+ local myconf=""
+
+ use threads && myconf="${myconf} --enable-threads"
+
+ econf ${myconf} \
+ --with-xml2-config="${EPREFIX}"/usr/bin/xml2-config \
+ --with-xslt-config="${EPREFIX}"/usr/bin/xslt-config \
+ --with-tclinclude="${EPREFIX}"/usr/include \
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable amd64 64bit) \
+ $(use_enable debug symbols)
+}
+
+src_install() {
+ default
+ dohtml doc/*.html
+}
diff --git a/dev-tcltk/tdom/Manifest b/dev-tcltk/tdom/Manifest
new file mode 100644
index 000000000000..44e19de93ea7
--- /dev/null
+++ b/dev-tcltk/tdom/Manifest
@@ -0,0 +1,10 @@
+AUX tdom-0.8.2-tnc.patch 2806 SHA256 f220162108eaf974a5f06b59de0ec130dc0703014cd9f7d7570dec2186b6a50f SHA512 b111a75abf35dd7acf813e05295e51633d30e12d20250f21905eec021ea64194d116a9869b2eac882da49f6a9037d3b1b6e23b30091b9bc92cd2bed91d7c8177 WHIRLPOOL 762ce7b28241d1578f8a758e6069674a7818b833c8e9d02f90e3caa30431409d5f612371ad26a97ad4e3f6b0131e8e6336fe063c81768e18a65eda9b37112f41
+AUX tdom-0.8.2.patch 2036 SHA256 523967222cf5d72fe84924b40f371831a10875599df9dd8d0c80ab2f5aa78472 SHA512 f86d07835de0274072243ff347123edba075d46e0e3da246d75f378d9dfcff3cc4e338f6d26449f15610db4bf1256b5e3890ac9b5f2b3d3c5edd24dcfd8120b5 WHIRLPOOL c850094d2317027871d90bb54e2951edd1be3aa488f7e59ddafcca07745f35b4931bdb7d825fb942719cba24964e363c01fd6771e3ce8794a2fb0e12f47edb6e
+AUX tdom-0.8.3-expat.patch 2512 SHA256 875a7d35aa920d971733d5319f713b4c3dbe0928e7e373bcddd9573d4249589c SHA512 110c07c55b2793152819c8da486a72440096876ff871b045d1a4b1d4a0a9e62bac4ccaf02bc83786f309b85f84e9311b6af31b6f4b5e8fb4f8294e6435f6be15 WHIRLPOOL 32fb0c84601b96a53fe254b1f41e4fe9870cf698796a981ecbde758dfa416a0389b72dc229cd1f919a7900900e5e5305d49efcfa520df6037770ab738ed74e55
+AUX tdom-0.8.3-soname.patch 963 SHA256 69126d56273b87599baf3aa58c7d016f4d32ffdced42fc9599c6abba94d3fa10 SHA512 ea7f689f3b979fc565947a6b5e2ef6dfd422eee83c98749c4f9f0a213f0a44f3beba211e5c8e1b251e4bc2bbd77a5e4e75476661de5ffeb9d01e8f7bbba05990 WHIRLPOOL 02c0ad62fe3ebbac97844743ed33d910cd25863ffb7f3a60e27cb2b6ff1c8e5d4b92e586de18347860eb48d4619fc529f420842c3c035dab94c701de91627ecf
+AUX tdom-0.8.3-tcl8.6.patch 764 SHA256 741a4347ba77f5b4ef3c645eb9ea227d34e0abd48277392a6d140d0993905d36 SHA512 4af4a3d712a9f6b57a7a9c6641c7fbef9c1ffd278c2507c067dc43d15102dc2bcc8df8eafc205973c7d7db8f7f9914f98d881877c863b32184c68c6313a466b6 WHIRLPOOL c466274533fd63f077fa11ef2e1ff08b25babc3a2234a5676024032b0817c9cb77f05242edb4aed518981ce25928894b89bb6b86a585bd02ad068a76c44a561e
+DIST tDOM-0.8.3.tgz 990367 SHA256 496d5950907dd70db61bc20c55a05a5521363ce3c076e2fdd97270181bc720b9 SHA512 aa5352bc9b67c45d115e52dbf2cf153a3db89f851b51c1cd574af69b02c466f643df0b5448f7d105245246d20a92f80605f16bd927cd7925c1f2007827f2dc20 WHIRLPOOL cec84152b636c3ea13a6daaa9681fe28c36a3e358e28382a439ee855206566b08c1f7427ca733cfbb806f2fdb1e2e10c96c8410005fe56e84f17e873168697ee
+EBUILD tdom-0.8.3-r4.ebuild 1905 SHA256 5e670b5b5146962b749fdba304de7d3eef15c7090905c2debc183da6502f986f SHA512 670a8a44ef017a15159aace5833d01defa5b45e1fc61ffefb36406076d7439fa051eedef3160c06695b2ac57f7bf4ff8f6e8c02b10b5e53eac68d6589889e0e7 WHIRLPOOL bb0d7da230ccb102c34926474ac7d37bb982db9da81ba7119d6ece71d132ba5901c0f4c14dd0db91c9e64da76773e74ed17e0b91c4f4b38edf96b3e4fc76693c
+MISC ChangeLog 3306 SHA256 b387b30194e841da4fda063f79c300d6eeb9da18741f16b45ad2de3ba111cf68 SHA512 a8e90b7b84ae2678aaa91e361e02a893be3ced682eb299916ad4d8aaaa0e0fe74fddc1a10cb7ca5169a581f346147748f8e57a6b2a92105be4213c99371ffda5 WHIRLPOOL 11ff544b8ee39617bfda08bff37c9cf9a6c9415f7204234e39731536c3c33cdc352d535b402989cdfecfa57e9c3e81bf392846717683c023546e9490acf245ff
+MISC ChangeLog-2015 3506 SHA256 d437b72b5ddfc3d80e82476caa71c4eb46ab50d98113ac4ae9c71d2914594f11 SHA512 bcca9ef4e414cfe7f003a86198b8be118bd78410668d4d831499b5f1a567dfccfe93f3751f6e0ba9239875b809a7563c64635c3af2f04e091cecd09d0f3357d1 WHIRLPOOL 83e2e6ce9e22abdf7f00d06f8b370d1ab97a9785f564270249485aad30fed334c37648b494948937555a7e769eab26d0734e74bfd60a11654c567d662e4a3a26
+MISC metadata.xml 609 SHA256 9a75b6c655549296e80e5cd4123b596c6a8c7c99b4403c3e870f5cc1222adfdd SHA512 80b0290426618cae5e2798eb85af524fbe39d27b47cd4298fbc7603c6b804c8ab3ac6299a9676fdfd50ae276b523e1327f4ded935fbd9dd338e587a5f8ff3f35 WHIRLPOOL 6300e3fe738dcd67ccda75f6e6f5b950d47032f04897309f7cbf9cdc00b306bda54c7f527c134f36f2030b040e28484f6b0967e6411bbea30f591bcbd67e5b66
diff --git a/dev-tcltk/tdom/files/tdom-0.8.2-tnc.patch b/dev-tcltk/tdom/files/tdom-0.8.2-tnc.patch
new file mode 100644
index 000000000000..7fa200b9ee33
--- /dev/null
+++ b/dev-tcltk/tdom/files/tdom-0.8.2-tnc.patch
@@ -0,0 +1,73 @@
+Source: http://download.opensuse.org/repositories/openSUSE:/11.0/standard/src/tdom-0.8.2-50.1.src.rpm
+--- extensions/tnc/Makefile.in
++++ extensions/tnc/Makefile.in
+@@ -355,29 +355,30 @@
+ #========================================================================
+
+ install-lib-binaries: binaries
+- @mkdir -p $(DESTDIR)$(pkglibdir)
++ @mkdir -p $(DESTDIR)$(libdir)
+ @list='$(lib_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
++ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \
++ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \
+ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
+ if test "x$$stub" = "xstub"; then \
+- echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
+- $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
++ echo " $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p"; \
++ $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p; \
+ else \
+- echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
+- $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
++ echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
++ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ fi; \
+ ext=`echo $$p|sed -e "s/.*\.//"`; \
+ if test "x$$ext" = "xdll"; then \
+ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
+ if test -f $$lib; then \
+- echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
+- $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
++ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \
++ $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \
+ fi; \
+ fi; \
+ fi; \
+ done
++ @mkdir -p $(DESTDIR)$(pkglibdir)
+ @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ destp=`basename $$p`; \
+--- extensions/tnc/configure.in
++++ extensions/tnc/configure.in
+@@ -89,7 +89,7 @@
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+ TEA_ADD_LIBS([\"`${CYGPATH} ${TDOM_STUB_LIB_PATH}`\"])
+ else
+- TEA_ADD_LIBS([${TDOM_STUB_LIB_SPEC}])
++ TEA_ADD_LIBS([${TDOM_BUILD_STUB_LIB_SPEC}])
+ fi
+
+ #--------------------------------------------------------------------
+--- extensions/tnc/pkgIndex.tcl.in
++++ extensions/tnc/pkgIndex.tcl.in
+@@ -2,4 +2,4 @@
+
+ package ifneeded tnc @PACKAGE_VERSION@ \
+ "package require tdom; \
+- [list load [file join $dir @PKG_LIB_FILE@] tnc]"
++ [list load @PKG_LIB_FILE@ tnc]"
+--- extensions/tnc/Makefile.in
++++ extensions/tnc/Makefile.in
+@@ -160,7 +160,7 @@ DEFS = @DEFS@ $(PKG_CFLAGS)
+ CONFIG_CLEAN_FILES = Makefile
+
+ CPPFLAGS = @CPPFLAGS@
+-LIBS = @PKG_LIBS@ @LIBS@
++LIBS = @PKG_LIBS@ @LIBS@ -L../../unix/
+ AR = @AR@
+ CFLAGS = @CFLAGS@
+ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
diff --git a/dev-tcltk/tdom/files/tdom-0.8.2.patch b/dev-tcltk/tdom/files/tdom-0.8.2.patch
new file mode 100644
index 000000000000..73af7c60e141
--- /dev/null
+++ b/dev-tcltk/tdom/files/tdom-0.8.2.patch
@@ -0,0 +1,52 @@
+Source: http://download.opensuse.org/repositories/openSUSE:/11.0/standard/src/tdom-0.8.2-50.1.src.rpm
+--- Makefile.in
++++ Makefile.in
+@@ -307,7 +307,7 @@
+
+ pkgIndex.tcl-hand:
+ @(echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION)\
+- "load [list [file join $$dir $(PKG_LIB_FILE)]];\
++ "load $(PKG_LIB_FILE);\
+ source [list [file join $$dir tdom.tcl]]"'\
+ ) > pkgIndex.tcl
+
+@@ -385,29 +385,30 @@
+ #========================================================================
+
+ install-lib-binaries: binaries
+- @mkdir -p $(DESTDIR)$(pkglibdir)
++ @mkdir -p $(DESTDIR)$(libdir)
+ @list='$(lib_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
++ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \
++ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \
+ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
+ if test "x$$stub" = "xstub"; then \
+- echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
+- $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
++ echo " $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p"; \
++ $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p; \
+ else \
+- echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
+- $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
++ echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
++ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ fi; \
+ ext=`echo $$p|sed -e "s/.*\.//"`; \
+ if test "x$$ext" = "xdll"; then \
+ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
+ if test -f $$lib; then \
+- echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
+- $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
++ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \
++ $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \
+ fi; \
+ fi; \
+ fi; \
+ done
++ @mkdir -p $(DESTDIR)$(pkglibdir)
+ @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ destp=`basename $$p`; \
diff --git a/dev-tcltk/tdom/files/tdom-0.8.3-expat.patch b/dev-tcltk/tdom/files/tdom-0.8.3-expat.patch
new file mode 100644
index 000000000000..818850bd8eee
--- /dev/null
+++ b/dev-tcltk/tdom/files/tdom-0.8.3-expat.patch
@@ -0,0 +1,84 @@
+diff --git a/configure.in b/configure.in
+index 8e634f2..d9999cf 100644
+--- a/configure.in
++++ b/configure.in
+@@ -72,6 +72,7 @@ AC_CHECK_FUNCS(memmove bcopy)
+ #--------------------------------------------------------------------
+
+ TDOM_PATH_AOLSERVER
++TDOM_PATH_EXPAT
+
+ #-----------------------------------------------------------------------
+ # __CHANGE__
+@@ -83,10 +84,7 @@ TDOM_PATH_AOLSERVER
+ # and PKG_TCL_SOURCES.
+ #-----------------------------------------------------------------------
+
+-TEA_ADD_SOURCES([expat/xmlrole.c \
+- expat/xmltok.c \
+- expat/xmlparse.c \
+- generic/xmlsimple.c \
++TEA_ADD_SOURCES([generic/xmlsimple.c \
+ generic/utf8conv.c \
+ generic/dom.c \
+ generic/domhtml.c \
+@@ -99,7 +97,7 @@ TEA_ADD_SOURCES([expat/xmlrole.c \
+ generic/tclexpat.c \
+ generic/tdomStubInit.c])
+ TEA_ADD_HEADERS([generic/tdom.h])
+-TEA_ADD_INCLUDES([-I${srcdir}/generic -I${srcdir}/expat ${AOL_INCLUDES}])
++TEA_ADD_INCLUDES([-I${srcdir}/generic ${AOL_INCLUDES}])
+ TEA_ADD_LIBS([${AOL_LIBS}])
+ TEA_ADD_CFLAGS([])
+ TEA_ADD_STUB_SOURCES([generic/tdomStubLib.c])
+diff --git a/tdom.m4 b/tdom.m4
+index f5ecd98..fcab883 100644
+--- a/tdom.m4
++++ b/tdom.m4
+@@ -216,6 +216,46 @@ AC_DEFUN(TDOM_PATH_AOLSERVER, [
+ fi
+ ])
+
++
++AC_DEFUN(TDOM_PATH_EXPAT, [
++ AC_MSG_CHECKING([for expat])
++ AC_ARG_WITH(expat,
++ AC_HELP_STRING([--with-expat],
++ [directory with expat installation]), , [with_expat=no])
++
++ AC_CACHE_VAL(ac_cv_c_expat,[
++ case $with_expat in
++ no) ;;
++ yes)
++ for f in /usr/local /usr; do
++ if test -f "$f/include/expat.h" ; then
++ ac_cv_c_expat=`(cd $f; pwd)`
++ break
++ fi
++ done
++ ;;
++ *)
++ if test -f "$with_expat/include/expat.h"; then
++ ac_cv_c_expat=`(cd $with_expat; pwd)`
++ else
++ AC_MSG_ERROR([${with_expat} directory doesn't contain expat.h])
++ fi
++ esac
++ ])
++ if test x"${ac_cv_c_expat}" = x ; then
++ AC_MSG_RESULT([using local copy])
++ TEA_ADD_SOURCES([expat/xmlrole.c \
++ expat/xmltok.c \
++ expat/xmlparse.c])
++ TEA_ADD_INCLUDES([-I${srcdir}/expat])
++ else
++ AC_MSG_RESULT([${ac_cv_c_expat}])
++ TEA_ADD_INCLUDES(${ac_cv_c_expat}/include)
++ TEA_ADD_LIBS([-lexpat])
++ fi
++])
++
++
+ #------------------------------------------------------------------------
+ # TDOM_PATH_CONFIG --
+ #
diff --git a/dev-tcltk/tdom/files/tdom-0.8.3-soname.patch b/dev-tcltk/tdom/files/tdom-0.8.3-soname.patch
new file mode 100644
index 000000000000..f742f6e7f5a1
--- /dev/null
+++ b/dev-tcltk/tdom/files/tdom-0.8.3-soname.patch
@@ -0,0 +1,26 @@
+diff --git a/Makefile.in b/Makefile.in
+index d995328..5c17e11 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -108,7 +108,7 @@ CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
+ CFLAGS_WARNING = @CFLAGS_WARNING@
+ CLEANFILES = @CLEANFILES@
+ EXEEXT = @EXEEXT@
+-LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
++LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ -Wl,-soname,libtdom$(PACKAGE_VERSION).so
+ MAKE_LIB = @MAKE_LIB@
+ MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
+ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
+diff --git a/extensions/tnc/Makefile.in b/extensions/tnc/Makefile.in
+index f8a332c..01e0ef0 100644
+--- a/extensions/tnc/Makefile.in
++++ b/extensions/tnc/Makefile.in
+@@ -98,7 +98,7 @@ CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
+ CFLAGS_WARNING = @CFLAGS_WARNING@
+ CLEANFILES = @CLEANFILES@
+ EXEEXT = @EXEEXT@
+-LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
++LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ -Wl,-soname,libtnc$(PACKAGE_VERSION).so
+ MAKE_LIB = @MAKE_LIB@
+ MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
+ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
diff --git a/dev-tcltk/tdom/files/tdom-0.8.3-tcl8.6.patch b/dev-tcltk/tdom/files/tdom-0.8.3-tcl8.6.patch
new file mode 100644
index 000000000000..5a805931ca31
--- /dev/null
+++ b/dev-tcltk/tdom/files/tdom-0.8.3-tcl8.6.patch
@@ -0,0 +1,21 @@
+ generic/tcldom.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/generic/tcldom.c b/generic/tcldom.c
+index 91d98c9..0f024b3 100644
+--- a/generic/tcldom.c
++++ b/generic/tcldom.c
+@@ -5933,8 +5933,13 @@ int tcldom_EvalLocked (
+ ret = Tcl_EvalObj(interp, objv[2]);
+ if (ret == TCL_ERROR) {
+ char msg[64 + TCL_INTEGER_SPACE];
++ #if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
+ sprintf(msg, "\n (\"%s %s\" body line %d)", Tcl_GetString(objv[0]),
+ Tcl_GetString(objv[1]), interp->errorLine);
++ #else
++ sprintf(msg, "\n (\"%s %s\" body line %d)", Tcl_GetString(objv[0]),
++ Tcl_GetString(objv[1]), Tcl_GetErrorLine(interp));
++ #endif
+ Tcl_AddErrorInfo(interp, msg);
+ }
+
diff --git a/dev-tcltk/tdom/metadata.xml b/dev-tcltk/tdom/metadata.xml
new file mode 100644
index 000000000000..9b594bd7ea41
--- /dev/null
+++ b/dev-tcltk/tdom/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <longdescription>
+tDOM combines high performance XML data processing with easy and
+powerful Tcl scripting functionality. tDOM should be one of the fastest
+ways to manipulate XML with a scripting language and uses very few
+memory: for example, the DOM tree of the XML recommendation in XML
+(160K) needs only about 450K of memory.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-tcltk/tdom/tdom-0.8.3-r4.ebuild b/dev-tcltk/tdom/tdom-0.8.3-r4.ebuild
new file mode 100644
index 000000000000..57a0b884ecc0
--- /dev/null
+++ b/dev-tcltk/tdom/tdom-0.8.3-r4.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib toolchain-funcs
+
+MY_P="tDOM-${PV}"
+
+DESCRIPTION="A XML/DOM/XPath/XSLT Implementation for Tcl"
+HOMEPAGE="https://tdom.github.com/"
+#SRC_URI="https://cloud.github.com/downloads/tDOM/${PN}/${MY_P}.tgz"
+SRC_URI="mirror://github/tDOM/${PN}/${MY_P}.tgz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~hppa ~ia64 ~mips ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs threads"
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-libs/expat"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/"${PN}-0.8.2.patch
+ "${FILESDIR}/"${P}-soname.patch
+ "${FILESDIR}/"${P}-expat.patch
+ "${FILESDIR}/"${PN}-0.8.2-tnc.patch
+ "${FILESDIR}/"${P}-tcl8.6.patch
+ )
+
+src_prepare() {
+ tc-export AR
+ append-libs -lm
+ sed \
+ -e 's:-O2::g' \
+ -e 's:-pipe::g' \
+ -e 's:-fomit-frame-pointer::g' \
+ -e '/SHLIB_LD_LIBS/s:\"$: ${TCL_LIB_FLAG}":g' \
+ -i {.,extensions/tnc}/configure tclconfig/tcl.m4 || die
+ epatch "${PATCHES[@]}"
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable threads)
+ --enable-shared
+ --disable-tdomalloc
+ --with-expat
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir)
+ )
+
+ cd "${S}"/unix && ECONF_SOURCE=".." econf ${myeconfargs}
+ cd "${S}"/extensions/tdomhtml && econf ${myeconfargs}
+ cd "${S}"/extensions/tnc && econf ${myeconfargs}
+}
+
+src_compile() {
+ local dir
+
+ for dir in "${S}"/unix "${S}"/extensions/tnc; do
+ pushd ${dir} > /dev/null
+ emake
+ popd > /dev/null
+ done
+}
+
+src_install() {
+ local dir
+
+ dodoc CHANGES ChangeLog README*
+
+ for dir in "${S}"/unix "${S}"/extensions/tdomhtml "${S}"/extensions/tnc; do
+ pushd ${dir} > /dev/null
+ emake DESTDIR="${D}" install
+ popd > /dev/null
+ done
+
+ if ! use static-libs; then
+ einfo "Removing static libs ..."
+ rm -f "${ED}"/usr/$(get_libdir)/*.{a,la} || die
+ fi
+}
diff --git a/dev-tcltk/thread/Manifest b/dev-tcltk/thread/Manifest
new file mode 100644
index 000000000000..ca554a6235ea
--- /dev/null
+++ b/dev-tcltk/thread/Manifest
@@ -0,0 +1,5 @@
+DIST thread2.7.1.tar.gz 295134 SHA256 0982027928adcca8a0ea7b47ea41b7d2529b10bb59ccb2d6b9181af7de98bab0 SHA512 18ebd9431b6f6bfb1e6a60797af39db0dee29a16cd457ddab2a18cd5dfd9ef2dea9284ab99238fb05b8284fcc855c2ef8011eb3ed02d7e54d715379d133512dc WHIRLPOOL fde8fb025973666294080a7b9356cb831db4843a09153ca0e810de77e6857ef344e4780816276ed047ec0b0d663fa72a07aeebf9900aa00479b77efd558243db
+EBUILD thread-2.7.1.ebuild 1090 SHA256 2a2f746072129c39a4c34bd54868e8931cf0570046eed393ff7fcfa8e3adb32e SHA512 4a4ffe65e33c306cc03b79d79c24ff14744b4415b15ef1e2b59e76a8a76524baebe5df8967c75a205de454fdf7ea7e537ea5902a2fb77dbd074a5bd29726defc WHIRLPOOL e551040a4f65985513c8ffef8096bbdd2c1b068888a3e3efe01bf5d69ba6feeddeccb59c88b9d296f605be0c2776b600a7df649ffbf523e44c2c0a5318fadece
+MISC ChangeLog 2425 SHA256 8ed22d39f8a8cbdee111858919b1d55c3111bb6fbc34a72d50f7f08bc8efa67a SHA512 1026ba33fdfd14e5537a640604bbaa185a7bed5da12b2a464a0642041dd920f35c576e4567f03e113e3d2baf06e84a38cdef3a5547b83f8f8446c34cf1b3466c WHIRLPOOL 0167bd2aa1ebf3d4984498f8d68fc59eb82bdc3b72cf7fa71c7d900e62ab5914709ab584bbf421ee64443261e6dfe9f09abe04a641fd01f3cdf1e4ded0e6d65d
+MISC ChangeLog-2015 4967 SHA256 96938c76a60714b3892ec4eb6b4b18f0cf6de6ddb8fc490337f282b40d772645 SHA512 e485f14590179e12b9e2a6c58140949c632527d8ed2707847a96046bfeba44c6d21abc24d879d54753ad4221216e66ad4038b27518d2af1a7037415f58af17a7 WHIRLPOOL 2aec2ad1241de2bcdcce7f7ab19c62ca50c3b9104c509d509ea2059a5f98f208ef0b261771f417c065016a6cd1a17372a1b7a41905f9f0e639feef3fee2bb4df
+MISC metadata.xml 326 SHA256 06b47a6bce70778ed4faa71031de53c1ae7d5a7b23cb3f080391a5d82d791b1e SHA512 0a3bc9dd4103f252027e5df1f1bec25c54b8e595c3161cf2e2e3dc083d9613c1cf7f810bae2eea1e4687d87195091d84c16ceac683d7bb508bd38ad565b5ba7d WHIRLPOOL 82bdd8d51cf35e10e4c573955788193f1ec3e2c038e2163544d34361d88d4c99638f70bc417f6918cd13363b7ab3804b718c930e3c3453cfd2c55fc0aae311e5
diff --git a/dev-tcltk/thread/metadata.xml b/dev-tcltk/thread/metadata.xml
new file mode 100644
index 000000000000..ec2fb390faa4
--- /dev/null
+++ b/dev-tcltk/thread/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/thread/thread-2.7.1.ebuild b/dev-tcltk/thread/thread-2.7.1.ebuild
new file mode 100644
index 000000000000..3028f887d212
--- /dev/null
+++ b/dev-tcltk/thread/thread-2.7.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils multilib
+
+MY_P="${PN}${PV}"
+TCL_VER="8.6.2"
+
+DESCRIPTION="Tcl Thread extension"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/project/tcl/Tcl/${TCL_VER}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
+IUSE="debug gdbm"
+
+DEPEND="
+ dev-lang/tcl:0=[threads]
+ gdbm? ( sys-libs/gdbm )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}${PV}
+
+RESTRICT="test"
+
+src_prepare() {
+ # Search for libs in libdir not just exec_prefix/lib
+ sed -i -e 's:${exec_prefix}/lib:${libdir}:' \
+ aclocal.m4 || die "sed failed"
+
+ sed -i -e "s/relid'/relid/" tclconfig/tcl.m4 || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-tclinclude="${EPREFIX}/usr/include"
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ use gdbm && myconf+=( --with-gdbm )
+ use debug && myconf+=( --enable-symbols )
+ autotools-utils_src_configure
+}
diff --git a/dev-tcltk/tix/Manifest b/dev-tcltk/tix/Manifest
new file mode 100644
index 000000000000..18384191634c
--- /dev/null
+++ b/dev-tcltk/tix/Manifest
@@ -0,0 +1,8 @@
+AUX tix-8.4.3-link.patch 402 SHA256 d4992c9d78b90c8e2ae79b1be63218f6d05cfbce31cc5ceadb5bb54571cb9696 SHA512 e220035cc8d71592dfe72e73e1fb92f79f7750b5c8a97d749bdb67aef9488a3684aad7873041ba6054083287c758889cb243d6cac5b83281f738b1392f29a821 WHIRLPOOL 2be7a639fd78020e79a6bb9d340113e58efe78c8ac491ba34ab48fda5a9668cee0b511af756af702b0dffe267993935af5f7b9570d5c50cdd25a7853faed0008
+AUX tix-8.4.3-tcl8.5.patch 6808 SHA256 435f96d7ae0cceab7b09b9b7630a2f51766fb36dd09c2ab84d7d4509365393a7 SHA512 e3dacb53df3852c195306f9d7220f931592ea3ec606b121ac02e3b4f84684efb9da9cae4e51e4fb3b818d7277860bf72378fe63ae835d9eb3a2b7539aee9f9cd WHIRLPOOL aca539ace69d8cd97958bb35ad702398c3eb7e2ce2bfabf9d02ca4b940bf88ce1c7a31dd3fd7eca5a14e4fd6a037c2aee3cbd3ac8687078bedb92f6dd78cb7e0
+AUX tix-8.4.3-tcl8.6.patch 665 SHA256 9c8d7b07d6d5e98c66485d9c3e68ef1b816232c1630590a2f4df0e03a20bcff7 SHA512 3b390b551c6d59d4af695d5c60c8c47c9dc270f97b5e8fd8dab23540c2c0f41b2ef2a43d6dc21249930f294354012718866bcbf773f58c43df7c5e8ee8f22f9e WHIRLPOOL c0b18f5012ea432ceef376ecb646a6ea2b79cb8ca4c21f9f347a6367f8c37054694df97e4ad8e7f72a54ec63b5fafdea09560a4397b13cf3e0341ec2841b4a38
+DIST Tix8.4.3-src.tar.gz 1831503 SHA256 562f040ff7657e10b5cffc2c41935f1a53c6402eb3d5f3189113d734fd6c03cb SHA512 f13217dad0f52c0b706d2fb8ee0886942db64be0325e5d0d51801dbf9a92a7919c743c1445b76dbfa98815817685205e238e2d63f9366a8745ace1e1e9a01852 WHIRLPOOL 5f72582d30eb1be27b3e5a9d7a49b5e5b46d7d8a0bdd1228c592c1b2192bf0d627f50b63990c8bd43f0e2713d61e7e903bdedd8135f5ef67464d51bd6f23110a
+EBUILD tix-8.4.3-r1.ebuild 1377 SHA256 a3386be50b02068860b0bd8c06117436c4dd16c9fd9d81eb710117301710049f SHA512 607ed3c6c35e80b1e58f7847f52d2c55a1c47e000d9f051deb3387a59efb0fddb514cf42ad62f3776d544f8f5769c1d478caec418a6f7240f3a9da37ae47c8c3 WHIRLPOOL 1ed871d06000afc5f2dfa001947d8ac98eba5ee305626596d68ef071c4b6e2b654a42ba70c649813190192e9c3e1a088c6777eaa65ff8473e5130870adea23f9
+MISC ChangeLog 2515 SHA256 18770fb55e19fc2ecaa6feda56d71e6324b236a0bf3adfcdc41b1d73367a7e8e SHA512 51c5df05ed1689075fd8dd42ee3deac86d9d30c2f01fe50cfdb81c57435b90fd02b86635e9954a719b982de88d9fe573ac20b812daf6a5de5c1a596067d4ed5f WHIRLPOOL 420c8973f1a490a42bd77ac8ecab1bf610a01b5bfcf58fc195dc765bab37e34689b87c5bddd5ad3bdc7fe0522f03cea113bc04c0d39c823bdb0b91ee66898c3a
+MISC ChangeLog-2015 6584 SHA256 5ce44e08b89f122e03ca2a97e4710e2cd32ce170d98abb4088e990c9b4bee35b SHA512 215ace9a7a3504a2f92b2221b709d6a174ee2fc6a7a9c4af50b75a85ce13458076dedbba1343f529bc894cd94124dc30617850228c341faf61ff5b2505690120 WHIRLPOOL 30043b5686a72d0d1a99f38fe50b414fed7cd6919f782bb47c917ac5d222942bf629c02525cb53ff44476fd1a2b966a3c22c1b5e9c987059badc1f5fcb8efd89
+MISC metadata.xml 326 SHA256 fd01dd2bb793ecb933f4c0a377629fb686e6249a971d6b9b0086b5ea2f939b1f SHA512 dff5470f4f3ea0164cd7bac8ea41ea6589134bd59f8a0992021bcec2962cbaecdfb4f76e68ea417c8b9ec4c573f89dcb109821208d429672dd5467814148aae7 WHIRLPOOL a12930a33279feb547f8f0a7c2edc65d5b86fd13484e381d507dd2a0f908c7bfd7516252d8792865a55b1b1e1a87c2bf88e07df6df0c836e1845e577a6c3dd50
diff --git a/dev-tcltk/tix/files/tix-8.4.3-link.patch b/dev-tcltk/tix/files/tix-8.4.3-link.patch
new file mode 100644
index 000000000000..d2d402dc8e49
--- /dev/null
+++ b/dev-tcltk/tix/files/tix-8.4.3-link.patch
@@ -0,0 +1,11 @@
+--- Tix8.4.2/Makefile.in.link 2006-11-18 04:41:06.000000000 +0100
++++ Tix8.4.2/Makefile.in 2006-11-18 04:43:13.000000000 +0100
+@@ -124,7 +124,7 @@
+ RANLIB = @RANLIB@
+ RANLIB_STUB = @RANLIB_STUB@
+ SHLIB_CFLAGS = @SHLIB_CFLAGS@
+-SHLIB_LD = @SHLIB_LD@
++SHLIB_LD = @SHLIB_LD@ $(CFLAGS) -Wl,-soname=$(PKG_LIB_FILE)
+ SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@
+ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+ STLIB_LD = @STLIB_LD@
diff --git a/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch b/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch
new file mode 100644
index 000000000000..d87cbff7e9a2
--- /dev/null
+++ b/dev-tcltk/tix/files/tix-8.4.3-tcl8.5.patch
@@ -0,0 +1,190 @@
+diff -up Tix8.4.2/generic/tixImgXpm.c_old Tix8.4.2/generic/tixImgXpm.c
+--- Tix8.4.2/generic/tixImgXpm.c_old 2008-01-08 11:53:37.000000000 +0100
++++ Tix8.4.2/generic/tixImgXpm.c 2008-01-08 12:04:49.000000000 +0100
+@@ -45,19 +45,19 @@ static int ImgXpmConfigureMaster _ANSI_
+ int flags));
+ static int ImgXpmGetData _ANSI_ARGS_((Tcl_Interp *interp,
+ PixmapMaster *masterPtr));
+-static char ** ImgXpmGetDataFromFile _ANSI_ARGS_((Tcl_Interp * interp,
++static CONST84 char ** ImgXpmGetDataFromFile _ANSI_ARGS_((Tcl_Interp * interp,
+ char * string, int * numLines_return));
+-static char ** ImgXpmGetDataFromId _ANSI_ARGS_((Tcl_Interp * interp,
++static CONST84 char ** ImgXpmGetDataFromId _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST84 char * id));
+-static char ** ImgXpmGetDataFromString _ANSI_ARGS_((Tcl_Interp*interp,
++static CONST84 char ** ImgXpmGetDataFromString _ANSI_ARGS_((Tcl_Interp*interp,
+ char * string, int * numLines_return));
+ static void ImgXpmGetPixmapFromData _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ PixmapMaster *masterPtr,
+ PixmapInstance *instancePtr));
+-static char * GetType _ANSI_ARGS_((char * colorDefn,
++static CONST84 char * GetType _ANSI_ARGS_((CONST84 char * colorDefn,
+ int * type_ret));
+-static char * GetColor _ANSI_ARGS_((char * colorDefn,
++static CONST84 char * GetColor _ANSI_ARGS_((CONST84 char * colorDefn,
+ char * colorName, int * type_ret));
+
+ /*
+@@ -286,7 +286,7 @@ ImgXpmGetData(interp, masterPtr)
+ Tcl_Interp *interp; /* For reporting errors. */
+ PixmapMaster *masterPtr;
+ {
+- char ** data = NULL;
++ CONST84 char ** data = NULL;
+ int isAllocated = 0; /* do we need to free "data"? */
+ int listArgc;
+ CONST84 char ** listArgv = NULL;
+@@ -363,7 +363,7 @@ ImgXpmGetData(interp, masterPtr)
+ return code;
+ }
+
+-static char ** ImgXpmGetDataFromId(interp, id)
++static CONST84 char ** ImgXpmGetDataFromId(interp, id)
+ Tcl_Interp * interp;
+ CONST84 char * id;
+ {
+@@ -378,13 +378,13 @@ static char ** ImgXpmGetDataFromId(inter
+ if (hashPtr == NULL) {
+ Tcl_AppendResult(interp, "unknown pixmap ID \"", id,
+ "\"", NULL);
+- return (char**)NULL;
++ return NULL;
+ } else {
+- return (char**)Tcl_GetHashValue(hashPtr);
++ return (CONST84 char**)Tcl_GetHashValue(hashPtr);
+ }
+ }
+
+-static char ** ImgXpmGetDataFromString(interp, string, numLines_return)
++static CONST84 char ** ImgXpmGetDataFromString(interp, string, numLines_return)
+ Tcl_Interp * interp;
+ char * string;
+ int * numLines_return;
+@@ -392,7 +392,7 @@ static char ** ImgXpmGetDataFromString(i
+ int quoted;
+ char * p, * list;
+ int numLines;
+- char ** data;
++ CONST84 char ** data;
+
+ /* skip the leading blanks (leading blanks are not defined in the
+ * the XPM definition, but skipping them shouldn't hurt. Also, the ability
+@@ -510,17 +510,17 @@ static char ** ImgXpmGetDataFromString(i
+
+ error:
+ Tcl_AppendResult(interp, "File format error", NULL);
+- return (char**) NULL;
++ return NULL;
+ }
+
+-static char ** ImgXpmGetDataFromFile(interp, fileName, numLines_return)
++static CONST84 char ** ImgXpmGetDataFromFile(interp, fileName, numLines_return)
+ Tcl_Interp * interp;
+ char * fileName;
+ int * numLines_return;
+ {
+ FILE * fd = NULL;
+ int size, n;
+- char ** data;
++ CONST84 char ** data;
+ char *cmdBuffer = NULL;
+ Tcl_DString buffer; /* initialized by Tcl_TildeSubst */
+
+@@ -588,16 +588,16 @@ static char ** ImgXpmGetDataFromFile(int
+ ckfree(cmdBuffer);
+ }
+ Tcl_DStringFree(&buffer);
+- return (char**)NULL;
++ return NULL;
+ }
+
+
+-static char *
++static CONST84 char *
+ GetType(colorDefn, type_ret)
+- char * colorDefn;
++ CONST84 char * colorDefn;
+ int * type_ret;
+ {
+- char * p = colorDefn;
++ CONST84 char * p = colorDefn;
+
+ /* skip white spaces */
+ while (*p && isspace(*p)) {
+@@ -642,9 +642,9 @@ GetType(colorDefn, type_ret)
+ /*
+ * colorName is guaranteed to be big enough
+ */
+-static char *
++static CONST84 char *
+ GetColor(colorDefn, colorName, type_ret)
+- char * colorDefn;
++ CONST84 char * colorDefn;
+ char * colorName; /* if found, name is copied to this array */
+ int * type_ret;
+ {
+@@ -751,7 +751,7 @@ ImgXpmGetPixmapFromData(interp, masterPt
+ }
+
+ for (i=0; i<masterPtr->ncolors; i++) {
+- char * colorDefn; /* the color definition line */
++ CONST84 char * colorDefn; /* the color definition line */
+ char * colorName; /* temp place to hold the color name
+ * defined for one type of visual */
+ char * useName; /* the color name used for this
+@@ -842,7 +842,7 @@ ImgXpmGetPixmapFromData(interp, masterPt
+ * Parse the main body of the image
+ */
+ for (i=0; i<masterPtr->size[1]; i++) {
+- char * p = masterPtr->data[i+lOffset];
++ CONST84 char * p = masterPtr->data[i+lOffset];
+
+ for (j=0; j<masterPtr->size[0]; j++) {
+ if (masterPtr->cpp == 1) {
+diff -up Tix8.4.2/generic/tixImgXpm.h_old Tix8.4.2/generic/tixImgXpm.h
+--- Tix8.4.2/generic/tixImgXpm.h_old 2008-01-08 12:04:59.000000000 +0100
++++ Tix8.4.2/generic/tixImgXpm.h 2008-01-08 12:05:26.000000000 +0100
+@@ -55,7 +55,7 @@ typedef struct PixmapMaster {
+ int size[2]; /* width and height */
+ int ncolors; /* number of colors */
+ int cpp; /* characters per pixel */
+- char ** data; /* The data that defines this pixmap
++ CONST84 char ** data; /* The data that defines this pixmap
+ * image (array of strings). It is
+ * converted into an X Pixmap when this
+ * image is instanciated
+diff -up Tix8.4.2/generic/tixInt.h_old Tix8.4.2/generic/tixInt.h
+--- Tix8.4.2/generic/tixInt.h_old 2008-01-08 12:05:53.000000000 +0100
++++ Tix8.4.2/generic/tixInt.h 2008-01-08 12:09:35.000000000 +0100
+@@ -23,6 +23,10 @@
+ #include <tixPort.h>
+ #endif
+
++#include <stdlib.h>
++#include <string.h>
++#include <ctype.h>
++
+ /*----------------------------------------------------------------------
+ *
+ * Tix Display Item Types
+diff -up Tix8.4.2/Makefile.in_old Tix8.4.2/Makefile.in
+--- Tix8.4.2/Makefile.in_old 2008-01-08 11:43:41.000000000 +0100
++++ Tix8.4.2/Makefile.in 2008-01-08 11:46:22.000000000 +0100
+@@ -128,6 +128,7 @@ SHLIB_LD = @SHLIB_LD@ $(CFLAGS) -Wl,-son
+ SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@
+ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+ STLIB_LD = @STLIB_LD@
++TCL_VERSION = @TCL_VERSION@
+ TCL_DEFS = @TCL_DEFS@
+ TCL_SRC_DIR = @TCL_SRC_DIR@
+ TCL_BIN_DIR = @TCL_BIN_DIR@
+@@ -294,7 +295,7 @@ VPATH = $(srcdir):$(srcdir)/generic:$(sr
+
+ pkgIndex.tcl:
+ (\
+- echo 'if {[catch {package require Tcl 8.4}]} return';\
++ echo 'if {[catch {package require Tcl $(TCL_VERSION)}]} return';\
+ echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
+ [list load [file join $$dir $(PKG_LIB_FILE)] $(PACKAGE_NAME)]'\
+ ) > pkgIndex.tcl
diff --git a/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch b/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch
new file mode 100644
index 000000000000..0ed17503a56f
--- /dev/null
+++ b/dev-tcltk/tix/files/tix-8.4.3-tcl8.6.patch
@@ -0,0 +1,18 @@
+ generic/tixGrSort.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/generic/tixGrSort.c b/generic/tixGrSort.c
+index 7dee30f..26ec054 100644
+--- a/generic/tixGrSort.c
++++ b/generic/tixGrSort.c
+@@ -447,8 +447,8 @@ SortCompareProc(first, second)
+ * Parse the result of the command.
+ */
+
+- order = strtol(sortInterp->result, &end, 0);
+- if ((end == sortInterp->result) || (*end != 0)) {
++ order = strtol(Tcl_GetStringResult(sortInterp), &end, 0);
++ if ((end == Tcl_GetStringResult(sortInterp)) || (*end != 0)) {
+ Tcl_ResetResult(sortInterp);
+ Tcl_AppendResult(sortInterp,
+ "comparison command returned non-numeric result",
diff --git a/dev-tcltk/tix/metadata.xml b/dev-tcltk/tix/metadata.xml
new file mode 100644
index 000000000000..1925cd538b7d
--- /dev/null
+++ b/dev-tcltk/tix/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tix</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tix/tix-8.4.3-r1.ebuild b/dev-tcltk/tix/tix-8.4.3-r1.ebuild
new file mode 100644
index 000000000000..f3806b06e063
--- /dev/null
+++ b/dev-tcltk/tix/tix-8.4.3-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_P="Tix${PV}"
+DESCRIPTION="A widget library for Tcl/Tk"
+HOMEPAGE="http://tix.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tix/${MY_P}-src.tar.gz"
+
+IUSE=""
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+
+RESTRICT="test"
+
+DEPEND="
+ dev-lang/tk:0=
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ (use x86-macos || use x64-macos) || epatch "${FILESDIR}"/${P}-link.patch
+ sed \
+ -e 's:-Os::g' \
+ -i configure tclconfig/tcl.m4 || die
+ epatch \
+ "${FILESDIR}"/${P}-tcl8.5.patch \
+ "${FILESDIR}"/${P}-tcl8.6.patch
+}
+
+src_configure() {
+ econf \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" \
+ --with-tk="${EPREFIX}/usr/$(get_libdir)"
+}
+
+src_install() {
+ default
+
+ # Bug 168897
+ doheader generic/tix.h
+ # Bug 201138
+ if use x86-macos || use x64-macos; then
+ mv "${ED}"/usr/$(get_libdir)/${MY_P}/libTix{,.}${PV}.dylib
+ dosym ${MY_P}/libTix.${PV}.dylib /usr/$(get_libdir)/libTix.${PV}.dylib
+ else
+ dosym ${MY_P}/lib${MY_P}.so /usr/$(get_libdir)/lib${MY_P}.so
+ fi
+
+ dodoc ChangeLog README.txt docs/*.txt
+ dohtml -r index.html ABOUT.html docs/
+}
diff --git a/dev-tcltk/tkTheme/Manifest b/dev-tcltk/tkTheme/Manifest
new file mode 100644
index 000000000000..006aa6d69a90
--- /dev/null
+++ b/dev-tcltk/tkTheme/Manifest
@@ -0,0 +1,8 @@
+AUX 1.0-Makefile.in.diff 1072 SHA256 1cd64e5b07bfa0397ec697f8418b76b42db06e8c3b2ebb395f5f43b3c5387552 SHA512 eb8e7af60adca22d34cd12dd53ad433d41638bece12e2553555954bd7dd8a762de7053417f69517d1ae30e55c89ac59923b287e3cd2cc419d49695bbb5af6d88 WHIRLPOOL a9f7f462b55c2f76377011cdfc6d33bc47e8f932afd468a93a72a9c05932bdd9f16f9ddcc12d8198d67894bd9ab3aa11f9ba7f08ba4fd449b0281efdd8e9b1d2
+AUX 1.0-cflags.patch 471 SHA256 4db5736b9aed911d9680ab066820916c84d06282a9d02bd37e4632e966606e3d SHA512 c32ea520bc4e7cc0d5d2b88ac1f980b16a3f1f154a04a2335084df3aa8c558b0460f924ae6ca54c8cfb1aeb305ae7a4fed3caf066f90725447e055ed2a63dd08 WHIRLPOOL ad9058087583b0df523f835b96aa7672bc002ba9dd4947bfa5e3cd905d16b9c7c49ed4ede4da6f288c5c5a4ac7c6e92455ba1d722e8dfd4f21a287c09efe4526
+AUX 1.0-configure.diff 289 SHA256 1889f9519b234308e445020233117b223646ac1c304aa2b2a1413da3a0a9eeb0 SHA512 710fa8a002f8347f79c56eff146b476a589f4ec7d457324dff86afa398df3c064cd1e053e5cc1ddad92a5252515051b88ba136174c6c5889a654d1649629ac8d WHIRLPOOL 2b81caca55065c83b1a63e3dc6291ff1348a8feb511a8cf2dcd78e539d887cefd05231ff2fc5386ff836119d108a78c45baf85ec93bb950b4fbc825e3103daa7
+DIST tkTheme.tgz 335061 SHA256 e6a2024d4a70ef69108020604de47885d21df09e558ba5cbfde7ccf67fc8a148 SHA512 71988f5a627582092d30f8d825f4e9e60f11c116e40b90bf4d669cad8146d7130e27ca0f83b0650ca7f225016849242815be27e247c8917f892a16447ed40d7c WHIRLPOOL 0994a65ef7980216c94922d38a014968acc7bfd098cdc4f3c71e576369527ec8a527638313f6c846938e3e02fa3890eed00759aee0a1ee97aef6e7402db2fe0f
+EBUILD tkTheme-1.0-r2.ebuild 1032 SHA256 bbb6ad94aca9cc9c4c1f13ddddfcbcf7db8171cbcfb3595a202ca4425398343f SHA512 57e3f73e4223988caeeba2404e89afcb15bc83f6008b8f29c8c58565b2094eb73cb05716de1a7f92554b843b2869f83f09a89857e28bb5d730a95b188253a395 WHIRLPOOL d8c99160f31b53bdbc7de239ed7d2ca052a0980bc9e19e375efa2ddec599e1499470bc354c50916c34cbc14fbf6cbfdbf5e17f3cbc27dffd2f93693948ac94f2
+MISC ChangeLog 2513 SHA256 3ad0d81aac5e41dbe637d9020f5e34e2d22a0f7e85f0e4b8d905dcbaca32971c SHA512 fc7ca9cb8dfdeaa60d665979d95931c91a2a87bc2f4e49b20d94d624dbe96285bd793f822eca61abc7a3242ad88ef471a7bd36209a21b2fd45bedebc5bd845a9 WHIRLPOOL e4cb85712bbe7f003835be00b193efa49be9d4af721e01158f65fa4f2b6efc78f766a2cff44bf4aa76937066bb9b07f8bc216a1ce17b5b09d93e63ec528d639b
+MISC ChangeLog-2015 3204 SHA256 548b10a60f7752cdd5d7d6179c424dc9651621723f8cb17a0c07614e684d0c27 SHA512 00199000f90c07fc1850b40f6bd4f4cc534da299542a2f626c3ea2ed7e1c8546dca228469305241c834b7670076efc7ea5311ae6efd323a267c83fcf599acc6a WHIRLPOOL 9533f4c94ceb44cce01b43338b8a49a45e637cb10d4b91ed1b736e72c172014870a39f55612febc1f95af3ff5c3727611dcd6fca10018645adf80a8c63a466f0
+MISC metadata.xml 253 SHA256 3bfd2f0bf3aef29f2fd477fbdd61be0a9f473004f344cb2a8b6ffa5458630b93 SHA512 9881e4487c9512c1b72ff2fa72a45b82ef3bf4ade0ec982aea1222f629367ac784ef922b839224add5829cba1717a25d49c31c1481610a02658d0bb265d4eaf6 WHIRLPOOL 357d70105adee9f81d45ebe78ec0eee8407d606e9385b656ad4ce0b6c158d6fc70a17046fd8ad67cce641887ff4d6cb754d66ce70d3b48a772754af88871e5cb
diff --git a/dev-tcltk/tkTheme/files/1.0-Makefile.in.diff b/dev-tcltk/tkTheme/files/1.0-Makefile.in.diff
new file mode 100644
index 000000000000..6076a0455c9b
--- /dev/null
+++ b/dev-tcltk/tkTheme/files/1.0-Makefile.in.diff
@@ -0,0 +1,29 @@
+ Makefile.in | 11 +++++------
+ 1 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 7cf8b1e..c2c7d3b 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -428,16 +428,15 @@ mostlyclean distclean maintainer-clean
+
+
+ install-exec-hook:
+- $(mkinstalldirs) @PKG_TCL@ @PKG_TCL@/demo
++ $(mkinstalldirs) $(DESTDIR)@PKG_TCL@
+ echo "package ifneeded tkTheme" \
+ `echo $(VERSION) | awk -F. '{ printf "%s.%s", $$1, $$2 }'` \
+- "[list load $(DESTDIR)$(libdir)/libtkTheme.so]" \
+- > @PKG_TCL@/pkgIndex.tcl
++ "[list load $(libdir)/libtkTheme.so]" \
++ > $(DESTDIR)@PKG_TCL@/pkgIndex.tcl
+ sed -e 's%load .libs/libtkTheme.so%package require tkTheme%' \
+- < test.tcl \
++ < $(srcdir)/test.tcl \
+ | sed -e 's%cd demo/%cd @PKG_TCL@/demo/%' \
+- > @PKG_TCL@/test.tcl
+- cp demo/* @PKG_TCL@/demo
++ > $(DESTDIR)@PKG_TCL@/test.tcl
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/dev-tcltk/tkTheme/files/1.0-cflags.patch b/dev-tcltk/tkTheme/files/1.0-cflags.patch
new file mode 100644
index 000000000000..34063d365fd7
--- /dev/null
+++ b/dev-tcltk/tkTheme/files/1.0-cflags.patch
@@ -0,0 +1,18 @@
+ configure | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+diff --git a/configure b/configure
+index 373c332..6fc1a14 100755
+--- a/configure
++++ b/configure
+@@ -3341,9 +3341,7 @@ fi
+
+
+ if test "${SHARED_BUILD}" = "1" ; then
+- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
+-else
+- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
++ CFLAGS+=' ${SHLIB_CFLAGS}'
+ fi
+
+ #--------------------------------------------------------------------
diff --git a/dev-tcltk/tkTheme/files/1.0-configure.diff b/dev-tcltk/tkTheme/files/1.0-configure.diff
new file mode 100644
index 000000000000..c73f7dc3aa3f
--- /dev/null
+++ b/dev-tcltk/tkTheme/files/1.0-configure.diff
@@ -0,0 +1,12 @@
+diff -Naur tkTheme.orig/configure tkTheme/configure
+--- tkTheme.orig/configure 2002-08-24 04:19:04.000000000 +0900
++++ tkTheme/configure 2005-06-26 22:26:30.000000000 +0900
+@@ -3472,7 +3472,7 @@
+
+
+
+-PKG_TCL=${TCL_PACKAGE_PATH}/tkTheme
++PKG_TCL=${TCL_PACKAGE_PATH%% *}/tkTheme
+
+
+
diff --git a/dev-tcltk/tkTheme/metadata.xml b/dev-tcltk/tkTheme/metadata.xml
new file mode 100644
index 000000000000..2b168a2f48c6
--- /dev/null
+++ b/dev-tcltk/tkTheme/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/tkTheme/tkTheme-1.0-r2.ebuild b/dev-tcltk/tkTheme/tkTheme-1.0-r2.ebuild
new file mode 100644
index 000000000000..496c8d524646
--- /dev/null
+++ b/dev-tcltk/tkTheme/tkTheme-1.0-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools-utils eutils toolchain-funcs
+
+DESCRIPTION="Tcl/Tk Theming library"
+HOMEPAGE="http://www.xmission.com/~georgeps/Tk_Theme/other/"
+SRC_URI="http://www.xmission.com/~georgeps/Tk_Theme/other/${PN}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc x86"
+IUSE="debug examples static-libs threads"
+
+DEPEND="
+ dev-lang/tk
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXpm"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-Makefile.in.diff
+ "${FILESDIR}"/${PV}-configure.diff
+ "${FILESDIR}"/${PV}-cflags.patch
+ )
+
+src_configure() {
+ tc-export CC
+ local myeconfargs=(
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ --with-tk="${EPREFIX}/usr/$(get_libdir)"
+ --with-x
+ $(use_with debug symbols)
+ $(use_enable threads)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ insinto /usr/share/${PN}
+ use examples && doins -r demo
+}
diff --git a/dev-tcltk/tkXwin/Manifest b/dev-tcltk/tkXwin/Manifest
new file mode 100644
index 000000000000..44a9986a6944
--- /dev/null
+++ b/dev-tcltk/tkXwin/Manifest
@@ -0,0 +1,7 @@
+AUX 1.0-Makefile.in.diff 796 SHA256 a72626c055365de8b7e41c54436ddca5d805ca7f96cc62c9f015ac36989b6455 SHA512 12dfd890912242624ff3801cd92f414525e7ddf74e373e2287529f2d84d90a68dc2ab7dcd69cdd22c7e33d9df2c5499e2db7beed3b74e8167a43ee3b1d814267 WHIRLPOOL 593ce9fd2b1ea9d5f28644aa24fca755a08ca4f4fd7b3e682f4b4fcd922d36b01d1e898752ef3f99b0d91e1f4963968737c08c277690e41e906a01bafeaf979d
+AUX tkXwin-1.0-configure.patch 2262 SHA256 1d461f12200da5ebcea38854ead641f9be4ab700fd62603a27b78065c9eb735b SHA512 1c2ba4e9ecc0781a47e3523b387ed2bee91bf6f255564bfd9af60ab8faf3a4759d848ae5b6cdc612068fee3582413a8e7f792f04c5126578eea92ef8db01a72d WHIRLPOOL 356c31d5bfe6c3605c9c7088a4e7981a441fd5c987fac27c6d7cdd65fbd6546a3b0fa8331d1411f1e304061d1d46d4b2368d287cb05f96fedf1c21ac1de90d9f
+DIST tkXwin-1.0.tgz 168650 SHA256 4390cd165c584162dccf8414d2f4f27bf4dd3b2ad1e66fbe280ee390475fb3c0 SHA512 0313ec6fc81c872019a7e247fcaac899d5d584eb8066e7abf1d1feff7bc741de43a9b8a6212ed6dcd12566e8c995bc658360833c692eea5f1b4b5fc199cf2d6e WHIRLPOOL 375b086509295aa93a5da15f285c3aa2e8336e9c619aabc974910bd52c47ffbec47543be488067b29f433fde4ffe1b854ec638216b61b40388fb7b158a367873
+EBUILD tkXwin-1.0-r3.ebuild 1013 SHA256 5813d9d7d4dd6cc4561aa167d97c9679d33b0b39cef47a297e13b67b5463a77c SHA512 b3f90ed7e7cbd5d8ca989fc2b2e4c0baa95cce1f5f0f07c8fb83be0e53e23208b82003b116dc5ee7beb816de06d52828e7fbf908422a73e7aa5dbe1cf3baffca WHIRLPOOL b1ce60000fdde6dd679d4a05aa12bd8e5665d5cde9aa4c8d7b418f6c8e73489c0105070aa0a252cfb40c80af9c17e91459d0fcb9908b3f24f46b1e5bbe449d40
+MISC ChangeLog 3225 SHA256 e65edea902dd2359f5834e942c87344c14a59c65ba9064057a2d6d5773b85220 SHA512 f3b8ba38d952723ec5c74a4a9bdc2b3e53610c09826b473b72fc1ab11a409fd85156586347ab2d3f6f684a06d6028247ffd3fe81c91ac9e49e45c8808c61c060 WHIRLPOOL cc1670226899f360db6c3380c6fb0be9e891462e0352846ebdb7a80cf181bca3f6aa4ef49774484277b363feb829bdeffda81a5f9198ecf5093c63aacf849191
+MISC ChangeLog-2015 3827 SHA256 7a7c5ed146eee11b816a93f13b9a2750e057030be53775b985b2a5271c965bcc SHA512 2a6d3ee9aae2468152becebce77316189a8910a1d003310d704aa4d931e982a05ba2a1f22e0c25c585c92490fdb7f04c20f369b026dd5f0df977ec9c6aeb346e WHIRLPOOL a35e93e537c3b75914b9ca9930b902411f02ea69ebf067625180e2f118629578e59bd01d482891ffe4578a54fb0eee26ee711ebc7623e8ffbf97c9a1b84c67c7
+MISC metadata.xml 335 SHA256 19c5967061a54f7127cce89b271582799e35a57c2d8c3503bb2f50d725e71be5 SHA512 e7f2cfb18a80ce750d413c54bd49c92a6bb32faeafb28bf9175f1434b73ec0fe4e1ab878d40d6a554a7671e02bed3ca89f29a04d6515801af706ed5ca8bbd891 WHIRLPOOL 77890d6c6773fffceae08f5df788501b731ad3b9fbd2dd8cb03aab28a17b9ec450514dd6bba33404bd4d5d83afafdde908a1997f0f356a1d9b6e87712c642fe9
diff --git a/dev-tcltk/tkXwin/files/1.0-Makefile.in.diff b/dev-tcltk/tkXwin/files/1.0-Makefile.in.diff
new file mode 100644
index 000000000000..bd10890c719c
--- /dev/null
+++ b/dev-tcltk/tkXwin/files/1.0-Makefile.in.diff
@@ -0,0 +1,21 @@
+--- Makefile.in.orig 2003-02-01 22:03:34.000000000 -0500
++++ Makefile.in 2003-02-01 22:04:39.000000000 -0500
+@@ -432,14 +432,14 @@
+
+
+ install-exec-hook:
+- $(mkinstalldirs) @PKG_TCL@
++ $(mkinstalldirs) $(DESTDIR)@PKG_TCL@
+ echo "package ifneeded tkXwin" \
+ `echo $(VERSION) | awk -F. '{ printf "%s.%s", $$1, $$2 }'` \
+- "[list load $(DESTDIR)$(libdir)/libtkXwin.so]" \
+- > @PKG_TCL@/pkgIndex.tcl
++ "[list load $(libdir)/libtkXwin.so]" \
++ > $(DESTDIR)@PKG_TCL@/pkgIndex.tcl
+ sed -e 's%load .libs/libtkXwin.so%package require tkXwin%' \
+ < test.tcl \
+- > @PKG_TCL@/test.tcl
++ > $(DESTDIR)@PKG_TCL@/test.tcl
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/dev-tcltk/tkXwin/files/tkXwin-1.0-configure.patch b/dev-tcltk/tkXwin/files/tkXwin-1.0-configure.patch
new file mode 100644
index 000000000000..ac2f84b97f21
--- /dev/null
+++ b/dev-tcltk/tkXwin/files/tkXwin-1.0-configure.patch
@@ -0,0 +1,93 @@
+ configure | 43 +++----------------------------------------
+ 1 file changed, 3 insertions(+), 40 deletions(-)
+
+diff --git a/configure b/configure
+index d92a1bf..d8605a0 100755
+--- a/configure
++++ b/configure
+@@ -823,7 +823,6 @@ fi
+
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+-CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+ echo "configure:829: checking whether ${CC-cc} accepts -g" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+@@ -839,23 +838,6 @@ rm -f conftest*
+
+ fi
+
+-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+-if test "$ac_test_CFLAGS" = set; then
+- CFLAGS="$ac_save_CFLAGS"
+-elif test $ac_cv_prog_cc_g = yes; then
+- if test "$GCC" = yes; then
+- CFLAGS="-g -O2"
+- else
+- CFLAGS="-g"
+- fi
+-else
+- if test "$GCC" = yes; then
+- CFLAGS="-O2"
+- else
+- CFLAGS=
+- fi
+-fi
+-
+ # Check whether --enable-static or --disable-static was given.
+ if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+@@ -2078,7 +2060,6 @@ fi
+
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+-CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+ echo "configure:2084: checking whether ${CC-cc} accepts -g" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+@@ -2094,24 +2075,6 @@ rm -f conftest*
+
+ fi
+
+-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+-if test "$ac_test_CFLAGS" = set; then
+- CFLAGS="$ac_save_CFLAGS"
+-elif test $ac_cv_prog_cc_g = yes; then
+- if test "$GCC" = yes; then
+- CFLAGS="-g -O2"
+- else
+- CFLAGS="-g"
+- fi
+-else
+- if test "$GCC" = yes; then
+- CFLAGS="-O2"
+- else
+- CFLAGS=
+- fi
+-fi
+-
+-
+ # Find a good install program. We prefer a C program (faster),
+ # so one script is as good as another. But avoid the broken or
+ # incompatible versions:
+@@ -3403,9 +3366,9 @@ fi
+
+
+ if test "${SHARED_BUILD}" = "1" ; then
+- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
++ CFLAGS+=' ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
+ else
+- CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
++ CFLAGS+=' ${CFLAGS_WARNING}'
+ fi
+
+ #--------------------------------------------------------------------
+@@ -3534,7 +3497,7 @@ fi
+
+
+
+-PKG_TCL=${TCL_PACKAGE_PATH}/tkXwin
++PKG_TCL=${libdir}/tkXwin
+
+
+
diff --git a/dev-tcltk/tkXwin/metadata.xml b/dev-tcltk/tkXwin/metadata.xml
new file mode 100644
index 000000000000..7d188a276b89
--- /dev/null
+++ b/dev-tcltk/tkXwin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">beepcore-tcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tkXwin/tkXwin-1.0-r3.ebuild b/dev-tcltk/tkXwin/tkXwin-1.0-r3.ebuild
new file mode 100644
index 000000000000..c6b35a7c21a9
--- /dev/null
+++ b/dev-tcltk/tkXwin/tkXwin-1.0-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools-utils multilib toolchain-funcs
+
+DESCRIPTION="Tcl/Tk library to detect idle periods of an X session"
+HOMEPAGE="http://beepcore-tcl.sourceforge.net/"
+SRC_URI="http://beepcore-tcl.sourceforge.net/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug static-libs threads"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="
+ dev-lang/tk[threads?]
+ x11-libs/libXScrnSaver
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-proto/scrnsaverproto
+ x11-proto/xextproto"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-Makefile.in.diff
+ "${FILESDIR}"/${P}-configure.patch
+ )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_prepare() {
+ tc-export CC AR RANLIB
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ --with-tk="${EPREFIX}/usr/$(get_libdir)"
+ --enable-gcc
+ --with-x
+ $(use_enable threads)
+ $(use_enable debug symbols)
+ )
+ autotools-utils_src_configure
+}
diff --git a/dev-tcltk/tkcon/Manifest b/dev-tcltk/tkcon/Manifest
new file mode 100644
index 000000000000..1e55ad34c476
--- /dev/null
+++ b/dev-tcltk/tkcon/Manifest
@@ -0,0 +1,5 @@
+DIST tkcon-2.5.tar.gz 139834 SHA256 3ff3eb7198b060d2c3bdc195c1f7d8532e63742447179fbb6091a3886bab42a9 SHA512 f53d21dbf281112b761970b05aa643d598819789644445a0e01f6eddcf98709c4b7ef635bc69ec40fc14b5c78397b240b86d8b6ed63aac48f656242c19fd7851 WHIRLPOOL 0d13bb208292ab9a9782eaf0b4d92848f866c36e178556671563ebecc4a48ebb3c766fb09b94e24932cbd293f5ff098c50fcd99bcf7223e7ba4efb17f2e59e10
+EBUILD tkcon-2.5.ebuild 673 SHA256 180ec1e923582c32861642478094a6ed0734f4e4185f891640c0579a5b987711 SHA512 0673560ed94ee6861dbbbe91fef57da8005c701d5baed5a8276e0c3c5f73553a90deb6b7ff2b7058f5e08a3cc60902cdb8759e1720cca3a1f57a1193e4f14bea WHIRLPOOL 1f98c81835992cca58ad7a3ddc7b99e1e20a4af358f79e4583d457f5b354b5ca398ab6ed4518bf97e0d745a35fb3acd5cfc81d03e2897ed7bb305a15a81e336d
+MISC ChangeLog 2418 SHA256 43c1db729dd3104c6918b7782563a5d2d8bec4dd43b33dead3935c8767c30e36 SHA512 68137186736cf0e19cd15e384e53fcd690ad961d7b0137c079f7f187dae2aec7e7f1b6103952558591507907056f029e75315f3aad2168829b26943292d70156 WHIRLPOOL 603218f77a58e1235aad46b15cb4a44554689f7e459cbc7e0857fff5f39787e533ee11f25ae7543ae756143fb61b7fe4d6e19475ac7b72244aa77bca0c4755d0
+MISC ChangeLog-2015 905 SHA256 bda2ca321b210e46db9140354f084793ed2b962039ea8400e11fe735a72cee11 SHA512 31c64e3c391e64529dd37bc834f62a3b975d75bfda69e554a60cec2d6a7d4f4b3d7db12b5f9d31cb40bcdc5e2b3534fe2df5253302a2f09f549a00d2617d15f0 WHIRLPOOL 64d8c40db5b5e4103e6038c4ec2a46fcf5d3bcf335d7970fb2eb44db7fd529758d424fe0fae60820b4f32d22ba99381d22ed171e8cdeb2d490f0422ab00d553d
+MISC metadata.xml 694 SHA256 c6fc70bc9e84ca4698a31de02423bfbb26070c1b2c51d87301e02624cf268d72 SHA512 ee533966467bd4b772b07339013888f9ce6ac0ae55a5c5f2b650fa70a7664d7bb2fdb760f01f8261ea23daaef39a1f4067df4e2d2759cbf75facbba4d3f3b9ec WHIRLPOOL af3f14a128a5854c9ed6c09116297cc98752be4efc9cf843ba6fee8af55d416cf35a3a155da0ad17c39962bd80dc38a2071de35ecd6db7306435e0e70ffe7ba9
diff --git a/dev-tcltk/tkcon/metadata.xml b/dev-tcltk/tkcon/metadata.xml
new file mode 100644
index 000000000000..16fe78d616a1
--- /dev/null
+++ b/dev-tcltk/tkcon/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ tkcon is a replacement for the standard console that comes with
+ Tk. The console itself provides more features than the standard
+ console. It is meant primarily to aid one when working with the
+ little details inside tcl and tk, giving UNIX users the GUI console
+ provided by default in the Mac and Windows Tk.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tkcon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tkcon/tkcon-2.5.ebuild b/dev-tcltk/tkcon/tkcon-2.5.ebuild
new file mode 100644
index 000000000000..b3a7f5c5fcd8
--- /dev/null
+++ b/dev-tcltk/tkcon/tkcon-2.5.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils multilib
+
+DESCRIPTION="Tk GUI console"
+HOMEPAGE="http://tkcon.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+IUSE="doc"
+
+DEPEND="dev-lang/tk"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ local tclver="$(echo 'puts $tcl_version' | tclsh)"
+ local instdir=/usr/$(get_libdir)/tcl${tclver}/${PN}2.5
+ dodir ${instdir}
+ cp -pP pkgIndex.tcl tkcon.tcl "${D}"${instdir} || die
+ dodir /usr/bin
+ dosym ${instdir}/tkcon.tcl /usr/bin/tkcon
+ dodoc README.txt
+ if use doc; then
+ dohtml doc/*
+ fi
+}
diff --git a/dev-tcltk/tkdnd/Manifest b/dev-tcltk/tkdnd/Manifest
new file mode 100644
index 000000000000..25769680e24d
--- /dev/null
+++ b/dev-tcltk/tkdnd/Manifest
@@ -0,0 +1,7 @@
+DIST tkdnd2.2.tar.gz 501708 SHA256 89a55e295f8e82829558b4c4548259fbb8a1dc193280b04c2f138bf561a7370f SHA512 96f3b7209d82801b69932531b987cfe2c3367fbaaffd2198afc84bf21643437db8a9958511e31ce2c36896538ff8f8c9237950d0f82b832f7133fb1e5768fd26 WHIRLPOOL 92182d6e54bbbd87e690d77247e6402f76e7dd45eea7cfb318fd104e25d7540534681e0da0e007579af095953fa5989f4f48838f8e6e7da1619176979e97f829
+DIST tkdnd2.6-src.tar.gz 180278 SHA256 e3f499c62d1db2e9a4468791544c784eac727175e094aa06bfe7441dfb3f08e7 SHA512 2ce1be9b49c21bc67102575420311c1ec764493315791c8a76313cae6d22846b3049dd85cdc0b2f28592889432b85103b0fa207445f678dbe22f988eb1d6fc87 WHIRLPOOL b1fc76e0f5d6f91b8a048413f46d0b590ab0f106c4efcf5d26296b2c01ce1586978fda0769da25739a563bec32052030a140c7814f24414612447f3619a69a98
+EBUILD tkdnd-2.2.ebuild 903 SHA256 4f7c070151da05a71951cf8607e718cd27c1144343c4d4f9b25070a8b04b2fcf SHA512 627a72f61f8a7d8e4192851155943bd001b66aed95b7f30f5e7c48d55d180f0fe3e7352d25d7c63fc9045f526872ad0684a473e66af8179e15a8549ff16db15a WHIRLPOOL f44cec60b2d5dfb580a96596c328a0f2ab07729fa48dd414550cce5dc3e40d2d998005f31935a8fc7c0f11fe29b6f90e2b3fad9097e58476412e8da9fef34b79
+EBUILD tkdnd-2.6.ebuild 907 SHA256 f6e615e79e76ee100c45eea2e0acec7cb3bda9e913f0b88333679c311b3b71d0 SHA512 d5fd89c87195c02ccdef39cd9a2fcacad964c1ae60e61536525ff7f7c407f7ac4c4111f52b56dbed9c95d8c2b2f861d4f87e818f3c08c16a49bc4e9f74aaecc9 WHIRLPOOL d4a96abd77fe706aa8ca6547b25b84d9d8cc791c7df7aa130dfe484daff55fbd22c9af6249b50db4a963e587538cd1a1b8e8b0058c463a1cba581066122d3e2b
+MISC ChangeLog 2462 SHA256 c125b356e1bc53c23498bee9fc4c95bf51c76c9e582aa76ce036a8cfd660e8dc SHA512 b4fbe954596d977f67ba5a144fa12d7d0ce74e73a3c6c75c67a33bc49a13cc6b663b364ac942dd5419773ec3e0091386786c01148305d84c87daa164b69c5a8a WHIRLPOOL 0273944227909d789ccd5f5ac8404fe6d99c610f338af2c20c511d0018732c6fdd9d69bdec5f4888ede621bdf946ba7e2d096e946af22ba988507b65006996e0
+MISC ChangeLog-2015 779 SHA256 aa3c1b393e1d2ad25c63a32552d2d8c4a8b30a8ac659de816dab2c5d1484afff SHA512 64212e8352d14cbb3cf54e37925fe4fef94b446fa75f4a2deb1ff6bb3855c71e141597d2da3831608f0c7af6d03b784c3ac741fa4d128467bed0b71d1f196a3f WHIRLPOOL 9f78b3ed6c9e767f12182dcb28747aee4beba6a986d409dc368c7d30801cbb21d91e2d620801a9039d7864cef257f9589c9ac959b564fabb255d17427f24e354
+MISC metadata.xml 328 SHA256 f59b8d18b0ea92af6abf6ffd99a8181f109c07ac92d5078b8231217587ffc25b SHA512 3130aa488c2f677c91f3b2ba72a2a9e16446865a10f1629ae7e44b810189ceb24cb9cd14d834a71b76609cc9a2e043d8db7560e9446103368084385754cd5045 WHIRLPOOL c52e511d4be9a11933445804b7dd0dbaf781ddc28a0e4561d0dd6587c2f7a49c41b35f5f7cec2fbb64bc43da8a853020817eb165a0039a7fa6a706421c6c9b8e
diff --git a/dev-tcltk/tkdnd/metadata.xml b/dev-tcltk/tkdnd/metadata.xml
new file mode 100644
index 000000000000..2c2d17964dce
--- /dev/null
+++ b/dev-tcltk/tkdnd/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tkdnd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tkdnd/tkdnd-2.2.ebuild b/dev-tcltk/tkdnd/tkdnd-2.2.ebuild
new file mode 100644
index 000000000000..3f608bac2cdf
--- /dev/null
+++ b/dev-tcltk/tkdnd/tkdnd-2.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools-utils eutils
+
+MY_PN="TkDND"
+
+DESCRIPTION="Extension that adds native drag & drop capabilities to the tk toolkit"
+HOMEPAGE="http://www.ellogon.org/petasis/tcltk-projects/tkdnd/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}/${MY_PN}%20${PV}/${P/-/}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug threads X"
+
+RESTRICT="test"
+
+DEPEND="dev-lang/tk"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${P/-/}
+
+src_prepare() {
+ sed \
+ -e 's:-O2::g' \
+ -e 's:-fomit-frame-pointer::g' \
+ -e 's:-pipe::g' \
+ -i configure tclconfig/tcl.m4 || die
+}
+
+src_configure() {
+ local myeconfargs
+ use X && myeconfargs+=( --with-x )
+ use debug && myeconfargs+=( --with-symbols )
+ use threads && myeconfargs+=( --enable-threads )
+ autotools-utils_src_configure
+}
diff --git a/dev-tcltk/tkdnd/tkdnd-2.6.ebuild b/dev-tcltk/tkdnd/tkdnd-2.6.ebuild
new file mode 100644
index 000000000000..77ed496b529b
--- /dev/null
+++ b/dev-tcltk/tkdnd/tkdnd-2.6.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils eutils
+
+MY_PN="TkDND"
+
+DESCRIPTION="Extension that adds native drag & drop capabilities to the tk toolkit"
+HOMEPAGE="http://www.ellogon.org/petasis/tcltk-projects/tkdnd/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}/${MY_PN}%20${PV}/${P/-/}-src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug threads X"
+
+DEPEND="dev-lang/tk"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${P/-/}
+
+RESTRICT="test"
+
+src_prepare() {
+ sed \
+ -e 's:-O2::g' \
+ -e 's:-fomit-frame-pointer::g' \
+ -e 's:-pipe::g' \
+ -i configure tclconfig/tcl.m4 || die
+}
+
+src_configure() {
+ local myeconfargs
+ use X && myeconfargs+=( --with-x )
+ use debug && myeconfargs+=( --with-symbols )
+ use threads && myeconfargs+=( --enable-threads )
+ autotools-utils_src_configure
+}
diff --git a/dev-tcltk/tkimg/Manifest b/dev-tcltk/tkimg/Manifest
new file mode 100644
index 000000000000..904dc4aae2cf
--- /dev/null
+++ b/dev-tcltk/tkimg/Manifest
@@ -0,0 +1,7 @@
+AUX tkimg-1.4-png2.patch 1044 SHA256 be9ab3c3cd82b65fd0ed2d3e30398ee671d19c78aa60e6464aac11caa56660ea SHA512 fbf982af5446fc54212745eee8338d5dc4b169f79045963be23a84c7a0ef9e68f54d895156b4f040f6585499f1ead9967ac0ce57106e3ca3615fbaa9adcd1fb7 WHIRLPOOL d918cde7bc6fc1364f8d86b709f8366a65506104b70a5a9901afd5c89f5d23dc6a0bc4606a4d1fb97bc5e49ee6eb3ce6c019031c09bbe558d278248454bed143
+DIST tkimg-1.4-patchset-1.tar.xz 17956 SHA256 b1eb9db771928ea71edb17852b23c6b760c112e3c776be51502b4f8b2cbd75f4 SHA512 bd20e0beaa224c42e856e6d44d86c2a5f04c28d096c561f44c4afcf8c821bf859c602156a9be60f23f906e8da2f43c89ca358d32e8f9497296e7c5a5bf23ed69 WHIRLPOOL 39099d752c4e6ccd96640c1287c218fff261a98e04455b9e8cba5c2aa308186916bc3583e4941c87f73323b3e46731ba2ed86358c10ab85cb6b913931585a778
+DIST tkimg1.4.tar.bz2 4912894 SHA256 a6beb98a8f98040f979eee60c133319f4338f1a5a3ab87379fb69b473e73e3b1 SHA512 b03aba6e21e35b8733dbc4fa66fae67284a05e68248e5afb2a85c1520c74d0c6c5091860a3ab682f4a662a318c562339e9b7b82f050e63bbf48d1b4757d379a1 WHIRLPOOL 0ace52c074389c09de240922c95a40ff4b1ab01d5bc060fca168396abad11a845326d15e582b039da6062c1b2780cee572299d21902947edd90195d4b99e6089
+EBUILD tkimg-1.4-r9.ebuild 1806 SHA256 a3d11a5cc8d56c6cad980558421f7163384413b05cfd8e4169ff615f38f328a3 SHA512 1dbbd2a6c0f924efd4351fdbdf1791d61adaa720b81892367ab5efd9b3c33a83f0891013751914cf0a8d8690ef958ee2bae9e3be375dd35c4cb82c700be2e710 WHIRLPOOL 10bbfd48f8dcf1d8b231b8dbd6dc16af835be4a8e8fc4b02353e4ebbd8058e1a200b2cc9a79e4ae1eb9dc15a89c5d078abe2fb7147dcbd70d2fd74be9bea57ff
+MISC ChangeLog 2832 SHA256 51b1bb4157b7d8387860e4fd43a2f7bafa3225d0df79bd8964adca30759cad5e SHA512 abdbe69a2275b8335e5308062da4c30a7be3b8ce3fb3ef7b874e94d19e04407c62c6d4d8e6719792335209a78888a56cafae1b59f45e68e61d30872d66527b8f WHIRLPOOL c3e721863918ce78558c1518c3d5a1933892df54b552545615746a9998f3c4a70681498c6cf4401f78407c98c4fdf1948860b77d03a61add378d07198361e2e2
+MISC ChangeLog-2015 10966 SHA256 153f3b14a578e718e54d4c9703532d4e84e134123a12ed2bdae96c1f01461b99 SHA512 8b40a89e1ab0df3e795a7e4322fe1206962b2bddee943c32ed8b47d96ac731c7e982ff637b35e51c6f1a840c152249cc44191eceeaa4668dce67b554eb76133f WHIRLPOOL ba63faa02ceaacb5eb171b2e299870194511997515bfc48d5302450dc291928ea939297a636591d0811a656459e813012bee01c3cf215713b3a9d2257f209664
+MISC metadata.xml 435 SHA256 907bf37086c569ba8c9728bf9a4101fa8b8ffef9d2d733a912666d9dc78bcf4c SHA512 9e8d0c94ee643ba3e9a8100ff28bef36fe059a6bdb0706c4f649e2433d4a44284eb66209d95f5dbc75057e4aae0337b14f1ccaaf2dadc8d3cdc19d8e04b368ad WHIRLPOOL 18f8494dff9d21d542fa49bf4001f93444fac75d09bf8b1f08d4e7b52aba172e221c55b6ac8d2db756565d6a937b7466f6bca3fe9fd18c3db3ea07cf91fc8118
diff --git a/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch b/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch
new file mode 100644
index 000000000000..195e9be43fa7
--- /dev/null
+++ b/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch
@@ -0,0 +1,36 @@
+--- png/png.c.orig 2010-06-17 06:40:24.000000000 -0700
++++ png/png.c 2013-04-23 20:57:32.000000000 -0700
+@@ -332,6 +332,16 @@
+ png_set_expand(png_ptr);
+ }
+
++ if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) {
++ png_set_sRGB(png_ptr, info_ptr, intent);
++ } else if (png_get_gAMA) {
++ double gamma;
++ if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) {
++ gamma = 0.45455;
++ }
++ png_set_gamma(png_ptr, 1.0, gamma);
++ }
++
+ png_read_update_info(png_ptr,info_ptr);
+ block.pixelSize = png_get_channels(png_ptr, info_ptr);
+ block.pitch = png_get_rowbytes(png_ptr, info_ptr);
+@@ -353,16 +363,6 @@
+ block.offset[3] = 0;
+ }
+
+- if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) {
+- png_set_sRGB(png_ptr, info_ptr, intent);
+- } else if (png_get_gAMA) {
+- double gamma;
+- if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) {
+- gamma = 0.45455;
+- }
+- png_set_gamma(png_ptr, 1.0, gamma);
+- }
+-
+ png_data= (char **) ckalloc(sizeof(char *) * info_height +
+ info_height * block.pitch);
+
diff --git a/dev-tcltk/tkimg/metadata.xml b/dev-tcltk/tkimg/metadata.xml
new file mode 100644
index 000000000000..7f29c15bbf0f
--- /dev/null
+++ b/dev-tcltk/tkimg/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The "Img" package adds a lot of image formats to Tcl/Tk.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tkimg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tkimg/tkimg-1.4-r9.ebuild b/dev-tcltk/tkimg/tkimg-1.4-r9.ebuild
new file mode 100644
index 000000000000..9b621a465ef7
--- /dev/null
+++ b/dev-tcltk/tkimg/tkimg-1.4-r9.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib prefix toolchain-funcs virtualx
+
+MYP="${PN}${PV}"
+
+DESCRIPTION="Adds a lot of image formats to Tcl/Tk"
+HOMEPAGE="http://tkimg.sourceforge.net/"
+SRC_URI="
+ https://dev.gentoo.org/~jlec/distfiles/${P}-patchset-1.tar.xz
+ mirror://sourceforge/${PN}/${PV}/${MYP}.tar.bz2"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE="doc test static-libs"
+
+RDEPEND="
+ dev-lang/tk:=
+ >=dev-tcltk/tcllib-1.11
+ media-libs/tiff:0=
+ >=media-libs/libpng-1.6:0=
+ >=sys-libs/zlib-1.2.7:=
+ x11-libs/libX11
+ virtual/jpeg:="
+DEPEND="${RDEPEND}
+ test? (
+ x11-apps/xhost
+ media-fonts/font-misc-misc
+ media-fonts/font-cursor-misc )"
+
+# Fails with jpeg-turbo silently, #386253
+#RESTRICT="test"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}"/${P}-jpeg.patch \
+ "${WORKDIR}"/${P}-tiff.patch \
+ "${WORKDIR}"/${P}-png.patch \
+ "${FILESDIR}"/${P}-png2.patch \
+ "${WORKDIR}"/${P}-zlib.patch
+
+ find compat/{libjpeg,libpng,zlib,libtiff} -delete
+
+ sed \
+ -e 's:-O2 -fomit-frame-pointer::g' \
+ -e 's: -pipe::g' \
+ -i */configure || die
+
+ eprefixify */*.h
+ tc-export AR
+}
+
+src_test() {
+ Xemake test || die "Xmake failed"
+}
+
+src_install() {
+ local l bl
+
+ emake \
+ DESTDIR="${D}" \
+ INSTALL_ROOT="${D}" \
+ install
+
+ if ! use static-libs; then
+ find "${ED}"/usr/$(get_libdir)/ -type f -name "*\.a" -delete || die
+ fi
+
+ # Make library links
+ for l in "${ED}"/usr/lib*/Img*/*tcl*.so; do
+ bl=$(basename $l)
+ dosym Img1.4/${bl} /usr/$(get_libdir)/${bl}
+ done
+
+ dodoc ChangeLog README Reorganization.Notes.txt changes ANNOUNCE
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins demo.tcl
+ insinto /usr/share/doc/${PF}/html
+ doins -r doc/*
+ fi
+}
diff --git a/dev-tcltk/tklib/Manifest b/dev-tcltk/tklib/Manifest
new file mode 100644
index 000000000000..a97cc4d551d7
--- /dev/null
+++ b/dev-tcltk/tklib/Manifest
@@ -0,0 +1,6 @@
+DIST tklib-0.6.tar.bz2 5637725 SHA256 d2e0648bdaf1ab0f874136f1e5645bd68a8fe206f1905d9f08614d90ee2e3025 SHA512 c4dbe6afe9d1d9c97edc154c807d429086e045f8b202870f21cafcd846b7ff759c8260d44d5e1e1322a0e7d3478c1dfb12d7a0c76200f583ac3bb85b21bf04b4 WHIRLPOOL afeb8f62d58f540eb7ecc99c150c719411a41e585ac09a868896484266e69f85ece4c408bc176d4cc87f123280b584b27b29780e8b9d2f58d22a8dae98b8d5d9
+EBUILD tklib-0.6-r1.ebuild 840 SHA256 6957b84ed3db160b59418f2b48cdfb6df3467db5b5ce1e005aa4a3b3a7773405 SHA512 dcfe0a410584c73e3a5c38359ee10dc585e32802f37c4e54599131dcace206f5f0b214f0e0118a670cbeb71585e79b06f6059c7e75b419ad7fe995b06d88e461 WHIRLPOOL f38b19d91be7ee16fb0f8f05dd1f5e41d4b8a8409e0ee42bdb36a70743bb8c9f7eb2edf4372b97e439f61717bd8e3912e98b44a3823a3c37604865826fece2a6
+EBUILD tklib-0.6-r2.ebuild 840 SHA256 6957b84ed3db160b59418f2b48cdfb6df3467db5b5ce1e005aa4a3b3a7773405 SHA512 dcfe0a410584c73e3a5c38359ee10dc585e32802f37c4e54599131dcace206f5f0b214f0e0118a670cbeb71585e79b06f6059c7e75b419ad7fe995b06d88e461 WHIRLPOOL f38b19d91be7ee16fb0f8f05dd1f5e41d4b8a8409e0ee42bdb36a70743bb8c9f7eb2edf4372b97e439f61717bd8e3912e98b44a3823a3c37604865826fece2a6
+MISC ChangeLog 2614 SHA256 fd7910210d2572af4d35d51a7b2f54428ffafd1e1890ecd4ab70b4dd04d6cc5a SHA512 b01c8ef4197f334eb39b3afc0934de0459e04713cca145f7c4f50a46e058fb58bc38ab9cebdb89024b356b883e1100e923e92a1c60d2ddb5051a8e6726ead208 WHIRLPOOL 970e74774b73cf0548a2d27aac852190adefcdbcf2726e8e3c126fafb46cd473fdba0d220eaf060eb206eb2ac606f977469be49bfc74e48f82ed01b8eb198793
+MISC ChangeLog-2015 1057 SHA256 6d4deba58856e27965a1db66378ce77c8e6c4b3eb7fc04a7451daea09687d0d7 SHA512 eee4d0e2c9ef47d84832d18adfaf26dd71e15328a1e283812c9f45b81219acf9b3f0809d0f6b671e25109be68927d3bcce42b54e214ccc6eddb5754d9ac4e2fc WHIRLPOOL d3d6113f2b94042d54230661208c1b161bdeb3412cedd6b01f17e55829a9307a4c3349dde6ba354f581399d2bce3a25988dfb755ed1085243f6e553624d417d5
+MISC metadata.xml 259 SHA256 f3ad7890286839b12dc011613c2ba3df199a206c295ba8c433a8fe7f0dcc5815 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639 WHIRLPOOL f5ad746e91e08e44d2d857057d7203fe515cbdd295f69a2d3ce2cb35343d2dc3f2879b57d00e8782bd416bfd36ce4504a7a91bbcf325eabe71075d0726e2bece
diff --git a/dev-tcltk/tklib/metadata.xml b/dev-tcltk/tklib/metadata.xml
new file mode 100644
index 000000000000..227dda5ba584
--- /dev/null
+++ b/dev-tcltk/tklib/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/tklib/tklib-0.6-r1.ebuild b/dev-tcltk/tklib/tklib-0.6-r1.ebuild
new file mode 100644
index 000000000000..9231c58cf5e7
--- /dev/null
+++ b/dev-tcltk/tklib/tklib-0.6-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+CODE=6a397dec6188148cf6a6fe290cf2bd92a9190c42
+
+DESCRIPTION="Collection of utility modules for Tk, and a companion to Tcllib"
+HOMEPAGE="http://www.tcl.tk/software/tklib"
+SRC_URI="http://core.tcl.tk/tklib/raw/tklib-0.6.tar.bz2?name=${CODE} -> ${P}.tar.bz2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="BSD"
+IUSE="doc"
+
+RDEPEND="
+ dev-lang/tk:0
+ dev-tcltk/tcllib"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ default
+ if use doc; then
+ emake DESTDIR="${D}" doc
+ dohtml doc/html/*
+ fi
+ dodoc DESCRIPTION.txt README*
+ dosym ${PN}${PV} /usr/$(get_libdir)/${PN}
+
+ mv "${ED}"/usr/share/man/mann/datefield{,-${PN}}.n || die
+ mv "${ED}"/usr/share/man/mann/menubar{,-${PN}}.n || die
+ mv "${ED}"/usr/bin/dia{,-${PN}} || die
+}
diff --git a/dev-tcltk/tklib/tklib-0.6-r2.ebuild b/dev-tcltk/tklib/tklib-0.6-r2.ebuild
new file mode 100644
index 000000000000..9231c58cf5e7
--- /dev/null
+++ b/dev-tcltk/tklib/tklib-0.6-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+CODE=6a397dec6188148cf6a6fe290cf2bd92a9190c42
+
+DESCRIPTION="Collection of utility modules for Tk, and a companion to Tcllib"
+HOMEPAGE="http://www.tcl.tk/software/tklib"
+SRC_URI="http://core.tcl.tk/tklib/raw/tklib-0.6.tar.bz2?name=${CODE} -> ${P}.tar.bz2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="BSD"
+IUSE="doc"
+
+RDEPEND="
+ dev-lang/tk:0
+ dev-tcltk/tcllib"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ default
+ if use doc; then
+ emake DESTDIR="${D}" doc
+ dohtml doc/html/*
+ fi
+ dodoc DESCRIPTION.txt README*
+ dosym ${PN}${PV} /usr/$(get_libdir)/${PN}
+
+ mv "${ED}"/usr/share/man/mann/datefield{,-${PN}}.n || die
+ mv "${ED}"/usr/share/man/mann/menubar{,-${PN}}.n || die
+ mv "${ED}"/usr/bin/dia{,-${PN}} || die
+}
diff --git a/dev-tcltk/tkpiechart/Manifest b/dev-tcltk/tkpiechart/Manifest
new file mode 100644
index 000000000000..1b35225cd074
--- /dev/null
+++ b/dev-tcltk/tkpiechart/Manifest
@@ -0,0 +1,5 @@
+DIST tkpiechart-6.5.tar.bz2 38096 SHA256 3fae6e09431300d78706d0505fb6a0a95299b7edee74d4eab872ca73bed34ab1 SHA512 828f106be8fe37ab8876c7e0b8ee00dee7f067f21489710653909ba277aed65de169e0f592ce0fedf5bc0ffc584d633d163b1b72fb628c1b2e541e8a850636aa WHIRLPOOL 2d073953ae14f062adca984fe69401eb41f1d971e41cbf81115f7714b676c644588964510e9cd453b3bbc3abfaf3c5ac1b54fdeaf7263193a9e63629d8372465
+EBUILD tkpiechart-6.5-r1.ebuild 627 SHA256 30bc619ad12069c31362650b14b9d29a8324db30ddb9d5bcfbf2d9b1922ad7cf SHA512 8902aa9295d4921ab582da11d5ec90a44e12a5caef4932d5993e5a6765dde03a34f8fd4005ff8c1d3310621e5757f534375e437b7b0484418070677331dbaf46 WHIRLPOOL 955cd873f2ba813d39c7cf8c82696be8591b9f093ad4b92c6ac15251b311ddc7937cab7677c09e4bbe510e16451aac2f50a013e9943112178699934227a4036f
+MISC ChangeLog 2439 SHA256 3f782ad33dc698504408f2d004d449cbff8d8ed2ecb041fcd28eb27cfae643d0 SHA512 b08f56ffa8827efab7fed48b8dc17024c58db993e80a6bf2b53b68769453f4055062cc6adcacd0cb68ab25bc7863c93389c37ac5a020a80d7511274467eee840 WHIRLPOOL 407ab54a55c418461bee659a0bea250af8f16eb1c7915900c51c9f202246994ebe2d10b78b8ead2626d16c57bf68c0c5c64f5914117ce3a055c0aafb93ef3c91
+MISC ChangeLog-2015 1345 SHA256 068e2cfd233bbfa86a5d01840f1071144380ece73887802a0a9e735cbf689ecd SHA512 be824eeaac7586e1ac40cd9c7e373854a28af2b2642f8000cc7a827d32a1e794026d736ac0de069fa51af055942bded88f1f497fb41cfb17c06c7b8be2787e3c WHIRLPOOL e1dda806aecfeb207fc9be18495291b2dd44dea26157282ba017d9e60d6be04ea0fb0b04924be0fbeb9afeb5c8b031cc7ff5b48b03c45db0e543487904062c97
+MISC metadata.xml 249 SHA256 b0f74d8b723073d3fc9417e8e6ed1ed0cadec16a609c40abf9a977ebc93c32a5 SHA512 e0b0007b4cfb9cb2af7a9bd33d578bc2bf1819985fa37d2dc8ec14cc1ae2987583d4054ad7497d9cf6c603b33f502bc6ee579ff990daa341b2e0572d585fbea6 WHIRLPOOL 4d36385654fa737b131ab83f5ae030c87f04e442052c7618f855d4124991c5fe7fc737b8f69c2eb5ab1a614093c599729f3c0bc9b595ddbb63df7eb351786f70
diff --git a/dev-tcltk/tkpiechart/metadata.xml b/dev-tcltk/tkpiechart/metadata.xml
new file mode 100644
index 000000000000..d836ed383e14
--- /dev/null
+++ b/dev-tcltk/tkpiechart/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/tkpiechart/tkpiechart-6.5-r1.ebuild b/dev-tcltk/tkpiechart/tkpiechart-6.5-r1.ebuild
new file mode 100644
index 000000000000..52eedeeddcb3
--- /dev/null
+++ b/dev-tcltk/tkpiechart/tkpiechart-6.5-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit multilib
+
+DESCRIPTION="create and update 2D or 3D pie charts in a Tcl/Tk application"
+HOMEPAGE="http://jfontain.free.fr/piechart6.htm"
+SRC_URI="http://jfontain.free.fr/${P}.tar.bz2"
+
+LICENSE="jfontain"
+KEYWORDS="amd64 ~ppc x86"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=dev-lang/tk-8.3
+ dev-tcltk/tcllib"
+
+src_install() {
+ dodir /usr/$(get_libdir)/tkpiechart
+ ./instapkg.tcl "${D}"/usr/$(get_libdir)/tkpiechart || die
+
+ dodoc CHANGES CONTENTS README TODO || die
+ dohtml *.gif *.htm || die
+ docinto demo
+ dodoc demo* || die
+}
diff --git a/dev-tcltk/tkpng/Manifest b/dev-tcltk/tkpng/Manifest
new file mode 100644
index 000000000000..415f9a561463
--- /dev/null
+++ b/dev-tcltk/tkpng/Manifest
@@ -0,0 +1,5 @@
+DIST tkpng0.9.tgz 127804 SHA256 92f361d4f43c3a0638f85f87af6cef30c63a1896fa59a9220bcfab4852ab10fb SHA512 7f832ec19b53ba0f98d3db24d7b7106ae9bb6983d46ee33c46e90a1b152646f2a99ea417c9c6f9bed1f2859ef509510b531d26b3bb81f20d4e291ea1092896fb WHIRLPOOL 30243c54ccefb07d430963a8afdc4852134d8f735cb7feeb6b690587174e33be6bae61e3405a1b7d1d4a7019a1db019e54f4617e12e8350d3a4547009ea5f19e
+EBUILD tkpng-0.9.ebuild 692 SHA256 e58558d1f8a6ad58076f5be8bb8b2820cd2e83cff2009deaf1152754a85676a8 SHA512 f095c3842eb3d85ba4fe214d010f7e368e5f8b586c0337073a20e55319652882e25db3400a67c43e10a3003779194a00749e4b185c2dc68a9d8e6a45021fa7a6 WHIRLPOOL fcba4c2ab021e4f9c8dac89a6694ebe9507b1cbaa9d81742fe99ba0a0fac65df83581f1bd361b1ae8cb51e15b7c00aef6a2de64006a2ef2b388a2b75489ce7ad
+MISC ChangeLog 2558 SHA256 cc06f39c08e0482c04c284a2559e29533a23db7f501812dab014916d9de5fd3c SHA512 30b3c1740d3086f1942b6fb76e51d94d13ee968e710d462bcb4820f82388b138e44ff89599335ca4a61f17fe7e04af33438a3c742fad823ba406a095c0a41615 WHIRLPOOL 1e636bafd972e13dacd1fce03ba12cc60867e8f532e83e0059060d556b3fafdeae2897d23add4254ba7149f5da4b1d617493db82cb12e236726f481c9839776d
+MISC ChangeLog-2015 801 SHA256 2e6bcfa3dd31ab67358ee1ff6cb19c7ff992bad145b3b0ecc33a49f93c8902fa SHA512 db88a680a904d5c27dcc57d60756dab2b986ce75f05a67a3a6f209671861d2347c442b35da30b766e81fc3c32e3cef51cff5be458df61e3a39e694bb72019ef4 WHIRLPOOL c2d8373f5c745aee5a0aac9ad86a44190191f22d933bc3278953d8197d5e632e40e220457d74076c7604598638591ffae06b9480989836e0ea249984a298b6a9
+MISC metadata.xml 328 SHA256 ced8432d23005d3db12ae00b12e3c5c58b8c2f9ae4e069e4a8805d67aa7e7e57 SHA512 e8aa8c4a77c92a9ce6961707314d3b806a9ee65584d5e34d1c7f87acf7aa365b63d0131060ddc2db3dd4c816d625a1b705cd7be291938c3245462b500b80f6d0 WHIRLPOOL 8dc72a61d366c36df2f9f12a85c77dcb5de33a953eb35b889ba10f59cf8ed2966ee056eddad86d5cfd9929b6306cff5b087fd5566cdb9ac1a30f99888d73b2b1
diff --git a/dev-tcltk/tkpng/metadata.xml b/dev-tcltk/tkpng/metadata.xml
new file mode 100644
index 000000000000..bcd5cf589a25
--- /dev/null
+++ b/dev-tcltk/tkpng/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tkpng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tkpng/tkpng-0.9.ebuild b/dev-tcltk/tkpng/tkpng-0.9.ebuild
new file mode 100644
index 000000000000..316297207f53
--- /dev/null
+++ b/dev-tcltk/tkpng/tkpng-0.9.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Implements support for loading and using PNG images with Tcl/Tk"
+HOMEPAGE="http://www.muonics.com/FreeStuff/TkPNG/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${MY_P}.tgz"
+
+SLOT="0"
+LICENSE="tcltk"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug threads"
+
+RDEPEND="
+ >=dev-lang/tcl-8.4:0=
+ >=dev-lang/tk-8.4:0=
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+# test target in Makefile, but test not shipped
+RESTRICT="test"
+
+S="${WORKDIR}"/${MY_P}
+
+src_configure() {
+ econf \
+ $(use_enable debug symbols) \
+ $(use_enable amd64 64bit) \
+ $(use_enable threads)
+}
diff --git a/dev-tcltk/tktable/Manifest b/dev-tcltk/tktable/Manifest
new file mode 100644
index 000000000000..48b27bc50cfe
--- /dev/null
+++ b/dev-tcltk/tktable/Manifest
@@ -0,0 +1,5 @@
+DIST Tktable2.10.tar.gz 284135 SHA256 c335117fa1be45fe4d3032e96fd4b4641fff6a4f8467878608dabed11198a4cb SHA512 d69b1c766abb2833f48c900ca4d4fd3927f138ddf728dd76f2087a784604daa4356ec60a146e71d2fb2508a644598711e0373cb81dbfb0272b7ad16a0754e899 WHIRLPOOL 514be8c8048c947ddb9a59c35105f4f81848de51aa70d6961a739b8077683019baa583042dd4a1e807e51abdcd51ab95f9f69e3a0963a7c6c21fc456c023ea6d
+EBUILD tktable-2.10.ebuild 661 SHA256 47b920b6d9bd85a83346256e852d3bc58c620a1ea8afbd6c94b7a97cb522492c SHA512 4c9c306f3e30d32b0b193261e134e86d19d1ab5a0284de04a73dc44afd44077d1a0cb7468b08affd69ee086afa05be59b937f9c0060be0700b4970f6dbfcdbad WHIRLPOOL 57aecba793768ad4dcbf2b90b33ef17e89dc6c8561ad423129d6b8213fe1aea97d27389fe46df0d4bd6b822e79b16c32eb2ad7edbd06362d69d597697ff207bc
+MISC ChangeLog 2426 SHA256 441025e7b4924781343f133fef21522f11be0675e11ae087013899eacc613e6a SHA512 4de7cecf486dfca3508fff58185991b40ad6c466c46f5f530e1b965d7d7d81c424d148437361a2fcd3af04b3117f8907bc8f151dfff6d2965baed3d759ed1fc2 WHIRLPOOL 0e0b473e19c4456f46951fb61ff4d9589ba401552dab05085f0aca636bad0ee0ddd18bc573ddda6b3fdd9a1f06de35d36212ddc97e93cad82b9393ace680df57
+MISC ChangeLog-2015 1625 SHA256 ca4f115322fa6b7abd89adff21fb9f31ab249d7343fddf79d21ff49277ca22d8 SHA512 3b9185d1829c868e38bdcebb774c2694b4efde891ec5aa203f74d1105f88b73a2d6fc59e4df1a05138da3ad13ed3684525918f345f5f594a95c57f4bd3a470fc WHIRLPOOL da169030fb51c553c49f87cc3e083d48def2ce0e72ff80e989953d80d4f168c36a8075fed62b4048e5f7f15c2a82ff32ec9717c097928710386a7bcbef17794a
+MISC metadata.xml 330 SHA256 7dd4296c6cfe949a3b7ae6eb545da3e09ec5c667f4855af42f72909573393b2d SHA512 fb035126055cbb4296c92e5ada9ec06baf9873f04b4e4f4dc369d54cdc14979bedc36940396b87c7f8a6c1bd113ceefd585c81ef64c4e1f052216a5a7a266238 WHIRLPOOL f0d89b0b0dcc581e4ba5c8adc3eaac76c65fe5aceb2eb9e84e0c54e23de587ab09af8c27fbaad3a6acf18e615e1c4fe80001184f9823646c5c00f633fda3680b
diff --git a/dev-tcltk/tktable/metadata.xml b/dev-tcltk/tktable/metadata.xml
new file mode 100644
index 000000000000..fb33b8e74e9d
--- /dev/null
+++ b/dev-tcltk/tktable/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tktable</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tktable/tktable-2.10.ebuild b/dev-tcltk/tktable/tktable-2.10.ebuild
new file mode 100644
index 000000000000..b25ff1651470
--- /dev/null
+++ b/dev-tcltk/tktable/tktable-2.10.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+MY_P="Tktable${PV}"
+
+DESCRIPTION="full-featured 2D table widget"
+HOMEPAGE="http://tktable.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tktable/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 ppc x86"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=dev-lang/tk-8.0"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -e '/^install:/{s: install-doc::}' \
+ -e '/^PKG_EXTRA_FILES/{s:=.*:=:}' -i Makefile.in || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dohtml doc/tkTable.html || die
+ dodoc ChangeLog README.txt release.txt || die
+}
diff --git a/dev-tcltk/tktray/Manifest b/dev-tcltk/tktray/Manifest
new file mode 100644
index 000000000000..2ef0c3229933
--- /dev/null
+++ b/dev-tcltk/tktray/Manifest
@@ -0,0 +1,6 @@
+AUX 1.1-ldflags.patch 371 SHA256 944943ef5ce0085c322f30bad80e7387a7b08da32ef1cd1f49f8cf8626343bc2 SHA512 d29c06676607eca5fb7a0a0675382a80441117a5a070236329d8f4e8c046a5ade060d7e618740953f4c4c87f432fd661a19e201b737b4273805a48bd0165f553 WHIRLPOOL 6d4b24f957b6a6ae05909a3aadf500bd0e4a3f94d3052c5e09c667fd2c02afeedb1e32ba42e1e8a5921b1f91cf5f9bef0c23c52286bc61da7b31886c6125af2e
+DIST tktray1.3.9.tar.gz 134484 SHA256 ef48b75ea7979186a05b605f8c153f92bbcc46cb76dee8be1d30bcda179bfcfc SHA512 2c52a343e7f8ff5b7e7bb2e2f1de7766111ce6b47b8ace478a1f2aaa6c28a5b19ec854f2b22511136be1f1da2a87f506932a1d1b893deb3c44a7e47a28609518 WHIRLPOOL cb22a1611f839f604e26061757f978d280faa0b9d0f0ac388c51d686f87f93b7370c43dd1685617ed25ec8d58532ee8e11cc6552e84f677958094fe54b81b9e5
+EBUILD tktray-1.3.9.ebuild 779 SHA256 0188f9fcccf24ae49cb4ac544d5f6c2dd74d9942a2b4c54e0f578d6cb0df9c57 SHA512 41a73581b12ef092c326b20121f476f174a09359ebb94e9f32701b8d6758f0ea4f28d5bb60946e542e86b15443b0951b88edd112825d2a67e4c559da019e45b4 WHIRLPOOL cab1d4ef349bd7f995e27382859b7b10507f64bad401aaebbdf49071a9558b62c46e8daae6333ea1caf4ddd920f64c51d7519b4782fae0e846751f3ba96886eb
+MISC ChangeLog 2451 SHA256 34c837eaa41ec01d1f9092457e7346aee29e1ca030ef7236ffa662528a6ee924 SHA512 a497e989b3056496ff85fc347fa8c891a128662599de981c6a581938b67ccfa940dc7c854560dfb691dac0bf38a2a0309e3b728b8da3fed110208e21ac65169c WHIRLPOOL 08970cf4bf5f4052e36e8ae4b16c7a248b0c8b17201bfe6dc7daf9fbb8bec304628d2a06e7f27bfaed329c1e9006e3a3b1a61c88a30ce56fc12d164c33190401
+MISC ChangeLog-2015 1827 SHA256 578b399287421e7dbb12e99236edaff16b7bd53839d76bff1aaa0298d9ea881d SHA512 bd96aa0a9820aa08c32b691f40c8548c74bb42f5a9a9c78c61f4460036411c15af2c98caaca531e90139d4f01e9ec6e65522b82a742e9591fdb25986159ba9b3 WHIRLPOOL 87f3119fac56d68d24dfbe85389d312771273ae8bb43b68292fd21027f124600c67c127eb438dd55e420573ed46eaa30e65717f9a0d0c4ac195a723291d7032b
+MISC metadata.xml 259 SHA256 f3ad7890286839b12dc011613c2ba3df199a206c295ba8c433a8fe7f0dcc5815 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639 WHIRLPOOL f5ad746e91e08e44d2d857057d7203fe515cbdd295f69a2d3ce2cb35343d2dc3f2879b57d00e8782bd416bfd36ce4504a7a91bbcf325eabe71075d0726e2bece
diff --git a/dev-tcltk/tktray/files/1.1-ldflags.patch b/dev-tcltk/tktray/files/1.1-ldflags.patch
new file mode 100644
index 000000000000..0392face2958
--- /dev/null
+++ b/dev-tcltk/tktray/files/1.1-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index 9c3945b..c626019 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -107,7 +107,7 @@ OBJEXT = @OBJEXT@
+ RANLIB = @RANLIB@
+ RANLIB_STUB = @RANLIB_STUB@
+ SHLIB_CFLAGS = @SHLIB_CFLAGS@
+-SHLIB_LD = @SHLIB_LD@
++SHLIB_LD = @SHLIB_LD@ $(CFLAGS) $(LDFLAGS)
+ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+ STLIB_LD = @STLIB_LD@
+ #TCL_DEFS = @TCL_DEFS@
diff --git a/dev-tcltk/tktray/metadata.xml b/dev-tcltk/tktray/metadata.xml
new file mode 100644
index 000000000000..227dda5ba584
--- /dev/null
+++ b/dev-tcltk/tktray/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/tktray/tktray-1.3.9.ebuild b/dev-tcltk/tktray/tktray-1.3.9.ebuild
new file mode 100644
index 000000000000..85b005ef2865
--- /dev/null
+++ b/dev-tcltk/tktray/tktray-1.3.9.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils virtualx
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="System Tray Icon Support for Tk on X11"
+HOMEPAGE="https://code.google.com/p/tktray/"
+SRC_URI="https://tktray.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc ~sparc x86"
+IUSE="debug threads test"
+
+DEPEND="
+ >=dev-lang/tcl-8.4:0=
+ >=dev-lang/tk-8.4:0=
+ x11-libs/libXext"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/1.1-ldflags.patch
+}
+
+src_configure() {
+ source /usr/lib/tclConfig.sh
+ CPPFLAGS="-I${TCL_SRC_DIR}/generic ${CPPFLAGS}" \
+ econf \
+ $(use_enable debug symbols) \
+ $(use_enable threads)
+}
+
+src_test() {
+ Xemake
+}
diff --git a/dev-tcltk/tktreectrl/Manifest b/dev-tcltk/tktreectrl/Manifest
new file mode 100644
index 000000000000..55c8391be67b
--- /dev/null
+++ b/dev-tcltk/tktreectrl/Manifest
@@ -0,0 +1,10 @@
+AUX 2.2.9-as-needed.patch 347 SHA256 507e7a7bcdf7ef236eae8f342d2a1170bd8dd8244a88d21c91666141df4da3f5 SHA512 6b3a916c97a28a644b04fa7a653e13e594a7d71a70aa64f2ab8b08793268a788737b568a83355dfa94d8dc0df95516dfb4b6cba98ed4cf54b2fceae35e2711a7 WHIRLPOOL 8db8f99fed405f6e6651a4634abd4a1ed8900e933b596773e411ae4409cc16e15e8514adcb0707d170da65db613cdf4b8db709940ca22d7cb5c3ba6f60116d21
+DIST tktreectrl-2.2.10.tar.gz 742335 SHA256 0baf7ad6a8e7874d40b4c2c338d3b43630b7bace8f99101757ec102d8efd8c9e SHA512 20598393d54ee304d0be74ef3de9f242433814b7c5dc8b649f8f18dfa5505dee66aba624e2ac2671a167b8ac491f5edbe0dc397db74cab740c6bc59e564b53e1 WHIRLPOOL 8a440225af7a05a1ca4abfe0086686d347e0f629fbf1fce1245c79c674fa70daf2f80c07f0e91fb7aeb1ee652bdf5987b3d873a885ee5b102fe5a307fbfdd978
+DIST tktreectrl-2.2.9.tar.gz 718999 SHA256 f6404844a296726597c4e825bdfca88c3e6257de23e487550b9089db3bdc98f7 SHA512 8e1f5d176e939238cfc6dc83e55dc1df911e13f633bac494b4e9a954729b6047b6436283509f83ec57d43eefd7dae4052ffe3af38a22a162faf7959498bc0b0e WHIRLPOOL e869df0de06767a8afc8908ee0baaf2fbd7d8c33a428ddc78bac5e093a3bffc7c5acf8bd12827e44ac3921b1e7cd1b443031a61593afe2cd676bce5bc2fca3d3
+DIST tktreectrl-2.4.1.tar.gz 945101 SHA256 c2d19cfc7ce8b150cb50a6b63dc6327c91fb71f76b4f2947e0334a15d5f869d3 SHA512 5ea3f286326cb9dd32a259f8032c37dd3bfe4c4ecdac878cc8e7a283b542c4eb67a5434c97ecc81b9773f08e55563401a173234452ebf63547c00780e5703c1b WHIRLPOOL 120808d8656e9d4d6cafa1071ade9214172cf1d5ebb075870cf2cb1e7ca4314e5463798ed21b847f5829fe205ef882bb78eb9b3c3ce5b74b7a14a94ea38a2bae
+EBUILD tktreectrl-2.2.10.ebuild 814 SHA256 e6f867567ad9f95484bead15ac55c6879afb3ffd7bf54bb92b1e075233bb81e6 SHA512 712468b548f56334f3da627658448413dc1694f2387ad62bc4ccf1822b857230bef15c1468e4b9671a534f2a23da93158e1698480083f2ee2d13ec3dff8b893b WHIRLPOOL 79d4fc0c45e2b685a419ca78968271559412235dfbf6f887cdf12557fb158c52fc9d7cb17624adfbd942231e8aae24ba992b8a3116b8ba919f569a9e01f029f6
+EBUILD tktreectrl-2.2.9.ebuild 872 SHA256 05feca1026e1027d7dbe1a9a4f7fabc0b26f90c2e60d9123b78afb55cf60ab3e SHA512 dd92235605b0bc0e17f8c2b060fb461e1f5bebdb194c4b7004e512b7d69aaf77da7e4212507034891560ee60df65ac1b0e4dc2faaa44d16e3ee650a5c696ab39 WHIRLPOOL a9aad728a6cf277583845b843f3396ab72f65e0acd2e882e32f93f0549af653342e92bb91bfdae44b8a4c30c06d1bbda435af0598ff284959cda6db5d5b376b1
+EBUILD tktreectrl-2.4.1.ebuild 814 SHA256 50d6feaa0dc8ae5cceb8d2dbe47b2452139a6e6318e5f00429c8365581e9a24f SHA512 a0e838736c77eec8ad8d015bda96b06b2a7b7b307f65abac7d6cc8bfae42bf5c9e4a684f8222abb0d4a8cc0f71f1b35f8b1c6ab4c8bfd6b4be74cf651835a688 WHIRLPOOL ed8b495a8bf9975df3020fec93899dbccaa210f634e506a11cd859c16827e7058c7e51da759f89d3acf94e46682904f30da0bee619b1caaddbc0b4207408e3ad
+MISC ChangeLog 2587 SHA256 d945f2da10d8c36224c4faaa30208c5b74f898d4105534e8b3abcfd6a6399a06 SHA512 8f6d68f503bc9f2d2802697d89c5bdf6ab7e98c1891c253d525105c9ef2d9127b33b840cdf52f2cb5922df334fdffb3b308685949956c07da6d807f97c809e14 WHIRLPOOL 90670cc122f7179461dca8474d0b9f0c96cbf9356ec07f97c2ffd088ee9b691aabebcec3806ff5d874be034b18cb6aa7c6ef10b74d79dd91d94b85470cb14538
+MISC ChangeLog-2015 1668 SHA256 1077f36037df592f440a2322615d5b12a48c95c993dd3e5c41e484784ab716e4 SHA512 d1d3f3d2166f744636df6e12475a050bb5d84fd63a5cd61eb14b288331eeb68d843efa11a4dc56c157b852fc800123505f31df3461d58a4bb698ea4db12691ea WHIRLPOOL d1c2fdd1bc93be1eaf58ca3019555aaf6d8a68f23fc1855926fc80e8b3c13347f02a19a192752067393340d2ae0ee70fc32fa8504e1328c24cd9330a208823cb
+MISC metadata.xml 363 SHA256 97618476f478dd7ae2d8558997c2a8fcd49e5abf281913bd4076016328e57ad6 SHA512 bf1d25c20fa8d56bafb78ee43f041cc28de6c94a0cf05fceb030f6c3ef050a3c028a8ebae51b8c46121aa0d5fe67123de15a2e1dd507efe63308bdc4bc8e32a4 WHIRLPOOL 4c814cddabace540ae987c4f8d1b25b262d13f42571e2091c3d0c62b9876a201986fb40d3bedf2d1a8e552bec84930f39c5bc9ba62883e974da69a05ea8b9a83
diff --git a/dev-tcltk/tktreectrl/files/2.2.9-as-needed.patch b/dev-tcltk/tktreectrl/files/2.2.9-as-needed.patch
new file mode 100644
index 000000000000..8b6dcea48acb
--- /dev/null
+++ b/dev-tcltk/tktreectrl/files/2.2.9-as-needed.patch
@@ -0,0 +1,11 @@
+--- Makefile.in 2008-02-24 23:22:10.000000000 +0100
++++ Makefile.in.new 2009-07-11 23:54:48.000000000 +0200
+@@ -107,7 +107,7 @@
+ RANLIB = @RANLIB@
+ RANLIB_STUB = @RANLIB_STUB@
+ SHLIB_CFLAGS = @SHLIB_CFLAGS@
+-SHLIB_LD = @SHLIB_LD@
++SHLIB_LD = $(CC) $(LDFLAGS) -shared
+ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+ STLIB_LD = @STLIB_LD@
+ TCL_DEFS = @TCL_DEFS@
diff --git a/dev-tcltk/tktreectrl/metadata.xml b/dev-tcltk/tktreectrl/metadata.xml
new file mode 100644
index 000000000000..99bf67dcc9a6
--- /dev/null
+++ b/dev-tcltk/tktreectrl/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="shellicon">shellicon extension</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">tktreectrl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tktreectrl/tktreectrl-2.2.10.ebuild b/dev-tcltk/tktreectrl/tktreectrl-2.2.10.ebuild
new file mode 100644
index 000000000000..5c55af25b88a
--- /dev/null
+++ b/dev-tcltk/tktreectrl/tktreectrl-2.2.10.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="A flexible listbox widget for Tk"
+HOMEPAGE="http://tktreectrl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="X debug shellicon threads"
+
+RDEPEND=">=dev-lang/tk-8.4"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/2.2.9-as-needed.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable threads) \
+ $(use_enable shellicon) \
+ $(use_enable amd64 64bit) \
+ $(use_enable debug symbols) \
+ $(use_enable X x) \
+ --enable-shared
+}
+
+#src_test() {
+# emake test || die
+#}
+
+src_install() {
+ default
+ mv "${ED}"/usr/lib*/treectrl${PV}/htmldoc "${ED}"/usr/share/doc/${P}/
+}
diff --git a/dev-tcltk/tktreectrl/tktreectrl-2.2.9.ebuild b/dev-tcltk/tktreectrl/tktreectrl-2.2.9.ebuild
new file mode 100644
index 000000000000..9873de5788a7
--- /dev/null
+++ b/dev-tcltk/tktreectrl/tktreectrl-2.2.9.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="A flexible listbox widget for Tk"
+HOMEPAGE="http://tktreectrl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="X debug shellicon threads"
+
+RDEPEND=">=dev-lang/tk-8.4"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-as-needed.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable threads) \
+ $(use_enable shellicon) \
+ $(use_enable amd64 64bit) \
+ $(use_enable debug symbols) \
+ $(use_enable X x) \
+ --enable-shared
+}
+
+src_test() {
+ emake test || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc ChangeLog README.txt || die
+ mv "${ED}"/usr/lib*/treectrl${PV}/htmldoc "${ED}"/usr/share/doc/${P}/
+}
diff --git a/dev-tcltk/tktreectrl/tktreectrl-2.4.1.ebuild b/dev-tcltk/tktreectrl/tktreectrl-2.4.1.ebuild
new file mode 100644
index 000000000000..24e9f19a4e36
--- /dev/null
+++ b/dev-tcltk/tktreectrl/tktreectrl-2.4.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils virtualx
+
+DESCRIPTION="A flexible listbox widget for Tk"
+HOMEPAGE="http://tktreectrl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="X debug shellicon threads"
+
+RDEPEND=">=dev-lang/tk-8.4"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/2.2.9-as-needed.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable threads) \
+ $(use_enable shellicon) \
+ $(use_enable amd64 64bit) \
+ $(use_enable debug symbols) \
+ $(use_enable X x) \
+ --enable-shared
+}
+
+src_test() {
+ Xemake test
+}
+
+src_install() {
+ default
+ mv "${ED}"/usr/lib*/treectrl${PV}/htmldoc "${ED}"/usr/share/doc/${P}/
+}
diff --git a/dev-tcltk/tkzinc/Manifest b/dev-tcltk/tkzinc/Manifest
new file mode 100644
index 000000000000..c6ee0c892e43
--- /dev/null
+++ b/dev-tcltk/tkzinc/Manifest
@@ -0,0 +1,7 @@
+AUX 3.3.6-ldflags.patch 552 SHA256 3a301c752e78400ba8b91469f990e44ee1d6f6af0aca6431cb9fcd56ab26c438 SHA512 5ef1d02ac3b6eaffc4c7310e80e27204c5eb0ccc9d6627a5da4598a6b13d20fa1a1eab63194578a56a0650eb07c70879370e64030ccf86caf5226a1d1c6fea7e WHIRLPOOL 0b6f728332198392ec8f580ba331fdbad4b5179aaaa9e8053b990641e3ab5c3e8f8b53c5b71db31dba1decd360aa5d6667e31cacf753ce6195176aac9795018e
+AUX tkzinc-3.3.4-latex.patch 331 SHA256 6fdde5a64a28a648ba91edea435c0584a58d1e5ad637b22c469a989807a3ded4 SHA512 20e859529ff20b41193a43baeec4c632107208311de3815795cc2a013741034dac36880d88c11e7dc1c4719259e42a180203c1ac478251ff81eec0e3d7f77ee4 WHIRLPOOL c7e768996db73316a29212a910895b103dbb5e32b34e75eddd1ef018fe73b16868e280a12e1a00fcdbc56ff1631ac6e7ff921f53536c16d46d9af15f7f4c6446
+DIST Tkzinc-3.3.6plus.tar.gz 1924729 SHA256 6a23a647a2062bc9f5a773092cbb6c63ee5e7564a8c8751839dcca79d807ff56 SHA512 ead998b69569ebec92e7f60415296262f60b91250b2fe15fdeb9fb71c38756006bedcd9ed2829d915cb6ce3a6461165a48c9037f8e397ba6049a76ae474f7838 WHIRLPOOL 65e30a3e3bd553145d918373f272cf7969a02111ed3b18fd407f234357ffc0223449b1e85796d5e501e8020eb616624ebbf1b4c1d2b1bc365399ded45ebdb552
+EBUILD tkzinc-3.3.6.ebuild 988 SHA256 5c2a6495ffbdcf6d745b0400c1df8472723cc12c7b7e361be57f40b216b886f1 SHA512 dab1039d8d10d96ee21ca89a9feb5894865cfe1947a967e98fd849b2fa19d52dee2e379ae76d4e6cd93aecda7295ba5f09a8708b6b520be4d2aca10ef9516f2e WHIRLPOOL 865dd6969345a702de7c54f353debe7f763a2a50c2e33287de48e510321530583b3692972b4d3a441b789c9baf10dbf1f759cf07ea45acb4bc9aef208d395821
+MISC ChangeLog 2614 SHA256 4d9507fcf52b45acc165ff76b2d4eeacadc2b9498c0eb1b8bc3e8cb3456a9786 SHA512 069a784e73bdb358acffa1c7c9f33b56cfbc0bccda86f2ebbcccc6344dc39416c0a231c7c1499b5443ad2a9100470a786da188c21b436422fcb3eb64b5febffc WHIRLPOOL 4e75ae4cab97d1294db78492629c1deca2b07eebb1dd7ab8786d12ac46621e5280c0487226d5e5751e94aa83a71ac1b5a6dce781f465804db291014da586f499
+MISC ChangeLog-2015 1842 SHA256 0f72221820d76321176ebe917db8a21eca6e1ddd8831e8c2396974582cd1b485 SHA512 7733be115de5291f04e18ca8db2df4d2b8ddb3bd994081937f549e24e18613b4cb737bf991c4bb280c3dc7259f4570dbf1fda1c23c9d081b2f7cd02a19073c71 WHIRLPOOL 4c7ed9b3a481499cc487d7be05fc514dbac21bf1b9d0e2ae4dac3073e030051319c092df778e597a618bd9995fe848139a6acb5f4f6ca1cd50bacdc4bceb2507
+MISC metadata.xml 266 SHA256 3bc20bf6a4b51a4aea6aa4a4502d41cc2fade4aea2519bc4b4f58047cc8412c4 SHA512 368799be115a9d4f3d71f55a6a5c306aecf65a57ccb6cc71cd08d8769a6480adaa94744f6efeb1530052ce8011768174d936f13a0c8bd1ba43bd9a204d4e8abb WHIRLPOOL 22312c94026cc7f8c3bb1c7b202803ef91d3f97a36410414f522d77bf9fd852aa9bbc93a3dd23e187b88012dec7026ddcdab9b430dc712f8efb4c3286e1be277
diff --git a/dev-tcltk/tkzinc/files/3.3.6-ldflags.patch b/dev-tcltk/tkzinc/files/3.3.6-ldflags.patch
new file mode 100644
index 000000000000..903ef9a2eaee
--- /dev/null
+++ b/dev-tcltk/tkzinc/files/3.3.6-ldflags.patch
@@ -0,0 +1,14 @@
+diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
+index 0cbca13..c68af63 100644
+--- a/tclconfig/tcl.m4
++++ b/tclconfig/tcl.m4
+@@ -1447,7 +1447,8 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+- SHLIB_LD="${CC} -shared"
++ # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT} ${LDFLAGS}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/dev-tcltk/tkzinc/files/tkzinc-3.3.4-latex.patch b/dev-tcltk/tkzinc/files/tkzinc-3.3.4-latex.patch
new file mode 100644
index 000000000000..6b697a7bfd78
--- /dev/null
+++ b/dev-tcltk/tkzinc/files/tkzinc-3.3.4-latex.patch
@@ -0,0 +1,12 @@
+ doc/refman.tex | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/doc/refman.tex b/doc/refman.tex
+index b384e97..be88fde 100644
+--- a/doc/refman.tex
++++ b/doc/refman.tex
+@@ -1,3 +1,4 @@
++\RequirePackage{ifpdf}
+ \documentclass[11pt,twoside,a4paper]{book}
+
+ %----------------------------------------------------------------------
diff --git a/dev-tcltk/tkzinc/metadata.xml b/dev-tcltk/tkzinc/metadata.xml
new file mode 100644
index 000000000000..c9530ddd3b0c
--- /dev/null
+++ b/dev-tcltk/tkzinc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <description>TCL / TK Herd</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/tkzinc/tkzinc-3.3.6.ebuild b/dev-tcltk/tkzinc/tkzinc-3.3.6.ebuild
new file mode 100644
index 000000000000..14b37ebcd1f6
--- /dev/null
+++ b/dev-tcltk/tkzinc/tkzinc-3.3.6.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils
+
+DESCRIPTION="A Tk widget library"
+HOMEPAGE="http://www.tkzinc.org"
+SRC_URI="http://www.tkzinc.org/Packages/Tkzinc-${PV}plus.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc"
+IUSE="debug doc threads"
+
+DEPEND="
+ dev-lang/tk
+ media-libs/glew
+ virtual/opengl
+ doc? ( virtual/latex-base )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/Tkzinc-${PV//.}+"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-ldflags.patch
+ "${FILESDIR}"/${PN}-3.3.4-latex.patch
+ )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+DOCS=( BUGS )
+
+src_configure() {
+ local myeconfargs=(
+ --enable-shared
+ --enable-gl=damage
+ $(use_enable debug symbols)
+ $(use_enable threads)
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ use doc && emake pdf
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ dohtml -r doc/*
+ use doc && dodoc doc/refman.pdf
+}
diff --git a/dev-tcltk/tls/Manifest b/dev-tcltk/tls/Manifest
new file mode 100644
index 000000000000..cb6c80959a6e
--- /dev/null
+++ b/dev-tcltk/tls/Manifest
@@ -0,0 +1,9 @@
+DIST tcltls-1.7.11.tar.gz 158181 SHA256 6c9ec017751a0bd6546780273f2992cee6786c2199e6798ec2e25367ff577f60 SHA512 7a9aa33d7ed606ba792b4ff5a817a94f880b7204795ac30ab386299ee5850c7dfde920f35056676afa2db23866ad4fc6cb6c6b9e7a7dfba7385f97f447de2e04 WHIRLPOOL 5a1f29bf812332218e5805598dd5bb0a70fd7342b2c5259fc9283457e202bf35399339254cfa10b7622df38e6822ab8cf7652708436f10fa400073762fdbc59e
+DIST tls1.6-src.tar.gz 168043 SHA256 adec50143a9ad634a671d24f7c7bbf2455487eb5f12d290f41797c32a98b93f3 SHA512 beaca2653a11924f022e28254cef5071ecb8ab2e2355496d278fcab1bdcc46424aa58d2fe176aea26ec4fbe4416a912b5af8e8e69571c8a5301b7921ecf48383 WHIRLPOOL 5769eccd4df94558d7b5cdaa7234f4b248e3d8108686c3104bfa53a709a444088cdbf51b9660ecaa1f213c9391afbf81108ed330fe41bed3409d3c9364ac9790
+DIST tls1.6.7-src.tar.gz 173654 SHA256 5119de3e5470359b97a8a00d861c9c48433571ee0167af0a952de66c99d3a3b8 SHA512 f8dbb7fc9890bcb3e3930cad66209ca67cd68c0aa2288caa6a3bb1fd1ad21444f1eb056b4b4585ec86da64079cd9df72cdd6ff201102820d45e6397d6148d21c WHIRLPOOL 3aa6f39995c89569d9365a118d096b628f11c9163be8b90cdd5dbf4f59502c78906da311ba5e47ef97f01e2980992d3a5fa4bfbb6c56dbc804a6d24e1f99439b
+EBUILD tls-1.6-r3.ebuild 936 SHA256 36d5e8c9a21a346fb1ba99a96ca2920e4285b9a6bbc99665d66f32bb0c7e43bb SHA512 ce74439d8dc71ddb256f6b3d34fd80190f7444680e753b30879f642824586543b8aa0baffed42b4f71e86b6fe895efb83d060a805498e37e6d5b0cc7e22efe76 WHIRLPOOL 0aef84416d3ff452a59a895a5f13a6ec698ae6e39071deef8b3c29c9c1f9ee4a38032d9dff09d2f5fc53981a7201244c06decb0b1a2af759b07845836e249bee
+EBUILD tls-1.6.7.ebuild 943 SHA256 cef319bfe18f37c377c942a1a0686361598b6e5e06ca92e48088b1afd6f976a6 SHA512 fc5fb789d5b89c61b0f3e212b5a40ae321a2d7e8177b3e1c5e3e6d80f98717db4c42b561cde558273bfec491290184d8fde0ac3dd421bdfe91c1d61b70e60c11 WHIRLPOOL ba9b0bbb6f2d3f86ff3b0a5450c7c47c9caf46f33605bbdd7dd18078751020a4d42513380396acaecc59e8d103382d145970a2b3eeaecc71276e94604424d6a8
+EBUILD tls-1.7.11.ebuild 945 SHA256 13d316e4899ecfeee62a4855d36a54bfb9670c28c35f0154ef7654a88a8519e1 SHA512 e47dd3ab69373e1bdf1597ad40a7068ab48c918978494a4c4e76c6c9419561bd32c49541bc8d3201428f7f876888a63441aff37e4b2e78f8464cc6dcb0edf6dd WHIRLPOOL c3a435a2ec1562293b17d70ba8074f4dc63839c5c93a3f315d30866a06f3601cf9d791fa1f522728f1e51c50d124bc9afb12a806a06c907d4c8308c36f63868c
+MISC ChangeLog 2825 SHA256 e1e024b5b3f9b747955d6fb0c8f0d6b6abb9e66c92218b682f326706e36b5ded SHA512 36d1dcfc89018381c9fee3f07ee9b31e616a7206fa5b4f0941a5ed3f2a65500388a6a3ffce1b65fa0546186027201f2998a602f01b82abbca1ed9797f10abbf2 WHIRLPOOL 8c5d61fba5a8b77999d458098eadc1141b4ca26bff3b331a4eecd369118f4e338ba827305904866fd34ea2f877be8540463fe52e604996ca6aa6a7fa81a14e0c
+MISC ChangeLog-2015 4737 SHA256 3725e5a2e6fad3ed0e55669fe3eaa7a4e108f28774a390ff34ff1e5c731f6e0c SHA512 559104c3afec2299bd9cc3b34ef4ebe75a52af9945f9ba1dd42821e0f411b638fc9a4bbf4e16a4e6fb176ba937b12da3d6cee32a9cd67a565a7d4fa2b42ae60c WHIRLPOOL 2ead3d8fd5b035a51813bd73abf63f198195600fcd280d6abc9ce286a321e9e137eab84a9d813f979e46e18aeb80f3b1991cd5eba11898c31bcd3de57eb52331
+MISC metadata.xml 326 SHA256 b001c96b875544f65e6957ee4564b37b13f4dde969f59228930227654a51f505 SHA512 6e3856770636152cb4cb2d2429dfba4ccdd4f82433903aa828ca23b3dbbe878546f7327a510ecdee93001c1d81dbc9c343c217d09ab08774c697a4b6fb2a0f94 WHIRLPOOL f660907f6171a562256c88fc6c1be94c8b13daaa231e59fef52e65455c3df73773763da1934b7ff9517e21149683344dbd23d7b4261fd7d430271c0cc90e36d8
diff --git a/dev-tcltk/tls/metadata.xml b/dev-tcltk/tls/metadata.xml
new file mode 100644
index 000000000000..ba80abe7401c
--- /dev/null
+++ b/dev-tcltk/tls/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tls</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tls/tls-1.6-r3.ebuild b/dev-tcltk/tls/tls-1.6-r3.ebuild
new file mode 100644
index 000000000000..f85cb1f65961
--- /dev/null
+++ b/dev-tcltk/tls/tls-1.6-r3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="TLS OpenSSL extension to Tcl"
+HOMEPAGE="http://tls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tls/${MY_P}-src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="tk"
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-libs/openssl:0=
+ tk? ( dev-lang/tk:0= )"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ econf \
+ --with-ssl-dir="${EPREFIX}/usr" \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+}
+
+src_install() {
+ default
+ dohtml tls.htm
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # this is ugly, but fixing the makefile mess is even worse
+ local loc=usr/$(get_libdir)/tls1.6/libtls1.6.dylib
+ install_name_tool -id "${EPREFIX}"/${loc} "${ED}"/${loc} || die
+ fi
+}
diff --git a/dev-tcltk/tls/tls-1.6.7.ebuild b/dev-tcltk/tls/tls-1.6.7.ebuild
new file mode 100644
index 000000000000..065cbe9b6ba8
--- /dev/null
+++ b/dev-tcltk/tls/tls-1.6.7.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="TLS OpenSSL extension to Tcl"
+HOMEPAGE="http://tls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tls/${MY_P}-src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="tk"
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-libs/openssl:0=
+ tk? ( dev-lang/tk:0= )"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ econf \
+ --with-ssl-dir="${EPREFIX}/usr" \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+}
+
+src_install() {
+ default
+ dohtml tls.htm
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # this is ugly, but fixing the makefile mess is even worse
+ local loc=usr/$(get_libdir)/tls1.6/libtls1.6.dylib
+ install_name_tool -id "${EPREFIX}"/${loc} "${ED}"/${loc} || die
+ fi
+}
diff --git a/dev-tcltk/tls/tls-1.7.11.ebuild b/dev-tcltk/tls/tls-1.7.11.ebuild
new file mode 100644
index 000000000000..7b22e45bf9df
--- /dev/null
+++ b/dev-tcltk/tls/tls-1.7.11.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+MY_P="tcl${PN}-${PV}"
+
+DESCRIPTION="TLS OpenSSL extension to Tcl"
+HOMEPAGE="http://tls.sourceforge.net/"
+SRC_URI="https://core.tcl.tk/tcltls/uv/tcl${PN}-${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="tk"
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-libs/openssl:0=
+ tk? ( dev-lang/tk:0= )"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ econf \
+ --with-ssl-dir="${EPREFIX}/usr" \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+}
+
+src_install() {
+ default
+ dodoc tls.htm
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # this is ugly, but fixing the makefile mess is even worse
+ local loc=usr/$(get_libdir)/tls1.7/libtls1.7.dylib
+ install_name_tool -id "${EPREFIX}"/${loc} "${ED}"/${loc} || die
+ fi
+}
diff --git a/dev-tcltk/togl/Manifest b/dev-tcltk/togl/Manifest
new file mode 100644
index 000000000000..3ffe3c6af17d
--- /dev/null
+++ b/dev-tcltk/togl/Manifest
@@ -0,0 +1,5 @@
+DIST Togl2.0-src.tar.gz 244968 SHA256 b7d4a90bbad3aca618d505ee99e7fd8fb04c829f63231dda2360f557ba3f7610 SHA512 2be3062baada848d96b2802582bc5590b215f2ab4dc02c91761e72af2bf8c0ba768a71a2ffb8107bca83b63b7d1321ee83de19b97f83b1c2f0962f9288948b0a WHIRLPOOL 6f4a8d69d74c499899002250b35f7dbac093035338716f9ee24b3f1d9b876ff302cb4727dadfda08f2f81dda1074a136bb8a51b335931bc97303c6c56fd155c2
+EBUILD togl-2.0-r2.ebuild 871 SHA256 e5b9c63263b41ea91e3fd7ea4cdca7b22db5bf710a630fe008939e8c37f2ebd0 SHA512 abfe4987bdb7a2f77f105386d4093bec7aa9e7f0d301ce0871a34535ca92ac9aabae37bf82ab15b1c7587710945677f0ac310b5c852d3f3c3820697165ed1a8a WHIRLPOOL 281b3151fe437fbe636efb55c165efae5201d7759e83b00a76fd4a8b2035b1b0dd5934c0e3bd0e8ce0d2b00661179cebe0a5a9f4051a7837cf69a9e28849afc0
+MISC ChangeLog 2421 SHA256 1625243f33753d754f886567ba82b5920eac7d46327b8bc2f8074b956b9b0289 SHA512 dd23778678b65bd7433b9e8b52eaacf2382771a277b92d39531644e8c5b8daacf19d07b16fdb1194a3eb6d5285d483d95c5e724311c2d03462276232cefc9c27 WHIRLPOOL fcb85e0e06917291df63219f9691216e0761acaf7e05bc03013a2d1bd17b3afc794dda744623d4af0185f0125617c45e8a1c934f3c9e3d153044d41fde22c6f4
+MISC ChangeLog-2015 3417 SHA256 f65b41abb06bf61cc6b98b96924dca7a3a839593a81c1b0b6be5941a7eaba899 SHA512 5722b18c9ba56b1f572dbb2bf3a1133c16be60df435deb27d75276566d626c20eb39a92f251d2563a82a4411d201ed4ae58e3dd91f6eea951b406790898711a9 WHIRLPOOL 63784e7b002f937bfd080a44b7b0d591777bea5488354d8b85caa32040e89762ad03af003cbf159359de5f49c4f622fb2c439130b03fac79c641765de7fdc6b3
+MISC metadata.xml 1191 SHA256 0861ace614a9db8bab705f540e66b2705a7efcb34900d1afb3c0d8d9ec6c2912 SHA512 890b9b1bb4b9ae4255e9fa24efb01e3f109a8e7675055ef9166a71d9ec1624494d2e5115cf3d8f074f400f805a61a3409558a8f21d544f91e4d8775fb2f3c5ef WHIRLPOOL 602c0cbee82be83e74067bb9ab3d9131402ad347cbac58d7197fce0c6582d737a2be737d2a6ab91cad44fc951031263b2939b1de0fe936673f22561201299cac
diff --git a/dev-tcltk/togl/metadata.xml b/dev-tcltk/togl/metadata.xml
new file mode 100644
index 000000000000..e8e075423cc0
--- /dev/null
+++ b/dev-tcltk/togl/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <longdescription>
+Togl is a Tk widget for OpenGL rendering. Togl was originally based on
+OGLTK, written by Benjamin Bederson at the University of New Mexico. Togl's
+main features are:
+
+* unifies Microsoft Windows, X11 (Linux/IRIX/...), and Mac OS X Aqua support
+* support for requesting stencil, accumulation, alpha buffers, etc.
+* multiple OpenGL drawing windows
+* simple stereo rendering support
+* simple, portable font support
+* color-index mode support including color allocation functions
+* overlay plane support
+* OpenGL extension testing from Tcl
+* Tcl Extension Architecture (TEA) 3 compliant
+
+Togl does almost no OpenGL drawing itself, instead it manages OpenGL
+drawing by calling various Tcl commands (a.k.a., callback functions). Those
+commands can be C functions that call OpenGL (in)directly or another Tcl
+package (e.g., Tcl3D).
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">togl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/togl/togl-2.0-r2.ebuild b/dev-tcltk/togl/togl-2.0-r2.ebuild
new file mode 100644
index 000000000000..58d12aadd6c7
--- /dev/null
+++ b/dev-tcltk/togl/togl-2.0-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+MY_P=Togl${PV}
+
+DESCRIPTION="A Tk widget for OpenGL rendering"
+HOMEPAGE="http://togl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}-src.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug +threads"
+
+RDEPEND="
+ dev-lang/tk
+ virtual/opengl
+ x11-libs/libXmu"
+DEPEND="${RDEPEND}"
+
+# tests directory is missing
+RESTRICT="test"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed \
+ -e 's:-fomit-frame-pointer::g' \
+ -e 's:-O2::g' \
+ -e 's:-pipe::g' \
+ -i configure || die
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug symbols) \
+ $(use_enable threads)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dohtml doc/*
+ dodoc README*
+}
diff --git a/dev-tcltk/vtcl/Manifest b/dev-tcltk/vtcl/Manifest
new file mode 100644
index 000000000000..11f9c59b9427
--- /dev/null
+++ b/dev-tcltk/vtcl/Manifest
@@ -0,0 +1,5 @@
+DIST vtcl-1.6.0.tar.gz 554727 SHA256 5b95bc67f1acce46cb788c46f167dc8743e69e48289f9bb04d1b3468ef7b4652 SHA512 bfc2ed114af4bee375e820e4b1e47d394a800541eb9917204ef42481a4033927c432d7d2b005d13edd086c7c91bd594908965aae512cc4af9e5654a2bfd296de WHIRLPOOL b1fce8a4c3d6c30090dff7d6c05aff95edfc009237089b827d1100cbc43959f179f6f2ea97909eb176e779a4b00b7b93553f66bdeb42cba1d50c571adae3186c
+EBUILD vtcl-1.6.0-r1.ebuild 884 SHA256 c415254237c526b36961cbd27bee7e523041e5645faa226352d3e9312e716df2 SHA512 133fb34c35ba8f3c61e54c8c0a95af76221293f5d565d4e41a0800d3410e309d35cfc4ce69c573203786c82fa4a6da461208dd886242b32e033960f2fb51131e WHIRLPOOL dc22ef68075ed013f4b2a7fa76c8d260797fa82b69bad42a3cd68ee27fe421782db5d0e90833a1f2159455d19d2ef103ac9b72c082dc3d37417489ec13aab681
+MISC ChangeLog 2425 SHA256 29dfa789bb9de4d342a71b2692fa12be762bab0bfde9573fe45912c63b8bcaab SHA512 8fd6e1c77c8de26ebc0b5a8b0c3320fff31a4c7b2eb779142007e8fac944d5acc97f5efdc1c9a5fd9d57bb7d875d4f1faab4bd4c3d1fd14b5c13838a6f2b126e WHIRLPOOL 1127ca498470bce535f2c1ee3bcede39515b958fce8576f75f68499cd3356a61fbfeb2520d75df63cbb408e2bec4a4fd3932ccf97ba76eb7a0ae708818642fd6
+MISC ChangeLog-2015 1471 SHA256 5701082deaa3cf9450a2ba2a02d2e1a385e02959ed2e2b080d2f39bdbb56512f SHA512 59a02a2c6b3934de4192e2992a5377581fc0f606ea8e838024b56bdab169bb2880c908ab50192baca8e071320e91d6f8c00fea04577ddd6d4a8fd2b4e1c253e5 WHIRLPOOL a318be1663b46707467950b72d361823189a8ef58c1fb4f2fa827786c47408318621fe2d920489832655f87d434c0c3dc2ace7d5a90caeef082ba66e3de61c8f
+MISC metadata.xml 334 SHA256 73862749cea8021d5394aff202881a423d39d56365ef7e1f0c1ad6672e06d559 SHA512 0bf7520b77a6c223a7fbcf9cf5e7296cfd8847dbe27f4e4751d2c230cc341d183d58aa7a300aa783a04fb5752d30ab37b621c02853c7aa5c1f1639a15d248980 WHIRLPOOL 7dbb01d89190043c09cf53db21a15fce4f0cf4be57e22ca8b64d556f8075685a63af5f65f9ef099d8f2cb7159c43796ac5078c97bd352b8c28b6d5845c038066
diff --git a/dev-tcltk/vtcl/metadata.xml b/dev-tcltk/vtcl/metadata.xml
new file mode 100644
index 000000000000..758a68349be6
--- /dev/null
+++ b/dev-tcltk/vtcl/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <description>TCL / TK herd</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">vtcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/vtcl/vtcl-1.6.0-r1.ebuild b/dev-tcltk/vtcl/vtcl-1.6.0-r1.ebuild
new file mode 100644
index 000000000000..c6d74931d96f
--- /dev/null
+++ b/dev-tcltk/vtcl/vtcl-1.6.0-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Visual Tcl is a high-quality application development environment"
+HOMEPAGE="http://vtcl.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc"
+DEPEND="dev-lang/tk"
+
+MY_DESTDIR=/usr/share/${PN}
+src_compile() {
+ ./configure || die
+ sed -i 's,^\(VTCL_HOME=\).*,\1'${MY_DESTDIR}',g' vtcl || die "Path fixing failed."
+ sed -i 's,package require -exact Tk ,package require Tk ,' lib/tkcon.tcl || die "Tcl8.5 patch failed"
+}
+
+src_install() {
+ dodir ${MY_DESTDIR} || die "Directory creation failed."
+ dobin vtcl || die
+ cp -r ./{demo,images,lib,sample,vtcl.tcl} "${D}/${MY_DESTDIR}" || die "Data installation failed."
+ dodoc ChangeLog README
+ use doc && dodoc doc/tutorial.txt
+ use doc && dohtml doc/*html
+}