On Wed, Oct 10, 2012 at 02:30:17AM -0400, Stuart Cassoff wrote: > On 04/30/12 17:14, Matthieu Herrb wrote: > > On Mon, Apr 30, 2012 at 02:50:27PM -0400, Stuart Cassoff wrote: > >> On 04/28/12 18:04, Matthieu Herrb wrote: > >>> ok? > >> > >> Here's a patch that works like yours, but slightly different. > >> Installing into ${MODTCL_TCLDIR} allows using it as a Tcl package. > >> > > Your version is less intrusive than mine. I like it better. Please > > commit (with or without the patch above). > > Latest. Tested on i386 and amd64.
It's been a while... ok matthieu@ > > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/lang/eltclsh/Makefile,v > retrieving revision 1.24 > diff -u -p -r1.24 Makefile > --- Makefile 28 Apr 2012 20:20:15 -0000 1.24 > +++ Makefile 10 Oct 2012 06:15:19 -0000 > @@ -2,8 +2,7 @@ > > COMMENT = Libedit interface to Tcl/Tk interpreters > > -DISTNAME = eltclsh-1.9 > -REVISION= 6 > +DISTNAME = eltclsh-1.12 > CATEGORIES = lang x11 > > MASTER_SITES = http://www.openrobots.org/distfiles/eltclsh/ > @@ -19,22 +18,31 @@ PERMIT_DISTFILES_CDROM = Yes > PERMIT_DISTFILES_FTP = Yes > > MODULES += x11/tk > -WANTLIB += X11 Xau Xdmcp Xext Xft Xrender Xss c edit expat fontconfig > -WANTLIB += freetype m pthread-stubs termcap xcb z > +WANTLIB += X11 Xext Xft Xrender Xss c edit expat fontconfig freetype > +WANTLIB += m termcap xcb z > > SEPARATE_BUILD = Yes > CONFIGURE_STYLE = gnu > + > CONFIGURE_ARGS = --with-tcl=${MODTCL_LIBDIR} \ > - --with-tk=${MODTK_LIBDIR} > -CONFIGURE_ENV = MKDEP=/bin/false > + --with-tk=${MODTK_LIBDIR} \ > + --libdir=\$${prefix}/lib/tcl \ > + --datadir=\$${prefix}/lib/tcl > + > USE_GMAKE = Yes > USE_LIBTOOL = Yes > -FAKE_FLAGS = "ELTCL_LIBRARY=${WRKINST}${PREFIX}/share/eltcl" > +FAKE_FLAGS = ELTCL_LIBRARY=${WRKINST}${MODTCL_TCLDIR}/eltcl > > NO_REGRESS = Yes > > LIB_DEPENDS += ${MODTK_LIB_DEPENDS} > > WANTLIB += ${MODTK_WANTLIB} > + > +post-install: > + rm ${WRKINST}${MODTCL_TCLDIR}/eltcl/libeltclsh.la > + rm ${WRKINST}${MODTCL_TCLDIR}/eltcl/libeltclsh.a > + rm ${WRKINST}${MODTCL_TCLDIR}/pkgconfig/eltclsh.pc > + rmdir ${WRKINST}${MODTCL_TCLDIR}/pkgconfig > > .include <bsd.port.mk> > Index: distinfo > =================================================================== > RCS file: /cvs/ports/lang/eltclsh/distinfo,v > retrieving revision 1.6 > diff -u -p -r1.6 distinfo > --- distinfo 30 Aug 2008 13:54:57 -0000 1.6 > +++ distinfo 10 Oct 2012 06:15:19 -0000 > @@ -1,5 +1,2 @@ > -MD5 (eltclsh-1.9.tar.gz) = /kN/So5a0QIZd42sYIa9XA== > -RMD160 (eltclsh-1.9.tar.gz) = i+4CiLxFiEW1OEJyFk30ji5+CwM= > -SHA1 (eltclsh-1.9.tar.gz) = TIX8aSfD/ENZMW6SZUYKh0eXKg0= > -SHA256 (eltclsh-1.9.tar.gz) = jzPI91FKVdQB8Tv0OdBGVc0GeMdbdsnvcRKXK74R0cY= > -SIZE (eltclsh-1.9.tar.gz) = 342659 > +SHA256 (eltclsh-1.12.tar.gz) = 75GlppHX8BQ+hsez2tlw30WPGqPNhqo8evKx0QE6TGk= > +SIZE (eltclsh-1.12.tar.gz) = 244359 > Index: patches/patch-Makefile_in > =================================================================== > RCS file: patches/patch-Makefile_in > diff -N patches/patch-Makefile_in > --- patches/patch-Makefile_in 23 Oct 2010 21:49:06 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,21 +0,0 @@ > -$OpenBSD: patch-Makefile_in,v 1.1 2010/10/23 21:49:06 naddy Exp $ > ---- Makefile.in.orig Sat Oct 23 19:50:38 2010 > -+++ Makefile.in Sat Oct 23 19:51:16 2010 > -@@ -65,7 +65,7 @@ all depends: $(config_files) $(config_headers) doc > - clean: > - $(make_subdirs) > - > --install: $(config_files) install-doc install-catdoc > -+install: $(config_files) install-doc > - $(make_subdirs) > - > - > -@@ -74,7 +74,7 @@ install: $(config_files) install-doc install-catdoc > - MAN= eltclsh.1 > - CATMAN= ${MAN:=.cat} > - > --doc: ${CATMAN} > -+doc: > - > - %.cat: % > - @if test "X${GROFF}" != "X"; then \ > Index: patches/patch-configure > =================================================================== > RCS file: patches/patch-configure > diff -N patches/patch-configure > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-configure 10 Oct 2012 06:15:19 -0000 > @@ -0,0 +1,11 @@ > +$OpenBSD$ > +--- configure.orig Mon Apr 30 12:41:06 2012 > ++++ configure Mon Apr 30 12:41:39 2012 > +@@ -11462,6 +11462,7 @@ $as_echo "$as_me: tk support not found/disabled" > >&6;} > + file=${tk_prefix}/tkConfig.sh > + . $file > + eval TK_INCLUDE_SPEC="\"${TK_INCLUDE_SPEC} ${TK_XINCLUDES}\"" > ++ eval TK_LIB_SPEC="\"${TK_LIB_SPEC} ${TK_LIBS}\"" > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tk headers" >&5 > + $as_echo_n "checking for tk headers... " >&6; } > Index: patches/patch-src_Makefile_in > =================================================================== > RCS file: patches/patch-src_Makefile_in > diff -N patches/patch-src_Makefile_in > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-src_Makefile_in 10 Oct 2012 06:15:19 -0000 > @@ -0,0 +1,12 @@ > +$OpenBSD$ > +--- src/Makefile.in.orig Tue Oct 9 01:01:16 2012 > ++++ src/Makefile.in Tue Oct 9 01:01:38 2012 > +@@ -104,7 +104,7 @@ $(ELWISH): $(elwishobjs) $(commonobjs) > + # > + lib$(ELPKG).la: $(pkgobjs) > + $(LTLD) -avoid-version -o $@ $(CFLAGS) $(pkgobjs) \ > +- $(addprefix -XCClinker ,$(TCLSTUB_LDFLAGS)) \ > ++ $(TCLSTUB_LDFLAGS) \ > + -rpath $(datadir) $(LDFLAGS) $(EL_LDFLAGS) > + > + # object files > Index: patches/patch-src_elwish_c > =================================================================== > RCS file: /cvs/ports/lang/eltclsh/patches/patch-src_elwish_c,v > retrieving revision 1.2 > diff -u -p -r1.2 patch-src_elwish_c > --- patches/patch-src_elwish_c 3 Apr 2004 09:30:22 -0000 1.2 > +++ patches/patch-src_elwish_c 10 Oct 2012 06:15:19 -0000 > @@ -1,13 +1,12 @@ > $OpenBSD: patch-src_elwish_c,v 1.2 2004/04/03 09:30:22 matthieu Exp $ > ---- src/elwish.c.orig 2003-09-27 19:14:21.000000000 +0200 > -+++ src/elwish.c 2004-04-03 11:23:11.000000000 +0200 > -@@ -77,9 +77,6 @@ elWishAppInit(ElTclInterpInfo *iinfo) > +--- src/elwish.c.orig Thu Jun 16 11:17:42 2011 > ++++ src/elwish.c Mon Apr 30 14:32:18 2012 > +@@ -74,8 +74,6 @@ elWishAppInit(Tcl_Interp *interp) > /* change the rc file */ > - Tcl_SetVar(iinfo->interp, "tcl_rcFileName", ".elwishrc", > TCL_GLOBAL_ONLY); > + Tcl_SetVar(interp, "tcl_rcFileName", "~/.elwishrc", TCL_GLOBAL_ONLY); > > - /* I hate that stupid empty window you get after Tk_Init() */ > -- Tcl_Eval(iinfo->interp, "wm withdraw ."); > -- > +- Tcl_Eval(interp, "wm withdraw ."); > + > return TCL_OK; > } > - > Index: patches/patch-src_loop_c > =================================================================== > RCS file: patches/patch-src_loop_c > diff -N patches/patch-src_loop_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-src_loop_c 10 Oct 2012 06:15:19 -0000 > @@ -0,0 +1,30 @@ > +$OpenBSD$ > + > +Adjust for OpenBSD-specific Tcl package path layout. > + > +--- src/loop.c.orig Wed Oct 10 01:35:23 2012 > ++++ src/loop.c Wed Oct 10 01:37:23 2012 > +@@ -57,7 +57,7 @@ elTclshLoop(int argc, char **argv, ElTclAppInitProc ap > + #endif /* TCL_VERSION */ > + { > + Tcl_Interp *interp; > +- Tcl_Obj *resultPtr, *obj; > ++ Tcl_Obj *resultPtr; > + #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 4 > + const > + #endif > +@@ -106,12 +106,14 @@ elTclshLoop(int argc, char **argv, ElTclAppInitProc ap > + } > + > + /* configure standard path for packages */ > ++/* > + obj = Tcl_GetVar2Ex(interp, "auto_path", NULL, TCL_GLOBAL_ONLY); > + if (!obj) obj = Tcl_NewListObj(0, NULL); > + > + Tcl_ListObjAppendElement(interp, obj, Tcl_NewStringObj(ELTCLSH_DATA, > -1)); > + Tcl_SetVar2Ex(interp, "auto_path", NULL, obj, TCL_GLOBAL_ONLY); > + > ++*/ > + > + /* require eltclsh extension. In case this fails (typically during > install, > + * before pkgIndex.tcl is built), print the error message but don't give > up > Index: patches/patch-tcl_init_tcl > =================================================================== > RCS file: patches/patch-tcl_init_tcl > diff -N patches/patch-tcl_init_tcl > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-tcl_init_tcl 10 Oct 2012 06:15:19 -0000 > @@ -0,0 +1,38 @@ > +$OpenBSD$ > + > +Adjust for OpenBSD-specific Tcl package path layout. > + > +--- tcl/init.tcl.orig Thu Jun 16 11:17:42 2011 > ++++ tcl/init.tcl Wed Oct 10 01:40:07 2012 > +@@ -30,10 +30,24 @@ > + # > + > + # Make packages in that directory available > +-eval lappend auto_path $eltcl_pkgPath > ++set na {} > ++foreach p $auto_path { > ++ lappend na [file normalize $p] > ++} > ++foreach p $eltcl_pkgPath { > ++ if {[set np [file normalize $p]] ni $na} { > ++ lappend auto_path $p > ++ lappend na $np > ++ } > ++} > + if { [info exists env(ELTCLLIBPATH)] } { > +- eval lappend auto_path $env(ELTCLLIBPATH) > ++ foreach p $env(ELTCLLIBPATH) { > ++ if {[file normalize $p] ni $na} { > ++ lappend auto_path $p > ++ } > ++ } > + } > ++unset na p np > + > + # Install default signal handlers (if the signal command exists) > + if { [info command signal] != "" } { namespace eval el { > +@@ -82,3 +96,4 @@ if {[info exists ::argv]} { > + unset i > + catch { unset pkgname } > + } > ++unset m > Index: pkg/DESCR > =================================================================== > RCS file: /cvs/ports/lang/eltclsh/pkg/DESCR,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 DESCR > --- pkg/DESCR 29 Dec 2003 11:24:57 -0000 1.1.1.1 > +++ pkg/DESCR 10 Oct 2012 06:15:19 -0000 > @@ -1,9 +1,9 @@ > -eltclsh (editline tcl shell) is an interactive shell for the TCL > +eltclsh (editline tcl shell) is an interactive shell for the Tcl > programming language. It provides command line editing, history > browsing as well as variables and command completion thanks to > editline features. The completion engine is programmable in a way > -similar to tcsh, and comes with an intelligent completion for the full > -tcl language by default. > +similar to tcsh, and comes with an intelligent completion for the > +full Tcl language by default. > > The package also provides elwish, an interactive interpreter for the > Tk toolkit. > Index: pkg/PFRAG.shared > =================================================================== > RCS file: pkg/PFRAG.shared > diff -N pkg/PFRAG.shared > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/PFRAG.shared 10 Oct 2012 06:15:19 -0000 > @@ -0,0 +1,2 @@ > +@comment $OpenBSD$ > +lib/tcl/eltcl/libeltclsh.so > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/lang/eltclsh/pkg/PLIST,v > retrieving revision 1.4 > diff -u -p -r1.4 PLIST > --- pkg/PLIST 23 Oct 2010 21:49:06 -0000 1.4 > +++ pkg/PLIST 10 Oct 2012 06:15:19 -0000 > @@ -1,9 +1,11 @@ > @comment $OpenBSD: PLIST,v 1.4 2010/10/23 21:49:06 naddy Exp $ > +%%SHARED%% > @bin bin/eltclsh > @bin bin/elwish > +lib/tcl/ > +lib/tcl/eltcl/ > +lib/tcl/eltcl/complete.tcl > +lib/tcl/eltcl/init.tcl > +lib/tcl/eltcl/pkgIndex.tcl > +lib/tcl/eltcl/tools.tcl > @man man/man1/eltclsh.1 > -share/eltcl/ > -share/eltcl/complete.tcl > -share/eltcl/init.tcl > -share/eltcl/pkgIndex.tcl > -share/eltcl/tools.tcl -- Matthieu Herrb