Bug 109716 - [UPDATE] devel/tcllib 1.9
Summary: [UPDATE] devel/tcllib 1.9
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mikhail Teterin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-01 13:10 UTC by Martin Matuska
Modified: 2007-06-28 14:54 UTC (History)
0 users

See Also:


Attachments
file.diff (5.54 KB, patch)
2007-03-01 13:10 UTC, Martin Matuska
no flags Details | Diff
tcllib.patch (6.22 KB, patch)
2007-03-01 14:00 UTC, Martin Matuska
no flags Details | Diff
tcllib.patch (5.48 KB, patch)
2007-03-08 16:13 UTC, Martin Matuska
no flags Details | Diff
tcllib.diff (1.87 KB, patch)
2007-05-10 10:43 UTC, Martin Matuska
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Matuska 2007-03-01 13:10:01 UTC
Update of tcllib 1.9
- removed support for tcl83 (sak.tcl does not run tests)
- added support for tcl85
- added support for threaded tcl84 and tcl85 (WITH_THREADS)
    separate slave port tcllib-thread will be submitted
- added support for tcl85 via USE_TCL_VER=85
- updated to USE_TCL infrastructure
- added configure and pre-build dependencies for make test
- new patches (tcl 8.5 fixes for tests):

files/patch-modules-math-fuzzy.test:
URL: http://tcllib.cvs.sourceforge.net/tcllib/tcllib/modules/math/fuzzy.test?r1=1.5&r2=1.6

files/patch-modules-snit-snit.test:
fixed catch result for tcl 8.5 in: expose-1.1

files/patch-modules-struct-sets.test:
fixed catch result for tcl 8.5 in: set-1.0

Tinderbox log:
http://tinderbox.vx.sk/logs/6.2-FreeBSD-amd64/tcllib-1.9_2.log

portlint -A: no fatal errors

I am interested in maintaining the port so I am asking the maintainer
to pass maintainership to me, if he/she agrees.
Comment 1 Edwin Groothuis freebsd_committer 2007-03-01 13:10:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this PRs
Comment 2 Edwin Groothuis freebsd_committer 2007-03-01 13:10:18 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 3 Martin Matuska 2007-03-01 14:00:32 UTC
There was one more issue I did not adress (the apps did not work):
- removed unnecessary subdirectory: scripts/
- fixed path to TCLSH in apps (bin/dtplite, bin/tcldocstrip, bin/page)

Fetchable patch:
http://www.matuska.org/martin/freebsd/ports/patches/devel-tcllib.patch

The tinderbox log is updated (URL in original PR).
Comment 4 Mikhail Teterin freebsd_committer 2007-03-01 17:28:56 UTC
Responsible Changed
From-To: miwi->mi

Hey. It is my port :-)
Comment 5 Mikhail Teterin 2007-03-01 17:40:09 UTC
Hi, Martin, and thank you very much for your work.

I am not quite certain, what is the need for PKGNAMESUFFIX -- nothing is 
compiled by the port, so what do we care if TCL is threaded or not?

Is it just that the three little applications installed by it require changes 
to their #!-lines?

I've never ran the tests against 8.5 -- are the patches for tests (snit, 
struct-sets) triggered by problems there? If so, you may wish to notify the 
vendor:

	http://sourceforge.net/projects/tcllib/

Andreas is usually quite responsive.

Thanks for your help.

	-mi
Comment 6 Martin Matuska 2007-03-02 10:36:02 UTC
I will issue bug reports in tcllib.sourceforge.net about the two tests.

The reason for PKGNAMESUFFIX concerns packages only. It has nothing to
do with the three little applications - the changes there are
only about chosing tclsh8.4 or tclsh8.5.

I maintain ports (www/openacs and www/openacs-dotlrn which are large web
application frameworks based on TCL) that depend on a threaded tcl and
the latest versions require tcllib, too.
Without a separate package it will be impossible to install from
packages - you always have to build from ports.

