summaryrefslogtreecommitdiff
path: root/dev-tcltk/expect
diff options
context:
space:
mode:
Diffstat (limited to 'dev-tcltk/expect')
-rw-r--r--dev-tcltk/expect/Manifest14
-rw-r--r--dev-tcltk/expect/expect-5.45.ebuild83
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15-expectk.patch14
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15-gfbsd.patch17
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15-headers.patch86
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15-ldflags.patch13
-rw-r--r--dev-tcltk/expect/files/expect-5.44.1.15_with-tk-no.patch117
-rw-r--r--dev-tcltk/expect/files/expect-5.45-darwin-install_name.patch13
-rw-r--r--dev-tcltk/expect/files/expect-5.45-format-security.patch18
-rw-r--r--dev-tcltk/expect/files/expect-5.45-gfbsd.patch26
-rw-r--r--dev-tcltk/expect/files/expect-5.45-headers.patch92
-rw-r--r--dev-tcltk/expect/metadata.xml11
12 files changed, 504 insertions, 0 deletions
diff --git a/dev-tcltk/expect/Manifest b/dev-tcltk/expect/Manifest
new file mode 100644
index 000000000000..b257169c4be5
--- /dev/null
+++ b/dev-tcltk/expect/Manifest
@@ -0,0 +1,14 @@
+AUX expect-5.44.1.15-expectk.patch 450 SHA256 3a90b1816ecc78b726287fe554d2c1deedff168734ee9cfc22efe020503f969c SHA512 7b31f6fa05a2294627287481e7fbc104c18446ca55550ddbcf0afb8e7d9bc85e90411c17c3ce8b4268c4227c8f597afcbe72535b14e5ea2a4b842728c735586d WHIRLPOOL 0b458ff43f3d55b818734878ec8a5fe3378a81c8e4acde9d79b575cf1f41a910db2e186aa8a1f9bdd21348d62038c938eaa33bd5e03fa35fd31712507e348891
+AUX expect-5.44.1.15-gfbsd.patch 659 SHA256 0b40a0798b7851a97b2e67043e1346d76c97b9f1084ca1d51d57f2d3f129fb01 SHA512 5b7316dcc275a243b3b4c4eed62eb845f28d9b558182333895e8c3323b256c4f331feb04c5d60cd833d07d1f21c7cedfbd415feeb5b918ceededbef86ae5e6e9 WHIRLPOOL b42444ee5427f723a7eadbb0e78cc13a2076c1582385ed9dc7a966f42a17d93b4ad3176e727e277d665707312851341c11ed2e21dc9f1d63083b4b288ad89bb9
+AUX expect-5.44.1.15-headers.patch 1879 SHA256 98f6b9607679b81da4d80b00e73c0f4550bfa8ba2c516e109092c42ff705696b SHA512 99559893044535f2619a2a2a02c59196dd9391915286cf9b532bf349f22c9adb9422d9ad80ae2a25610f2d1d77aca151b007f4272b26c577a750301d9848bc8a WHIRLPOOL 84afcc77660c7d827e5d151fa1ebd7c80b2dd82aae912f0e938917fa089913d2a987531c2550c9b3706f8084f617cb5d2a99e45739206ac5b9888f642760eb77
+AUX expect-5.44.1.15-ldflags.patch 360 SHA256 2e9d3a614edc020044480ba78802696880be638f5b5dcb0fff02c632e0e738d2 SHA512 36c62ec8043249ae0b9b0c4470937cc99b31c4845d5e67e37403f7e9d97be9edb37dc0a5c8abd2df50cace62b0d87303dbc62fdd2a3e87b501d2b983460ab75f WHIRLPOOL 4418e0497f4ab4385261f036bb6bc6836b3be401da943efbb2869018154168768014a6757e17fdee0cca47bfcd48aece8f55510df1c400e5d52ac92c4bc4eeaf
+AUX expect-5.44.1.15_with-tk-no.patch 3471 SHA256 41e889fc40d1a501285fe0acb1324d8be016654ee92b2a9dcdfe7bd2f3df06a0 SHA512 f0fbf901ce8a1f05282ddf6e33a4c153129a994f6e959e6c28e7b08ee75bee8fd906ed4182b85b355aa8c1415a4680f1278dec9dcd6dd152fbb3706d46f7bc45 WHIRLPOOL 7645718b9ca2ccc8e471e1b7668246dc02fcb245f719b773b436bcd7ab6e98c5f1fe5e07097f9f4ca9d9b0c623f118a709f1261cf56fb11da18c2bb6852698a6
+AUX expect-5.45-darwin-install_name.patch 727 SHA256 40673730c4c47fa9a8284e6d0ebbcda4b2df891bf47668f3a31f923f70ca2ba6 SHA512 886d378caa8d63add7d4ac73c90b53b4b30d642a2a5cf06c80aad87f57d49a3362bf506fe12f6aade77c56b8b4c83ffe18138143cdf0fe5d7e9e2d673f2bc6d5 WHIRLPOOL 44d6f4a1814ebf1c1da0b277488b4277dfc391d4aec7cbb07eec19134ca18be664ba2471c91326feab4f75a4ec933549319421a89a13370e901383d8aa011a89
+AUX expect-5.45-format-security.patch 428 SHA256 bec8125e223f014e99fe5e967bc3c8e18d3e9fbfd8fbc3c083532a5f1055402d SHA512 b85f0985b908f72d960eeb00567caab048874806c68d259835dc4564e33032524e9026e07ece3ad5f8669d67f7976019efb5dd763ba84b4cc13571ca999c7f06 WHIRLPOOL 874111389800e7d2a46113db2c9cfbcf057087e7ba2b91a8cb97d5de48bcf9ee5178498829fbfc3783eac563d7576af5625b4b21a9994852fd46d84fb18f687f
+AUX expect-5.45-gfbsd.patch 996 SHA256 5126942c16a7186e7d68b47db80949696f4d53c5fe1c643a68d0f3cd5f939dca SHA512 4fa7c4723c9ad2f5811c5762abe202f1d7584a6050c75cab277fe1b6c697809204a9adcf6f6f6c3c215c8df32f3ac9b083da907777b1ea02e1a4e64b8bf91242 WHIRLPOOL 4e88af63d192340578c85f6636035220f1ed5f665e17638d03d930a1017baa55cb5461b6eb2d5712229a65ff851b78f246c112019491b5e3e671c22468893907
+AUX expect-5.45-headers.patch 2280 SHA256 a1c49b2491b0d8d5650afa938521e36e4738a2d486ca1b95df05b084113c493f SHA512 ac55ec9d65e87d5c64327d802fa16eab9f218f71e760090b2afc00b5fdb791859e6d1f35b0d1a5f52e7ff6ffb21e538581a1782976754fe8ae3ca5950c8db55c WHIRLPOOL 6e55f50364cb86e879b935a449c9f4b7e1ded54922fdc6f28e2a57aefdb7ab7f17dff0279da32a8ecd9a9696c6fa142d3ddc559ceebfbab23e84e233beb62fe9
+DIST expect5.45.tar.gz 628808 SHA256 b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040 SHA512 be991c68241e607b3a689eae7e7966056dbfb577e857331d54a4911bd178c1816425217603b43918ad1b6d2e966271a0f01e79d7028a22e223562d59d10c8c51 WHIRLPOOL e28a5019036d20260f76b13cbd47d2e56661b0107592ead296118c12ed28157a1300a091730820e088d2fa6f86396e7244e844c7bc2e942fc6cf995e4194f10f
+EBUILD expect-5.45.ebuild 2312 SHA256 d9537c1fecc7efb5bb0299effba9d255a33cf766cb723ba9253859c1a8f91d5c SHA512 a9a2eeace95cddb6af90cb238458056fcb4956d76d7861e8eba1cb09901c6ab3f83608669783edd59b3c01b63523648d6e77726e4c49ff1ea64865b972862b08 WHIRLPOOL cfbab4ed11283f6635b410bc8f5413ab6c19f55b4b11e29d2534c20bdff2986f87a190192038a485d1c569892545d8b01a45439723e9ebd4eb6171699753937d
+MISC ChangeLog 4061 SHA256 003e05d17287ad41f0d3713689f37b39f19ce71e4323030787577b320c4e4200 SHA512 f35544348b3028431766d32683d1bb21ba6abd730395a92fba5a2f843f34c2964d6fa5ebccee772abfe24ceed2bec97c05a07471167228a38a90259faa76e84f WHIRLPOOL 6bfb1eefa15cfd001e33b20854f058ce742ee406c6f4036d25a7a648c7fc0c18f36b0404cf574cc3ff9ae0ceb1b9c05c30b05ce65ba23511edbb55593769ee64
+MISC ChangeLog-2015 13891 SHA256 1c8eb5f59080851f31b5743481e7ebf29972702957e3496d243cb2af3937b65f SHA512 9500afee5923d853058d6e1bc5a5509616fa060eecd322e6500c06550cf42b51a2e5c7f6c42759b1a7aab9f862021b29d12510d5fff1611624285db5a00d2c42 WHIRLPOOL 6581631895f77c2e51372786399be5ceccdbdafa5ed8d2597e6ba42d4e5e5eb3d6c7ead374380ff3f5441dff6f28cb0c1c54b217be92570027ab94b1940c0f60
+MISC metadata.xml 329 SHA256 eddb2cab033479731a524d904fb5848eb3942d1fb1d22b44ae154354db0b688e SHA512 cd5b6144b39381b2b69791171489dd907c3d779ae488b361f744ffacb2459b0c72cb70a72a85dce6bd7a25774e1a42da511dd0d041b25580bf243a515095f3d1 WHIRLPOOL 8eca01b95f446bab157f26b942bb4515bdd46ca70e4d55442b87d942d80c83d001a324434bf2893f3f5a5126067e8e7c409cbc1c7a87be1d2e0dae010facb623
diff --git a/dev-tcltk/expect/expect-5.45.ebuild b/dev-tcltk/expect/expect-5.45.ebuild
new file mode 100644
index 000000000000..336914daa558
--- /dev/null
+++ b/dev-tcltk/expect/expect-5.45.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+MY_P="${PN}${PV}"
+DESCRIPTION="tool for automating interactive applications"
+HOMEPAGE="http://expect.nist.gov/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~m68k-mint ~x86-solaris"
+IUSE="debug doc threads"
+
+# We need dejagnu for src_test, but dejagnu needs expect
+# to compile/run, so we cant add dejagnu to DEPEND :/
+DEPEND=">=dev-lang/tcl-8.2:0[threads?]"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -i "s:/usr/local/bin:${EPREFIX}/usr/bin:" expect.man || die
+ # stops any example scripts being installed by default
+ sed -i \
+ -e 's/^SCRIPT_LIST[[:space:]]*=/_&/' \
+ -e 's/^SCRIPTS[[:space:]]*=/_&/' \
+ -e 's/^SCRIPTS_MANPAGES[[:space:]]*=/_&/' \
+ Makefile.in || die
+
+ epatch "${FILESDIR}"/${PN}-5.45-gfbsd.patch
+ epatch "${FILESDIR}"/${PN}-5.44.1.15-ldflags.patch
+ epatch "${FILESDIR}"/${PN}-5.45-headers.patch #337943
+ epatch "${FILESDIR}"/${PN}-5.45-format-security.patch
+ sed -i 's:ifdef HAVE_SYS_WAIT_H:ifndef NO_SYS_WAIT_H:' *.c
+
+ # fix install_name on darwin
+ [[ ${CHOST} == *-darwin* ]] && \
+ epatch "${FILESDIR}"/${P}-darwin-install_name.patch
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+}
+
+src_configure() {
+ # the 64bit flag is useless ... it only adds 64bit compiler flags
+ # (like -m64) which the target toolchain should already handle
+ econf \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" \
+ --disable-64bit \
+ --enable-shared \
+ $(use_enable threads) \
+ $(use_enable debug symbols mem)
+}
+
+src_test() {
+ # we need dejagnu to do tests ... but dejagnu needs
+ # expect ... so don't do tests unless we have dejagnu
+ type -p runtest || return 0
+ emake test
+}
+
+expect_make_var() {
+ touch pkgIndex.tcl-hand
+ printf 'all:;echo $('$1')\ninclude Makefile' | emake --no-print-directory -s -f -
+ rm -f pkgIndex.tcl-hand || die
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ docinto examples
+ dodoc \
+ example/README \
+ $(printf 'example/%s ' $(expect_make_var _SCRIPTS)) \
+ $(printf 'example/%s.man ' $(expect_make_var _SCRIPTS_MANPAGES))
+ fi
+}
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15-expectk.patch b/dev-tcltk/expect/files/expect-5.44.1.15-expectk.patch
new file mode 100644
index 000000000000..0c0ba80293e0
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15-expectk.patch
@@ -0,0 +1,14 @@
+expectk is only built when TK_BIN_DIR is defined. the configure script
+takes care of figuring out this value, but then they forgot to actually
+write it out to the Makefile.
+
+--- Makefile.in
++++ Makefile.in
+@@ -24,6 +24,7 @@
+ # SETUID = chmod u+s
+
+ LIB_RUNTIME_DIR = $(DESTDIR)@libdir@
++TK_BIN_DIR = @TK_BIN_DIR@
+
+ # The following Expect scripts are not necessary to have installed as
+ # commands, but are very useful. Edit out what you don't want
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15-gfbsd.patch b/dev-tcltk/expect/files/expect-5.44.1.15-gfbsd.patch
new file mode 100644
index 000000000000..d67de2126a07
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15-gfbsd.patch
@@ -0,0 +1,17 @@
+--- expect-5.44.1.15/tclconfig/tcl.m4.orig 2010-04-08 22:49:51.568043292 -0700
++++ expect-5.44.1.15/tclconfig/tcl.m4 2010-04-08 22:50:28.207915301 -0700
+@@ -1579,12 +1579,12 @@
+ FreeBSD-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+- SHLIB_LD="ld -Bshareable -x"
++ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS="$LDFLAGS -export-dynamic"
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15-headers.patch b/dev-tcltk/expect/files/expect-5.44.1.15-headers.patch
new file mode 100644
index 000000000000..77e4d91f4bf9
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15-headers.patch
@@ -0,0 +1,86 @@
+https://sourceforge.net/tracker/?func=detail&aid=3071706&group_id=13179&atid=113179
+
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -15,6 +15,12 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
+
+ #ifdef TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+--- a/exp_trap.c
++++ b/exp_trap.c
+@@ -13,6 +13,7 @@
+ #include <stdio.h>
+ #include <signal.h>
+ #include <sys/types.h>
++#include <string.h>
+
+ #ifdef HAVE_SYS_WAIT_H
+ #include <sys/wait.h>
+--- a/pty_termios.c
++++ b/pty_termios.c
+@@ -9,6 +9,8 @@
+
+ #include <stdio.h>
+ #include <signal.h>
++#include <string.h>
++#include <pty.h>
+
+ #if defined(SIGCLD) && !defined(SIGCHLD)
+ #define SIGCHLD SIGCLD
+@@ -100,6 +100,7 @@
+
+ #include "exp_tty_in.h"
+ #include "exp_rename.h"
++#include "exp_int.h"
+ #include "exp_pty.h"
+
+ void expDiagLog();
+--- a/exp_chan.c
++++ b/exp_chan.c
+@@ -34,6 +34,7 @@
+ #include "exp_rename.h"
+ #include "exp_prog.h"
+ #include "exp_command.h"
++#include "exp_event.h"
+ #include "exp_log.h"
+ #include "tcldbg.h" /* Dbg_StdinMode */
+
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -1955,6 +1955,7 @@
+
+ #include "expect.h"
+ #include "exp_int.h"
++EXTERN void exp_init_tty _ANSI_ARGS_((void));
+
+ /* exp_glob.c - expect functions for doing glob
+ *
+--- a/exp_tty.h
++++ b/exp_tty.h
+@@ -17,6 +17,7 @@
+
+ void exp_tty_raw(int set);
+ void exp_tty_echo(int set);
++int exp_tty_cooked_echo(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
+ void exp_tty_break(Tcl_Interp *interp, int fd);
+ int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
+ int exp_israw(void);
+--- a/exp_main_tk.c
++++ b/exp_main_tk.c
+@@ -32,6 +32,7 @@
+ static char sccsid[] = "@(#) tkAppInit.c 1.19 95/12/23 17:09:24";
+ #endif /* not lint */
+
++#include <string.h>
+ #include <ctype.h>
+
+ #include "tk.h"
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15-ldflags.patch b/dev-tcltk/expect/files/expect-5.44.1.15-ldflags.patch
new file mode 100644
index 000000000000..be3641c2105c
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.in b/Makefile.in
+index cc2c79b..1083eaf 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -148,7 +148,7 @@ OBJEXT = @OBJEXT@
+ RANLIB = @RANLIB@
+ RANLIB_STUB = @RANLIB_STUB@
+ SHLIB_CFLAGS = @SHLIB_CFLAGS@
+-SHLIB_LD = @SHLIB_LD@
++SHLIB_LD = @SHLIB_LD@ $(LDFLAGS)
+ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+ STLIB_LD = @STLIB_LD@
+ TCL_DEFS = @TCL_DEFS@
diff --git a/dev-tcltk/expect/files/expect-5.44.1.15_with-tk-no.patch b/dev-tcltk/expect/files/expect-5.44.1.15_with-tk-no.patch
new file mode 100644
index 000000000000..cea372daaacb
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.44.1.15_with-tk-no.patch
@@ -0,0 +1,117 @@
+This is a minimal patch that does not keep indentation consistent in tcl.m4
+Updating indentation would make the patch much bigger and less readable.
+
+Signed-off-by: Gilles Espinasse <g.esp@free.fr>
+
+Index: INSTALL
+===================================================================
+RCS file: /cvsroot/expect/expect/INSTALL,v
+retrieving revision 5.30
+diff -u -r5.30 INSTALL
+--- INSTALL 21 Jun 1999 18:41:41 -0000 5.30
++++ INSTALL 30 May 2009 11:51:21 -0000
+@@ -152,6 +152,7 @@
+
+ --with-tk=... Specifies the directory containing Tk's
+ configure file (tkConfig.sh).
++ --with-tk=no disable Tk usage in expect
+
+ --with-tkinclude=... Specifies the directory containing Tk's
+ private include files (such as tkInt.h)
+Index: Makefile.in
+===================================================================
+RCS file: /cvsroot/expect/expect/Makefile.in,v
+retrieving revision 5.45
+diff -u -r5.45 Makefile.in
+--- Makefile.in 3 Oct 2008 17:05:14 -0000 5.45
++++ Makefile.in 30 May 2009 11:51:21 -0000
+@@ -103,7 +103,11 @@
+ PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
+
+ lib_BINARIES = $(PKG_LIB_FILE)
+-bin_BINARIES = expect expectk
++bin_BINARIES = expect
++ifneq ($(TK_BIN_DIR),)
++ bin_BINARIES += expectk
++endif
++
+ BINARIES = $(lib_BINARIES) $(bin_BINARIES)
+
+ SHELL = @SHELL@
+Index: tclconfig/tcl.m4
+===================================================================
+RCS file: /cvsroot/expect/expect/tclconfig/tcl.m4,v
+retrieving revision 1.3
+diff -u -r1.3 tcl.m4
+--- tclconfig/tcl.m4 25 Jan 2006 21:52:11 -0000 1.3
++++ tclconfig/tcl.m4 30 May 2009 11:51:23 -0000
+@@ -181,10 +181,12 @@
+ #
+ # Adds the following arguments to configure:
+ # --with-tk=...
++# --with-tk=no disable Tk usage
+ #
+ # Defines the following vars:
+ # TK_BIN_DIR Full path to the directory containing
+ # the tkConfig.sh file
++# Empty if Tk is disabled
+ #------------------------------------------------------------------------
+
+ AC_DEFUN(TEA_PATH_TKCONFIG, [
+@@ -201,6 +203,12 @@
+ AC_HELP_STRING([--with-tk],
+ [directory containing tk configuration (tkConfig.sh)]),
+ with_tkconfig=${withval})
++
++ if test x"${with_tkconfig}" = x"no" ; then
++ AC_MSG_RESULT([Tk is disabled by --with-tk=no])
++ unset TK_BIN_DIR
++ else
++
+ AC_MSG_CHECKING([for Tk configuration])
+ AC_CACHE_VAL(ac_cv_c_tkconfig,[
+
+@@ -309,6 +317,7 @@
+ TK_BIN_DIR=${ac_cv_c_tkconfig}
+ AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh])
+ fi
++ fi
+ fi
+ ])
+
+@@ -420,6 +429,7 @@
+ #------------------------------------------------------------------------
+
+ AC_DEFUN(TEA_LOAD_TKCONFIG, [
++ if test x"${with_tkconfig}" != x"no" ; then
+ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
+
+ if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
+@@ -501,6 +511,7 @@
+
+ AC_SUBST(TK_LIBS)
+ AC_SUBST(TK_XINCLUDES)
++ fi
+ ])
+
+ #------------------------------------------------------------------------
+@@ -3528,6 +3539,11 @@
+ #------------------------------------------------------------------------
+
+ AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [
++ if test x"${with_tkconfig}" = x"no" ; then
++ TK_INCLUDES=""
++ AC_SUBST(TK_INCLUDES)
++ else
++
+ AC_MSG_CHECKING([for Tk public headers])
+
+ AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval})
+@@ -3608,6 +3624,7 @@
+ fi
+ AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}])
+ fi
++ fi
+ ])
+
+ #------------------------------------------------------------------------
diff --git a/dev-tcltk/expect/files/expect-5.45-darwin-install_name.patch b/dev-tcltk/expect/files/expect-5.45-darwin-install_name.patch
new file mode 100644
index 000000000000..f5470aadb88e
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-darwin-install_name.patch
@@ -0,0 +1,13 @@
+Add install_name (soname)
+
+--- tclconfig/tcl.m4
++++ tclconfig/tcl.m4
+@@ -1703,7 +1703,7 @@
+ ])
+ # TEA specific: link shlib with current and compatiblity version flags
+ vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([[0-9]]\{1,5\}\)\(\(\.[[0-9]]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
+- SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
++ SHLIB_LD="${SHLIB_LD} -install_name \$(pkglibdir)/\$(PKG_LIB_FILE) -current_version ${vers:-0} -compatibility_version ${vers:-0}"
+ SHLIB_SUFFIX=".dylib"
+ # Don't use -prebind when building for Mac OS X 10.4 or later only:
+ AS_IF([test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
diff --git a/dev-tcltk/expect/files/expect-5.45-format-security.patch b/dev-tcltk/expect/files/expect-5.45-format-security.patch
new file mode 100644
index 000000000000..c623264be27a
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-format-security.patch
@@ -0,0 +1,18 @@
+ exp_clib.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/exp_clib.c b/exp_clib.c
+index 172c05e..c86dda4 100644
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -1476,8 +1476,8 @@ expDiagLogU(str)
+ char *str;
+ {
+ if (exp_is_debugging) {
+- fprintf(stderr,str);
+- if (exp_logfile) fprintf(exp_logfile,str);
++ fprintf(stderr,"%s", str);
++ if (exp_logfile) fprintf(exp_logfile,"%s", str);
+ }
+ }
+
diff --git a/dev-tcltk/expect/files/expect-5.45-gfbsd.patch b/dev-tcltk/expect/files/expect-5.45-gfbsd.patch
new file mode 100644
index 000000000000..5ae9c26adb88
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-gfbsd.patch
@@ -0,0 +1,26 @@
+--- a/tclconfig/tcl.m4
++++ b/tclconfig/tcl.m4
+@@ -1634,20 +1634,15 @@ dnl AC_CHECK_TOOL(AR, ar)
+ SHLIB_LD="${CC} -shared"
+ TCL_SHLIB_LD_EXTRAS="-soname \$[@]"
+ SHLIB_SUFFIX=".so"
+- LDFLAGS=""
++ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ AS_IF([test $doRpath = yes], [
+- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
++ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
++ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ AS_IF([test "${TCL_THREADS}" = "1"], [
+ # The -pthread needs to go in the LDFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+- # Version numbers are dot-stripped by system policy.
+- TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
+- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+- TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ Darwin-*)
+ CFLAGS_OPTIMIZE="-Os"
diff --git a/dev-tcltk/expect/files/expect-5.45-headers.patch b/dev-tcltk/expect/files/expect-5.45-headers.patch
new file mode 100644
index 000000000000..98330211b328
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-headers.patch
@@ -0,0 +1,92 @@
+https://sourceforge.net/tracker/?func=detail&aid=3071706&group_id=13179&atid=113179
+--- a/configure.in
++++ b/configure.in
+@@ -133,6 +133,8 @@ AC_CHECK_HEADER(sys/fcntl.h, AC_DEFINE(HAVE_SYS_FCNTL_H))
+ AC_CHECK_HEADER(sys/ptem.h, AC_DEFINE(HAVE_SYS_PTEM_H))
+ AC_CHECK_HEADER(sys/strredir.h, AC_DEFINE(HAVE_STRREDIR_H))
+ AC_CHECK_HEADER(sys/strpty.h, AC_DEFINE(HAVE_STRPTY_H))
++AC_CHECK_HEADER(pty.h, AC_DEFINE(HAVE_PTY_H))
++AC_CHECK_HEADER(libutil.h, AC_DEFINE(HAVE_LIBUTIL_H))
+
+ AC_MSG_CHECKING([for sys/bsdtypes.h])
+ if test "ISC_${ISC}" = "ISC_1" ; then
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -15,6 +15,12 @@
+ #endif
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++#ifdef HAVE_SYS_WAIT_H
++#include <sys/wait.h>
++#endif
+
+ #ifdef TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+--- a/exp_trap.c
++++ b/exp_trap.c
+@@ -13,6 +13,7 @@
+ #include <stdio.h>
+ #include <signal.h>
+ #include <sys/types.h>
++#include <string.h>
+
+ #ifdef HAVE_SYS_WAIT_H
+ #include <sys/wait.h>
+--- a/pty_termios.c
++++ b/pty_termios.c
+@@ -9,6 +9,14 @@
+
+ #include <stdio.h>
+ #include <signal.h>
++#include <string.h>
++#ifdef HAVE_PTY_H
++#include <pty.h>
++#endif
++#ifdef HAVE_LIBUTIL_H
++#include <sys/types.h>
++#include <libutil.h>
++#endif
+
+ #if defined(SIGCLD) && !defined(SIGCHLD)
+ #define SIGCHLD SIGCLD
+@@ -100,6 +100,7 @@
+
+ #include "exp_tty_in.h"
+ #include "exp_rename.h"
++#include "exp_int.h"
+ #include "exp_pty.h"
+
+ void expDiagLog();
+--- a/exp_chan.c
++++ b/exp_chan.c
+@@ -34,6 +34,7 @@
+ #include "exp_rename.h"
+ #include "exp_prog.h"
+ #include "exp_command.h"
++#include "exp_event.h"
+ #include "exp_log.h"
+ #include "tcldbg.h" /* Dbg_StdinMode */
+
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -1955,6 +1955,7 @@
+
+ #include "expect.h"
+ #include "exp_int.h"
++EXTERN void exp_init_tty _ANSI_ARGS_((void));
+
+ /* exp_glob.c - expect functions for doing glob
+ *
+--- a/exp_tty.h
++++ b/exp_tty.h
+@@ -17,6 +17,7 @@
+
+ void exp_tty_raw(int set);
+ void exp_tty_echo(int set);
++int exp_tty_cooked_echo(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
+ void exp_tty_break(Tcl_Interp *interp, int fd);
+ int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
+ int exp_israw(void);
diff --git a/dev-tcltk/expect/metadata.xml b/dev-tcltk/expect/metadata.xml
new file mode 100644
index 000000000000..67378c136485
--- /dev/null
+++ b/dev-tcltk/expect/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">expect</remote-id>
+ </upstream>
+</pkgmetadata>