[92644] trunk/dports/devel/expect

ryandesign at macports.org ryandesign at macports.org
Wed May 2 16:48:18 PDT 2012


Revision: 92644
          https://trac.macports.org/changeset/92644
Author:   ryandesign at macports.org
Date:     2012-05-02 16:48:17 -0700 (Wed, 02 May 2012)
Log Message:
-----------
expect: fix "can't find package Expect while executing 'package require Expect'"; see #31225

Modified Paths:
--------------
    trunk/dports/devel/expect/Portfile

Added Paths:
-----------
    trunk/dports/devel/expect/files/
    trunk/dports/devel/expect/files/patch-example.diff

Modified: trunk/dports/devel/expect/Portfile
===================================================================
--- trunk/dports/devel/expect/Portfile	2012-05-02 23:47:46 UTC (rev 92643)
+++ trunk/dports/devel/expect/Portfile	2012-05-02 23:48:17 UTC (rev 92644)
@@ -5,7 +5,7 @@
 name			expect
 conflicts		whois
 version			5.45
-revision		2
+revision		3
 platforms		darwin
 categories		devel
 maintainers		markd openmaintainer
@@ -42,6 +42,20 @@
 
 depends_lib		port:tcl
 
+post-patch {
+	# For each example that gets installed in ${prefix}/bin, fix its
+	# shebang (#!) line to directly run expect (why not?) to fix
+	# "can't find package Expect while executing 'package require Expect'"
+	foreach example {autoexpect autopasswd cryptdir decryptdir dislocate \
+		ftp-rfc kibitz lpunlock mkpasswd multixterm passmass rftp \
+		rlogin-cwd timed-read timed-run tknewsbiff tkpasswd unbuffer \
+		weather xkibitz xpstat} {
+		set file ${worksrcpath}/example/${example}
+		system "patch ${file} < ${filespath}/patch-example.diff"
+		reinplace "s|@PREFIX@|${prefix}|g" ${file}
+	}
+}
+
 configure.cflags	"-I${workpath}/tcl${tclv}/generic -I${workpath}/tcl${tclv}/unix"
 configure.args		--disable-shared \
 			--mandir=${prefix}/share/man \

Added: trunk/dports/devel/expect/files/patch-example.diff
===================================================================
--- trunk/dports/devel/expect/files/patch-example.diff	                        (rev 0)
+++ trunk/dports/devel/expect/files/patch-example.diff	2012-05-02 23:48:17 UTC (rev 92644)
@@ -0,0 +1,9 @@
+--- foo.orig	2010-08-27 16:51:53.000000000 -0500
++++ foo	2012-05-02 18:34:25.000000000 -0500
+@@ -1,5 +1,2 @@
+-#!/bin/sh
+-# -*- tcl -*-
+-# The next line is executed by /bin/sh, but not tcl \
+-exec tclsh "$0" ${1+"$@"}
++#!@PREFIX@/bin/expect
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120502/a9b6bb81/attachment.html>


More information about the macports-changes mailing list