diff --git a/programming/language/expect/actions.py b/programming/language/expect/actions.py new file mode 100644 index 0000000000..5db4249b6f --- /dev/null +++ b/programming/language/expect/actions.py @@ -0,0 +1,46 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import get + +libname = "libexpect.so.%s" % get.srcVERSION() +majorVersion = tuple(get.srcVERSION().split(".")[:2]) + +def setup(): + #pisitools.dosed("expect.man", "/usr/local/bin", "/usr/bin") + #pisitools.dosed("expectk.man", "/usr/local/bin", "/usr/bin") + + pisitools.dosed("Makefile.in", "^install: .*", "install: all install-binaries install-doc") + pisitools.dosed("Makefile.in", "^(SCRIPTS_MANPAGES = .*)$", "_\\1") + + autotools.autoconf() + + shelltools.export("CFLAGS","%s -D_BSD_SOURCE" % get.CFLAGS()) + autotools.configure("--with-tcl=/usr/lib \ + --with-tclinclude=/usr/include \ + --without-x \ + --with-tk=no \ + --enable-shared") + +def build(): + autotools.make("SONAME=%s" % libname) + +def install(): + autotools.rawInstall('DESTDIR="%s"' % get.installDIR()) + + pisitools.domove("/usr/lib/expect%s/libexpect%s.so" % (get.srcVERSION(), get.srcVERSION()), "/usr/lib/", libname) + + pisitools.rename("/usr/lib/expect%s" % get.srcVERSION(), "expect%s.%s" % majorVersion) + + #pisitools.dosym(libname, "/usr/lib/libexpect.so.%s.%s" % majorVersion) + pisitools.dosym(libname, "/usr/lib/libexpect%s.so" % get.srcVERSION()) + pisitools.dosym(libname, "/usr/lib/libexpect.so.%s" % majorVersion[0]) + pisitools.dosym(libname, "/usr/lib/libexpect.so") + + pisitools.dodoc("FAQ", "ChangeLog", "NEWS", "README", "HISTORY") diff --git a/programming/language/expect/files/expect-5.43.0-fixformatsecurity.patch b/programming/language/expect/files/expect-5.43.0-fixformatsecurity.patch new file mode 100644 index 0000000000..b5c98e5917 --- /dev/null +++ b/programming/language/expect/files/expect-5.43.0-fixformatsecurity.patch @@ -0,0 +1,27 @@ +From 200f54ec3498c9d53c530b863ee43b42ff258fea Mon Sep 17 00:00:00 2001 +From: Frederic Crozat +Date: Thu, 5 Mar 2009 11:44:35 +0100 +Subject: [PATCH] Fix format security + +--- + exp_clib.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/exp_clib.c b/exp_clib.c +index 79e6309..1ae6073 100644 +--- a/exp_clib.c ++++ b/exp_clib.c +@@ -1936,8 +1936,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); + } + } + +-- +1.6.1.3 + diff --git a/programming/language/expect/files/expect-5.44.1.15-ldflags.patch b/programming/language/expect/files/expect-5.44.1.15-ldflags.patch new file mode 100644 index 0000000000..be3641c210 --- /dev/null +++ b/programming/language/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/programming/language/expect/files/expect-fedora-5.32.2-random.patch b/programming/language/expect/files/expect-fedora-5.32.2-random.patch new file mode 100644 index 0000000000..94afc42a6a --- /dev/null +++ b/programming/language/expect/files/expect-fedora-5.32.2-random.patch @@ -0,0 +1,19 @@ +diff -up expect-5.43/example/mkpasswd.random expect-5.43/example/mkpasswd +--- expect-5.43/example/mkpasswd.random 2004-12-07 00:38:21.000000000 +0100 ++++ expect-5.43/example/mkpasswd 2008-09-25 12:27:19.000000000 +0200 +@@ -92,7 +92,14 @@ proc insert {pvar char} { + } + + proc rand {m} { +- expr {int($m*rand())} ++ set device /dev/urandom ;# /dev/random can block ++ set fileId [open $device r] ++ binary scan [read $fileId 4] i1 number ++ set clipped [expr $number % $m] ++# puts "number is $number" ++# puts "clipped is $clipped" ++ close $fileId ++ return $clipped + } + + # choose left or right starting hand diff --git a/programming/language/expect/files/expect-fedora-5.43.0-log_file.patch b/programming/language/expect/files/expect-fedora-5.43.0-log_file.patch new file mode 100644 index 0000000000..4e1c5dacf8 --- /dev/null +++ b/programming/language/expect/files/expect-fedora-5.43.0-log_file.patch @@ -0,0 +1,12 @@ +diff -up expect-5.43/exp_log.c.log_file expect-5.43/exp_log.c +--- expect-5.43/exp_log.c.log_file 2004-08-18 22:54:35.000000000 +0200 ++++ expect-5.43/exp_log.c 2008-09-25 12:24:42.000000000 +0200 +@@ -471,7 +471,7 @@ expLogChannelOpen(interp,filename,append + Tcl_DStringAppend(&tsdPtr->logFilename,filename,-1); + } + +- tsdPtr->logChannel = Tcl_OpenFileChannel(interp,newfilename,mode,0777); ++ tsdPtr->logChannel = Tcl_OpenFileChannel(interp,newfilename,mode,0666); + if (!tsdPtr->logChannel) { + Tcl_DStringFree(&tsdPtr->logFilename); + return TCL_ERROR; diff --git a/programming/language/expect/pspec.xml b/programming/language/expect/pspec.xml new file mode 100644 index 0000000000..895d9b8325 --- /dev/null +++ b/programming/language/expect/pspec.xml @@ -0,0 +1,50 @@ + + + + + expect + https://core.tcl-lang.org/expect/index + + Kamil Atlı + suvari@pisilinux.org + + BSD + app:console + library + A tool for automating interactive applications + Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications. + mirrors://sourceforge/expect/Expect/5.45.4/expect5.45.4.tar.gz + + tcl-devel + + + expect-5.44.1.15-ldflags.patch + expect-5.43.0-fixformatsecurity.patch + expect-fedora-5.32.2-random.patch + expect-fedora-5.43.0-log_file.patch + + + + + expect + + tcl + + + /usr/bin + /usr/lib + /usr/share/man + /usr/share/doc + + + + + + 2022-05-01 + 5.45.4 + First release + Kamil Atlı + suvari@pisilinux.org + + + diff --git a/programming/language/expect/translations.xml b/programming/language/expect/translations.xml new file mode 100644 index 0000000000..fd09a75329 --- /dev/null +++ b/programming/language/expect/translations.xml @@ -0,0 +1,8 @@ + + + + expect + İnteraktif uygulamaları otomatikleştirmek için kullanılan bir araç. + Outil pour automatiser les applications interactives + +