The idea is that there will be a "dummy" tcllib-threads port, that looks
like "lang/tcl84-thread" or "lang/xotcl-thread" so there
will be a tcllib-threads package with tcl-threads-8.4.x (until 8.5
becomes standard) as a dependency. The package dependencies
have to be unique, it is not possible to choose between dependencies
(maybe a feature desirable for the future ports tree).
Therefore ports that depend on threaded tcl cannot use the tcllib
package (depends mismatch). You can install it from the ports tree (with
a part of my patch it will have correct dependencies) but there will be
no package built for the FreeBSD package repositories.

Thats why I would like to see tcllib-1.x and tcllib-threads-1.x packages
in the FreeBSD package tree.
Comment 7 Martin Matuska 2007-03-08 16:13:25 UTC
Maintainer suggested depending on USE_TCL_BUILD only

To make our life easier with this I have managed the following:
- new port lang/tcl-tk-wrapper that wraps tclsh and wish around
(independent of tcl and tk)
- tcl85, tcl84, tcl83, tcl82 do not pseudo-install tclsh anymore, the
wrapper should be used instaed
- now tcl scripts only can use this wrapper as dependency instead of
whole tcl
- therefore I suggest this wrapper as a run dependency (see patch)

portlint -A: no fatal errors, tinderbox log:
http://tinderbox.vx.sk/logs/6.2-FreeBSD-amd64/tcllib-1.9_2.log

Comment 9 Martin Matuska freebsd_committer 2007-06-26 13:18:55 UTC
This patch tells tcllib to use the new USE_TCL infrastructure. It can
now be used e.g. with the WITH_TCL_THREADS option. Please consider
commiting (and closing PR).

Tinderbox tests:
5.5-i386:  http://i386.vx.sk/logs/5.5-FreeBSD-i386/tcllib-1.9_2.log
6.2-i386:  http://i386.vx.sk/logs/6.2-FreeBSD-i386/tcllib-1.9_2.log
7-i386:    http://tb4.droso.net/logs/7-mm/tcllib-1.9_2.log
5.5-amd64: http://amd64.vx.sk/logs/5.5-FreeBSD-amd64/tcllib-1.9_2.log
6.2-amd64: http://amd64.vx.sk/logs/6.2-FreeBSD-amd64/tcllib-1.9_2.log
7-amd64:   http://tb3.droso.net/logs/7-mm/tcllib-1.9_2.log

Thank you, mm

Index: ports/devel/tcllib/Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/tcllib/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- ports/devel/tcllib/Makefile	12 Feb 2007 19:55:14 -0000	1.25
+++ ports/devel/tcllib/Makefile	26 Jun 2007 10:57:58 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=		tcllib
 PORTVERSION=		1.9
