diff -Nbur devel/tcllib.orig/Makefile devel/tcllib/Makefile --- devel/tcllib.orig/Makefile Mon Feb 12 20:55:14 2007 +++ devel/tcllib/Makefile Thu Mar 8 16:50:19 2007 @@ -7,24 +7,28 @@ PORTNAME= tcllib PORTVERSION= 1.9 -PORTREVISION= 1 -CATEGORIES= devel tcl83 tcl84 +PORTREVISION= 2 +CATEGORIES= devel tcl84 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= tcllib MAINTAINER= mi@aldan.algebra.com COMMENT= A collection of utility modules for Tcl -BUILD_DEPENDS= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${TCL_VER:S/.//} +RUN_DEPENDS= tclsh:${PORTSDIR}/lang/tcl-tk-wrapper -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} +USE_TCL_VER?= 84 + +.if ${USE_TCL_VER} != 84 && ${USE_TCL_VER} != 85 +IGNORE= supported values for USE_TCL_VER are only 84 and 85 +.endif + +USE_TCL_BUILD= ${USE_TCL_VER} MANN= aes.n asn.n ansi_cmacros.n ansi_cctrl.n ansi_cattr.n \ ansi_code.n ansi_ctrlu.n ansi_send.n autoproxy.n base32hex.n \ @@ -58,20 +62,32 @@ MANCOMPRESSED= no -post-patch: - # - # Ensure, the detailed output of vendors' self-tests is - # available in addition to the pretty progress report: - # - ${REINPLACE_CMD} -e 's,test run,test run -l testlog,' \ - ${WRKSRC}/Makefile.in +PLIST_SUB+= PORTVERSION=${PORTVERSION} .include +SCRIPTS_ENV+= TCL_VER=${TCL_VER} PATCH="${PATCH}" + +post-patch: +# Ensure that configure looks for the right tclsh + @${REINPLACE_CMD} -e 's|\$$dir/tclsh\[8-9\]\*\$${EXEEXT}|${TCLSH}|g' \ + -e 's|\$$dir/tclsh\*\$${EXEEXT}|${TCLSH}|g' ${WRKSRC}/configure +# +# Ensure, the detailed output of vendors' self-tests is +# available in addition to the pretty progress report: +# + @${REINPLACE_CMD} -e 's,test run,test run -l testlog,' \ + ${WRKSRC}/Makefile.in +.for FILE in dtplite tcldocstrip page + @${REINPLACE_CMD} -e 's|exec tclsh|exec ${LOCALBASE}/bin/tclsh|g' \ + ${WRKSRC}/apps/${FILE} +.endfor + RUNTEST= ${SETENV} LANG=C DISPLAY= ${MAKE} -C ${WRKSRC} test MYID != ${ID} -u .if ${MYID} == 0 RUNTEST:= ${SU_CMD:S/root/-m nobody/} "${RUNTEST}" + pre-build: # # Preparing to run the tests as `nobody' @@ -79,7 +95,7 @@ ${FIND} ${WRKSRC} -type d | ${XARGS} ${CHOWN} nobody .endif -test: +test: configure pre-build @set -x ; if ! ${RUNTEST}; \ then \ ${AWK} '$$NF == "FAILED" { echo = 1 } \ diff -Nbur devel/tcllib.orig/files/patch-modules-math-fuzzy.test devel/tcllib/files/patch-modules-math-fuzzy.test --- devel/tcllib.orig/files/patch-modules-math-fuzzy.test Thu Jan 1 01:00:00 1970 +++ devel/tcllib/files/patch-modules-math-fuzzy.test Wed Feb 28 18:21:24 2007 @@ -0,0 +1,24 @@ +--- 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 + + diff -Nbur devel/tcllib.orig/files/patch-modules-snit-snit.test devel/tcllib/files/patch-modules-snit-snit.test --- devel/tcllib.orig/files/patch-modules-snit-snit.test Thu Jan 1 01:00:00 1970 +++ devel/tcllib/files/patch-modules-snit-snit.test Thu Mar 8 16:58:31 2007 @@ -0,0 +1,23 @@ +--- modules/snit/snit.test.orig Wed Sep 6 08:47:30 2006 ++++ modules/snit/snit.test Thu Mar 8 16:58:16 2007 +@@ -5784,13 +5784,19 @@ + #----------------------------------------------------------------------- + # expose statement + ++if {[package vsatisfies [package present Tcl] 8.5]} { ++ set expose_msg "expose" ++} else { ++ set expose_msg "::snit::Comp.statement.expose" ++} ++ + 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 $expose_msg {component ?as? ?methodname?} 0] + + test expose-1.2 {expose a component that's never installed} -body { + type dog { diff -Nbur devel/tcllib.orig/files/patch-modules-struct-sets.test devel/tcllib/files/patch-modules-struct-sets.test --- devel/tcllib.orig/files/patch-modules-struct-sets.test Thu Jan 1 01:00:00 1970 +++ devel/tcllib/files/patch-modules-struct-sets.test Thu Mar 8 16:54:53 2007 @@ -0,0 +1,20 @@ +--- modules/struct/sets.test.orig Tue Jan 31 05:57:40 2006 ++++ modules/struct/sets.test Thu Mar 1 12:58:55 2007 +@@ -36,10 +36,16 @@ + + #---------------------------------------------------------------------- + ++if {[package vsatisfies [package present Tcl] 8.5]} { ++ set setop_msg setop ++} else { ++ set setop_msg ::struct::set::set ++} ++ + test set-1.0 {nothing} { + catch {setop} msg + set msg +-} [tcltest::wrongNumArgs {::struct::set::set} {cmd args} 0] ++} [tcltest::wrongNumArgs $setop_msg {cmd args} 0] + + test set-1.1 {bogus} { + catch {setop foo} msg diff -Nbur devel/tcllib.orig/scripts/post-patch devel/tcllib/scripts/post-patch --- devel/tcllib.orig/scripts/post-patch Sat Dec 18 03:49:47 2004 +++ devel/tcllib/scripts/post-patch Thu Jan 1 01:00:00 1970 @@ -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