dev-tcltk/expect: Version bump to 5.45.4
authorTupone Alfredo <tupone@gentoo.org>
Wed, 26 Sep 2018 17:07:27 +0000 (19:07 +0200)
committerTupone Alfredo <tupone@gentoo.org>
Wed, 26 Sep 2018 17:07:27 +0000 (19:07 +0200)
Closes: https://bugs.gentoo.org/607106
Package-Manager: Portage-2.3.49, Repoman-2.3.10

dev-tcltk/expect/Manifest
dev-tcltk/expect/expect-5.45.4.ebuild [new file with mode: 0644]
dev-tcltk/expect/files/expect-5.45.4-examples.patch [new file with mode: 0644]

index 12480be8f294c01f62ec849065d94172d56e93b1..5334acf4f518697c5293e98e5e85a817dc9e6141 100644 (file)
@@ -1 +1,2 @@
+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.ebuild b/dev-tcltk/expect/expect-5.45.4.ebuild
new file mode 100644 (file)
index 0000000..7f54026
--- /dev/null
@@ -0,0 +1,80 @@
+# 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
+               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.4-examples.patch b/dev-tcltk/expect/files/expect-5.45.4-examples.patch
new file mode 100644 (file)
index 0000000..10de882
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/Makefile.in      2018-09-26 15:59:09.049279363 +0200
++++ b/Makefile.in      2018-09-26 16:00:00.514427553 +0200
+@@ -32,16 +32,12 @@
+ # SCRIPTS is a target. If this is a problem, just comment out the
+ # SCRIPTS target itself.
+-SCRIPTS = timed-run timed-read ftp-rfc autopasswd lpunlock weather \
+-      passmass rftp kibitz rlogin-cwd xpstat tkpasswd dislocate xkibitz \
+-      tknewsbiff unbuffer mkpasswd cryptdir decryptdir autoexpect \
+-      multixterm
++SCRIPTS = unbuffer
+ # A couple of the scripts have man pages of their own.
+ # You can delete these too if you don't want'em.
+-SCRIPTS_MANPAGES = kibitz dislocate xkibitz tknewsbiff unbuffer mkpasswd \
+-      passmass cryptdir decryptdir autoexpect multixterm
++SCRIPTS_MANPAGES = unbuffer
+ # allow us to handle null list gracefully, "end_of_list" should not exist