summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-tcltk/expect')
-rw-r--r--dev-tcltk/expect/Manifest1
-rw-r--r--dev-tcltk/expect/expect-5.45.4-r4.ebuild80
-rw-r--r--dev-tcltk/expect/expect-5.45.4-r5.ebuild81
-rw-r--r--dev-tcltk/expect/expect-5.45.4.ebuild84
-rw-r--r--dev-tcltk/expect/expect-5.45.ebuild83
-rw-r--r--dev-tcltk/expect/files/expect-5.45-warnings.patch684
-rw-r--r--dev-tcltk/expect/files/expect-5.45.4-configure-clang16.patch223
-rw-r--r--dev-tcltk/expect/files/expect-5.45.4-configure-in.patch113
-rw-r--r--dev-tcltk/expect/metadata.xml2
9 files changed, 1182 insertions, 169 deletions
diff --git a/dev-tcltk/expect/Manifest b/dev-tcltk/expect/Manifest
index 5334acf4f518..19761bb76881 100644
--- a/dev-tcltk/expect/Manifest
+++ b/dev-tcltk/expect/Manifest
@@ -1,2 +1 @@
DIST expect5.45.4.tar.gz 632363 BLAKE2B a3a936e7644c922fdd474fa08c45926396ccce9a63e5f65f4d5e157f5160cfe4de47688734b39d13281d9548aac492810f19236e06563903d3d8081e4661048d SHA512 a8dc25e8175f67e029e15cbcfca1705165c1c4cb2dd37eaaaebffb61e3ba132d9519cd73ca5add4c3358a2b0b7a91e878279e8d0b72143ff2c287fce07e4659a
-DIST expect5.45.tar.gz 628808 BLAKE2B d7260d3b2ce1bcd72deef121e1f994f45bfa5397291692d794c9b8ad627d7ac183689ba00ba22f728853ac03b6b083fb6f283dc5c453aa991e04263c217be552 SHA512 be991c68241e607b3a689eae7e7966056dbfb577e857331d54a4911bd178c1816425217603b43918ad1b6d2e966271a0f01e79d7028a22e223562d59d10c8c51
diff --git a/dev-tcltk/expect/expect-5.45.4-r4.ebuild b/dev-tcltk/expect/expect-5.45.4-r4.ebuild
new file mode 100644
index 000000000000..ba137b0db314
--- /dev/null
+++ b/dev-tcltk/expect/expect-5.45.4-r4.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools edo flag-o-matic
+
+MY_P="${PN}${PV}"
+DESCRIPTION="tool for automating interactive applications"
+HOMEPAGE="https://core.tcl-lang.org/expect/"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="debug doc test threads"
+RESTRICT="!test? ( test )"
+
+DEPEND=">=dev-lang/tcl-8.2:=[threads?]"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-util/dejagnu )"
+
+PATCHES=( "${FILESDIR}"/${P}-examples.patch )
+
+src_prepare() {
+ default
+ sed -i "s:/usr/local/bin:${EPREFIX}/usr/bin:" expect.man || die
+
+ eapply "${FILESDIR}"/${PN}-5.45-gfbsd.patch
+ eapply "${FILESDIR}"/${PN}-5.44.1.15-ldflags.patch
+ eapply "${FILESDIR}"/${PN}-5.45-headers.patch #337943
+ eapply "${FILESDIR}"/${PN}-5.45-format-security.patch
+ eapply "${FILESDIR}"/${PN}-5.45.4-configure-in.patch
+ eapply "${FILESDIR}"/${PN}-5.45.4-configure-clang16.patch || die
+
+ sed -i 's:ifdef HAVE_SYS_WAIT_H:ifndef NO_SYS_WAIT_H:' *.c || die
+
+ # fix install_name on darwin
+ [[ ${CHOST} == *-darwin* ]] && \
+ eapply "${FILESDIR}"/${P}-darwin-install_name.patch
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+}
+
+src_configure() {
+ # bug #881687
+ append-flags -std=gnu89
+
+ # the 64bit flag is useless ... it only adds 64bit compiler flags
+ # (like -m64) which the target toolchain should already handle
+ econf \
+ --cache-file="${S}"/config.cache \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" \
+ --disable-64bit \
+ --enable-shared \
+ $(use_enable threads) \
+ $(use_enable debug symbols mem)
+}
+
+expect_make_var() {
+ touch pkgIndex.tcl-hand || die
+ 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
+
+ edo 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/expect-5.45.4-r5.ebuild b/dev-tcltk/expect/expect-5.45.4-r5.ebuild
new file mode 100644
index 000000000000..91113d38b871
--- /dev/null
+++ b/dev-tcltk/expect/expect-5.45.4-r5.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools edo flag-o-matic
+
+MY_P="${PN}${PV}"
+DESCRIPTION="tool for automating interactive applications"
+HOMEPAGE="https://core.tcl-lang.org/expect/"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="debug doc test threads"
+RESTRICT="!test? ( test )"
+
+DEPEND=">=dev-lang/tcl-8.2:=[threads?]"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-util/dejagnu )"
+
+PATCHES=( "${FILESDIR}"/${P}-examples.patch )
+
+src_prepare() {
+ default
+ sed -i "s:/usr/local/bin:${EPREFIX}/usr/bin:" expect.man || die
+
+ eapply "${FILESDIR}"/${PN}-5.45-gfbsd.patch
+ eapply "${FILESDIR}"/${PN}-5.44.1.15-ldflags.patch
+ eapply "${FILESDIR}"/${PN}-5.45-headers.patch #337943
+ eapply "${FILESDIR}"/${PN}-5.45-format-security.patch
+ eapply "${FILESDIR}"/${PN}-5.45.4-configure-in.patch
+ eapply "${FILESDIR}"/${PN}-5.45.4-configure-clang16.patch
+ eapply "${FILESDIR}"/${PN}-5.45-warnings.patch
+
+ sed -i 's:ifdef HAVE_SYS_WAIT_H:ifndef NO_SYS_WAIT_H:' *.c || die
+
+ # fix install_name on darwin
+ [[ ${CHOST} == *-darwin* ]] && \
+ eapply "${FILESDIR}"/${P}-darwin-install_name.patch
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+}
+
+src_configure() {
+ # bug #881687
+ append-flags -std=gnu89
+
+ # the 64bit flag is useless ... it only adds 64bit compiler flags
+ # (like -m64) which the target toolchain should already handle
+ econf \
+ --cache-file="${S}"/config.cache \
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" \
+ --disable-64bit \
+ --enable-shared \
+ $(use_enable threads) \
+ $(use_enable debug symbols mem)
+}
+
+expect_make_var() {
+ touch pkgIndex.tcl-hand || die
+ 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
+
+ edo 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/expect-5.45.4.ebuild b/dev-tcltk/expect/expect-5.45.4.ebuild
deleted file mode 100644
index b6d1a0feefe2..000000000000
--- a/dev-tcltk/expect/expect-5.45.4.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-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 ~x64-solaris ~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}
-
-PATCHES=( "${FILESDIR}"/${P}-examples.patch )
-
-src_prepare() {
- default
- sed -i "s:/usr/local/bin:${EPREFIX}/usr/bin:" expect.man || 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
- echo dodoc \
- example/README \
- $(printf 'example/%s ' $(expect_make_var _SCRIPTS)) \
- $(printf 'example/%s.man ' $(expect_make_var _SCRIPTS_MANPAGES))
- 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/expect-5.45.ebuild b/dev-tcltk/expect/expect-5.45.ebuild
deleted file mode 100644
index bfcd37e9d3e4..000000000000
--- a/dev-tcltk/expect/expect-5.45.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2018 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 ~x64-solaris ~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.45-warnings.patch b/dev-tcltk/expect/files/expect-5.45-warnings.patch
new file mode 100644
index 000000000000..31c3809be374
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45-warnings.patch
@@ -0,0 +1,684 @@
+https://bugs.gentoo.org/918972
+https://core.tcl-lang.org/expect/info/35d0b2bdfecd634d
+--- a/Dbg.c
++++ b/Dbg.c
+@@ -173,12 +173,12 @@ Tcl_Obj *objPtr;
+ }
+ }
+
+-/* return 1 to break, 0 to continue */
++/* return 1 to break, 0 to continue
++ * cmd: command about to be executed
++ * bp: breakpoint to test
++ */
+ static int
+-breakpoint_test(interp,cmd,bp)
+-Tcl_Interp *interp;
+-char *cmd; /* command about to be executed */
+-struct breakpoint *bp; /* breakpoint to test */
++breakpoint_test(Tcl_Interp *interp,const char *cmd,struct breakpoint *bp)
+ {
+ if (bp->re) {
+ int found = 0;
+@@ -239,7 +239,7 @@ TclGetFrame2(interp, origFramePtr, string, framePtrPtr, dir)
+ {
+ Interp *iPtr = (Interp *) interp;
+ int level, result;
+- CallFrame *framePtr; /* frame currently being searched */
++ CallFrame *framePtr = NULL; /* frame currently being searched */
+
+ CallFrame *curFramePtr = iPtr->varFramePtr;
+
+@@ -302,7 +302,6 @@ TclGetFrame2(interp, origFramePtr, string, framePtrPtr, dir)
+ return result;
+ }
+
+-
+ static char *printify(s)
+ char *s;
+ {
+@@ -658,6 +657,8 @@ debugger_trap(clientData,interp,level,command,commandInfo,objc,objv)
+ if (goalFramePtr != iPtr->varFramePtr) goto finish;
+ goto start_interact;
+ /* DANGER: unhandled cases! none, up, down, where */
++ default:
++ break; /* Silence compiler warning */
+ }
+
+ start_interact:
+@@ -716,6 +717,8 @@ end_interact:
+ case where:
+ PrintStack(interp,iPtr->varFramePtr,viewFramePtr,objc,objv,level_text);
+ break;
++ default:
++ break; /* Silence compiler warning */
+ }
+
+ /* restore view and restart interactor */
+--- a/exp_chan.c
++++ b/exp_chan.c
+@@ -58,17 +58,14 @@ static int ExpGetHandleProc _ANSI_ARGS_((ClientData instanceData,
+ */
+
+ Tcl_ChannelType expChannelType = {
+- "exp", /* Type name. */
+- ExpBlockModeProc, /* Set blocking/nonblocking mode.*/
+- ExpCloseProc, /* Close proc. */
+- ExpInputProc, /* Input proc. */
+- ExpOutputProc, /* Output proc. */
+- NULL, /* Seek proc. */
+- NULL, /* Set option proc. */
+- NULL, /* Get option proc. */
+- ExpWatchProc, /* Initialize notifier. */
+- ExpGetHandleProc, /* Get OS handles out of channel. */
+- NULL, /* Close2 proc */
++ .typeName = "exp", /* Type name. */
++ .version = TCL_CHANNEL_VERSION_2,
++ .blockModeProc = ExpBlockModeProc, /* Set blocking/nonblocking mode.*/
++ .closeProc = ExpCloseProc, /* Close proc. */
++ .inputProc = ExpInputProc, /* Input proc. */
++ .outputProc = ExpOutputProc, /* Output proc. */
++ .watchProc = ExpWatchProc, /* Initialize notifier. */
++ .getHandleProc = ExpGetHandleProc /* Get OS handles out of channel. */
+ };
+
+ typedef struct ThreadSpecificData {
+@@ -437,10 +434,10 @@ ExpGetHandleProc(instanceData, direction, handlePtr)
+ ExpState *esPtr = (ExpState *) instanceData;
+
+ if (direction & TCL_WRITABLE) {
+- *handlePtr = (ClientData) esPtr->fdin;
++ *handlePtr = (ClientData)(intptr_t)esPtr->fdin;
+ }
+ if (direction & TCL_READABLE) {
+- *handlePtr = (ClientData) esPtr->fdin;
++ *handlePtr = (ClientData)(intptr_t)esPtr->fdin;
+ } else {
+ return TCL_ERROR;
+ }
+--- a/exp_clib.c
++++ b/exp_clib.c
+@@ -56,6 +56,10 @@ would appreciate credit if this program or parts of it are used.
+ # endif
+ #endif
+
++#ifdef HAVE_UNISTD_H
++#include <unistd.h>
++#endif
++
+ #include <signal.h>
+ /*#include <memory.h> - deprecated - ANSI C moves them into string.h */
+ #include "string.h"
+@@ -122,6 +126,7 @@ extern unsigned long strtoul _ANSI_ARGS_((CONST char *string,
+
+ #include <tcl.h>
+ #include "expect.h"
++#include "exp_command.h"
+ #define TclRegError exp_TclRegError
+
+ /*
+@@ -1814,6 +1819,13 @@ int fd;
+
+ }
+
++/* ultrix (at least 4.1-2) fails to obtain controlling tty if setsid */
++/* is called. setpgrp works though. */
++#if defined(POSIX) && !defined(ultrix) || defined(__convex__)
++#define DO_SETSID
++#endif
++
++#if !defined(DO_SETSID) && (!defined(SYSV3) || defined(CRAY)) /* { */
+ static
+ void
+ exp_setpgrp()
+@@ -1830,6 +1842,7 @@ exp_setpgrp()
+ (void) setpgrp(0,0);
+ #endif
+ }
++#endif /* } */
+
+ /* returns fd of master side of pty */
+ int
+@@ -1840,7 +1853,9 @@ char *argv[]; /* some compiler complains about **argv? */
+ int cc;
+ int errorfd; /* place to stash fileno(stderr) in child */
+ /* while we're setting up new stderr */
++#if defined(TIOCNOTTY) && !defined(SYSV3) && !defined(DO_SETSID)
+ int ttyfd;
++#endif
+ int sync_fds[2];
+ int sync2_fds[2];
+ int status_pipe[2];
+@@ -2015,15 +2030,6 @@ when trapping, see below in child half of fork */
+ (void) close(exp_pty[0]);
+ #endif
+
+-/* ultrix (at least 4.1-2) fails to obtain controlling tty if setsid */
+-/* is called. setpgrp works though. */
+-#if defined(POSIX) && !defined(ultrix)
+-#define DO_SETSID
+-#endif
+-#ifdef __convex__
+-#define DO_SETSID
+-#endif
+-
+ #ifdef DO_SETSID
+ setsid();
+ #else
+@@ -2451,7 +2457,7 @@ struct exp_case *ecases;
+ int return_val;
+ int sys_error = 0;
+ #define return_normally(x) {return_val = x; goto cleanup;}
+-#define return_errno(x) {sys_error = x; goto cleanup;}
++#define return_errno(x) {sys_error = x; return_val = -1; goto cleanup;}
+
+ f = fdfp2f(fd,fp);
+ if (!f) return_errno(ENOMEM);
+@@ -2860,7 +2866,9 @@ char *program;
+ int
+ exp_disconnect()
+ {
++#if defined(TIOCNOTTY) && !defined(SYSV3) && !defined(POSIX)
+ int ttyfd;
++#endif
+
+ #ifndef EALREADY
+ #define EALREADY 37
+--- a/exp_command.c
++++ b/exp_command.c
+@@ -532,6 +532,13 @@ set_pgrp(int fd)
+ }
+ #endif
+
++/* ultrix (at least 4.1-2) fails to obtain controlling tty if setsid */
++/* is called. setpgrp works though. */
++#if defined(POSIX) && !defined(ultrix) || defined(__convex__)
++#define DO_SETSID
++#endif
++
++#if !defined(DO_SETSID) && (!defined(SYSV3) || defined(CRAY)) /* { */
+ static
+ void
+ expSetpgrp()
+@@ -548,7 +555,7 @@ expSetpgrp()
+ (void) setpgrp(0,0);
+ #endif
+ }
+-
++#endif /* } */
+
+ /*ARGSUSED*/
+ static void
+@@ -581,9 +588,7 @@ Exp_SpawnObjCmd(
+ ExpState *esPtr = 0;
+ int slave;
+ int pid;
+-#ifdef TIOCNOTTY
+- /* tell Saber to ignore non-use of ttyfd */
+- /*SUPPRESS 591*/
++#if defined(TIOCNOTTY) && !defined(SYSV3) && !defined(DO_SETSID)
+ int ttyfd;
+ #endif /* TIOCNOTTY */
+ int errorfd; /* place to stash fileno(stderr) in child */
+@@ -903,13 +908,17 @@ Exp_SpawnObjCmd(
+ if (TCL_ERROR == Tcl_GetChannelHandle(channel, TCL_READABLE, &rfdc)) {
+ return TCL_ERROR;
+ }
+- rfd = (int)(long) rfdc;
++ rfd = (int)(intptr_t) rfdc;
++ } else {
++ rfd = -1;
+ }
+ if (mode & TCL_WRITABLE) {
+ if (TCL_ERROR == Tcl_GetChannelHandle(channel, TCL_WRITABLE, &wfdc)) {
+ return TCL_ERROR;
+ }
+- wfd = (int)(long) wfdc;
++ wfd = (int)(intptr_t) wfdc;
++ } else {
++ wfd = -1;
+ }
+ master = ((mode & TCL_READABLE)?rfd:wfd);
+
+@@ -1126,15 +1135,6 @@ Exp_SpawnObjCmd(
+ (void) close(master);
+ #endif
+
+-/* ultrix (at least 4.1-2) fails to obtain controlling tty if setsid */
+-/* is called. setpgrp works though. */
+-#if defined(POSIX) && !defined(ultrix)
+-#define DO_SETSID
+-#endif
+-#ifdef __convex__
+-#define DO_SETSID
+-#endif
+-
+ #ifdef DO_SETSID
+ setsid();
+ #else
+@@ -1976,7 +1976,7 @@ Exp_SendObjCmd(
+ #define SEND_STYLE_BREAK 0x20
+ int send_style = SEND_STYLE_PLAIN;
+ int want_cooked = TRUE;
+- char *string; /* string to send */
++ char *string = NULL; /* string to send */
+ int len = -1; /* length of string to send */
+ int zeros; /* count of how many ascii zeros to send */
+
+@@ -3114,9 +3114,7 @@ Exp_DisconnectObjCmd(
+ {
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
+
+-#ifdef TIOCNOTTY
+- /* tell CenterLine to ignore non-use of ttyfd */
+- /*SUPPRESS 591*/
++#if defined(TIOCNOTTY) && !defined(SYSV3) && !defined(DO_SETSID)
+ int ttyfd;
+ #endif /* TIOCNOTTY */
+
+--- a/exp_event.c
++++ b/exp_event.c
+@@ -24,6 +24,7 @@ NIST would appreciate credit if this program or parts of it are used.
+ #include "exp_prog.h"
+ #include "exp_command.h" /* for ExpState defs */
+ #include "exp_event.h"
++#include "exp_log.h"
+
+ typedef struct ThreadSpecificData {
+ int rr; /* round robin ptr */
+@@ -120,6 +121,9 @@ exp_unblock_background_channelhandler(esPtr)
+ case disarm_req_while_blocked:
+ exp_disarm_background_channelhandler_force(esPtr);
+ break;
++ default:
++ expDiagLog("Unexpected value %d of bg-handler in %s",
++ esPtr->bg_status, __func__);
+ }
+ }
+
+--- a/exp_inter.c
++++ b/exp_inter.c
+@@ -404,8 +404,8 @@ intEcho(
+ int matchBytes)
+ {
+ int seenBytes; /* either printed or echoed */
+- int echoBytes;
+- int offsetBytes;
++ int echoBytes = 0;
++ int offsetBytes = 0;
+
+ /* write is unlikely to fail, since we just read from same descriptor */
+ seenBytes = esPtr->printed + esPtr->echoed;
+@@ -706,9 +706,6 @@ inter_updateproc(
+
+ #define finish(x) { status = x; goto done; }
+
+-static char return_cmd[] = "return";
+-static char interpreter_cmd[] = "interpreter";
+-
+ /*ARGSUSED*/
+ int
+ Exp_InteractObjCmd(
+@@ -1344,15 +1341,15 @@ Exp_InteractObjCmd(
+ int rc; /* return code from ready. This is further refined by matcher. */
+ int cc; /* # of chars from read() */
+ struct action *action = 0;
+- time_t previous_time;
++ time_t previous_time = 0;
+ time_t current_time;
+- int matchLen; /* # of chars matched */
++ int matchLen = 0; /* # of chars matched */
+ int skip; /* # of chars not involved in match */
+ int print; /* # of chars to print */
+ int oldprinted; /* old version of u->printed */
+ int change; /* if action requires cooked mode */
+ int attempt_match = TRUE;
+- struct input *soonest_input;
++ struct input *soonest_input = NULL;
+ int timeout; /* current as opposed to default_timeout */
+ Tcl_Time temp_time;
+
+--- a/exp_log.c
++++ b/exp_log.c
+@@ -90,6 +90,8 @@ expWriteBytesAndLogIfTtyU(esPtr,buf,lenChars)
+
+ if (esPtr->valid)
+ wc = expWriteCharsUni(esPtr,buf,lenChars);
++ else
++ wc = -1;
+
+ if (tsdPtr->logChannel && ((esPtr->fdout == 1) || expDevttyIs(esPtr))) {
+ Tcl_DString ds;
+--- a/exp_pty.c
++++ b/exp_pty.c
+@@ -135,7 +135,9 @@ int timeout;
+ }
+
+ static RETSIGTYPE (*oldAlarmHandler)();
++#ifndef O_NOCTTY
+ static RETSIGTYPE (*oldHupHandler)();
++#endif
+ static time_t current_time; /* time when testing began */
+
+ /* if TRUE, begin testing, else end testing */
+--- a/exp_trap.c
++++ b/exp_trap.c
+@@ -298,11 +298,10 @@ char *s;
+
+ /*ARGSUSED*/
+ int
+-Exp_TrapObjCmd(clientData, interp, objc, objv)
+-ClientData clientData;
+-Tcl_Interp *interp;
+-int objc;
+-Tcl_Obj *CONST objv[];
++Exp_TrapObjCmd(ClientData clientData,
++ Tcl_Interp *interp,
++ int objc,
++ Tcl_Obj *CONST objv[])
+ {
+ char *action = 0;
+ int n; /* number of signals in list */
+@@ -320,7 +319,9 @@ Tcl_Obj *CONST objv[];
+
+ objc--; objv++;
+
+- while (objc) {
++ if (objc <= 0) goto usage_error;
++
++ do {
+ arg = Tcl_GetString(*objv);
+
+ if (streq(arg,"-code")) {
+@@ -339,7 +340,7 @@ Tcl_Obj *CONST objv[];
+ objc--; objv++;
+ show_max = TRUE;
+ } else break;
+- }
++ } while(objc);
+
+ if (show_name || show_number || show_max) {
+ if (objc > 0) goto usage_error;
+--- a/exp_tty.c
++++ b/exp_tty.c
+@@ -585,18 +585,20 @@ Exp_SystemCmd(
+ int total_len = 0, arg_len;
+
+ int stty_args_recognized = TRUE;
+- int cmd_is_stty = FALSE;
++ int cmd_is_stty;
+ int cooked = FALSE;
+- int was_raw, was_echo;
++ const char *was_raw = "-raw", *was_echo = "-echo";
+
+ if (argc == 1) return TCL_OK;
+
+- if (streq(argv[1],"stty")) {
++ cmd_is_stty = streq(argv[1],"stty");
++ if (cmd_is_stty) {
+ expDiagLogU("system stty is deprecated, use stty\r\n");
+
+- cmd_is_stty = TRUE;
+- was_raw = exp_israw();
+- was_echo = exp_isecho();
++ if (exp_israw())
++ was_raw++;
++ if (exp_isecho())
++ was_echo++;
+ }
+
+ if (argc > 2 && cmd_is_stty) {
+@@ -635,11 +637,7 @@ Exp_SystemCmd(
+ return(TCL_ERROR);
+ }
+ if (cmd_is_stty) {
+- char buf [11];
+- sprintf(buf,"%sraw %secho",
+- (was_raw?"":"-"),
+- (was_echo?"":"-"));
+- Tcl_SetResult (interp, buf, TCL_VOLATILE);
++ Tcl_AppendResult (interp, was_raw, " ", was_echo, NULL);
+ }
+ return(TCL_OK);
+ }
+@@ -699,11 +697,7 @@ Exp_SystemCmd(
+ }
+
+ if (cmd_is_stty) {
+- char buf [11];
+- sprintf(buf,"%sraw %secho",
+- (was_raw?"":"-"),
+- (was_echo?"":"-"));
+- Tcl_SetResult (interp, buf, TCL_VOLATILE);
++ Tcl_AppendResult (interp, was_raw, " ", was_echo, NULL);
+ }
+
+ /* following macros stolen from Tcl's tclUnix.h file */
+--- a/exp_win.c
++++ b/exp_win.c
+@@ -78,9 +78,9 @@ typedef struct {
+ static exp_winsize winsize = {0, 0};
+ static exp_winsize win2size = {0, 0};
+
+-int exp_window_size_set(fd)
+-int fd;
++int exp_window_size_set(int fd)
+ {
++ return
+ #ifdef TIOCSWINSZ
+ ioctl(fd,TIOCSWINSZ,&winsize);
+ #endif
+@@ -89,9 +89,9 @@ int fd;
+ #endif
+ }
+
+-int exp_window_size_get(fd)
+-int fd;
++int exp_window_size_get(int fd)
+ {
++ return
+ #ifdef TIOCGWINSZ
+ ioctl(fd,TIOCGWINSZ,&winsize);
+ #endif
+@@ -105,8 +105,7 @@ int fd;
+ }
+
+ void
+-exp_win_rows_set(rows)
+-char *rows;
++exp_win_rows_set(const char *rows)
+ {
+ winsize.rows = atoi(rows);
+ exp_window_size_set(exp_dev_tty);
+@@ -122,8 +121,7 @@ exp_win_rows_get()
+ }
+
+ void
+-exp_win_columns_set(columns)
+-char *columns;
++exp_win_columns_set(const char *columns)
+ {
+ winsize.columns = atoi(columns);
+ exp_window_size_set(exp_dev_tty);
+@@ -142,8 +140,8 @@ exp_win_columns_get()
+ * separate copy of everything above - used for handling user stty requests
+ */
+
+-int exp_win2_size_set(fd)
+-int fd;
++static void
++exp_win2_size_set(int fd)
+ {
+ #ifdef TIOCSWINSZ
+ ioctl(fd,TIOCSWINSZ,&win2size);
+@@ -153,8 +151,8 @@ int fd;
+ #endif
+ }
+
+-int exp_win2_size_get(fd)
+-int fd;
++static void
++exp_win2_size_get(int fd)
+ {
+ #ifdef TIOCGWINSZ
+ ioctl(fd,TIOCGWINSZ,&win2size);
+@@ -165,9 +163,7 @@ int fd;
+ }
+
+ void
+-exp_win2_rows_set(fd,rows)
+-int fd;
+-char *rows;
++exp_win2_rows_set(int fd,const char *rows)
+ {
+ exp_win2_size_get(fd);
+ win2size.rows = atoi(rows);
+@@ -175,8 +171,7 @@ char *rows;
+ }
+
+ char*
+-exp_win2_rows_get(fd)
+-int fd;
++exp_win2_rows_get(int fd)
+ {
+ static char rows [20];
+ exp_win2_size_get(fd);
+@@ -189,9 +184,7 @@ int fd;
+ }
+
+ void
+-exp_win2_columns_set(fd,columns)
+-int fd;
+-char *columns;
++exp_win2_columns_set(int fd,const char *columns)
+ {
+ exp_win2_size_get(fd);
+ win2size.columns = atoi(columns);
+@@ -199,8 +192,7 @@ char *columns;
+ }
+
+ char*
+-exp_win2_columns_get(fd)
+-int fd;
++exp_win2_columns_get(int fd)
+ {
+ static char columns [20];
+ exp_win2_size_get(fd);
+--- a/exp_win.h
++++ b/exp_win.h
+@@ -11,12 +11,12 @@ would appreciate credit if you use this file or parts of it.
+ int exp_window_size_set();
+ int exp_window_size_get();
+
+-void exp_win_rows_set _ANSI_ARGS_ ((char* rows));
++void exp_win_rows_set _ANSI_ARGS_ ((const char* rows));
+ char* exp_win_rows_get _ANSI_ARGS_ ((void));
+-void exp_win_columns_set _ANSI_ARGS_ ((char* columns));
++void exp_win_columns_set _ANSI_ARGS_ ((const char* columns));
+ char* exp_win_columns_get _ANSI_ARGS_ ((void));
+
+-void exp_win2_rows_set _ANSI_ARGS_ ((int fd, char* rows));
++void exp_win2_rows_set _ANSI_ARGS_ ((int fd, const char* rows));
+ char* exp_win2_rows_get _ANSI_ARGS_ ((int fd));
+-void exp_win2_columns_set _ANSI_ARGS_ ((int fd, char* columns));
++void exp_win2_columns_set _ANSI_ARGS_ ((int fd, const char* columns));
+ char* exp_win2_columns_get _ANSI_ARGS_ ((int fd));
+--- a/expect.c
++++ b/expect.c
+@@ -2537,7 +2537,7 @@ Exp_ExpectObjCmd(
+ struct exp_state_list *state_list; /* list of ExpStates to watch */
+ struct exp_state_list *slPtr; /* temp for interating over state_list */
+ ExpState **esPtrs;
+- int mcount; /* number of esPtrs to watch */
++ int mcount = 0; /* number of esPtrs to watch */
+
+ struct eval_out eo; /* final case of interest */
+
+@@ -2546,7 +2546,7 @@ Exp_ExpectObjCmd(
+ time_t start_time_total; /* time at beginning of this procedure */
+ time_t start_time = 0; /* time when restart label hit */
+ time_t current_time = 0; /* current time (when we last looked)*/
+- time_t end_time; /* future time at which to give up */
++ time_t end_time = 0; /* future time at which to give up */
+
+ ExpState *last_esPtr; /* for differentiating when multiple f's */
+ /* to print out better debugging messages */
+@@ -2554,7 +2554,7 @@ Exp_ExpectObjCmd(
+ int first_time = 1; /* if not "restarted" */
+
+ int key; /* identify this expect command instance */
+- int configure_count; /* monitor exp_configure_count */
++ int configure_count = 0; /* monitor exp_configure_count */
+
+ int timeout; /* seconds */
+ int remtime; /* remaining time in timeout */
+@@ -2947,12 +2947,14 @@ process_di (
+ } else {
+ esPtr = expStateFromChannelName(interp,chan,0,0,0,(char*)cmd);
+ }
+- if (!esPtr) return(TCL_ERROR);
++ if (!esPtr)
++ return(TCL_ERROR);
++
++ *esOut = esPtr;
+ }
+
+ *at = i;
+ *Default = def;
+- *esOut = esPtr;
+ return TCL_OK;
+ }
+
+--- a/pty_termios.c
++++ b/pty_termios.c
+@@ -71,6 +71,14 @@ with openpty which supports 4000 while ptmx supports 60. */
+ #endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#if defined(HAVE_OPENPTY)
++#include <termios.h>
++#if defined(HAVE_LIBUTIL_H)
++#include <libutil.h>
++#else
++#include <pty.h>
++#endif
++#endif
+
+ #ifdef NO_STDLIB_H
+ #include "../compat/stdlib.h"
+@@ -381,11 +389,14 @@ exp_init_pty()
+ int
+ exp_getptymaster()
+ {
++#if !defined(HAVE_CONVEX_GETPTY) && !defined(HAVE_PTYM) && !defined(HAVE_SCO_CLIST_PTYS) && defined(TEST_PTY)
+ char *hex, *bank;
+- struct stat stat_buf;
++#endif
+ int master = -1;
+ int slave = -1;
++#ifdef HAVE_SCO_CLIST_PTYS
+ int num;
++#endif
+
+ exp_pty_error = 0;
+
+@@ -438,6 +449,7 @@ exp_getptymaster()
+ master = open("/dev/ptc", O_RDWR);
+ if (master >= 0) {
+ int ptynum;
++ struct stat stat_buf;
+
+ if (fstat(master, &stat_buf) < 0) {
+ close(master);
+@@ -644,8 +656,10 @@ exp_getptyslave(
+ int ttyinit,
+ CONST char *stty_args)
+ {
+- int slave, slave2;
++ int slave;
++#if defined(HAVE_PTMX_BSD)
+ char buf[10240];
++#endif
+
+ if (0 > (slave = open(slave_name, O_RDWR))) {
+ static char buf[500];
diff --git a/dev-tcltk/expect/files/expect-5.45.4-configure-clang16.patch b/dev-tcltk/expect/files/expect-5.45.4-configure-clang16.patch
new file mode 100644
index 000000000000..5d40e5ddf684
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45.4-configure-clang16.patch
@@ -0,0 +1,223 @@
+From 4c3a5051aa9706eea42dab31f9e121d975c08521 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 17 Nov 2022 20:20:45 +0000
+Subject: [PATCH] Fix configure with clang 16
+
+Bug: https://bugs.gentoo.org/881687
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.in
++++ b/configure.in
+@@ -454,7 +454,7 @@ AC_CHECK_FUNC(siglongjmp, AC_DEFINE(HAVE_SIGLONGJMP))
+ # because Unixware 2.0 handles it specially and refuses to compile
+ # autoconf's automatic test that is a call with no arguments
+ AC_MSG_CHECKING([for memcpy])
+-AC_TRY_LINK(,[
++AC_TRY_LINK([#include <string.h>],[
+ char *s1, *s2;
+ memcpy(s1,s2,0);
+ ],
+@@ -471,7 +471,7 @@ memcpy(s1,s2,0);
+ AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
+ AC_TRY_RUN([
+ #include <sys/wait.h>
+-main() {
++int main(void) {
+ #ifndef WNOHANG
+ return 0;
+ #else
+@@ -491,7 +491,7 @@ rm -rf wnohang
+ AC_TRY_RUN([
+ #include <stdio.h>
+ #include <sys/wait.h>
+-main() {
++int main(void) {
+ #ifdef WNOHANG
+ FILE *fp = fopen("wnohang","w");
+ fprintf(fp,"%d",WNOHANG);
+@@ -540,24 +540,23 @@ dnl AC_HEADER_EGREP([(void|sighandler_t).*signal], signal.h, retsigtype=void,AC_
+ AC_MSG_CHECKING([if signals need to be re-armed])
+ AC_TRY_RUN([
+ #include <signal.h>
+-#define RETSIGTYPE $retsigtype
+-
++#include <stdlib.h>
++#include <sys/wait.h>
++#include <unistd.h>
+ int signal_rearms = 0;
+
+ RETSIGTYPE
+-child_sigint_handler(n)
+-int n;
++child_sigint_handler(int n)
+ {
+ }
+
+ RETSIGTYPE
+-parent_sigint_handler(n)
+-int n;
++parent_sigint_handler(int n)
+ {
+ signal_rearms++;
+ }
+
+-main()
++int main(void)
+ {
+ signal(SIGINT,parent_sigint_handler);
+
+@@ -719,7 +718,8 @@ fi
+ AC_MSG_CHECKING([for struct sgttyb])
+ AC_TRY_RUN([
+ #include <sgtty.h>
+-main()
++#include <stdlib.h>
++int main(void)
+ {
+ struct sgttyb tmp;
+ exit(0);
+@@ -745,7 +745,8 @@ if test $mach -eq 0 ; then
+ # pty_termios.c is set up to handle pty_termio.
+ AC_MSG_CHECKING([for struct termio])
+ AC_TRY_RUN([#include <termio.h>
+- main()
++ #include <stdlib.h>
++ int main(void)
+ {
+ struct termio tmp;
+ exit(0);
+@@ -769,7 +770,8 @@ if test $mach -eq 0 ; then
+ # include <inttypes.h>
+ # endif
+ # include <termios.h>
+- main()
++# include <stdlib.h>
++ int main(void)
+ {
+ struct termios tmp;
+ exit(0);
+@@ -793,7 +795,7 @@ AC_TRY_RUN([
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++int main(void) {
+ #if defined(TCGETS) || defined(TCGETA)
+ return 0;
+ #else
+@@ -815,7 +817,7 @@ AC_TRY_RUN([
+ #include <inttypes.h>
+ #endif
+ #include <termios.h>
+-main() {
++int main(void) {
+ #ifdef TIOCGWINSZ
+ return 0;
+ #else
+@@ -834,7 +836,7 @@ main() {
+ AC_MSG_CHECKING([for Cray-style ptys])
+ SETUID=":"
+ AC_TRY_RUN([
+-main(){
++int main(void) {
+ #ifdef CRAY
+ return 0;
+ #else
+@@ -887,9 +889,10 @@ AC_FUNC_SETPGRP
+ #
+ AC_MSG_CHECKING([for SV-style timezone])
+ AC_TRY_RUN([
++#include <stdlib.h>
+ extern char *tzname[2];
+ extern int daylight;
+-main()
++int main(void)
+ {
+ int *x = &daylight;
+ char **y = tzname;
+--- a/tclconfig/tcl.m4
++++ b/tclconfig/tcl.m4
+@@ -2029,7 +2029,7 @@ AC_DEFUN([TEA_SERIAL_PORT], [
+ AC_TRY_RUN([
+ #include <termios.h>
+
+-int main() {
++int main(void) {
+ struct termios t;
+ if (tcgetattr(0, &t) == 0) {
+ cfsetospeed(&t, 0);
+@@ -2042,7 +2042,7 @@ int main() {
+ AC_TRY_RUN([
+ #include <termio.h>
+
+-int main() {
++int main(void) {
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0) {
+ t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
+@@ -2055,7 +2055,7 @@ int main() {
+ AC_TRY_RUN([
+ #include <sgtty.h>
+
+-int main() {
++int main(void) {
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0) {
+ t.sg_ospeed = 0;
+@@ -2070,7 +2070,7 @@ int main() {
+ #include <termios.h>
+ #include <errno.h>
+
+-int main() {
++int main(void) {
+ struct termios t;
+ if (tcgetattr(0, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+@@ -2086,7 +2086,7 @@ int main() {
+ #include <termio.h>
+ #include <errno.h>
+
+-int main() {
++int main(void) {
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+@@ -2101,7 +2101,7 @@ int main() {
+ #include <sgtty.h>
+ #include <errno.h>
+
+-int main() {
++int main(void) {
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+@@ -2392,7 +2392,9 @@ AC_DEFUN([TEA_TIME_HANDLER], [
+ # (like convex) have timezone functions, etc.
+ #
+ AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
+- AC_TRY_COMPILE([#include <time.h>],
++ AC_TRY_COMPILE([#include <time.h>
++ #include <stdlib.h>
++ ],
+ [extern long timezone;
+ timezone += 1;
+ exit (0);],
+@@ -2404,7 +2406,9 @@ AC_DEFUN([TEA_TIME_HANDLER], [
+ # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+ #
+ AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
+- AC_TRY_COMPILE([#include <time.h>],
++ AC_TRY_COMPILE([#include <time.h>
++ #include <stdlib.h>
++ ],
+ [extern time_t timezone;
+ timezone += 1;
+ exit (0);],
+@@ -2441,7 +2445,7 @@ AC_DEFUN([TEA_BUGGY_STRTOD], [
+ AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
+ AC_TRY_RUN([
+ extern double strtod();
+- int main() {
++ int main(void) {
+ char *infString="Inf", *nanString="NaN", *spaceString=" ";
+ char *term;
+ double value;
diff --git a/dev-tcltk/expect/files/expect-5.45.4-configure-in.patch b/dev-tcltk/expect/files/expect-5.45.4-configure-in.patch
new file mode 100644
index 000000000000..8c05205bf5ae
--- /dev/null
+++ b/dev-tcltk/expect/files/expect-5.45.4-configure-in.patch
@@ -0,0 +1,113 @@
+Allow cross compiling.
+
+Signed-off-by: Anders Roxell <anders.roxell@enea.com>
+Upstream-Status: Pending
+
+Patch source:
+https://github.com/openembedded/openembedded-core/blob/bb87788832ad64079609e4f554e4d55a14f0aa94/meta/recipes-devtools/expect/expect/0001-configure.in.patch
+
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+diff -uNr a/configure.in b/configure.in
+--- a/configure.in 2012-12-14 15:31:32.623180450 +0100
++++ b/configure.in 2012-12-14 15:53:34.518233519 +0100
+@@ -481,7 +481,7 @@
+ ,
+ AC_MSG_RESULT(no)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_MSG_RESULT(no)
+ )
+
+ AC_MSG_CHECKING([if any value exists for WNOHANG])
+@@ -506,7 +506,9 @@
+ AC_MSG_RESULT(no)
+ AC_DEFINE(WNOHANG_BACKUP_VALUE, 1)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_MSG_RESULT(yes)
++ AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`)
++ rm -f wnohang
+ )
+
+ #
+@@ -574,7 +576,8 @@
+ AC_DEFINE(REARM_SIG)
+ ,
+ AC_MSG_RESULT(no)
+-, AC_MSG_WARN([Expect can't be cross compiled])
++,
++ AC_MSG_RESULT(no)
+ )
+
+ # HPUX7 has trouble with the big cat so split it
+@@ -725,7 +728,9 @@
+ ,
+ AC_MSG_RESULT(no)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_SGTTYB)
++ PTY_TYPE=sgttyb
+ )
+
+ # mach systems have include files for unimplemented features
+@@ -749,7 +754,9 @@
+ ,
+ AC_MSG_RESULT(no)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_DEFINE(HAVE_TERMIO)
++ PTY_TYPE=termios
++ AC_MSG_RESULT(yes)
+ )
+
+ # now check for the new style ttys (not yet posix)
+@@ -771,7 +778,9 @@
+ ,
+ AC_MSG_RESULT(no)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_DEFINE(HAVE_TERMIOS)
++ PTY_TYPE=termios
++ AC_MSG_RESULT(yes)
+ )
+ fi
+
+@@ -794,7 +803,7 @@
+ ,
+ AC_MSG_RESULT(no)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_MSG_RESULT(no)
+ )
+
+ AC_MSG_CHECKING([if TIOCGWINSZ in termios.h])
+@@ -816,7 +825,7 @@
+ ,
+ AC_MSG_RESULT(no)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_MSG_RESULT(no)
+ )
+
+ # finally check for Cray style ttys
+@@ -837,7 +846,7 @@
+ ,
+ AC_MSG_RESULT(no)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_MSG_RESULT(no)
+ )
+
+ #
+@@ -889,7 +898,8 @@
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ ,
+- AC_MSG_ERROR([Expect can't be cross compiled])
++ AC_DEFINE(HAVE_SV_TIMEZONE)
++ AC_MSG_RESULT(yes),
+ )
+
+
diff --git a/dev-tcltk/expect/metadata.xml b/dev-tcltk/expect/metadata.xml
index 67378c136485..8b51c5171249 100644
--- a/dev-tcltk/expect/metadata.xml
+++ b/dev-tcltk/expect/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>tcltk@gentoo.org</email>