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.
>
> I'm not sure whats' up with:
> cc: unrecognized option '-XCClinker'
It's a libtool option that doesn't get recognized OpenBSD's libtool,
so it ends up on the gcc command line.
http://www.gnu.org/software/libtool/manual/html_node/Link-mode.html
Apparently OpenBSD's libtool and OpenBSD's tcl package work well
enough together and the comment in src/Makefile.in doesn't apply. So
it can be patched out. like that (patches/patch-src_Makefile_in)
--- src/Makefile.in.orig Mon Apr 30 23:08:39 2012
+++ src/Makefile.in Mon Apr 30 23:09:20 2012
@@ -104,7 +104,7 @@
#
lib$(ELPKG).la: $(pkgobjs)
$(LTLD) -avoid-version -o $@ $(CFLAGS) $(pkgobjs) \
- $(addprefix -XCClinker ,$(TCLSTUB_LDFLAGS)) \
+ $(TCLSTUB_LDFLAGS) \
-rpath $(datadir) $(LDFLAGS) $(EL_LDFLAGS)
# object files
>
> Otherwise, looks good. :)
Your version is less intrusive than mine. I like it better. Please
commit (with or without the patch above).
>
> Stu
>
>
> 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 30 Apr 2012 18:34:32 -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,17 +18,18 @@ 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
> +WANTLIB += freetype 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} \
> + --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
>
> 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 30 Apr 2012 18:34:32 -0000
> @@ -1,5 +1,5 @@
> -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
> +MD5 (eltclsh-1.12.tar.gz) = f+FDlP4DuIrnjQtoI8ujPA==
> +RMD160 (eltclsh-1.12.tar.gz) = vVCR2IDbeCt/sg8385EffDPTKAM=
> +SHA1 (eltclsh-1.12.tar.gz) = acJf96kDPmgpH1QyVSelBTWBF+o=
> +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 30 Apr 2012 18:34:32 -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_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 30 Apr 2012 18:34:32 -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: 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 30 Apr 2012 18:34:32 -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 30 Apr 2012 18:34:32 -0000
> @@ -1,9 +1,15 @@
> @comment $OpenBSD: PLIST,v 1.4 2010/10/23 21:49:06 naddy Exp $
> +%%SHARED%%
> @bin bin/eltclsh
> @bin bin/elwish
> +lib/pkgconfig/
> +lib/pkgconfig/eltclsh.pc
> +lib/tcl/
> +lib/tcl/eltcl/
> +lib/tcl/eltcl/complete.tcl
> +lib/tcl/eltcl/init.tcl
> +lib/tcl/eltcl/libeltclsh.a
> +lib/tcl/eltcl/libeltclsh.la
> +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