summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-tcltk')
-rw-r--r--dev-tcltk/anigif/Manifest1
-rw-r--r--dev-tcltk/anigif/anigif-1.3-r1.ebuild26
-rw-r--r--dev-tcltk/anigif/metadata.xml7
-rw-r--r--dev-tcltk/blt/Manifest1
-rw-r--r--dev-tcltk/blt/blt-2.4z-r10.ebuild120
-rw-r--r--dev-tcltk/blt/blt-2.4z-r11.ebuild123
-rw-r--r--dev-tcltk/blt/blt-2.4z-r12.ebuild127
-rw-r--r--dev-tcltk/blt/blt-2.4z-r13.ebuild126
-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-makefile.patch23
-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/files/blt2.4z-install.diff26
-rw-r--r--dev-tcltk/blt/files/pkgIndex.tcl2
-rw-r--r--dev-tcltk/blt/metadata.xml5
-rw-r--r--dev-tcltk/bwidget/Manifest1
-rw-r--r--dev-tcltk/bwidget/bwidget-1.9.8.ebuild43
-rw-r--r--dev-tcltk/bwidget/files/bwidget-1.9.7-test.patch31
-rw-r--r--dev-tcltk/bwidget/files/bwidget-1.9.8-test.patch16
-rw-r--r--dev-tcltk/bwidget/metadata.xml8
-rw-r--r--dev-tcltk/ck/Manifest2
-rw-r--r--dev-tcltk/ck/ck-8.0-r4.ebuild49
-rw-r--r--dev-tcltk/ck/files/ck-8.0-gentoo.patch133
-rw-r--r--dev-tcltk/ck/metadata.xml5
-rw-r--r--dev-tcltk/combobox/Manifest1
-rw-r--r--dev-tcltk/combobox/combobox-2.3-r1.ebuild26
-rw-r--r--dev-tcltk/combobox/metadata.xml8
-rw-r--r--dev-tcltk/expect-lite/Manifest18
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.0.3.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.1.0.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.1.2.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.2.0.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.2.1.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.2.2.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.3.0.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.3.1.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.3.2.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.3.3.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.4.0.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.4.1.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.5.0.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.6.0.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.6.1.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.6.2.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.7.2.ebuild29
-rw-r--r--dev-tcltk/expect-lite/expect-lite-4.8.0.ebuild31
-rw-r--r--dev-tcltk/expect-lite/metadata.xml14
-rw-r--r--dev-tcltk/expect/Manifest2
-rw-r--r--dev-tcltk/expect/expect-5.44.1.15.ebuild97
-rw-r--r--dev-tcltk/expect/expect-5.45.ebuild84
-rw-r--r--dev-tcltk/expect/files/expect-5.39.0-libdir.patch11
-rw-r--r--dev-tcltk/expect/files/expect-5.43.0-avoid-tcl-internals-1.patch100
-rw-r--r--dev-tcltk/expect/files/expect-5.43.0-darwin.patch11
-rw-r--r--dev-tcltk/expect/files/expect-5.43.0-missing-includes.patch44
-rw-r--r--dev-tcltk/expect/files/expect-5.43.0-multilib.patch11
-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/files/expect.m4609
-rw-r--r--dev-tcltk/expect/metadata.xml8
-rw-r--r--dev-tcltk/itcl/Manifest2
-rw-r--r--dev-tcltk/itcl/files/3.4_beta1-test.patch16
-rw-r--r--dev-tcltk/itcl/itcl-3.4.1.ebuild45
-rw-r--r--dev-tcltk/itcl/itcl-4.0.3.ebuild66
-rw-r--r--dev-tcltk/itcl/metadata.xml8
-rw-r--r--dev-tcltk/itk/Manifest3
-rw-r--r--dev-tcltk/itk/files/itk-3.4_pre20090417-install.patch103
-rw-r--r--dev-tcltk/itk/files/itk-4.0.0-install_data.patch20
-rw-r--r--dev-tcltk/itk/itk-3.4.1.ebuild60
-rw-r--r--dev-tcltk/itk/itk-4.0.0.ebuild59
-rw-r--r--dev-tcltk/itk/itk-4.0.1.ebuild60
-rw-r--r--dev-tcltk/itk/metadata.xml8
-rw-r--r--dev-tcltk/iwidgets/Manifest2
-rw-r--r--dev-tcltk/iwidgets/files/4.0.1-path.patch63
-rw-r--r--dev-tcltk/iwidgets/iwidgets-4.0.1-r3.ebuild65
-rw-r--r--dev-tcltk/iwidgets/iwidgets-4.0.1.ebuild40
-rw-r--r--dev-tcltk/iwidgets/metadata.xml8
-rw-r--r--dev-tcltk/metadata.xml36
-rw-r--r--dev-tcltk/mysqltcl/Manifest1
-rw-r--r--dev-tcltk/mysqltcl/files/mysqltcl-3.05-ldflags.patch16
-rw-r--r--dev-tcltk/mysqltcl/metadata.xml5
-rw-r--r--dev-tcltk/mysqltcl/mysqltcl-3.05.ebuild35
-rw-r--r--dev-tcltk/scwoop/Manifest1
-rw-r--r--dev-tcltk/scwoop/metadata.xml5
-rw-r--r--dev-tcltk/scwoop/scwoop-4.1.ebuild24
-rw-r--r--dev-tcltk/snack/Manifest1
-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.xml5
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r5.ebuild106
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r6.ebuild98
-rw-r--r--dev-tcltk/tablelist/Manifest1
-rw-r--r--dev-tcltk/tablelist/metadata.xml8
-rw-r--r--dev-tcltk/tablelist/tablelist-5.8.ebuild31
-rw-r--r--dev-tcltk/tcl-gtk/Manifest1
-rw-r--r--dev-tcltk/tcl-gtk/metadata.xml8
-rw-r--r--dev-tcltk/tcl-gtk/tcl-gtk-0.08.ebuild21
-rw-r--r--dev-tcltk/tcl-mccp/Manifest1
-rw-r--r--dev-tcltk/tcl-mccp/files/tcl-mccp-0.6-flags.patch18
-rw-r--r--dev-tcltk/tcl-mccp/metadata.xml8
-rw-r--r--dev-tcltk/tcl-mccp/tcl-mccp-0.6.ebuild21
-rw-r--r--dev-tcltk/tcl-sql/Manifest1
-rw-r--r--dev-tcltk/tcl-sql/files/fix-const.patch101
-rw-r--r--dev-tcltk/tcl-sql/files/ldflags.patch28
-rw-r--r--dev-tcltk/tcl-sql/metadata.xml12
-rw-r--r--dev-tcltk/tcl-sql/tcl-sql-20000114-r2.ebuild38
-rw-r--r--dev-tcltk/tcl3d/Manifest1
-rw-r--r--dev-tcltk/tcl3d/metadata.xml22
-rw-r--r--dev-tcltk/tcl3d/tcl3d-0.4.0.ebuild57
-rw-r--r--dev-tcltk/tcllib/Manifest4
-rw-r--r--dev-tcltk/tcllib/files/tcllib-1.14-test.patch39
-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.xml8
-rw-r--r--dev-tcltk/tcllib/tcllib-1.15-r2.ebuild55
-rw-r--r--dev-tcltk/tcllib/tcllib-1.16.ebuild59
-rw-r--r--dev-tcltk/tclperl/Manifest1
-rw-r--r--dev-tcltk/tclperl/metadata.xml5
-rw-r--r--dev-tcltk/tclperl/tclperl-3.2-r1.ebuild42
-rw-r--r--dev-tcltk/tclpython/Manifest1
-rw-r--r--dev-tcltk/tclpython/files/tclpython-4.1-python-3.patch229
-rw-r--r--dev-tcltk/tclpython/metadata.xml5
-rw-r--r--dev-tcltk/tclpython/tclpython-4.1-r4.ebuild55
-rw-r--r--dev-tcltk/tclreadline/Manifest2
-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.xml8
-rw-r--r--dev-tcltk/tclreadline/tclreadline-2.1.0-r4.ebuild69
-rw-r--r--dev-tcltk/tclx/Manifest1
-rw-r--r--dev-tcltk/tclx/files/tclx-8.4-ldflags.patch13
-rw-r--r--dev-tcltk/tclx/files/tclx-8.4-relid.patch31
-rw-r--r--dev-tcltk/tclx/files/tclx-8.4-varinit.patch11
-rw-r--r--dev-tcltk/tclx/metadata.xml13
-rw-r--r--dev-tcltk/tclx/tclx-8.4.1.ebuild55
-rw-r--r--dev-tcltk/tclxml/Manifest1
-rw-r--r--dev-tcltk/tclxml/files/tclxml-3.1-test.patch46
-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/files/tclxml-3_configure.patch74
-rw-r--r--dev-tcltk/tclxml/files/tclxml-3_include_path.patch12
-rw-r--r--dev-tcltk/tclxml/metadata.xml8
-rw-r--r--dev-tcltk/tclxml/tclxml-3.2-r2.ebuild53
-rw-r--r--dev-tcltk/tdom/Manifest1
-rw-r--r--dev-tcltk/tdom/files/tdom-0.8.2-expat.patch83
-rw-r--r--dev-tcltk/tdom/files/tdom-0.8.2-soname.patch26
-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.xml12
-rw-r--r--dev-tcltk/tdom/tdom-0.8.3-r4.ebuild88
-rw-r--r--dev-tcltk/thread/Manifest1
-rw-r--r--dev-tcltk/thread/metadata.xml8
-rw-r--r--dev-tcltk/thread/thread-2.7.1.ebuild50
-rw-r--r--dev-tcltk/tix/Manifest1
-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.xml8
-rw-r--r--dev-tcltk/tix/tix-8.4.3-r1.ebuild61
-rw-r--r--dev-tcltk/tkTheme/Manifest1
-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.xml5
-rw-r--r--dev-tcltk/tkTheme/tkTheme-1.0-r2.ebuild50
-rw-r--r--dev-tcltk/tkXwin/Manifest1
-rw-r--r--dev-tcltk/tkXwin/files/1.0-Makefile.in.diff21
-rw-r--r--dev-tcltk/tkXwin/files/1.0-configure.diff12
-rw-r--r--dev-tcltk/tkXwin/files/1.0-configure.patch13
-rw-r--r--dev-tcltk/tkXwin/files/tkXwin-1.0-configure.patch93
-rw-r--r--dev-tcltk/tkXwin/metadata.xml5
-rw-r--r--dev-tcltk/tkXwin/tkXwin-1.0-r3.ebuild49
-rw-r--r--dev-tcltk/tkcon/Manifest1
-rw-r--r--dev-tcltk/tkcon/metadata.xml15
-rw-r--r--dev-tcltk/tkcon/tkcon-2.5.ebuild30
-rw-r--r--dev-tcltk/tkdnd/Manifest2
-rw-r--r--dev-tcltk/tkdnd/metadata.xml8
-rw-r--r--dev-tcltk/tkdnd/tkdnd-2.2.ebuild41
-rw-r--r--dev-tcltk/tkdnd/tkdnd-2.6.ebuild41
-rw-r--r--dev-tcltk/tkimg/Manifest2
-rw-r--r--dev-tcltk/tkimg/files/tkimg-1.4-png2.patch36
-rw-r--r--dev-tcltk/tkimg/metadata.xml11
-rw-r--r--dev-tcltk/tkimg/tkimg-1.4-r9.ebuild92
-rw-r--r--dev-tcltk/tklib/Manifest1
-rw-r--r--dev-tcltk/tklib/metadata.xml8
-rw-r--r--dev-tcltk/tklib/tklib-0.6-r1.ebuild37
-rw-r--r--dev-tcltk/tklib/tklib-0.6-r2.ebuild37
-rw-r--r--dev-tcltk/tkpiechart/Manifest1
-rw-r--r--dev-tcltk/tkpiechart/metadata.xml5
-rw-r--r--dev-tcltk/tkpiechart/tkpiechart-6.5-r1.ebuild27
-rw-r--r--dev-tcltk/tkpng/Manifest1
-rw-r--r--dev-tcltk/tkpng/metadata.xml11
-rw-r--r--dev-tcltk/tkpng/tkpng-0.9.ebuild34
-rw-r--r--dev-tcltk/tktable/Manifest1
-rw-r--r--dev-tcltk/tktable/metadata.xml8
-rw-r--r--dev-tcltk/tktable/tktable-2.10.ebuild32
-rw-r--r--dev-tcltk/tktray/Manifest1
-rw-r--r--dev-tcltk/tktray/files/1.1-ldflags.patch13
-rw-r--r--dev-tcltk/tktray/metadata.xml6
-rw-r--r--dev-tcltk/tktray/tktray-1.3.9.ebuild42
-rw-r--r--dev-tcltk/tktreectrl/Manifest3
-rw-r--r--dev-tcltk/tktreectrl/files/2.2.9-as-needed.patch11
-rw-r--r--dev-tcltk/tktreectrl/metadata.xml14
-rw-r--r--dev-tcltk/tktreectrl/tktreectrl-2.2.10.ebuild42
-rw-r--r--dev-tcltk/tktreectrl/tktreectrl-2.2.9.ebuild43
-rw-r--r--dev-tcltk/tktreectrl/tktreectrl-2.4.1.ebuild42
-rw-r--r--dev-tcltk/tkzinc/Manifest1
-rw-r--r--dev-tcltk/tkzinc/files/3.3.4-ldflags.patch14
-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.xml9
-rw-r--r--dev-tcltk/tkzinc/tkzinc-3.3.6.ebuild58
-rw-r--r--dev-tcltk/tls/Manifest1
-rw-r--r--dev-tcltk/tls/files/tls-1.5.0-bad-version.patch10
-rw-r--r--dev-tcltk/tls/metadata.xml8
-rw-r--r--dev-tcltk/tls/tls-1.6-r3.ebuild45
-rw-r--r--dev-tcltk/togl/Manifest1
-rw-r--r--dev-tcltk/togl/metadata.xml28
-rw-r--r--dev-tcltk/togl/togl-2.0-r2.ebuild47
-rw-r--r--dev-tcltk/vtcl/Manifest1
-rw-r--r--dev-tcltk/vtcl/metadata.xml12
-rw-r--r--dev-tcltk/vtcl/vtcl-1.6.0-r1.ebuild28
245 files changed, 10160 insertions, 0 deletions
diff --git a/dev-tcltk/anigif/Manifest b/dev-tcltk/anigif/Manifest
new file mode 100644
index 000000000000..a771d4fccd83
--- /dev/null
+++ b/dev-tcltk/anigif/Manifest
@@ -0,0 +1 @@
+DIST anigif-1.3.zip 18270 SHA256 3ed2fdf42c7d4e64faee27fc2e35eca01e05f7d6f7b200d7cd8ad9f8e38c33e3 SHA512 d9611319461cd4a956eaacbbd63104594fc20752731a9dc314934409a1705d822738f266f4dd4419cd966ce4161148a74e9607be4ed734cb6b715ad00b4743ab WHIRLPOOL 2dbc09b193e70196bbf5230d2a22a85a9cfefbb04218ae90b4dd7a270a4c04f2d132fb4514ec1435e0488a9b9c685a592e75163e11533c68eceb3e2d8519fd66
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..84c8b49ca83a
--- /dev/null
+++ b/dev-tcltk/anigif/anigif-1.3-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Image rotation package"
+HOMEPAGE="http://cardtable.sourceforge.net/tcltk/"
+SRC_URI="http://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..4a00a64b40ae
--- /dev/null
+++ b/dev-tcltk/anigif/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/blt/Manifest b/dev-tcltk/blt/Manifest
new file mode 100644
index 000000000000..90355b26aa92
--- /dev/null
+++ b/dev-tcltk/blt/Manifest
@@ -0,0 +1 @@
+DIST blt2.4z-8.5.2.tar.gz 2326234 SHA256 e4e60628f79e1899175b51a3398133131fac52021b9b9019b4483525c48d6d16 SHA512 afc465ba47ae43a0c6be17400d0a572dccd8c2a8adfd8fc3ed50f9ec28d02129f069d88096c1428c4b242550131092b4141035d7ce90c9e7181ccf712502f09a WHIRLPOOL a00a029e075916dd7656ca85acb308a48e6d80563a91ada9e9e7df7518ef0d4de2200b54e5d9c8a9602520c03472e73968956c0df30afb8ef7f7b364fdd5524f
diff --git a/dev-tcltk/blt/blt-2.4z-r10.ebuild b/dev-tcltk/blt/blt-2.4z-r10.ebuild
new file mode 100644
index 000000000000..08f95fce1380
--- /dev/null
+++ b/dev-tcltk/blt/blt-2.4z-r10.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit 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="
+ http://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 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+DEPEND="
+ dev-lang/tk
+ jpeg? ( virtual/jpeg )
+ X? ( x11-libs/libX11 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}${MY_V_SUFFIX}"
+
+src_prepare() {
+ epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile.patch"
+ epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile2.patch"
+ # From blt-2.4z-6mdk.src.rpm
+ epatch "${FILESDIR}"/blt2.4z-64bit.patch
+
+ #epatch "${FILESDIR}"/blt-2.4z-tcl8.5-fix.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" \
+ -i src/Makefile.in || die
+
+ epatch "${FILESDIR}"/${P}-linking.patch
+ epatch "${FILESDIR}"/${P}-darwin.patch
+ epatch "${FILESDIR}"/${P}-gbsd.patch
+}
+
+src_configure() {
+ # bug 167934
+ append-flags -fPIC
+
+ 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() {
+ # parallel borks
+ emake -j1 LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+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 \
+ || die "dodir failed"
+ emake -j1 INSTALL_ROOT="${D}" install || die "make install failed"
+
+ 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}
+ done
+
+ # bug 259338 - dev-tcltk/blt-2.4z-r4 provides empty pkgIndex.tcl
+ cp "${FILESDIR}"/pkgIndex.tcl "${ED}"/usr/$(get_libdir)/blt2.4/pkgIndex.tcl
+
+ # fix for linking against shared lib with -lBLT or -lBLTlite
+ dosym libBLT24$(get_libname) /usr/$(get_libdir)/libBLT$(get_libname) || die
+ dosym libBLTlite24$(get_libname) /usr/$(get_libdir)/libBLTlite$(get_libname) || die
+
+ use static-libs || \
+ find "${ED}"/usr/$(get_libdir) -name "*.a" -print0 | \
+ xargs -r -0 rm -fv
+}
diff --git a/dev-tcltk/blt/blt-2.4z-r11.ebuild b/dev-tcltk/blt/blt-2.4z-r11.ebuild
new file mode 100644
index 000000000000..05dcb7ebf5ce
--- /dev/null
+++ b/dev-tcltk/blt/blt-2.4z-r11.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit 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="
+ http://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 ~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
+ jpeg? ( virtual/jpeg )
+ X? ( x11-libs/libX11 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}${MY_V_SUFFIX}"
+
+MAKEOPTS+=" -j1"
+
+src_prepare() {
+ epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile.patch"
+ epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile2.patch"
+ # From blt-2.4z-6mdk.src.rpm
+ epatch "${FILESDIR}"/blt2.4z-64bit.patch
+
+ #epatch "${FILESDIR}"/blt-2.4z-tcl8.5-fix.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" \
+ -i src/Makefile.in || die
+
+ epatch \
+ "${FILESDIR}"/${P}-linking.patch \
+ "${FILESDIR}"/${P}-darwin.patch \
+ "${FILESDIR}"/${P}-gbsd.patch \
+ "${FILESDIR}"/${P}-tk8.6.patch
+
+ append-cflags -DUSE_INTERP_RESULT -fPIC
+}
+
+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() {
+ # parallel borks
+ 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 || die "make install failed"
+
+ 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}
+ done
+
+ # bug 259338 - dev-tcltk/blt-2.4z-r4 provides empty pkgIndex.tcl
+ cp "${FILESDIR}"/pkgIndex.tcl "${ED}"/usr/$(get_libdir)/blt2.4/pkgIndex.tcl
+
+ # 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/blt-2.4z-r12.ebuild b/dev-tcltk/blt/blt-2.4z-r12.ebuild
new file mode 100644
index 000000000000..e3ff8c5f0eac
--- /dev/null
+++ b/dev-tcltk/blt/blt-2.4z-r12.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="
+ http://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 ~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
+ jpeg? ( virtual/jpeg )
+ X? ( x11-libs/libX11 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}${MY_V_SUFFIX}"
+
+MAKEOPTS+=" -j1"
+
+src_prepare() {
+ epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile.patch"
+ epatch "${FILESDIR}/blt-2.4z-r4-fix-makefile2.patch"
+ # From blt-2.4z-6mdk.src.rpm
+ epatch "${FILESDIR}"/blt2.4z-64bit.patch
+
+ #epatch "${FILESDIR}"/blt-2.4z-tcl8.5-fix.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" \
+ -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
+
+ 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() {
+ # parallel borks
+ 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 || die "make install failed"
+
+ 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}
+ done
+
+ # bug 259338 - dev-tcltk/blt-2.4z-r4 provides empty pkgIndex.tcl
+ cp "${FILESDIR}"/pkgIndex.tcl "${ED}"/usr/$(get_libdir)/blt2.4/pkgIndex.tcl
+
+ # 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/blt-2.4z-r13.ebuild b/dev-tcltk/blt/blt-2.4z-r13.ebuild
new file mode 100644
index 000000000000..09fd4ce1e116
--- /dev/null
+++ b/dev-tcltk/blt/blt-2.4z-r13.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="
+ http://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 ~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-makefile.patch b/dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile.patch
new file mode 100644
index 000000000000..8404f2625c37
--- /dev/null
+++ b/dev-tcltk/blt/files/blt-2.4z-r4-fix-makefile.patch
@@ -0,0 +1,23 @@
+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
+@@ -45,7 +45,7 @@ all: pkgIndex
+
+ pkgIndex:
+ rm -f pkgIndex.tcl
+- sed -e 's/%VERSION%/$(version)/' $(srcdir)/pkgIndex.tcl.in | \
++ sed -e 's/%VERSION%/$(version)/' $(INSTALL_ROOT)$(srcdir)/pkgIndex.tcl.in | \
+ sed -e 's/%LIB_PREFIX%/$(lib_prefix)/' | \
+ sed -e 's;%LIB_DIR%;$(libdir);' > pkgIndex.tcl
+
+@@ -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-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/files/blt2.4z-install.diff b/dev-tcltk/blt/files/blt2.4z-install.diff
new file mode 100644
index 000000000000..184d7f701ce5
--- /dev/null
+++ b/dev-tcltk/blt/files/blt2.4z-install.diff
@@ -0,0 +1,26 @@
+--- blt2.4z/library/Makefile.in.jj 2003-07-09 20:18:32.000000000 +0100
++++ blt2.4z/library/Makefile.in 2003-07-09 20:19:06.000000000 +0100
+@@ -58,7 +58,7 @@
+ 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 \
+--- blt2.4z/Makefile.in.jj 2003-07-09 20:19:24.000000000 +0100
++++ blt2.4z/Makefile.in 2003-07-09 20:19:46.000000000 +0100
+@@ -47,9 +47,9 @@
+ (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/pkgIndex.tcl b/dev-tcltk/blt/files/pkgIndex.tcl
new file mode 100644
index 000000000000..7911d8537b84
--- /dev/null
+++ b/dev-tcltk/blt/files/pkgIndex.tcl
@@ -0,0 +1,2 @@
+package ifneeded BLT 2.4 [list load [file join $dir .. libBLT24.so]]
+package ifneeded BLTlite 2.4 [list load [file join $dir .. libBLTlite24.so]]
diff --git a/dev-tcltk/blt/metadata.xml b/dev-tcltk/blt/metadata.xml
new file mode 100644
index 000000000000..70ac40499556
--- /dev/null
+++ b/dev-tcltk/blt/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+</pkgmetadata>
diff --git a/dev-tcltk/bwidget/Manifest b/dev-tcltk/bwidget/Manifest
new file mode 100644
index 000000000000..6cf3053c1ad2
--- /dev/null
+++ b/dev-tcltk/bwidget/Manifest
@@ -0,0 +1 @@
+DIST bwidget-1.9.8.tar.gz 252668 SHA256 545016e3ee998991308f54d8ef26bbf16144ee50fa432b9100d37ef806bdb314 SHA512 437958871809c8ce285cbf4521ff08720d106dca708183ff94234015da2b04ccb3a7b05df13d8e3f46466106c91418607c5983fc4ed8d9c4285ae0a0b1071262 WHIRLPOOL 4ee88816e8abab426c846ccc8a688a347ba9bdc43288b10ec56fec3f695f7733140441a686f321035cb1aebfc100178c263945c8a36c4b15b1ad227af72ee844
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..adfcc4ca6483
--- /dev/null
+++ b/dev-tcltk/bwidget/bwidget-1.9.8.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 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/files/bwidget-1.9.7-test.patch b/dev-tcltk/bwidget/files/bwidget-1.9.7-test.patch
new file mode 100644
index 000000000000..ff293f6450ca
--- /dev/null
+++ b/dev-tcltk/bwidget/files/bwidget-1.9.7-test.patch
@@ -0,0 +1,31 @@
+Index: tests/entry.test
+==================================================================
+--- tests/entry.test
++++ tests/entry.test
+@@ -21,11 +21,11 @@
+ {-bg #ff0000 #ff0000 non-existent {unknown color name "non-existent"}}
+ {-borderwidth 1.3 1 badValue {bad screen distance "badValue"}}
+ {-command foo foo {} {}}
+ {-disabledforeground blue blue non-existent \
+ {unknown color name "non-existent"}}
+- {-editable false false shazbot {expected boolean value but got "shazbot"}}
++ {-editable false 0 shazbot {expected boolean value but got "shazbot"}}
+ {-exportselection yes 1 xyzzy {expected boolean value but got "xyzzy"}}
+ {-fg #110022 #110022 bogus {unknown color name "bogus"}}
+ {-font {Helvetica 12 italic} {Helvetica 12 italic} {} \
+ {font "" doesn't exist}}
+ {-foreground #110022 #110022 bogus {unknown color name "bogus"}}
+@@ -63,11 +63,11 @@
+ }
+ destroy .e
+
+ test Entry-2.1 {Entry} {
+ list [catch {Entry} msg] $msg
+-} {1 {no value given for parameter "path" to "Entry"}}
++} {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"}}
+ test Entry-2.3 {Entry procedure} {
+ Entry .e
+
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..c9ab155ba8d5
--- /dev/null
+++ b/dev-tcltk/bwidget/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..b07e307c126e
--- /dev/null
+++ b/dev-tcltk/ck/Manifest
@@ -0,0 +1,2 @@
+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
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..359cc40aa61c
--- /dev/null
+++ b/dev-tcltk/ck/ck-8.0-r4.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ http://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..70ac40499556
--- /dev/null
+++ b/dev-tcltk/ck/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+</pkgmetadata>
diff --git a/dev-tcltk/combobox/Manifest b/dev-tcltk/combobox/Manifest
new file mode 100644
index 000000000000..065ac6215a26
--- /dev/null
+++ b/dev-tcltk/combobox/Manifest
@@ -0,0 +1 @@
+DIST combobox-2.3.tar.gz 37327 SHA256 05d03337730c9a5b5bc509fca2abf50d755bb6f9b752f0d0454870070f1587c6 SHA512 6c85ed671ad64d671630bba09cbcbbcecee91d0ed77a63eee60b1b1ae12caf6312ab1da9a1cbb8ac949136ac37889c20f4dbd0097e41c8eeb3b018ebbafcf36e WHIRLPOOL 8833afd426c7befd99930a425d8f1785f5c21640b57598a9964c36d9fe33a3d6b197d68708ade17f41559258bfea1207781d70a5e65ac5d59f07705d70e42a7e
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..4eb867b80c6e
--- /dev/null
+++ b/dev-tcltk/combobox/combobox-2.3-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..5ef07a39e7e1
--- /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>
+ <herd>sci</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-tcltk/expect-lite/Manifest b/dev-tcltk/expect-lite/Manifest
new file mode 100644
index 000000000000..edad26404629
--- /dev/null
+++ b/dev-tcltk/expect-lite/Manifest
@@ -0,0 +1,18 @@
+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
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..f41b0f459a87
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.0.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..94c696d5a3c7
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.1.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..94c696d5a3c7
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.1.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..94c696d5a3c7
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.2.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..94c696d5a3c7
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.2.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..5437ed19f5c8
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.2.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..f8c7d41c91fe
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.3.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..f8c7d41c91fe
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.3.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..70631c099baa
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.3.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..70631c099baa
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.3.3.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..272dc60a06bb
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.4.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..70631c099baa
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.4.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..70631c099baa
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.5.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..272dc60a06bb
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.6.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..70631c099baa
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.6.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..70631c099baa
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.6.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..6503db6b0e4d
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.7.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..052bc7e4ba13
--- /dev/null
+++ b/dev-tcltk/expect-lite/expect-lite-4.8.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..60de8dcb3a23
--- /dev/null
+++ b/dev-tcltk/expect-lite/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <maintainer>
+ <email>vapier@gentoo.org</email>
+ </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..840a8748c16c
--- /dev/null
+++ b/dev-tcltk/expect/Manifest
@@ -0,0 +1,2 @@
+DIST expect-5.44.1.15.tar.bz2 547655 SHA256 c8565b869d67389995684b60553685168dd40135aa50022bd759f2d5e757d6f1 SHA512 ef7b90dcad733d8c02264d9ff2ad1b018bb50923f78fd16181e9cae2bcdd49dba723da1ef8bada0a3b570399760f198390e7e51f5f90a34f80f845c2244ea336 WHIRLPOOL cf464abf7f27fc7dd33dd9d98bb7dfc27cfde9cc90bf74098fcce17a7a4d78c46db49b72bcd0c7bd7a45580ec37cf5f3b57971bacb4302586c1520413ce5dfd0
+DIST expect5.45.tar.gz 628808 SHA256 b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040 SHA512 be991c68241e607b3a689eae7e7966056dbfb577e857331d54a4911bd178c1816425217603b43918ad1b6d2e966271a0f01e79d7028a22e223562d59d10c8c51 WHIRLPOOL e28a5019036d20260f76b13cbd47d2e56661b0107592ead296118c12ed28157a1300a091730820e088d2fa6f86396e7244e844c7bc2e942fc6cf995e4194f10f
diff --git a/dev-tcltk/expect/expect-5.44.1.15.ebuild b/dev-tcltk/expect/expect-5.44.1.15.ebuild
new file mode 100644
index 000000000000..ef49826c2faa
--- /dev/null
+++ b/dev-tcltk/expect/expect-5.44.1.15.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit autotools eutils
+
+DESCRIPTION="tool for automating interactive applications"
+HOMEPAGE="http://expect.nist.gov/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="debug doc threads X"
+
+# 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?]
+ X? ( >=dev-lang/tk-8.2:0[threads?] )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i "s#/usr/local/bin#${EPREFIX}/usr/bin#" expect{,k}.man || die
+ # stops any example scripts being installed by default
+ sed -i \
+ -e 's/^SCRIPT_LIST/_&/' \
+ -e 's/^SCRIPTS/_&/' \
+ -e 's/^SCRIPTS_MANPAGES = /_&/' \
+ Makefile.in
+
+ epatch "${FILESDIR}"/${P}-gfbsd.patch
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ epatch "${FILESDIR}"/${P}_with-tk-no.patch
+ epatch "${FILESDIR}"/${P}-headers.patch #337943
+ epatch "${FILESDIR}"/${P}-expectk.patch
+ sed -i 's:ifdef HAVE_SYS_WAIT_H:ifndef NO_SYS_WAIT_H:' *.c
+
+ eautoconf
+}
+
+src_configure() {
+ local myconf
+ local tclv
+ local tkv
+ # Find the version of tcl/tk that has headers installed.
+ # This will be the most recently merged, not necessarily the highest
+ # version number.
+ tclv=$(grep TCL_VER ${EPREFIX}/usr/include/tcl.h | sed 's/^.*"\(.*\)".*/\1/')
+ #tkv isn't really needed, included for symmetry and the future
+ #tkv=$(grep TK_VER ${EPREFIX}/usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+ myconf="--with-tcl=${EPREFIX}/usr/$(get_libdir) --with-tclinclude=${EPREFIX}/usr/$(get_libdir)/tcl${tclv}/include/generic --with-tk=yes"
+
+ if use X ; then
+ #--with-x is enabled by default
+ #configure needs to find the file tkConfig.sh and tk.h
+ #tk.h is in /usr/lib so don't need to explicitly set --with-tkinclude
+ myconf="$myconf --with-tk=${EPREFIX}/usr/$(get_libdir) --with-tkinclude=${EPREFIX}/usr/include"
+ else
+ #configure knows that tk depends on X so just disable X
+ myconf="$myconf --with-tk=no"
+ fi
+
+ econf \
+ $myconf \
+ --enable-shared \
+ $(use_enable threads) \
+ $(use_enable amd64 64bit) \
+ $(use_enable debug symbols)
+}
+
+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 || die "emake test failed"
+}
+
+expect_make_var() {
+ touch pkgIndex.tcl-hand
+ printf 'all:;echo $('$1')\ninclude Makefile' | emake --no-print-directory -s -f -
+ rm -f pkgIndex.tcl-hand
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc ChangeLog FAQ HISTORY NEWS README
+
+ # install examples if 'doc' is set
+ if use doc ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins $(printf 'example/%s ' $(expect_make_var SCRIPTS)) || die
+ docinto examples
+ dodoc example/README $(printf 'example/%s.man ' $(expect_make_var _SCRIPTS_MANPAGES)) || die
+ fi
+}
diff --git a/dev-tcltk/expect/expect-5.45.ebuild b/dev-tcltk/expect/expect-5.45.ebuild
new file mode 100644
index 000000000000..5ba1acfb31fd
--- /dev/null
+++ b/dev-tcltk/expect/expect-5.45.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~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.39.0-libdir.patch b/dev-tcltk/expect/files/expect-5.39.0-libdir.patch
new file mode 100644
index 000000000000..061db835fb8b
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.39.0-libdir.patch
@@ -0,0 +1,11 @@
+--- expect-5.39/Makefile.in.libdir 2003-07-30 00:46:51.000000000 +0200
++++ expect-5.39/Makefile.in 2003-11-17 17:54:52.000000000 +0100
+@@ -316,7 +316,7 @@
+ CFLAGS_INT = $(MH_CFLAGS) $(CPPFLAGS) $(XCFLAGS)
+
+ LIB_INSTALL_DIR = $(tcl_libdir)
+-LIB_RUNTIME_DIR = $(tcl_libdir)
++LIB_RUNTIME_DIR = $(subst $(INSTALL_ROOT),,$(tcl_libdir))
+ # I don't understand why Tcl splits these up, but it does. LIB_RUNTIME_DIR
+ # can appear as part of the LD_SEARCH_FLAGS inherited by configure.
+
diff --git a/dev-tcltk/expect/files/expect-5.43.0-avoid-tcl-internals-1.patch b/dev-tcltk/expect/files/expect-5.43.0-avoid-tcl-internals-1.patch
new file mode 100644
index 000000000000..517fe93f8b2c
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.43.0-avoid-tcl-internals-1.patch
@@ -0,0 +1,100 @@
+Submitted By: Bryan Kadzban <bryan@kadzban.is-a-geek.net>
+Date: 2008-01-12
+Initial Package Version: 5.43
+Upstream status: Not Submitted - Test Version
+Origin: LFS ticket 2126 (http://wiki.linuxfromscratch.org/lfs/ticket/2126)
+Description: Removes references to functions that Tcl 8.5 no longer exposes.
+
+diff -Naur expect-5.43/exp_command.c expect-5.43-patched/exp_command.c
+--- expect-5.43/exp_command.c 2004-08-20 13:18:01.000000000 -0400
++++ expect-5.43-patched/exp_command.c 2008-01-12 11:42:45.000000000 -0500
+@@ -2265,6 +2265,8 @@
+ /*NOTREACHED*/
+ }
+
++static struct exp_cmd_data cmd_data[];
++
+ /*ARGSUSED*/
+ static int
+ Exp_CloseObjCmd(clientData, interp, objc, objv)
+@@ -2311,12 +2313,23 @@
+ /* Historical note: we used "close" long before there was a */
+ /* Tcl builtin by the same name. */
+
++ /* The code that registered this function as the handler for */
++ /* the "close" command stored away the old handler in the */
++ /* exp_cmd_data for the "close" command. */
++
++ struct exp_cmd_data *cmd_ptr;
+ Tcl_CmdInfo info;
++
++ for(cmd_ptr = &cmd_data[0]; cmd_ptr->name; cmd_ptr++) {
++ if(strncmp(cmd_ptr->name, "close", 5) == 0)
++ break;
++ }
++
+ Tcl_ResetResult(interp);
+ if (0 == Tcl_GetCommandInfo(interp,"close",&info)) {
+ info.clientData = 0;
+ }
+- return(Tcl_CloseObjCmd(info.clientData,interp,objc_orig,objv_orig));
++ return(cmd_ptr->old_objProc(info.clientData,interp,objc_orig,objv_orig));
+ }
+
+ if (chanName) {
+@@ -2961,7 +2974,10 @@
+ /* if successful (i.e., TCL_RETURN is returned) */
+ /* modify the result, so that we will handle it specially */
+
+- int result = Tcl_ReturnObjCmd(clientData,interp,objc,objv);
++ Tcl_CmdInfo info;
++ Tcl_GetCommandInfo(interp, "return", &info);
++
++ int result = info.objProc(clientData,interp,objc,objv);
+ if (result == TCL_RETURN)
+ result = EXP_TCL_RETURN;
+ return result;
+@@ -3062,8 +3078,7 @@
+
+ for (;c->name;c++) {
+ /* if already defined, don't redefine */
+- if ((c->flags & EXP_REDEFINE) ||
+- !(Tcl_FindHashEntry(&globalNsPtr->cmdTable,c->name) ||
++ if (!(Tcl_FindHashEntry(&globalNsPtr->cmdTable,c->name) ||
+ Tcl_FindHashEntry(&currNsPtr->cmdTable,c->name))) {
+ if (c->objproc)
+ Tcl_CreateObjCommand(interp,c->name,
+@@ -3072,6 +3087,21 @@
+ Tcl_CreateCommand(interp,c->name,c->proc,
+ c->data,exp_deleteProc);
+ }
++ else if (c->flags & EXP_REDEFINE) { /* unless the REDEFINE flag is present */
++ Tcl_CmdInfo info;
++
++ if (Tcl_GetCommandInfo(interp, c->name, &info)) {
++ c->old_proc = info.proc;
++ c->old_objProc = info.objProc;
++ }
++
++ if (c->objproc)
++ Tcl_CreateObjCommand(interp,c->name,
++ c->objproc,c->data,exp_deleteObjProc);
++ else
++ Tcl_CreateCommand(interp,c->name,c->proc,
++ c->data,exp_deleteProc);
++ }
+ if (!(c->name[0] == 'e' &&
+ c->name[1] == 'x' &&
+ c->name[2] == 'p')
+diff -Naur expect-5.43/exp_command.h expect-5.43-patched/exp_command.h
+--- expect-5.43/exp_command.h 2008-01-12 11:44:11.000000000 -0500
++++ expect-5.43-patched/exp_command.h 2008-01-12 11:26:05.000000000 -0500
+@@ -297,6 +297,8 @@
+ Tcl_CmdProc *proc;
+ ClientData data;
+ int flags;
++ Tcl_CmdProc *old_proc; /* these store the procedure for the old command, */
++ Tcl_ObjCmdProc *old_objProc; /* if any */
+ };
+
+ EXTERN void exp_create_commands _ANSI_ARGS_((Tcl_Interp *,
diff --git a/dev-tcltk/expect/files/expect-5.43.0-darwin.patch b/dev-tcltk/expect/files/expect-5.43.0-darwin.patch
new file mode 100644
index 000000000000..7ce1bb6cb7fb
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.43.0-darwin.patch
@@ -0,0 +1,11 @@
+--- Makefile.in
++++ Makefile.in
+@@ -413,7 +413,7 @@
+ expect-shared-lib-file :: $(EXP_SHARED_LIB_FILE)
+ $(EXP_SHARED_LIB_FILE): $(OFILES)
+ -rm -f $(EXP_SHARED_LIB_FILE)
+- @TCL_SHLIB_LD@ -o $(EXP_SHARED_LIB_FILE) $(SHARED_OFILES) @EXP_LD_SEARCH_FLAGS@ @EXP_SHLIB_LD_LIBS@
++ @TCL_SHLIB_LD@ -o $(EXP_SHARED_LIB_FILE) $(SHARED_OFILES) @EXP_LD_SEARCH_FLAGS@ @EXP_SHLIB_LD_LIBS@ -install_name $(tcl_libdir)/$(EXP_SHARED_LIB_FILE)
+
+ .PHONY: install-info install info
+ install-info:
diff --git a/dev-tcltk/expect/files/expect-5.43.0-missing-includes.patch b/dev-tcltk/expect/files/expect-5.43.0-missing-includes.patch
new file mode 100644
index 000000000000..a4310d011216
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.43.0-missing-includes.patch
@@ -0,0 +1,44 @@
+diff -urpN expect-5.43.0.orig/work/expect-5.43/exp_glob.c expect-5.43.0/work/expect-5.43/exp_glob.c
+--- expect-5.43.0.orig/work/expect-5.43/exp_glob.c 2009-06-07 19:36:31.000000000 +0200
++++ expect-5.43.0/work/expect-5.43/exp_glob.c 2009-06-07 19:39:04.000000000 +0200
+@@ -11,6 +11,7 @@ would appreciate credit if this program
+
+ */
+
++#include <string.h>
+ #include "expect_cf.h"
+ #include "tcl.h"
+ #include "exp_int.h"
+diff -urpN expect-5.43.0.orig/work/expect-5.43/exp_main_exp.c expect-5.43.0/work/expect-5.43/exp_main_exp.c
+--- expect-5.43.0.orig/work/expect-5.43/exp_main_exp.c 2009-06-07 19:36:31.000000000 +0200
++++ expect-5.43.0/work/expect-5.43/exp_main_exp.c 2009-06-07 19:37:39.000000000 +0200
+@@ -9,6 +9,7 @@ would appreciate credit if this program
+
+ #include "expect_cf.h"
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "tcl.h"
+ #include "expect_tcl.h"
+
+diff -urpN expect-5.43.0.orig/work/expect-5.43/exp_trap.c expect-5.43.0/work/expect-5.43/exp_trap.c
+--- expect-5.43.0.orig/work/expect-5.43/exp_trap.c 2009-06-07 19:36:31.000000000 +0200
++++ expect-5.43.0/work/expect-5.43/exp_trap.c 2009-06-07 19:38:51.000000000 +0200
+@@ -11,6 +11,7 @@ would appreciate credit if this program
+ #include "expect_cf.h"
+
+ #include <stdio.h>
++#include <string.h>
+ #include <signal.h>
+ #include <sys/types.h>
+
+diff -urpN expect-5.43.0.orig/work/expect-5.43/pty_termios.c expect-5.43.0/work/expect-5.43/pty_termios.c
+--- expect-5.43.0.orig/work/expect-5.43/pty_termios.c 2009-06-07 19:36:31.000000000 +0200
++++ expect-5.43.0/work/expect-5.43/pty_termios.c 2009-06-07 19:38:19.000000000 +0200
+@@ -8,6 +8,7 @@ would appreciate credit if you use this
+ */
+
+ #include <stdio.h>
++#include <string.h>
+ #include <signal.h>
+
+ #if defined(SIGCLD) && !defined(SIGCHLD)
diff --git a/dev-tcltk/expect/files/expect-5.43.0-multilib.patch b/dev-tcltk/expect/files/expect-5.43.0-multilib.patch
new file mode 100644
index 000000000000..9257537349d5
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.43.0-multilib.patch
@@ -0,0 +1,11 @@
+--- expect-5.42/configure.in.orig 2004-12-21 03:02:36.095170881 -0800
++++ expect-5.42/configure.in 2004-12-21 03:03:08.987170537 -0800
+@@ -1141,7 +1141,7 @@
+ fi
+
+ EXP_BUILD_LIB_SPEC="-L`pwd` -lexpect${EXP_LIB_VERSION}${DBGX}"
+-EXP_LIB_SPEC="-L\${INSTALL_ROOT}\${exec_prefix}/lib -lexpect${EXP_LIB_VERSION}${DBGX}"
++EXP_LIB_SPEC="-L\${libdir} -lexpect${EXP_LIB_VERSION}${DBGX}"
+ EXP_UNSHARED_LIB_FILE=libexpect${EXP_LIB_VERSION}${DBGX}.a
+
+ # The TCL_SHARED_LIB_SUFFIX macro below relies on the DBGX macro,
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/files/expect.m4 b/dev-tcltk/expect/files/expect.m4
new file mode 100644
index 000000000000..1fea61f8b477
--- /dev/null
+++ b/dev-tcltk/expect/files/expect.m4
@@ -0,0 +1,609 @@
+dnl written by Rob Savoye <rob@cygnus.com> for Cygnus Support
+dnl major rewriting for Tcl 7.5 by Don Libes <libes@nist.gov>
+
+dnl CY_AC_PATH_TCLCONFIG and CY_AC_LOAD_TCLCONFIG should be invoked
+dnl (in that order) before any other TCL macros. Similarly for TK.
+
+dnl CYGNUS LOCAL: This gets the right posix flag for gcc
+AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
+[AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
+AC_MSG_CHECKING([if running LynxOS])
+AC_CACHE_VAL(ac_cv_os_lynx,
+[AC_EGREP_CPP(yes,
+[/*
+ * The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__"
+ */
+#if defined(__Lynx__) || defined(Lynx)
+yes
+#endif
+], ac_cv_os_lynx=yes, ac_cv_os_lynx=no)])
+#
+if test "$ac_cv_os_lynx" = "yes" ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(LYNX)
+ AC_MSG_CHECKING([whether -mposix or -X is available])
+ AC_CACHE_VAL(ac_cv_c_posix_flag,
+ [AC_TRY_COMPILE(,[
+ /*
+ * This flag varies depending on how old the compiler is.
+ * -X is for the old "cc" and "gcc" (based on 1.42).
+ * -mposix is for the new gcc (at least 2.5.8).
+ */
+ #if defined(__GNUC__) && __GNUC__ >= 2
+ choke me
+ #endif
+ ], ac_cv_c_posix_flag=" -mposix", ac_cv_c_posix_flag=" -X")])
+ CC="$CC $ac_cv_c_posix_flag"
+ AC_MSG_RESULT($ac_cv_c_posix_flag)
+ else
+ AC_MSG_RESULT(no)
+fi
+])
+
+#
+# Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
+# makes configure think it's cross compiling. If --target wasn't used, then
+# we can't configure, so something is wrong. We don't use the cache
+# here cause if somebody fixes their compiler install, we want this to work.
+AC_DEFUN(CY_AC_C_WORKS,
+[# If we cannot compile and link a trivial program, we can't expect anything to work
+AC_MSG_CHECKING(whether the compiler ($CC) actually works)
+AC_TRY_COMPILE(, [/* don't need anything here */],
+ c_compiles=yes, c_compiles=no)
+
+AC_TRY_LINK(, [/* don't need anything here */],
+ c_links=yes, c_links=no)
+
+if test x"${c_compiles}" = x"no" ; then
+ AC_MSG_ERROR(the native compiler is broken and won't compile.)
+fi
+
+if test x"${c_links}" = x"no" ; then
+ AC_MSG_ERROR(the native compiler is broken and won't link.)
+fi
+AC_MSG_RESULT(yes)
+])
+
+AC_DEFUN(CY_AC_PATH_TCLH, [
+#
+# Ok, lets find the tcl source trees so we can use the headers
+# Warning: transition of version 9 to 10 will break this algorithm
+# because 10 sorts before 9. We also look for just tcl. We have to
+# be careful that we don't match stuff like tclX by accident.
+# the alternative search directory is involked by --with-tclinclude
+#
+no_tcl=true
+AC_MSG_CHECKING(for Tcl private headers)
+AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl private headers are], with_tclinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_tclh,[
+# first check to see if --with-tclinclude was specified
+if test x"${with_tclinclude}" != x ; then
+ if test -f ${with_tclinclude}/tclInt.h ; then
+ ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
+ elif test -f ${with_tclinclude}/generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers])
+ fi
+fi
+
+# next check if it came with Tcl configuration file
+if test x"${ac_cv_c_tclconfig}" != x ; then
+ if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/../generic; pwd)`
+ fi
+fi
+
+# next check in private source directory
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tclh}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../tcl[[9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../tcl[[8]].[[2-9]] 2>/dev/null` \
+ ${srcdir}/../../tcl \
+ `ls -dr ${srcdir}/../../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../../tcl[[9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../../tcl[[8]].[[2-9]] 2>/dev/null` \
+ ${srcdir}/../../../tcl \
+ `ls -dr ${srcdir}/../../../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../../../tcl[[9]].[[0-9]] 2>/dev/null ` \
+ `ls -dr ${srcdir}/../../../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../../../tcl[[8]].[[2-9]] 2>/dev/null ` ; do
+ if test -f $i/generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+# finally check in a few common install locations
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tclh}" = x ; then
+ for i in \
+ `ls -dr /usr/local/src/tcl[[9]].[[0-9]].[[0-9]] /usr/local/src/tcl[[9]].[[0-9]] 2>/dev/null` \
+ `ls -dr /usr/local/src/tcl[[8]].[[2-9]].[[0-9]] /usr/local/src/tcl[[8]].[[2-9]] 2>/dev/null` \
+ `ls -dr /usr/local/lib/tcl[[9]].[[0-9]].[[0-9]] /usr/local/lib/tcl[[9]].[[0-9]] 2>/dev/null` \
+ `ls -dr /usr/local/lib/tcl[[8]].[[2-9]].[[0-9]] /usr/local/lib/tcl[[8]].[[2-9]] 2>/dev/null` \
+ /usr/local/src/tcl \
+ /usr/local/lib/tcl \
+ ${prefix}/include ; do
+ if test -f $i/generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+# see if one is installed
+if test x"${ac_cv_c_tclh}" = x ; then
+ AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")
+fi
+])
+if test x"${ac_cv_c_tclh}" = x ; then
+ TCLHDIR="# no Tcl private headers found"
+ TCLHDIRDASHI="# no Tcl private headers found"
+ AC_MSG_ERROR([Can't find Tcl private headers])
+fi
+if test x"${ac_cv_c_tclh}" != x ; then
+ no_tcl=""
+ if test x"${ac_cv_c_tclh}" = x"installed" ; then
+ AC_MSG_RESULT([is installed])
+ TCLHDIR=""
+ TCLHDIRDASHI=""
+ TCL_LIBRARY=""
+ else
+ AC_MSG_RESULT([found in ${ac_cv_c_tclh}])
+ # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
+ TCLHDIR="${ac_cv_c_tclh}"
+ TCLHDIRDASHI="-I${ac_cv_c_tclh} -I`dirname ${ac_cv_c_tclh}`/unix"
+ TCL_LIBRARY=`echo $TCLHDIR | sed -e 's/generic//'`library
+ fi
+fi
+
+AC_SUBST(TCLHDIR)
+AC_SUBST(TCLHDIRDASHI)
+AC_SUBST(TCL_LIBRARY)
+])
+
+
+AC_DEFUN(CY_AC_PATH_TCLCONFIG, [
+#
+# Ok, lets find the tcl configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-tcl
+#
+
+if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+ AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)],
+ with_tclconfig=${withval})
+ AC_MSG_CHECKING([for Tcl configuration])
+ AC_CACHE_VAL(ac_cv_c_tclconfig,[
+
+ # First check to see if --with-tcl was specified.
+ if test x"${with_tclconfig}" != x ; then
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[[9]].[[0-9]].[[0-9]] ../tcl[[9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../tcl[[8]].[[2-9]].[[0-9]] ../tcl[[8]].[[2-9]] 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[[9]].[[0-9]].[[0-9]] ../../tcl[[9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../tcl[[8]].[[2-9]].[[0-9]] ../../tcl[[8]].[[2-9]] 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[[9]].[[0-9]].[[0-9]] ../../../tcl[[9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../tcl[[8]].[[2-9]].[[0-9]] ../../../tcl[[8]].[[2-9]] 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../tcl[[9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../tcl[[8]].[[2-9]] 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCLCONFIG="# no Tcl configs found"
+ AC_MSG_WARN(Can't find Tcl configuration definitions)
+ else
+ no_tcl=
+ TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
+ AC_MSG_RESULT(found $TCLCONFIG)
+ fi
+fi
+])
+
+# Defined as a separate macro so we don't have to cache the values
+# from PATH_TCLCONFIG (because this can also be cached).
+AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [
+ . $TCLCONFIG
+
+dnl AC_SUBST(TCL_VERSION)
+dnl AC_SUBST(TCL_MAJOR_VERSION)
+dnl AC_SUBST(TCL_MINOR_VERSION)
+dnl AC_SUBST(TCL_CC)
+ AC_SUBST(TCL_DEFS)
+dnl following is just to test if missing symbol can be handled by configure
+ AC_SUBST(TCL_DELETEME)
+ AC_SUBST(TCL_DBGX)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_LIB_FILE)
+
+dnl don't export, not used outside of configure
+dnl AC_SUBST(TCL_LIBS)
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_PREFIX)
+
+ AC_SUBST(TCL_EXEC_PREFIX)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_SHLIB_CFLAGS)
+ AC_SUBST(TCL_SHLIB_LD)
+dnl don't export, not used outside of configure
+dnl AC_SUBST(TCL_SHLIB_LD_LIBS)
+
+# Tcl defines TCL_SHLIB_SUFFIX but TCL_SHARED_LIB_SUFFIX then looks for it
+# as just SHLIB_SUFFIX. How bizarre.
+ SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
+ AC_SUBST(SHLIB_SUFFIX)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_DL_LIBS)
+ AC_SUBST(TCL_LD_FLAGS)
+dnl don't export, not used outside of configure
+dnl AC_SUBST(TCL_LD_SEARCH_FLAGS)
+dnl AC_SUBST(TCL_COMPAT_OBJS)
+dnl AC_SUBST(TCL_RANLIB)
+
+# if Tcl's build directory has been removed, TCL_LIB_SPEC should
+# be used instead of TCL_BUILD_LIB_SPEC
+SAVELIBS=$LIBS
+# eval used to expand out TCL_DBGX
+eval "LIBS=\"$TCL_BUILD_LIB_SPEC $TCL_LIBS\""
+AC_MSG_CHECKING([Tcl build library])
+AC_MSG_RESULT($LIBS)
+
+AC_CHECK_FUNC(Tcl_CreateCommand,[
+ AC_MSG_CHECKING([if Tcl library build specification is valid])
+ AC_MSG_RESULT(yes)
+],[
+ TCL_BUILD_LIB_SPEC=$TCL_LIB_SPEC
+ # Can't pull the following CHECKING call out since it will be
+ # broken up by the CHECK_FUNC just above.
+ AC_MSG_CHECKING([if Tcl library build specification is valid])
+ AC_MSG_RESULT(no)
+])
+LIBS=$SAVELIBS
+
+ AC_SUBST(TCL_BUILD_LIB_SPEC)
+ AC_SUBST(TCL_LIB_SPEC)
+dnl AC_SUBST(TCL_LIB_VERSIONS_OK)
+
+ AC_SUBST(TCL_SHARED_LIB_SUFFIX)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
+])
+
+# Warning: Tk definitions are very similar to Tcl definitions but
+# are not precisely the same. There are a couple of differences,
+# so don't do changes to Tcl thinking you can cut and paste it do
+# the Tk differences and later simply substitute "Tk" for "Tcl".
+# Known differences:
+# - Acceptable Tcl major version #s is 8.2-9.* while Tk is 8.2-9.*
+# - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h
+# - Computing major/minor versions is different because Tk depends on
+# headers to Tcl, Tk, and X.
+# - Symbols in tkConfig.sh are different than tclConfig.sh
+# - Acceptable for Tk to be missing but not Tcl.
+
+AC_DEFUN(CY_AC_PATH_TKH, [
+#
+# Ok, lets find the tk source trees so we can use the headers
+# If the directory (presumably symlink) named "tk" exists, use that one
+# in preference to any others. Same logic is used when choosing library
+# and again with Tcl. The search order is the best place to look first, then in
+# decreasing significance. The loop breaks if the trigger file is found.
+# Note the gross little conversion here of srcdir by cd'ing to the found
+# directory. This converts the path from a relative to an absolute, so
+# recursive cache variables for the path will work right. We check all
+# the possible paths in one loop rather than many seperate loops to speed
+# things up.
+# the alternative search directory is involked by --with-tkinclude
+#
+#no_tk=true
+AC_MSG_CHECKING(for Tk private headers)
+AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where tk private headers are], with_tkinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_tkh,[
+# first check to see if --with-tkinclude was specified
+if test x"${with_tkinclude}" != x ; then
+ if test -f ${with_tkinclude}/tk.h ; then
+ ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
+ elif test -f ${with_tkinclude}/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
+ else
+ AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers])
+ fi
+fi
+
+# next check if it came with Tk configuration file
+if test x"${ac_cv_c_tkconfig}" != x ; then
+ if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
+ ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/../generic; pwd)`
+ fi
+fi
+
+# next check in private source directory
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tkh}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ ${srcdir}/../../tk \
+ `ls -dr ${srcdir}/../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ ${srcdir}/../../../tk \
+ `ls -dr ${srcdir}/../../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../../tk[[4-9]].[[0-9]] 2>/dev/null ` \
+ `ls -dr ${srcdir}/../../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../../tk[[4-9]].[[0-9]] 2>/dev/null ` ; do
+ if test -f $i/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+# finally check in a few common install locations
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tkh}" = x ; then
+ for i in \
+ `ls -dr /usr/local/src/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/src/tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr /usr/local/src/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/src/tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr /usr/local/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/lib/tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr /usr/local/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/lib/tk[[4-9]].[[0-9]] 2>/dev/null` \
+ /usr/local/src/tk \
+ /usr/local/lib/tk \
+ ${prefix}/include ; do
+ if test -f $i/generic/tk.h ; then
+ ac_cv_c_tkh=`(cd $i/generic; pwd)`
+ break
+ fi
+ done
+fi
+# see if one is installed
+if test x"${ac_cv_c_tkh}" = x ; then
+ AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed, ac_cv_c_tkh="")
+fi
+])
+if test x"${ac_cv_c_tkh}" != x ; then
+# no_tk=""
+ if test x"${ac_cv_c_tkh}" = x"installed" ; then
+ AC_MSG_RESULT([is installed])
+ TKHDIRDASHI=""
+ else
+ AC_MSG_RESULT([found in ${ac_cv_c_tkh}])
+ # this hack is cause the TKHDIRDASHI won't print if there is a "-I" in it.
+ TKHDIRDASHI="-I${ac_cv_c_tkh}"
+ fi
+else
+ TKHDIRDASHI="# no Tk directory found"
+ AC_MSG_WARN([Can't find Tk private headers])
+ no_tk=true
+fi
+
+AC_SUBST(TKHDIRDASHI)
+])
+
+
+AC_DEFUN(CY_AC_PATH_TKCONFIG, [
+#
+# Ok, lets find the tk configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-tk
+#
+
+if test x"${no_tk}" = x ; then
+ # we reset no_tk in case something fails here
+ no_tk=true
+ AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)],
+ with_tkconfig=${withval})
+ AC_MSG_CHECKING([for Tk configuration])
+ AC_CACHE_VAL(ac_cv_c_tkconfig,[
+
+ # First check to see if --with-tk was specified.
+ if test x"${with_tkconfig}" != x ; then
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tk library
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[[4-9]].[[0-9]].[[0-9]] ../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../tk[[4-9]].[[0-9]].[[0-9]] ../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[[4-9]].[[0-9]].[[0-9]] ../../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../tk[[4-9]].[[0-9]].[[0-9]] ../../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[[4-9]].[[0-9]].[[0-9]] ../../../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../tk[[4-9]].[[0-9]].[[0-9]] ../../../tk[[4-9]].[[0-9]] 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TKCONFIG="# no Tk configs found"
+ AC_MSG_WARN(Can't find Tk configuration definitions)
+ else
+ no_tk=
+ TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
+ AC_MSG_RESULT(found $TKCONFIG)
+ fi
+fi
+
+])
+
+# Defined as a separate macro so we don't have to cache the values
+# from PATH_TKCONFIG (because this can also be cached).
+AC_DEFUN(CY_AC_LOAD_TKCONFIG, [
+ if test -f "$TKCONFIG" ; then
+ . $TKCONFIG
+ fi
+
+ AC_SUBST(TK_VERSION)
+dnl not actually used, don't export to save symbols
+dnl AC_SUBST(TK_MAJOR_VERSION)
+dnl AC_SUBST(TK_MINOR_VERSION)
+ AC_SUBST(TK_DEFS)
+
+ AC_SUBST(TK_DBGX)
+dnl not used, don't export to save symbols
+ dnl AC_SUBST(TK_LIB_FILE)
+
+dnl not used outside of configure
+dnl AC_SUBST(TK_LIBS)
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TK_PREFIX)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TK_EXEC_PREFIX)
+
+ AC_SUBST(TK_XINCLUDES)
+ AC_SUBST(TK_XLIBSW)
+
+# if Tk's build directory has been removed, TK_LIB_SPEC should
+# be used instead of TK_BUILD_LIB_SPEC
+SAVELIBS=$LIBS
+# eval used to expand out TK_DBGX
+eval "LIBS=\"$TK_BUILD_LIB_SPEC $TCL_BUILD_LIB_SPEC $TK_LIBS\""
+AC_CHECK_FUNC(Tk_Init,[
+ AC_MSG_CHECKING([if Tk library build specification is valid])
+ AC_MSG_RESULT(yes)
+],[
+ TK_BUILD_LIB_SPEC=$TK_LIB_SPEC
+ # Can't pull the following CHECKING call out since it will be
+ # broken up by the CHECK_FUNC just above.
+ AC_MSG_CHECKING([if Tk library build specification is valid])
+ AC_MSG_RESULT(no)
+])
+LIBS=$SAVELIBS
+
+ AC_SUBST(TK_BUILD_LIB_SPEC)
+ AC_SUBST(TK_LIB_SPEC)
+])
+
+#------------------------------------------------------------------------
+# SC_ENABLE_THREADS --
+#
+# Specify if thread support should be enabled
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-threads
+#
+# Sets the following vars:
+# THREADS_LIBS Thread library(s)
+#
+# Defines the following vars:
+# TCL_THREADS
+# _REENTRANT
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(SC_ENABLE_THREADS, [
+ AC_MSG_CHECKING(for building with threads)
+ AC_ARG_ENABLE(threads, [ --enable-threads build with threads (not supported)],
+ [tcl_ok=$enableval], [tcl_ok=no])
+
+ if test "$tcl_ok" = "yes"; then
+ AC_MSG_WARN([Expect is not fully thread-enabled. Although significant work has been done towards that goal, it is not complete. Continue compiling at your own risk.])
+ fi
+# if test "$tcl_ok" = "yes"; then
+# AC_MSG_RESULT(yes)
+# TCL_THREADS=1
+# AC_DEFINE(TCL_THREADS)
+# AC_DEFINE(_REENTRANT)
+#
+# AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
+# if test "$tcl_ok" = "yes"; then
+# # The space is needed
+# THREADS_LIBS=" -lpthread"
+# else
+# TCL_THREADS=0
+# AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
+# fi
+# else
+# TCL_THREADS=0
+# AC_MSG_RESULT(no (default))
+# fi
+
+ AC_MSG_RESULT(no (default))
+
+])
+
+
+#------------------------------------------------------------------------
+## AK ## Macros which encapsulate the expect specific checks.
+## AK ## This allows me to move them around in the configure.in
+## AK ##
+
diff --git a/dev-tcltk/expect/metadata.xml b/dev-tcltk/expect/metadata.xml
new file mode 100644
index 000000000000..4a2e453c9905
--- /dev/null
+++ b/dev-tcltk/expect/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..3bf56d4f7861
--- /dev/null
+++ b/dev-tcltk/itcl/Manifest
@@ -0,0 +1,2 @@
+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
diff --git a/dev-tcltk/itcl/files/3.4_beta1-test.patch b/dev-tcltk/itcl/files/3.4_beta1-test.patch
new file mode 100644
index 000000000000..16e7fce59c67
--- /dev/null
+++ b/dev-tcltk/itcl/files/3.4_beta1-test.patch
@@ -0,0 +1,16 @@
+ itcl/tests/ensemble.test | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/itcl/tests/ensemble.test b/itcl/tests/ensemble.test
+index c21531e..c36ad5f 100644
+--- a/itcl/tests/ensemble.test
++++ b/itcl/tests/ensemble.test
+@@ -98,7 +98,7 @@ test ensemble-1.10 {part errors are handled gracefully} {
+
+ test ensemble-1.11 {part argument errors are handled gracefully} {
+ list [catch "itcl::ensemble test_numbers {part foo {{}} {}}" msg] $msg $errorInfo
+-} {1 {procedure "foo" has argument with no name} {procedure "foo" has argument with no name
++} {1 {argument with no name} {argument with no name
+ while executing
+ "part foo {{}} {}"
+ ("ensemble" body line 1)
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..b893304da932
--- /dev/null
+++ b/dev-tcltk/itcl/itcl-3.4.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..a7cc698df151
--- /dev/null
+++ b/dev-tcltk/itcl/itcl-4.0.3.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..2f4ceee8b869
--- /dev/null
+++ b/dev-tcltk/itcl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..5f8aa2d64341
--- /dev/null
+++ b/dev-tcltk/itk/Manifest
@@ -0,0 +1,3 @@
+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
diff --git a/dev-tcltk/itk/files/itk-3.4_pre20090417-install.patch b/dev-tcltk/itk/files/itk-3.4_pre20090417-install.patch
new file mode 100644
index 000000000000..721bf9185528
--- /dev/null
+++ b/dev-tcltk/itk/files/itk-3.4_pre20090417-install.patch
@@ -0,0 +1,103 @@
+ itk/Makefile.in | 2 +-
+ itk/configure.in | 23 +++++++++++++++++++++++
+ itk/itkConfig.sh.in | 28 +++++++++++-----------------
+ 3 files changed, 35 insertions(+), 18 deletions(-)
+--- a/itk/Makefile.in
++++ a/itk/Makefile.in
+@@ -395,7 +395,7 @@ install-lib-binaries:
+ fi; \
+ done
+ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
+- : $(INSTALL_DATA) itkConfig.sh $(DESTDIR)$(libdir)
++ $(INSTALL_DATA) itkConfig.sh $(DESTDIR)$(libdir)
+
+ #========================================================================
+ # Install binary executables (e.g. .exe files)
+--- a/itk/configure.in
++++ a/itk/configure.in
+@@ -219,6 +219,7 @@ fi
+ # library.
+ #--------------------------------------------------------------------
+
++itk_LIB_FILE=${PKG_LIB_FILE}
+ AC_SUBST(itkstub_LIB_FILE)
+ AC_SUBST(itk_LIB_FILE)
+
+@@ -234,6 +235,28 @@ TEA_PROG_TCLSH
+ TEA_PROG_WISH
+
+ #--------------------------------------------------------------------
++# These are for itkConfig.sh
++#--------------------------------------------------------------------
++
++# pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
++eval pkglibdir="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
++if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
++ eval itk_LIB_FLAG="-litk${PACKAGE_VERSION}${DBGX}"
++else
++ eval itk_LIB_FLAG="-litk`echo ${PACKAGE_VERSION} | tr -d .`${DBGX}"
++fi
++itk_BUILD_LIB_SPEC="-L`pwd` ${itk_LIB_FLAG}"
++itk_LIB_SPEC="-L${pkglibdir} ${itk_LIB_FLAG}"
++
++AC_SUBST(itk_BUILD_LIB_SPEC)
++AC_SUBST(itk_LIB_SPEC)
++
++# itk_SRC_DIR must be a fully qualified path
++eval itk_SRC_DIR="$srcdir"
++itk_SRC_DIR=`cd "${itk_SRC_DIR}"; pwd`
++AC_SUBST(itk_SRC_DIR)
++
++#--------------------------------------------------------------------
+ # Finally, substitute all of the various values into the Makefile.
+ #--------------------------------------------------------------------
+
+--- a/itk/itkConfig.sh.in
++++ a/itk/itkConfig.sh.in
+@@ -11,30 +11,23 @@
+ #
+ # The information in this file is specific to a single platform.
+
+-# Itcl's version number.
+-ITCL_VERSION='@ITCL_VERSION@'
++# Itk's version number.
++itk_VERSION='@PACKAGE_VERSION@'
++ITK_VERSION='@PACKAGE_VERSION@'
+
+ # The name of the Itk library (may be either a .a file or a shared library):
+-ITK_LIB_FILE=@ITK_LIB_FILE@
++itk_LIB_FILE=@itk_LIB_FILE@
++ITK_LIB_FILE=@itk_LIB_FILE@
+
+ # String to pass to linker to pick up the Itk library from its
+ # build directory.
+-ITK_BUILD_LIB_SPEC='@ITK_BUILD_LIB_SPEC@'
++itk_BUILD_LIB_SPEC='@itk_BUILD_LIB_SPEC@'
++ITK_BUILD_LIB_SPEC='@itk_BUILD_LIB_SPEC@'
+
+ # String to pass to linker to pick up the Itk library from its
+ # installed directory.
+-ITK_LIB_SPEC='@ITK_LIB_SPEC@'
+-
+-# The name of the Itk stub library (a .a file):
+-ITK_STUB_LIB_FILE=@ITK_STUB_LIB_FILE@
+-
+-# String to pass to linker to pick up the Itk stub library from its
+-# build directory.
+-ITK_BUILD_STUB_LIB_SPEC='@ITK_BUILD_STUB_LIB_SPEC@'
+-
+-# String to pass to linker to pick up the Itk stub library from its
+-# installed directory.
+-ITK_STUB_LIB_SPEC='@ITK_STUB_LIB_SPEC@'
++itk_LIB_SPEC='@itk_LIB_SPEC@'
++ITK_LIB_SPEC='@itk_LIB_SPEC@'
+
+ # Location of the top-level source directories from which [incr Tk]
+ # was built. This is the directory that contains a README file as well
+@@ -42,4 +35,5 @@ ITK_STUB_LIB_SPEC='@ITK_STUB_LIB_SPEC@'
+ # compiled in a different place than the directory containing the source
+ # files, this points to the location of the sources, not the location
+ # where [incr Tk] was compiled.
+-ITK_SRC_DIR='@ITK_SRC_DIR@'
++itk_SRC_DIR='@itk_SRC_DIR@'
++ITK_SRC_DIR='@itk_SRC_DIR@'
diff --git a/dev-tcltk/itk/files/itk-4.0.0-install_data.patch b/dev-tcltk/itk/files/itk-4.0.0-install_data.patch
new file mode 100644
index 000000000000..caea5ba9e381
--- /dev/null
+++ b/dev-tcltk/itk/files/itk-4.0.0-install_data.patch
@@ -0,0 +1,20 @@
+--- Makefile.in.ori 2013-01-10 19:43:56.349623406 +0100
++++ Makefile.in 2013-01-10 19:46:08.634960354 +0100
+@@ -100,10 +100,13 @@
+
+ top_builddir = .
+
+-INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+-INSTALL_DATA = @INSTALL_DATA@
+-INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_OPTIONS =
++INSTALL = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS}
++INSTALL_DATA_DIR = ${INSTALL} -d -m 755
++INSTALL_PROGRAM = ${INSTALL} -m 755
++INSTALL_DATA = ${INSTALL} -m 444
++INSTALL_SCRIPT = ${INSTALL_PROGRAM}
++INSTALL_LIBRARY = ${INSTALL_DATA}
+
+ PACKAGE_NAME = @PACKAGE_NAME@
+ PACKAGE_VERSION = @PACKAGE_VERSION@
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..14be48d1aaeb
--- /dev/null
+++ b/dev-tcltk/itk/itk-3.4.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..3341679220dd
--- /dev/null
+++ b/dev-tcltk/itk/itk-4.0.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..82eebb069179
--- /dev/null
+++ b/dev-tcltk/itk/itk-4.0.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..2f4ceee8b869
--- /dev/null
+++ b/dev-tcltk/itk/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..8d6c4526d054
--- /dev/null
+++ b/dev-tcltk/iwidgets/Manifest
@@ -0,0 +1,2 @@
+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
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..9179a2588feb
--- /dev/null
+++ b/dev-tcltk/iwidgets/iwidgets-4.0.1-r3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..428a22f66928
--- /dev/null
+++ b/dev-tcltk/iwidgets/iwidgets-4.0.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..2f4ceee8b869
--- /dev/null
+++ b/dev-tcltk/iwidgets/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..5649f4b8451f
--- /dev/null
+++ b/dev-tcltk/mysqltcl/Manifest
@@ -0,0 +1 @@
+DIST mysqltcl-3.05.tar.gz 198755 SHA256 e2346aee4b99b2d91b552718e4be8ec8c4fc4bbbfe12430e4041e9e13d27a245 SHA512 14e0196b2fce08d97b085bcf25357a72797e9566578a6c0674a76e4402a704b43919b1ce8360d55719a6f2a36c6f68f3762dd23a9f737b7cf9f6537a00acb7ef WHIRLPOOL c2dc4d1441c4092f6d12fa2a1890d6dbda4eb822ec7b87106586e9980d331b04f825e4ac9ad08a8b9dd0604fe3547bf5f73251e27d793e73e0f3213114717620
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..716e7d4301bd
--- /dev/null
+++ b/dev-tcltk/mysqltcl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>mysql</herd>
+</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..17beab1a505f
--- /dev/null
+++ b/dev-tcltk/mysqltcl/mysqltcl-3.05.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/scwoop/Manifest b/dev-tcltk/scwoop/Manifest
new file mode 100644
index 000000000000..8a8640c720be
--- /dev/null
+++ b/dev-tcltk/scwoop/Manifest
@@ -0,0 +1 @@
+DIST scwoop-4.1.tar.gz 86368 SHA256 f1598ecf2be44de6c97ad648faab010000e905c781877cd1b493220054c42a57 SHA512 8fd3fc01bd133aa155b45dcc5a821986aa72115fe248e0382611604f9e23596506f0d34ac331c4824bfd84dce7958b7a10186551604a0614572ee4e84fa3be21 WHIRLPOOL e1d75da7b7c29e505c9f7a92a52ae13f8afdcabfbbf6b4371ef005f0472ee4d3f3ee1247606fefe98a4b04fc2fe1ffbb2ba62ed209d3eaf368416aff0d5f0422
diff --git a/dev-tcltk/scwoop/metadata.xml b/dev-tcltk/scwoop/metadata.xml
new file mode 100644
index 000000000000..d9408d8ab078
--- /dev/null
+++ b/dev-tcltk/scwoop/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>tcltk</herd>
+</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..35bea31f0ec4
--- /dev/null
+++ b/dev-tcltk/scwoop/scwoop-4.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..3a016c09ca08
--- /dev/null
+++ b/dev-tcltk/snack/Manifest
@@ -0,0 +1 @@
+DIST snack2.2.10.tar.gz 1798252 SHA256 4bfe764547ab92ba58f43b77366dbb7c7b3512d65a27cdbf9e585a9cb64ce81e SHA512 c17ad332fa4f3ded006b97ceca85cada079e4c7cd933768b289c13dadca1b8803fccaf709ec2def5af4abe92c307f25597ebfa6f94df2d681e40815cd7eccb9b WHIRLPOOL 8374d482041a60443fff3c28614d08b97390648367088d37b7c9a140355e8481e444f09f0c0c9fd7370903b33a2f46eae7c96ec5dbce532bb47f06537ce799ee
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..70ac40499556
--- /dev/null
+++ b/dev-tcltk/snack/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+</pkgmetadata>
diff --git a/dev-tcltk/snack/snack-2.2.10-r5.ebuild b/dev-tcltk/snack/snack-2.2.10-r5.ebuild
new file mode 100644
index 000000000000..4ee81c4a459c
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r5.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="python? 2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit eutils distutils 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-8.4.3:0
+ >dev-lang/tk-8.4.3:0
+ alsa? ( media-libs/alsa-lib )
+ vorbis? ( media-libs/libvorbis )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}/unix"
+
+PYTHON_MODNAME="tkSnack.py"
+
+pkg_setup() {
+ if use python; then
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # bug 226137 - snack depends on alsa private symbol _snd_pcm_mmap_hw_ptr
+ epatch "${FILESDIR}"/alsa-undef-sym.patch
+ # bug 270839 - error from /usr/include/bits/mathcalls.h:310
+ sed \
+ -e 's|^\(#define roundf(.*\)|//\1|' \
+ -i ../generic/jkFormatMP3.c || die
+
+ # adds -install_name (soname on Darwin)
+ [[ ${CHOST} == *-darwin* ]] && epatch "${FILESDIR}"/${P}-darwin.patch
+
+ # From Fedora
+ cd ../
+ epatch "${FILESDIR}"/${P}-CVE-2012-6303-fix.patch
+}
+
+src_configure() {
+ local myconf="--libdir="${EPREFIX}"/usr/$(get_libdir) --includedir="${EPREFIX}"/usr/include"
+
+ use alsa && myconf="${myconf} --enable-alsa"
+ use threads && myconf="${myconf} --enable-threads"
+
+ if use vorbis ; then
+ myconf="${myconf} --with-ogg-include="${EPREFIX}"/usr/include"
+ myconf="${myconf} --with-ogg-lib="${EPREFIX}"/usr/$(get_libdir)"
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ # We do not want to run distutils_src_compile
+ default
+}
+
+src_install() {
+ default
+
+ if use python ; then
+ cd "${S}"/../python
+ distutils_src_install
+ fi
+
+ cd "${S}"/..
+
+ dohtml doc/*
+
+ if use examples ; then
+ sed -i -e 's/wish[0-9.]+/wish/g' demos/tcl/* || die
+ docinto examples/tcl
+ dodoc demos/tcl/*
+
+ if use python ; then
+ docinto examples/python
+ dodoc demos/python/*
+ fi
+ fi
+}
+
+pkg_postinst() {
+ use python && distutils_pkg_postinst
+}
+
+pkg_postrm() {
+ use python && distutils_pkg_postrm
+}
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..3daca2a59649
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r6.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..f3bcf9744b67
--- /dev/null
+++ b/dev-tcltk/tablelist/Manifest
@@ -0,0 +1 @@
+DIST tablelist5.8.tar.gz 416416 SHA256 4e24d2e2eae368d1a80d063c0682ff936aef1ffb03afc2f4ef221aacb2b06dd8 SHA512 9c8e3577ae0e89291450c7ecccbbb042417d9a24255489e9257eae2b48454cbef4ec759949ddfc8d73123260da3fc506e01acf6c15e113e5112ed15c014d6833 WHIRLPOOL 002b22975e9667b061e8a84b9cb55ab9d73f1317d517749dbb5c7496b3bf406fe49d218ac7ace5fa3de57f10a580f5db9f46a3fd9d48fef3311d575c6ea40c43
diff --git a/dev-tcltk/tablelist/metadata.xml b/dev-tcltk/tablelist/metadata.xml
new file mode 100644
index 000000000000..5ef07a39e7e1
--- /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>
+ <herd>sci</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </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..1cce0d16f105
--- /dev/null
+++ b/dev-tcltk/tablelist/tablelist-5.8.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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-gtk/Manifest b/dev-tcltk/tcl-gtk/Manifest
new file mode 100644
index 000000000000..fe874d87eba9
--- /dev/null
+++ b/dev-tcltk/tcl-gtk/Manifest
@@ -0,0 +1 @@
+DIST tcl-gtk-0.08.tar.gz 527455 SHA256 b91dde436d0604a64eb6477b3eccdad0c687ba8db7cd63678c89c56c04b49e0f SHA512 8cca1e8017c7ecd5de437af67c05ed82bbf61e9cc2a49f6eaa34b4119c1e38379ad6113c40011e79e0f72bd9861bca1a7c7d899c8c55c45cea5119e2999eaa29 WHIRLPOOL d75663b5c8138ac9fd0326a0f5d3a368a06be9cb582a88a91f0633542f3a09a146393dc380e4cdbb2c939bbed21810e2ca21fb7e9e837de2ceb3068c739f17a0
diff --git a/dev-tcltk/tcl-gtk/metadata.xml b/dev-tcltk/tcl-gtk/metadata.xml
new file mode 100644
index 000000000000..10c4bdcfecee
--- /dev/null
+++ b/dev-tcltk/tcl-gtk/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <upstream>
+ <remote-id type="sourceforge">tcl-gtk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tcl-gtk/tcl-gtk-0.08.ebuild b/dev-tcltk/tcl-gtk/tcl-gtk-0.08.ebuild
new file mode 100644
index 000000000000..035216e57f35
--- /dev/null
+++ b/dev-tcltk/tcl-gtk/tcl-gtk-0.08.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="GTK bindings for TCL"
+HOMEPAGE="http://tcl-gtk.sf.net/"
+SRC_URI="mirror://sourceforge/tcl-gtk/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="
+ >=dev-lang/tcl-8.4:0
+ dev-libs/glib:2
+ x11-libs/gtk+:2
+ >=x11-libs/vte-0.11.11:0"
+RDEPEND="${DEPEND}"
diff --git a/dev-tcltk/tcl-mccp/Manifest b/dev-tcltk/tcl-mccp/Manifest
new file mode 100644
index 000000000000..1b7d413c8e4d
--- /dev/null
+++ b/dev-tcltk/tcl-mccp/Manifest
@@ -0,0 +1 @@
+DIST tcl-mccp-0.6.tar.gz 167446 SHA256 caf3fe21bc62a8a39e4360eb5ccd9100bdc2c9a04a0dbfd0f6aaea1862042b0c SHA512 d3f77b49454dc4f838b91d95146c71d6f8d46d293743b46b551e9217a92a9f6b03b26400cc21faf9bb22a0a0f92123b25f9b284453f756654e87b82201c395e6 WHIRLPOOL 60b6ebe684a3a2f7558815a8840ff243621968c380e8aa3bd965a4370a517a0d0d5565006c9b00c6cd0cb19782cf950ef2d53c81e20a10ca1172387e287b57d2
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..3be4732250a6
--- /dev/null
+++ b/dev-tcltk/tcl-mccp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..fa3ce61046c4
--- /dev/null
+++ b/dev-tcltk/tcl-mccp/tcl-mccp-0.6.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/tcl-sql/Manifest b/dev-tcltk/tcl-sql/Manifest
new file mode 100644
index 000000000000..7eab16f7e3c8
--- /dev/null
+++ b/dev-tcltk/tcl-sql/Manifest
@@ -0,0 +1 @@
+DIST tcl-sql-20000114.tgz 159365 SHA256 203acb2dac5589bd730482995887f328efc40d8881ea1365d96d4340fdcdb53b SHA512 ba16bd0e4a3483b7d2786783ed299732691efd27b43c87143d9037ea4da91ab49d3b66b0967e95baebedb9f778de620313fdf6f2ecdd69ebd6de054b4fbe806f WHIRLPOOL e50173b2b19a66eb31bb1b8b2578fa1a344e5b83ebea016dc9b172f0f48ab8f025e2e7024ddc29fa0134a446638e9bea6a803b7fbd73c19fc584e51b4c856b04
diff --git a/dev-tcltk/tcl-sql/files/fix-const.patch b/dev-tcltk/tcl-sql/files/fix-const.patch
new file mode 100644
index 000000000000..64289472265a
--- /dev/null
+++ b/dev-tcltk/tcl-sql/files/fix-const.patch
@@ -0,0 +1,101 @@
+diff -urN tcl-sql.old/sql-mysql.cc tcl-sql/sql-mysql.cc
+--- tcl-sql.old/sql-mysql.cc 2000-01-12 20:50:03.000000000 -0500
++++ tcl-sql/sql-mysql.cc 2004-08-08 13:15:15.820828056 -0400
+@@ -1,3 +1,4 @@
++#define USE_OLD_FUNCTIONS
+ #include "tcl.h"
+ #include "sql-mysql.h"
+
+@@ -20,7 +21,7 @@
+ // -------------------------------------------------------------
+ char *
+ Sql_mysql::getErrorMsg() {
+- char *msg = mysql_error(&mysql);
++ char *msg = (char *)mysql_error(&mysql);
+ if (*msg == '\0') {
+ return errormsg;
+ } else {
+@@ -71,7 +72,7 @@
+
+ // -------------------------------------------------------------
+ int
+-Sql_mysql::numRows(int resHandle=0) {
++Sql_mysql::numRows(int resHandle) {
+ if (!results[resHandle]) { return -1; }
+ return(mysql_num_rows(results[resHandle]));
+ }
+@@ -109,7 +110,7 @@
+
+ // -------------------------------------------------------------
+ void
+-Sql_mysql::endquery(int resHandle=0) {
++Sql_mysql::endquery(int resHandle) {
+ if (!results[resHandle]) return;
+ mysql_free_result(results[resHandle]);
+ results[resHandle] = NULL;
+@@ -120,7 +121,7 @@
+ // Note: A new Sql_row is allocated. Has to be freed by calling
+ // party.
+ Sql_row *
+-Sql_mysql::fetchrow(int resHandle=0) {
++Sql_mysql::fetchrow(int resHandle) {
+
+ if (!results[resHandle]) {
+ sprintf(errormsg, "Result handle [%d] not in use.\n", resHandle);
+diff -urN tcl-sql.old/sql.cc tcl-sql/sql.cc
+--- tcl-sql.old/sql.cc 2000-01-12 20:53:23.000000000 -0500
++++ tcl-sql/sql.cc 2004-08-08 13:12:57.058923072 -0400
+@@ -122,7 +122,7 @@
+
+ // -------------------------------------------------------------
+ //
+-int SqlCmd(ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
++int SqlCmd(ClientData clientData, Tcl_Interp *interp, int argc, const char **argv)
+ {
+ if (argc == 1) {
+ Tcl_SetResult(interp, "Usage: sql command ?handle?", TCL_STATIC);
+@@ -137,7 +137,7 @@
+
+ // -----------------------------------
+ if (strcmp(argv[1], "connect")==0) {
+- c = mgr->connect(argc-2, argv+2);
++ c = mgr->connect(argc-2, (char **)(argv+2));
+ if (c < 0) {
+ char *basemsg = "Unable to Connect: ";
+ char *errmsg = mgr->getErrorMsg();
+@@ -160,7 +160,7 @@
+ if (argc <= 2) {
+ Tcl_SetResult(interp, "Usage:\nsql command handle", TCL_STATIC);
+ return TCL_ERROR;
+- } else if ((connid = stripPrefix(argv[2], HANDLE_PREFIX)) < 0) {
++ } else if ((connid = stripPrefix((char *)argv[2], HANDLE_PREFIX)) < 0) {
+ Tcl_AppendResult(interp, "sql: Invalid handle: ", argv[2], NULL);
+ return TCL_ERROR;
+ } else if (!mgr->inUse(connid)) {
+@@ -172,19 +172,19 @@
+
+ // take care of the command:
+ if (strcmp(argv[1], "exec") == 0) {
+- res = execCmd(interp, conn, argv[3]);
++ res = execCmd(interp, conn, (char *)argv[3]);
+ } else if (strcmp(argv[1], "query") == 0) {
+- res = queryCmd(interp, conn, argv[3]);
++ res = queryCmd(interp, conn, (char *)argv[3]);
+ } else if (strcmp(argv[1], "endquery") == 0) {
+- res = endqueryCmd(interp, conn, argv[3]);
++ res = endqueryCmd(interp, conn, (char *)argv[3]);
+ } else if (strcmp(argv[1], "fetchrow") == 0) {
+- res = fetchrowCmd(interp, conn, argv[3]);
++ res = fetchrowCmd(interp, conn, (char *)argv[3]);
+ } else if (strcmp(argv[1], "numrows") == 0) {
+- res = numrowsCmd(interp, conn, argv[3]);
++ res = numrowsCmd(interp, conn, (char *)argv[3]);
+ } else if (strcmp(argv[1], "disconnect") == 0) {
+ res = disconnectCmd(interp, mgr, connid);
+ } else if (strcmp(argv[1], "selectdb")==0) {
+- res = selectdbCmd(interp, conn, argv[3]);
++ res = selectdbCmd(interp, conn, (char *)argv[3]);
+ } else {
+ Tcl_AppendResult(interp, "sql: unknown sql command: ", argv[1], NULL);
+ return TCL_ERROR;
+
diff --git a/dev-tcltk/tcl-sql/files/ldflags.patch b/dev-tcltk/tcl-sql/files/ldflags.patch
new file mode 100644
index 000000000000..2099ed115f95
--- /dev/null
+++ b/dev-tcltk/tcl-sql/files/ldflags.patch
@@ -0,0 +1,28 @@
+diff --git a/Makefile b/Makefile
+index 81a80ea..7738920 100644
+--- a/Makefile
++++ b/Makefile
+@@ -22,8 +22,8 @@ OBJS = $(SRC:%.cc=$(OBJ_DIR)/%.o)
+
+ # -- Configurable parameters: ----------------------------
+ # Section II:
+-CC = g++
+-LD = g++
++CXX ?= g++
++LD ?= g++
+ FLAGS = -Wall
+ # include the path to your libmysqlclient as one of the -L's
+ LD_FLAGS = -L/usr/lib/mysql -L/usr/local/mysql/lib \
+@@ -69,10 +69,10 @@ CURDATE = `date +%y%m%d`
+ all: sql.so
+
+ $(OBJ_DIR)/%.o: %.cc
+- $(CC) -c $(INCLUDE) $(EXTRA_FLAGS) $(FLAGS) -o $@ $<
++ $(CXX) $(CXXFLAGS) -c $(INCLUDE) $(EXTRA_FLAGS) $(FLAGS) -o $@ $<
+
+ sql.so: $(OBJS)
+- $(LD) $(OBJS) $(EXTRA_LINKS) $(LD_FLAGS) $(EXTRA_LD_FLAGS) -o sql.so
++ $(CXX) $(LDFLAGS) $(EXTRA_LINKS) $(OBJS) -o sql.so $(LD_FLAGS) $(EXTRA_LD_FLAGS) -ltcl
+
+ clean:
+ @ rm -f *~ $(OBJ_DIR)/*.o sql.so
diff --git a/dev-tcltk/tcl-sql/metadata.xml b/dev-tcltk/tcl-sql/metadata.xml
new file mode 100644
index 000000000000..b678ec2d1e34
--- /dev/null
+++ b/dev-tcltk/tcl-sql/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <maintainer>
+ <email>tcltk@gentoo.org</email>
+ <description>TCL / TK herd</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tcl-sql</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-tcltk/tcl-sql/tcl-sql-20000114-r2.ebuild b/dev-tcltk/tcl-sql/tcl-sql-20000114-r2.ebuild
new file mode 100644
index 000000000000..f1b7b96641fe
--- /dev/null
+++ b/dev-tcltk/tcl-sql/tcl-sql-20000114-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="A generic Tcl interface to SQL databases"
+HOMEPAGE="http://www.parand.com/tcl-sql/"
+SRC_URI="mirror://sourceforge/tcl-sql/${PN}-${PV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="
+ dev-lang/tcl:0=
+ virtual/mysql"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${PN}
+
+src_prepare() {
+ find . -type f -exec chmod 644 '{}' \; || die
+ epatch \
+ "${FILESDIR}"/fix-const.patch \
+ "${FILESDIR}"/ldflags.patch
+ tc-export CXX
+}
+
+src_install() {
+ exeinto /usr/$(get_libdir)/${P}
+ doexe sql.so
+ dodoc CHANGES.txt CODE_DESCRIPTION.txt docs/sample.full.txt docs/sample.simple.txt
+ dohtml README.html docs/api.html
+}
diff --git a/dev-tcltk/tcl3d/Manifest b/dev-tcltk/tcl3d/Manifest
new file mode 100644
index 000000000000..a5c60e4e4558
--- /dev/null
+++ b/dev-tcltk/tcl3d/Manifest
@@ -0,0 +1 @@
+DIST tcl3d-src-0.4.0.zip 1501305 SHA256 f98bee3c2ca0189780125b683481949e1499018ee56ad1d21b4e3e594e058496 SHA512 a8a525693bc45e9fb9e2167e2121d300ff60534f2bced33bb068a1075cfd8e8281dd97bd7fb432b9d6a95cdb37fc3da03c82dd1ee20e368fb8ac249ea54c30a5 WHIRLPOOL cbc1982df7a28b93249ff7877d0376b06b64261bb33f3df8c64b2c80600684529605b9eeff6f593c2e9f7c64c253066b226f0a0dae9cee21bec980f6782c7777
diff --git a/dev-tcltk/tcl3d/metadata.xml b/dev-tcltk/tcl3d/metadata.xml
new file mode 100644
index 000000000000..8791d02088e4
--- /dev/null
+++ b/dev-tcltk/tcl3d/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>tcltk</herd>
+<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.
+tcl3dGauges Tcl3D package for displaying gauges.
+</longdescription>
+</pkgmetadata>
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..d750c1bb212f
--- /dev/null
+++ b/dev-tcltk/tcl3d/tcl3d-0.4.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+"
+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/tcllib/Manifest b/dev-tcltk/tcllib/Manifest
new file mode 100644
index 000000000000..816a671a73e2
--- /dev/null
+++ b/dev-tcltk/tcllib/Manifest
@@ -0,0 +1,4 @@
+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
diff --git a/dev-tcltk/tcllib/files/tcllib-1.14-test.patch b/dev-tcltk/tcllib/files/tcllib-1.14-test.patch
new file mode 100644
index 000000000000..b8c83fd5a1f7
--- /dev/null
+++ b/dev-tcltk/tcllib/files/tcllib-1.14-test.patch
@@ -0,0 +1,39 @@
+Index: support/devel/sak/validate/syntax.tcl
+==================================================================
+--- support/devel/sak/validate/syntax.tcl
++++ support/devel/sak/validate/syntax.tcl
+@@ -192,11 +192,13 @@
+ if {[string equal $c rename]} continue
+ if {[string equal $c namespace]} continue
+ 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 {}]
+
+ foreach m {
+ pcx::register unknown
+
+Index: support/devel/sak/validate/testsuites.tcl
+==================================================================
+--- support/devel/sak/validate/testsuites.tcl
++++ support/devel/sak/validate/testsuites.tcl
+@@ -137,11 +137,13 @@
+ if {[string equal $c rename]} continue
+ if {[string equal $c namespace]} continue
+ 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 {}]
+
+ foreach m {
+ testing unknown useLocal useLocalKeep useAccel
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..c9ab155ba8d5
--- /dev/null
+++ b/dev-tcltk/tcllib/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..755c5b8f83c8
--- /dev/null
+++ b/dev-tcltk/tcllib/tcllib-1.15-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils virtualx
+
+DESCRIPTION="Tcl Standard Library"
+HOMEPAGE="http://www.tcl.tk/software/tcllib/"
+SRC_URI="
+ http://dev.gentoo.org/~jlec/distfiles/${P}-manpage-rename.patch.xz
+ http://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 ~x86-freebsd ~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..1eab64ccbfab
--- /dev/null
+++ b/dev-tcltk/tcllib/tcllib-1.16.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="~amd64 ~hppa ~ppc ~x86 ~x86-fbsd ~x86-freebsd ~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..42927aecfd61
--- /dev/null
+++ b/dev-tcltk/tclperl/Manifest
@@ -0,0 +1 @@
+DIST tclperl-3.2.tar.bz2 11765 SHA256 3643915a2f3d51da4d6296d0b57d796163ba0358f65bc97da6c0ef5cccb26173 SHA512 aed6fb4b0275cf75e6024336e81e3cd1502d82ae697e79b6142d2f9b3cfb0891541cc585fa83d6219632f11d6eda43b141d009caf5fe7433b2b2ca92aa875c00 WHIRLPOOL a64d8b043f208cd4a76424920c3510baed0ceecb9b5308463e6d6739df4d89cb7b4bde13b69db0c65e9da653a41fa64ca78986eeabf9631720e18e8fd6571862
diff --git a/dev-tcltk/tclperl/metadata.xml b/dev-tcltk/tclperl/metadata.xml
new file mode 100644
index 000000000000..70ac40499556
--- /dev/null
+++ b/dev-tcltk/tclperl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+</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..c56754a6150d
--- /dev/null
+++ b/dev-tcltk/tclperl/tclperl-3.2-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..802276bb58dd
--- /dev/null
+++ b/dev-tcltk/tclpython/Manifest
@@ -0,0 +1 @@
+DIST tclpython-4.1.tar.bz2 10580 SHA256 663e0e9e16875fda8e98fd8c74108475062b5e96dcf7145b46142b16c289db50 SHA512 5f08e7129a7d9afeb1ac6bf1ab1c83ad3bb481593c9516c0653c7b4ba0dfb1b3129a336e64b998cec8ef2d2377a6a366b73c640d25839ab280d5079c0b220d54 WHIRLPOOL a3535555eb314dd19f54628135053c4eac0a9cb79cc1be7cca3b8f861c826438765fa98513fc7f7ac3271fd4fef7f9f70e036421a5b7991035b328b63239ba03
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..70ac40499556
--- /dev/null
+++ b/dev-tcltk/tclpython/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+</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..4a0620511b50
--- /dev/null
+++ b/dev-tcltk/tclpython/tclpython-4.1-r4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,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/tclreadline/Manifest b/dev-tcltk/tclreadline/Manifest
new file mode 100644
index 000000000000..cb3de133de7b
--- /dev/null
+++ b/dev-tcltk/tclreadline/Manifest
@@ -0,0 +1,2 @@
+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
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..bf64b24deb60
--- /dev/null
+++ b/dev-tcltk/tclreadline/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..9f3ae269dc05
--- /dev/null
+++ b/dev-tcltk/tclreadline/tclreadline-2.1.0-r4.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..002f32afc67c
--- /dev/null
+++ b/dev-tcltk/tclx/Manifest
@@ -0,0 +1 @@
+DIST tclx8.4.1.tar.bz2 330073 SHA256 a9b41f606ec6c1268b9c78512e6e1cb533bd9ae3e786e650d111fc16ffe758ec SHA512 faad58f5d8e0e1e759da639800f354b583fb01418c94f2274924aa07beb0ee9559beb87b3386ed5ae3694700a71dfe5b8ac54ead0ec75c6963507e9d3ead7060 WHIRLPOOL fd65983cdc51935fb8e7917bb4fc77e9a9822173c644dfdb63afc9e034ce41321a2a28a736039fcb18bcfeb1cd7aa9601000879ac1171c11bdeb266d30f0de41
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-relid.patch b/dev-tcltk/tclx/files/tclx-8.4-relid.patch
new file mode 100644
index 000000000000..45fe6876050b
--- /dev/null
+++ b/dev-tcltk/tclx/files/tclx-8.4-relid.patch
@@ -0,0 +1,31 @@
+--- tclx8.4/configure.relid 2006-02-03 16:13:25.000000000 -0500
++++ tclx8.4/configure 2006-02-03 16:13:33.000000000 -0500
+@@ -6999,7 +6999,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print }' /etc/.relid'`
++ system=MP-RAS-`awk '{print }' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+--- tclx8.4/tclconfig/tcl.m4.relid 2006-02-03 16:13:43.000000000 -0500
++++ tclx8.4/tclconfig/tcl.m4 2006-02-03 16:13:57.000000000 -0500
+@@ -859,7 +859,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -2302,7 +2302,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
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..4cf3132678c5
--- /dev/null
+++ b/dev-tcltk/tclx/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <maintainer>
+ <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..33af3ceb5e5e
--- /dev/null
+++ b/dev-tcltk/tclx/tclx-8.4.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..b550e1b65d74
--- /dev/null
+++ b/dev-tcltk/tclxml/Manifest
@@ -0,0 +1 @@
+DIST tclxml-3.2.tar.gz 757594 SHA256 f4116b6680b249ce74b856a121762361ca09e6256f0c8ad578d1c661b822cb39 SHA512 5e7d45063c1a311d49ecc42f664bf7d88862fc19a46b64f52d038e2adfcc5b6964ae74d61b40bcf8eb4e1440f849339095fd8712bd39f0cb57e279acea58a3da WHIRLPOOL 6b0b04e2a0e27bc73bbcd595642c8ec024a36eb25d12a8f324835de95afd64dd25fa58c3109be1dec03b379852e14a79db81b3ea7f0f1c6896b07054dd9c8d13
diff --git a/dev-tcltk/tclxml/files/tclxml-3.1-test.patch b/dev-tcltk/tclxml/files/tclxml-3.1-test.patch
new file mode 100644
index 000000000000..f312f4c897a5
--- /dev/null
+++ b/dev-tcltk/tclxml/files/tclxml-3.1-test.patch
@@ -0,0 +1,46 @@
+diff -Naur tclxml-3.1.orig/Makefile.in tclxml-3.1/Makefile.in
+--- tclxml-3.1.orig/Makefile.in 2005-05-20 21:02:01.000000000 +0900
++++ tclxml-3.1/Makefile.in 2007-12-24 13:28:55.000000000 +0900
+@@ -267,7 +267,7 @@
+ # -testdir $(srcdir)/tea.tests
+
+ test: binaries libraries
+- (cd $(srcdir)/tests; $(bindir)/tclsh8.4 all.tcl)
++ (cd $(srcdir)/tests; $(bindir)/tclsh all.tcl)
+
+ shell: binaries libraries
+ @$(TCLSH) $(SCRIPT)
+diff -Naur tclxml-3.1.orig/examples/README tclxml-3.1/examples/README
+--- tclxml-3.1.orig/examples/README 2000-12-28 15:07:12.000000000 +0900
++++ tclxml-3.1/examples/README 2007-12-24 13:29:21.000000000 +0900
+@@ -31,7 +31,7 @@
+ REC-xml-20001006.xml
+ The W3C XML spec in XML format. A handy file to run xmlwc over
+ to test your build. You should get this output with the command
+- tclsh8.3 xmlwc REC-xml-20001006.xml
++ tclsh xmlwc REC-xml-20001006.xml
+ :
+
+ 2929 14978 116827 REC-xml-20001006.xml
+diff -Naur tclxml-3.1.orig/examples/flatten.tcl tclxml-3.1/examples/flatten.tcl
+--- tclxml-3.1.orig/examples/flatten.tcl 2000-05-20 08:56:20.000000000 +0900
++++ tclxml-3.1/examples/flatten.tcl 2007-12-24 13:29:29.000000000 +0900
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ # -*- tcl -*- \
+-exec tclsh8.3 "$0" "$@"
++exec tclsh "$0" "$@"
+
+ # flatten.tcl --
+ #
+diff -Naur tclxml-3.1.orig/examples/xmlwc tclxml-3.1/examples/xmlwc
+--- tclxml-3.1.orig/examples/xmlwc 2000-12-28 14:53:38.000000000 +0900
++++ tclxml-3.1/examples/xmlwc 2007-12-24 13:29:09.000000000 +0900
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ # \
+-exec tclsh8.3 "$0" "$@"
++exec tclsh "$0" "$@"
+
+ package require xml
+
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/files/tclxml-3_configure.patch b/dev-tcltk/tclxml/files/tclxml-3_configure.patch
new file mode 100644
index 000000000000..58de6b1db4a8
--- /dev/null
+++ b/dev-tcltk/tclxml/files/tclxml-3_configure.patch
@@ -0,0 +1,74 @@
+Tkanhs to Matteo Pillon <matteo.pillon@gmail.com>
+--- tcl.m4 2006-02-24 21:04:37.000000000 +0100
++++ tcl.m4.1 2006-02-24 21:04:54.000000000 +0100
+@@ -588,7 +588,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -1454,7 +1454,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+--- configure 2004-07-11 05:43:18.000000000 +0200
++++ configure.1 2006-02-24 21:14:04.000000000 +0100
+@@ -3771,7 +3771,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print }' /etc/.relid'`
++ system=MP-RAS-`awk '{print }' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+--- tclconfig/tcl.m4 2003-12-03 21:06:35.000000000 +0100
++++ tclconfig/tcl.m4.1 2006-02-24 21:16:04.000000000 +0100
+@@ -759,7 +759,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -2026,7 +2026,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+--- expat/configure 2004-07-11 05:43:29.000000000 +0200
++++ expat/configure.1 2006-02-24 21:16:31.000000000 +0100
+@@ -3860,7 +3860,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print }' /etc/.relid'`
++ system=MP-RAS-`awk '{print }' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+--- libxml2/configure 2004-07-11 14:11:03.000000000 +0200
++++ libxml2/configure.1 2006-02-24 21:16:50.000000000 +0100
+@@ -3912,7 +3912,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print }' /etc/.relid'`
++ system=MP-RAS-`awk '{print }' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
diff --git a/dev-tcltk/tclxml/files/tclxml-3_include_path.patch b/dev-tcltk/tclxml/files/tclxml-3_include_path.patch
new file mode 100644
index 000000000000..c270d5762986
--- /dev/null
+++ b/dev-tcltk/tclxml/files/tclxml-3_include_path.patch
@@ -0,0 +1,12 @@
+--- expat/Makefile.in.orig 2006-04-08 12:28:11.594940750 +0200
++++ expat/Makefile.in 2006-04-08 12:28:26.927899000 +0200
+@@ -175,7 +175,8 @@
+ INCLUDES = @TCL_INCLUDES@ \
+ -I$(srcdir)/xmltok \
+ -I$(srcdir)/xmlparse \
+- -I$(srcdir)/xmlwf
++ -I$(srcdir)/xmlwf \
++ -I../include
+
+ EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
+
diff --git a/dev-tcltk/tclxml/metadata.xml b/dev-tcltk/tclxml/metadata.xml
new file mode 100644
index 000000000000..52d7934bd296
--- /dev/null
+++ b/dev-tcltk/tclxml/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..665495ffbbd3
--- /dev/null
+++ b/dev-tcltk/tclxml/tclxml-3.2-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..b9823c6ac7ac
--- /dev/null
+++ b/dev-tcltk/tdom/Manifest
@@ -0,0 +1 @@
+DIST tDOM-0.8.3.tgz 990367 SHA256 496d5950907dd70db61bc20c55a05a5521363ce3c076e2fdd97270181bc720b9 SHA512 aa5352bc9b67c45d115e52dbf2cf153a3db89f851b51c1cd574af69b02c466f643df0b5448f7d105245246d20a92f80605f16bd927cd7925c1f2007827f2dc20 WHIRLPOOL cec84152b636c3ea13a6daaa9681fe28c36a3e358e28382a439ee855206566b08c1f7427ca733cfbb806f2fdb1e2e10c96c8410005fe56e84f17e873168697ee
diff --git a/dev-tcltk/tdom/files/tdom-0.8.2-expat.patch b/dev-tcltk/tdom/files/tdom-0.8.2-expat.patch
new file mode 100644
index 000000000000..cdcbb1006f4d
--- /dev/null
+++ b/dev-tcltk/tdom/files/tdom-0.8.2-expat.patch
@@ -0,0 +1,83 @@
+Source: http://download.opensuse.org/repositories/openSUSE:/11.0/standard/src/tdom-0.8.2-50.1.src.rpm
+Index: Makefile.in
+================================================================================
+--- configure.in
++++ configure.in
+@@ -72,6 +72,7 @@
+ #--------------------------------------------------------------------
+
+ TDOM_PATH_AOLSERVER
++TDOM_PATH_EXPAT
+
+ #-----------------------------------------------------------------------
+ # __CHANGE__
+@@ -83,10 +84,7 @@
+ # 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/domalloc.c \
+@@ -100,7 +98,7 @@
+ 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])
+--- tdom.m4
++++ tdom.m4
+@@ -215,6 +215,46 @@
+ 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.2-soname.patch b/dev-tcltk/tdom/files/tdom-0.8.2-soname.patch
new file mode 100644
index 000000000000..3f0bc7e62a9d
--- /dev/null
+++ b/dev-tcltk/tdom/files/tdom-0.8.2-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,libdom$(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.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..15cec3cf4c63
--- /dev/null
+++ b/dev-tcltk/tdom/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..3ba43ee8a0e2
--- /dev/null
+++ b/dev-tcltk/tdom/tdom-0.8.3-r4.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="http://tdom.github.com/"
+#SRC_URI="http://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="amd64 ~hppa ~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..1e7d6f930a8d
--- /dev/null
+++ b/dev-tcltk/thread/Manifest
@@ -0,0 +1 @@
+DIST thread2.7.1.tar.gz 295134 SHA256 0982027928adcca8a0ea7b47ea41b7d2529b10bb59ccb2d6b9181af7de98bab0 SHA512 18ebd9431b6f6bfb1e6a60797af39db0dee29a16cd457ddab2a18cd5dfd9ef2dea9284ab99238fb05b8284fcc855c2ef8011eb3ed02d7e54d715379d133512dc WHIRLPOOL fde8fb025973666294080a7b9356cb831db4843a09153ca0e810de77e6857ef344e4780816276ed047ec0b0d663fa72a07aeebf9900aa00479b77efd558243db
diff --git a/dev-tcltk/thread/metadata.xml b/dev-tcltk/thread/metadata.xml
new file mode 100644
index 000000000000..6aece7ec2ee6
--- /dev/null
+++ b/dev-tcltk/thread/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..087930c6ffaf
--- /dev/null
+++ b/dev-tcltk/thread/thread-2.7.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..41999f5a7644
--- /dev/null
+++ b/dev-tcltk/tix/Manifest
@@ -0,0 +1 @@
+DIST Tix8.4.3-src.tar.gz 1831503 SHA256 562f040ff7657e10b5cffc2c41935f1a53c6402eb3d5f3189113d734fd6c03cb SHA512 f13217dad0f52c0b706d2fb8ee0886942db64be0325e5d0d51801dbf9a92a7919c743c1445b76dbfa98815817685205e238e2d63f9366a8745ace1e1e9a01852 WHIRLPOOL 5f72582d30eb1be27b3e5a9d7a49b5e5b46d7d8a0bdd1228c592c1b2192bf0d627f50b63990c8bd43f0e2713d61e7e903bdedd8135f5ef67464d51bd6f23110a
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..793044fd656f
--- /dev/null
+++ b/dev-tcltk/tix/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..d96bb2d78f12
--- /dev/null
+++ b/dev-tcltk/tix/tix-8.4.3-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 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..37d2ae1dedc6
--- /dev/null
+++ b/dev-tcltk/tkTheme/Manifest
@@ -0,0 +1 @@
+DIST tkTheme.tgz 335061 SHA256 e6a2024d4a70ef69108020604de47885d21df09e558ba5cbfde7ccf67fc8a148 SHA512 71988f5a627582092d30f8d825f4e9e60f11c116e40b90bf4d669cad8146d7130e27ca0f83b0650ca7f225016849242815be27e247c8917f892a16447ed40d7c WHIRLPOOL 0994a65ef7980216c94922d38a014968acc7bfd098cdc4f3c71e576369527ec8a527638313f6c846938e3e02fa3890eed00759aee0a1ee97aef6e7402db2fe0f
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..815cc916f2b6
--- /dev/null
+++ b/dev-tcltk/tkTheme/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+</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..808cc86b8125
--- /dev/null
+++ b/dev-tcltk/tkTheme/tkTheme-1.0-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..ce648a703de6
--- /dev/null
+++ b/dev-tcltk/tkXwin/Manifest
@@ -0,0 +1 @@
+DIST tkXwin-1.0.tgz 168650 SHA256 4390cd165c584162dccf8414d2f4f27bf4dd3b2ad1e66fbe280ee390475fb3c0 SHA512 0313ec6fc81c872019a7e247fcaac899d5d584eb8066e7abf1d1feff7bc741de43a9b8a6212ed6dcd12566e8c995bc658360833c692eea5f1b4b5fc199cf2d6e WHIRLPOOL 375b086509295aa93a5da15f285c3aa2e8336e9c619aabc974910bd52c47ffbec47543be488067b29f433fde4ffe1b854ec638216b61b40388fb7b158a367873
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/1.0-configure.diff b/dev-tcltk/tkXwin/files/1.0-configure.diff
new file mode 100644
index 000000000000..250908845e2f
--- /dev/null
+++ b/dev-tcltk/tkXwin/files/1.0-configure.diff
@@ -0,0 +1,12 @@
+diff -Naur tkXwin-1.0.orig/configure tkXwin-1.0/configure
+--- tkXwin-1.0.orig/configure 2002-08-25 15:29:53.000000000 +0900
++++ tkXwin-1.0/configure 2005-06-26 22:17:41.000000000 +0900
+@@ -3534,7 +3534,7 @@
+
+
+
+-PKG_TCL=${TCL_PACKAGE_PATH}/tkXwin
++PKG_TCL=${TCL_PACKAGE_PATH%% *}/tkXwin
+
+
+
diff --git a/dev-tcltk/tkXwin/files/1.0-configure.patch b/dev-tcltk/tkXwin/files/1.0-configure.patch
new file mode 100644
index 000000000000..3a0affc6cd68
--- /dev/null
+++ b/dev-tcltk/tkXwin/files/1.0-configure.patch
@@ -0,0 +1,13 @@
+diff --git a/configure b/configure
+index d92a1bf..6d75569 100755
+--- a/configure
++++ b/configure
+@@ -3534,7 +3534,7 @@ fi
+
+
+
+-PKG_TCL=${TCL_PACKAGE_PATH}/tkXwin
++PKG_TCL=${libdir}/tkXwin
+
+
+
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..815cc916f2b6
--- /dev/null
+++ b/dev-tcltk/tkXwin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+</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..1bb8c432990c
--- /dev/null
+++ b/dev-tcltk/tkXwin/tkXwin-1.0-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..c6fc4d252056
--- /dev/null
+++ b/dev-tcltk/tkcon/Manifest
@@ -0,0 +1 @@
+DIST tkcon-2.5.tar.gz 139834 SHA256 3ff3eb7198b060d2c3bdc195c1f7d8532e63742447179fbb6091a3886bab42a9 SHA512 f53d21dbf281112b761970b05aa643d598819789644445a0e01f6eddcf98709c4b7ef635bc69ec40fc14b5c78397b240b86d8b6ed63aac48f656242c19fd7851 WHIRLPOOL 0d13bb208292ab9a9782eaf0b4d92848f866c36e178556671563ebecc4a48ebb3c766fb09b94e24932cbd293f5ff098c50fcd99bcf7223e7ba4efb17f2e59e10
diff --git a/dev-tcltk/tkcon/metadata.xml b/dev-tcltk/tkcon/metadata.xml
new file mode 100644
index 000000000000..021d026a88a7
--- /dev/null
+++ b/dev-tcltk/tkcon/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..b3add8dea439
--- /dev/null
+++ b/dev-tcltk/tkcon/tkcon-2.5.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..9aff0f38f902
--- /dev/null
+++ b/dev-tcltk/tkdnd/Manifest
@@ -0,0 +1,2 @@
+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
diff --git a/dev-tcltk/tkdnd/metadata.xml b/dev-tcltk/tkdnd/metadata.xml
new file mode 100644
index 000000000000..19c3be566f20
--- /dev/null
+++ b/dev-tcltk/tkdnd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..1bedea4aec94
--- /dev/null
+++ b/dev-tcltk/tkdnd/tkdnd-2.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..d42a3cc67eb4
--- /dev/null
+++ b/dev-tcltk/tkdnd/tkdnd-2.6.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..4f362df8e458
--- /dev/null
+++ b/dev-tcltk/tkimg/Manifest
@@ -0,0 +1,2 @@
+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
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..0e009fd6d057
--- /dev/null
+++ b/dev-tcltk/tkimg/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..3835d73f12e3
--- /dev/null
+++ b/dev-tcltk/tkimg/tkimg-1.4-r9.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+VIRTUALX_USE=test
+
+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="
+ http://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..dc6293f778d9
--- /dev/null
+++ b/dev-tcltk/tklib/Manifest
@@ -0,0 +1 @@
+DIST tklib-0.6.tar.bz2 5637725 SHA256 d2e0648bdaf1ab0f874136f1e5645bd68a8fe206f1905d9f08614d90ee2e3025 SHA512 c4dbe6afe9d1d9c97edc154c807d429086e045f8b202870f21cafcd846b7ff759c8260d44d5e1e1322a0e7d3478c1dfb12d7a0c76200f583ac3bb85b21bf04b4 WHIRLPOOL afeb8f62d58f540eb7ecc99c150c719411a41e585ac09a868896484266e69f85ece4c408bc176d4cc87f123280b584b27b29780e8b9d2f58d22a8dae98b8d5d9
diff --git a/dev-tcltk/tklib/metadata.xml b/dev-tcltk/tklib/metadata.xml
new file mode 100644
index 000000000000..e5c951f2dd1c
--- /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>
+ <herd>tcltk</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </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..26eaef01eb51
--- /dev/null
+++ b/dev-tcltk/tklib/tklib-0.6-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..26eaef01eb51
--- /dev/null
+++ b/dev-tcltk/tklib/tklib-0.6-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..2efed9a848f4
--- /dev/null
+++ b/dev-tcltk/tkpiechart/Manifest
@@ -0,0 +1 @@
+DIST tkpiechart-6.5.tar.bz2 38096 SHA256 3fae6e09431300d78706d0505fb6a0a95299b7edee74d4eab872ca73bed34ab1 SHA512 828f106be8fe37ab8876c7e0b8ee00dee7f067f21489710653909ba277aed65de169e0f592ce0fedf5bc0ffc584d633d163b1b72fb628c1b2e541e8a850636aa WHIRLPOOL 2d073953ae14f062adca984fe69401eb41f1d971e41cbf81115f7714b676c644588964510e9cd453b3bbc3abfaf3c5ac1b54fdeaf7263193a9e63629d8372465
diff --git a/dev-tcltk/tkpiechart/metadata.xml b/dev-tcltk/tkpiechart/metadata.xml
new file mode 100644
index 000000000000..d9408d8ab078
--- /dev/null
+++ b/dev-tcltk/tkpiechart/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>tcltk</herd>
+</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..f7b91a3406ed
--- /dev/null
+++ b/dev-tcltk/tkpiechart/tkpiechart-6.5-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..97743a7ba39c
--- /dev/null
+++ b/dev-tcltk/tkpng/Manifest
@@ -0,0 +1 @@
+DIST tkpng0.9.tgz 127804 SHA256 92f361d4f43c3a0638f85f87af6cef30c63a1896fa59a9220bcfab4852ab10fb SHA512 7f832ec19b53ba0f98d3db24d7b7106ae9bb6983d46ee33c46e90a1b152646f2a99ea417c9c6f9bed1f2859ef509510b531d26b3bb81f20d4e291ea1092896fb WHIRLPOOL 30243c54ccefb07d430963a8afdc4852134d8f735cb7feeb6b690587174e33be6bae61e3405a1b7d1d4a7019a1db019e54f4617e12e8350d3a4547009ea5f19e
diff --git a/dev-tcltk/tkpng/metadata.xml b/dev-tcltk/tkpng/metadata.xml
new file mode 100644
index 000000000000..59b019a72d38
--- /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>
+ <herd>tcltk</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </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..9bff1fdda1eb
--- /dev/null
+++ b/dev-tcltk/tkpng/tkpng-0.9.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..446fc5d412fd
--- /dev/null
+++ b/dev-tcltk/tktable/Manifest
@@ -0,0 +1 @@
+DIST Tktable2.10.tar.gz 284135 SHA256 c335117fa1be45fe4d3032e96fd4b4641fff6a4f8467878608dabed11198a4cb SHA512 d69b1c766abb2833f48c900ca4d4fd3927f138ddf728dd76f2087a784604daa4356ec60a146e71d2fb2508a644598711e0373cb81dbfb0272b7ad16a0754e899 WHIRLPOOL 514be8c8048c947ddb9a59c35105f4f81848de51aa70d6961a739b8077683019baa583042dd4a1e807e51abdcd51ab95f9f69e3a0963a7c6c21fc456c023ea6d
diff --git a/dev-tcltk/tktable/metadata.xml b/dev-tcltk/tktable/metadata.xml
new file mode 100644
index 000000000000..2aa34a4a39b9
--- /dev/null
+++ b/dev-tcltk/tktable/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..98f0cbb16b69
--- /dev/null
+++ b/dev-tcltk/tktable/tktable-2.10.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..0c899aaa3b05
--- /dev/null
+++ b/dev-tcltk/tktray/Manifest
@@ -0,0 +1 @@
+DIST tktray1.3.9.tar.gz 134484 SHA256 ef48b75ea7979186a05b605f8c153f92bbcc46cb76dee8be1d30bcda179bfcfc SHA512 2c52a343e7f8ff5b7e7bb2e2f1de7766111ce6b47b8ace478a1f2aaa6c28a5b19ec854f2b22511136be1f1da2a87f506932a1d1b893deb3c44a7e47a28609518 WHIRLPOOL cb22a1611f839f604e26061757f978d280faa0b9d0f0ac388c51d686f87f93b7370c43dd1685617ed25ec8d58532ee8e11cc6552e84f677958094fe54b81b9e5
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..9b9b332c113b
--- /dev/null
+++ b/dev-tcltk/tktray/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-im</herd>
+ <herd>tcltk</herd>
+</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..130603e65fd3
--- /dev/null
+++ b/dev-tcltk/tktray/tktray-1.3.9.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..04927cb4cfe0
--- /dev/null
+++ b/dev-tcltk/tktreectrl/Manifest
@@ -0,0 +1,3 @@
+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
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..46ede87475ee
--- /dev/null
+++ b/dev-tcltk/tktreectrl/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <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..10a6a1a7e854
--- /dev/null
+++ b/dev-tcltk/tktreectrl/tktreectrl-2.2.10.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..00f37ab5efc1
--- /dev/null
+++ b/dev-tcltk/tktreectrl/tktreectrl-2.2.9.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..9c51d10ec840
--- /dev/null
+++ b/dev-tcltk/tktreectrl/tktreectrl-2.4.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..ade994aa06bf
--- /dev/null
+++ b/dev-tcltk/tkzinc/Manifest
@@ -0,0 +1 @@
+DIST Tkzinc-3.3.6plus.tar.gz 1924729 SHA256 6a23a647a2062bc9f5a773092cbb6c63ee5e7564a8c8751839dcca79d807ff56 SHA512 ead998b69569ebec92e7f60415296262f60b91250b2fe15fdeb9fb71c38756006bedcd9ed2829d915cb6ce3a6461165a48c9037f8e397ba6049a76ae474f7838 WHIRLPOOL 65e30a3e3bd553145d918373f272cf7969a02111ed3b18fd407f234357ffc0223449b1e85796d5e501e8020eb616624ebbf1b4c1d2b1bc365399ded45ebdb552
diff --git a/dev-tcltk/tkzinc/files/3.3.4-ldflags.patch b/dev-tcltk/tkzinc/files/3.3.4-ldflags.patch
new file mode 100644
index 000000000000..6f4264d8bd6a
--- /dev/null
+++ b/dev-tcltk/tkzinc/files/3.3.4-ldflags.patch
@@ -0,0 +1,14 @@
+diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
+index ff26a0f..faba464 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/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..94d2144dccaa
--- /dev/null
+++ b/dev-tcltk/tkzinc/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <maintainer>
+ <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..d14266adb9ac
--- /dev/null
+++ b/dev-tcltk/tkzinc/tkzinc-3.3.6.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..a16147d3356d
--- /dev/null
+++ b/dev-tcltk/tls/Manifest
@@ -0,0 +1 @@
+DIST tls1.6-src.tar.gz 168043 SHA256 adec50143a9ad634a671d24f7c7bbf2455487eb5f12d290f41797c32a98b93f3 SHA512 beaca2653a11924f022e28254cef5071ecb8ab2e2355496d278fcab1bdcc46424aa58d2fe176aea26ec4fbe4416a912b5af8e8e69571c8a5301b7921ecf48383 WHIRLPOOL 5769eccd4df94558d7b5cdaa7234f4b248e3d8108686c3104bfa53a709a444088cdbf51b9660ecaa1f213c9391afbf81108ed330fe41bed3409d3c9364ac9790
diff --git a/dev-tcltk/tls/files/tls-1.5.0-bad-version.patch b/dev-tcltk/tls/files/tls-1.5.0-bad-version.patch
new file mode 100644
index 000000000000..a55a00c6d5f0
--- /dev/null
+++ b/dev-tcltk/tls/files/tls-1.5.0-bad-version.patch
@@ -0,0 +1,10 @@
+diff -ur tls1.5_org/pkgIndex.tcl.in tls1.5/pkgIndex.tcl.in
+--- tls1.5_org/pkgIndex.tcl.in 2007-04-05 23:09:11.000000000 +0200
++++ tls1.5/pkgIndex.tcl.in 2007-04-05 23:09:40.000000000 +0200
+@@ -5,5 +5,5 @@
+ # replace the original which didn't include the commands from "tls.tcl".
+ #
+
+-package ifneeded tls 1.5 "[list load [file join $dir @RELPATH@ @tls_LIB_FILE@] ] ; [list source [file join $dir tls.tcl] ]"
++package ifneeded tls 1.50 "[list load [file join $dir @RELPATH@ @tls_LIB_FILE@] ] ; [list source [file join $dir tls.tcl] ]"
+
diff --git a/dev-tcltk/tls/metadata.xml b/dev-tcltk/tls/metadata.xml
new file mode 100644
index 000000000000..4c5c70d2f177
--- /dev/null
+++ b/dev-tcltk/tls/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..5d505ed32b8c
--- /dev/null
+++ b/dev-tcltk/tls/tls-1.6-r3.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/togl/Manifest b/dev-tcltk/togl/Manifest
new file mode 100644
index 000000000000..5857aad57e7f
--- /dev/null
+++ b/dev-tcltk/togl/Manifest
@@ -0,0 +1 @@
+DIST Togl2.0-src.tar.gz 244968 SHA256 b7d4a90bbad3aca618d505ee99e7fd8fb04c829f63231dda2360f557ba3f7610 SHA512 2be3062baada848d96b2802582bc5590b215f2ab4dc02c91761e72af2bf8c0ba768a71a2ffb8107bca83b63b7d1321ee83de19b97f83b1c2f0962f9288948b0a WHIRLPOOL 6f4a8d69d74c499899002250b35f7dbac093035338716f9ee24b3f1d9b876ff302cb4727dadfda08f2f81dda1074a136bb8a51b335931bc97303c6c56fd155c2
diff --git a/dev-tcltk/togl/metadata.xml b/dev-tcltk/togl/metadata.xml
new file mode 100644
index 000000000000..d41cba32a9ab
--- /dev/null
+++ b/dev-tcltk/togl/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <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..217ac21c27a6
--- /dev/null
+++ b/dev-tcltk/togl/togl-2.0-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 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..19c2ccd2942c
--- /dev/null
+++ b/dev-tcltk/vtcl/Manifest
@@ -0,0 +1 @@
+DIST vtcl-1.6.0.tar.gz 554727 SHA256 5b95bc67f1acce46cb788c46f167dc8743e69e48289f9bb04d1b3468ef7b4652 SHA512 bfc2ed114af4bee375e820e4b1e47d394a800541eb9917204ef42481a4033927c432d7d2b005d13edd086c7c91bd594908965aae512cc4af9e5654a2bfd296de WHIRLPOOL b1fce8a4c3d6c30090dff7d6c05aff95edfc009237089b827d1100cbc43959f179f6f2ea97909eb176e779a4b00b7b93553f66bdeb42cba1d50c571adae3186c
diff --git a/dev-tcltk/vtcl/metadata.xml b/dev-tcltk/vtcl/metadata.xml
new file mode 100644
index 000000000000..9cdc0c6fea10
--- /dev/null
+++ b/dev-tcltk/vtcl/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+ <maintainer>
+ <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..95db8edfa78e
--- /dev/null
+++ b/dev-tcltk/vtcl/vtcl-1.6.0-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}