-PORTREVISION=		1
+PORTREVISION=		2
 CATEGORIES=		devel tcl83 tcl84
 MASTER_SITES=		${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	tcllib
@@ -15,14 +15,13 @@
 MAINTAINER=	mi@aldan.algebra.com
 COMMENT=	A collection of utility modules for Tcl
 
-BUILD_DEPENDS=	tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${TCL_VER:S/.//}
+USE_TCL_BUILD=	yes
+USE_TCL_RUN=	${USE_TCL_BUILD}
 
-TCL_VER?=	8.4
 USE_BZIP2=	yes
 GNU_CONFIGURE=	yes
 ALL_TARGET=	all
 MAKE_ENV+=	LANG=C
-SCRIPTS_ENV+=	TCL_VER=${TCL_VER} PATCH="${PATCH}"
 
 PLIST_SUB+=	PORTVERSION=${PORTVERSION}
 
@@ -58,6 +57,10 @@
 
 MANCOMPRESSED=	no
 
+.include <bsd.port.pre.mk>
+
+CONFIGURE_ENV+=	ac_cv_path_tclsh="${TCLSH}"
+
 post-patch:
 	#
 	# Ensure, the detailed output of vendors' self-tests is
@@ -65,8 +68,8 @@
 	#
 	${REINPLACE_CMD} -e 's,test run,test run -l testlog,' \
 		${WRKSRC}/Makefile.in
-
-.include <bsd.port.pre.mk>
+	${REINPLACE_CMD} -e 's,exec tclsh,exec ${TCLSH},' \
+		${WRKSRC}/apps/dtplite
 
 RUNTEST=	${SETENV} LANG=C DISPLAY= ${MAKE} -C ${WRKSRC} test
 MYID	!=	${ID} -u
Index: ports/devel/tcllib/scripts/post-patch
===================================================================
RCS file: ports/devel/tcllib/scripts/post-patch
diff -N ports/devel/tcllib/scripts/post-patch
--- ports/devel/tcllib/scripts/post-patch	18 Dec 2004 02:49:47 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-${PATCH} -f ${WRKSRC}/apps/dtplite << EOP
-@@ -1,3 +1,1 @@
--#! /bin/sh
--# -*- tcl -*-
--exec tclsh "$0" ${1+"$@"}
-+#!${PREFIX}/bin/tclsh${TCL_VER}
-EOP
Comment 10 dfilter service freebsd_committer 2007-06-27 20:52:18 UTC
mi          2007-06-27 19:52:12 UTC

  FreeBSD ports repository

  Modified files:
    devel/tcllib         Makefile 
  Removed files:
    devel/tcllib/scripts post-patch 
  Log:
  Convert to using the USE_TCL knobs instead of trying to guess the
  desired TCL-version.
  
  PR:     109716  (partial)
  
  Revision  Changes    Path
  1.26      +8 -4      ports/devel/tcllib/Makefile
  1.2       +0 -9      ports/devel/tcllib/scripts/post-patch (dead)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 11 mi+metlife 2007-06-27 20:53:22 UTC
Hi, Martin!

I just committed the bsd.tcl.mk parts of your changes. Please, add the 
module patches you have and bump PORTREVISION yourself now. Thank you 
very much for your work and patience.

    -mi
Comment 12 Martin Matuska freebsd_committer 2007-06-28 14:14:47 UTC
Thanks, Mikhail.

So here is what I want to commit:
- remove obsolete BUILD_DEPENDS line
- change Makefile to support tcl 8.5
- add a patch that fixes some tests for tcl 8.5 (see below)

All my tinderboxes (5.5,6.2,7)*(i386,amd64) build it correctly and
manual tests using WITH_TCL_VER=85 and/or WITH_TCL_THREADS=yes pass, too.

With this patch the port can be built against tcl84, tcl84-thread,
tcl85, tcl85-thread :-)

Index: ports/devel/tcllib/Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/tcllib/Makefile,v
retrieving revision 1.26
diff -u -r1.26 Makefile
--- ports/devel/tcllib/Makefile	27 Jun 2007 19:52:12 -0000	1.26
+++ ports/devel/tcllib/Makefile	28 Jun 2007 13:08:05 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=		tcllib
 PORTVERSION=		1.9
-PORTREVISION=		1
+PORTREVISION=		2
 CATEGORIES=		devel tcl83 tcl84
 MASTER_SITES=		${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	tcllib
@@ -15,8 +15,7 @@
 MAINTAINER=	mi@aldan.algebra.com
 COMMENT=	A collection of utility modules for Tcl
 
-BUILD_DEPENDS=	tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${TCL_VER:S/.//}
-USE_TCL_BUILD=	yes
+USE_TCL_BUILD=	84+
 USE_TCL_RUN=	${USE_TCL_BUILD}
 
 USE_BZIP2=	yes
Index: ports/devel/tcllib/files/patch-tcl85
===================================================================
RCS file: ports/devel/tcllib/files/patch-tcl85
diff -N ports/devel/tcllib/files/patch-tcl85
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ports/devel/tcllib/files/patch-tcl85	28 Jun 2007 13:08:05 -0000
@@ -0,0 +1,195 @@
+--- modules/cmdline/typedCmdline.test.orig	Thu Jun 28 13:56:05 2007
++++ modules/cmdline/typedCmdline.test	Thu Jun 28 13:57:28 2007
+@@ -115,7 +115,7 @@
+ 	catch {unset arg}
+ 	set argList {-foo 123}
+ 	list [catch {cmdline::typedGetopt argList {a.arg foo.bar b} opt arg} msg] $msg $argList $opt $arg
+-    } [list 1 {Illegal option type specification: must be one of alnum|alpha|ascii|control|boolean|digit|double|false|graph|integer|lower|print|punct|space|true|upper|wideinteger|wordchar|xdigit} {-foo 123} {} {}]
++    } [list 1 {Illegal option type specification: must be one of alnum|alpha|ascii|control|boolean|digit|double|false|graph|integer|list|lower|print|punct|space|true|upper|wideinteger|wordchar|xdigit} {-foo 123} {} {}]
+ } else {
+     test typed-cmdline-6.14 {cmdline::typedGetopt, integer options} {
+ 	catch {unset opt}
+--- modules/grammar_me/me_tcl.test.orig	Thu Jun 28 14:00:22 2007
++++ modules/grammar_me/me_tcl.test	Thu Jun 28 14:03:49 2007
+@@ -509,7 +509,17 @@
+ 	grammar::me::tcl::ict_match_tokclass a b c
+     } -result {wrong # args: should be "grammar::me::tcl::ict_match_tokclass code msg"}
+ 
+-test mevmtcl-ict_match_tokclass-1.2a {Call with bad code} \
++if {[::tcltest::testConstraint tcl8.5plus]} {
++    test mevmtcl-ict_match_tokclass-1.2a {Call with bad code} \
++	-constraints tcl8.5plus \
++	-returnCodes error \
++	-setup {
++	    grammar::me::tcl::init fake
++	} -body {
++	    grammar::me::tcl::ict_match_tokclass gargle foo
++	} -result {bad class "gargle": must be alnum, alpha, ascii, control, boolean, digit, double, false, graph, integer, list, lower, print, punct, space, true, upper, wideinteger, wordchar, or xdigit}
++} else {
++    test mevmtcl-ict_match_tokclass-1.2a {Call with bad code} \
+     -constraints tcl8.5plus \
+     -returnCodes error \
+     -setup {
+@@ -517,6 +527,7 @@
+     } -body {
+ 	grammar::me::tcl::ict_match_tokclass gargle foo
+     } -result {bad class "gargle": must be alnum, alpha, ascii, control, boolean, digit, double, false, graph, integer, lower, print, punct, space, true, upper, wideinteger, wordchar, or xdigit}
++}
+ 
+ test mevmtcl-ict_match_tokclass-1.2b {Call with bad code} \
+     -constraints {!tcl8.5plus} \
+--- modules/math/fuzzy.test	2006/01/24 05:10:01	1.5
++++ modules/math/fuzzy.test	2006/11/07 20:02:34	1.6
+@@ -168,6 +168,12 @@
+    set tol_le 0
+    set tol_lt 0
+ 
++   #
++   # Force Tcl8.4 or earlier behaviour in expanding numbers
++   #
++   set org_tcl_precision $tcl_precision
++   set tcl_precision 12
++
+    for { set i -1000 } { $i <= 1000 } { incr i } {
+       if { $i == 0 } continue
+ 
+@@ -192,6 +198,7 @@
+          set equal 0
+       }
+    }
++   set tcl_precision $org_tcl_precision
+    set equal
+ } 0
+ 
+
+--- modules/snit/snit.test.orig	Thu Jun 28 14:48:15 2007
++++ modules/snit/snit.test	Thu Jun 28 14:48:17 2007
+@@ -693,7 +693,8 @@
+     dog destroy
+ } -result {3}
+ 
+-test dtypemethod-1.6 {delegating unknown typemethod to existing typecomponent with error} -body {
++if {[::tcltest::testConstraint tcl8.5plus]} {
++    test dtypemethod-1.6 {delegating unknown typemethod to existing typecomponent with error} -body {
+     type dog {
+         delegate typemethod * to stringhandler
+ 
+@@ -703,9 +704,24 @@
+     }
+ 
+     dog foo bar
+-} -returnCodes {
++    } -returnCodes {
+     error
+-} -result {bad option "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}
++    } -result {bad option "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}
++} else {
++    test dtypemethod-1.6 {delegating unknown typemethod to existing typecomponent with error} -body {
++	type dog {
++    	    delegate typemethod * to stringhandler
++
++    	    typeconstructor {
++        	set stringhandler string
++    	    }
++	}
++
++	dog foo bar
++    } -returnCodes {
++	error
++    } -result {bad option "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}
++}
+ 
+ test dtypemethod-1.7 {can't delegate local typemethod: order 1} -body {
+     type dog {
+@@ -3218,7 +3234,8 @@
+     dog destroy
+ } -result {3}
+ 
+-test dmethod-1.6 {delegating unknown method to existing component with error} -body {
++if {[::tcltest::testConstraint tcl8.5plus]} {
++    test dmethod-1.6 {delegating unknown method to existing component with error} -body {
+     type dog {
+         constructor {args} {
+             set stringhandler string
+@@ -3229,11 +3246,29 @@
+ 
+     dog create spot
+     spot foo bar
+-} -returnCodes {
++    } -returnCodes {
+     error
+-} -cleanup {
++    } -cleanup {
++        dog destroy
++    } -result {bad option "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}
++} else {
++    test dmethod-1.6 {delegating unknown method to existing component with error} -body {
++	type dog {
++    	    constructor {args} {
++        	set stringhandler string
++    	    }
++
++            delegate method * to stringhandler
++	}
++
++        dog create spot
++        spot foo bar
++    } -returnCodes {
++	error
++    } -cleanup {
+     dog destroy
+-} -result {bad option "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}
++    } -result {bad option "foo": must be bytelength, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, tolower, toupper, totitle, trim, trimleft, trimright, wordend, or wordstart}
++}
+ 
+ test dmethod-1.7 {can't delegate local method: order 1} -body {
+     type cat {
+@@ -5784,13 +5819,23 @@
+ #-----------------------------------------------------------------------
+ # expose statement
+ 
+-test expose-1.1 {can't expose nothing} -body {
++if {[::tcltest::testConstraint tcl8.5plus]} {
++    test expose-1.1 {can't expose nothing} -body {
+     type dog {
+ 	expose
+     }
+-} -returnCodes {
++    } -returnCodes {
++	error
++    } -result [tcltest::wrongNumArgs expose {component ?as? ?methodname?} 0]
++} else {
++    test expose-1.1 {can't expose nothing} -body {
++	type dog {
++	    expose
++	}
++    } -returnCodes {
+     error
+-} -result [tcltest::wrongNumArgs ::snit::Comp.statement.expose {component ?as? ?methodname?} 0]
++    } -result [tcltest::wrongNumArgs ::snit::Comp.statement.expose {component ?as? ?methodname?} 0]
++}
+ 
+ test expose-1.2 {expose a component that's never installed} -body {
+     type dog {
+--- modules/struct/sets.test.orig	Thu Jun 28 14:10:46 2007
++++ modules/struct/sets.test	Thu Jun 28 14:13:24 2007
+@@ -36,10 +36,17 @@
+ 
+ #----------------------------------------------------------------------
+ 
+-test set-1.0 {nothing} {
++if {[::tcltest::testConstraint tcl8.5plus]} {
++    test set-1.0 {nothing} {
+     catch {setop} msg
+     set msg
+-} [tcltest::wrongNumArgs {::struct::set::set} {cmd args} 0]
++    } [tcltest::wrongNumArgs {setop} {cmd args} 0]
++} else {
++    test set-1.0 {nothing} {
++	catch {setop} msg
++	set msg
++    } [tcltest::wrongNumArgs {::struct::set::set} {cmd args} 0]
++}
+ 
+ test set-1.1 {bogus} {
+     catch {setop foo} msg
Comment 13 dfilter service freebsd_committer 2007-06-28 14:44:42 UTC
mm          2007-06-28 13:44:37 UTC

  FreeBSD ports repository

  Modified files:
    devel/tcllib         Makefile 
  Added files:
    devel/tcllib/files   patch-tcl85 
  Log:
  - remove BUILD_DEPENDS line (replaced by USE_TCL_*)
  - add patch to support tcl 8.5
  
  PR:             ports/109716
  Submitted by:   mm
  Approved by:    mi (maintainer), garga (mentor)
  
  Revision  Changes    Path
  1.27      +2 -3      ports/devel/tcllib/Makefile
  1.1       +195 -0    ports/devel/tcllib/files/patch-tcl85 (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 14 Mikhail Teterin freebsd_committer 2007-06-28 14:53:30 UTC
State Changed
From-To: feedback->closed

The submitter, who is now a ports-committer too, has committed the 
proposed changes. Thanks.