diff --git a/Mk/Uses/tcl.mk b/Mk/Uses/tcl.mk index d940b4a19409..eb47dfea7bbf 100644 --- a/Mk/Uses/tcl.mk +++ b/Mk/Uses/tcl.mk @@ -1,236 +1,227 @@ # vim: ts=8 noexpandtab # # Provide support to use Tcl/Tk # # Variables set by this file: # # TCL_VER - Major.Minor version of Tcl # # TCLSH - Set to full path of the Tcl interpreter # # TCL_LIBDIR - Path where the Tcl libraries can be found # # TCL_INCLUDEDIR - Path where the Tcl C headers can be found # # # TK_VER - Major.Minor version of Tk # # WISH - Set to full path of the Tk interpreter # # TK_LIBDIR - Path where the Tk libraries can be found # # TK_INCLUDEDIR - Path where the Tk C headers can be found # # # # Usage: # # USES+= PORT[:(VERSION|wrapper),build,run,tea,test] # # where PORT is one of: # # - tcl - Depend on Tcl # - tk - Depend on both Tk and Tcl (Tk itself depends on Tcl) # # and VERSION is in one of the following formats: # # - (empty) - Depend on any installed version of PORT. If none # is installed, bring in the default version. See # ${_TCLTK_DEFAULT_VERSION} below. # -# - 85, 86, 87 - Depend on a specific version series of PORT. Multiple +# - 86, 87 - Depend on a specific version series of PORT. Multiple # values are OK. The highest version available is # picked. # -# - 85+, 86+, 87+ - Depend on any installed version greater or equal to +# - 86+, 87+ - Depend on any installed version greater or equal to # the specified version. # # If wrapper is specified, an additional dependency on tcl-wrapper or # tk-wrapper is added. It is NOT possible to select a specific version of # Tcl/Tk when using the wrapper. # # Build-time / Run-time / Test-time only dependencies can be specified with # build, run or test. # # Tea can be used for Tcl/Tk extensions that use the Tcl Extension Architecture # [http://www.tcl.tk/doc/tea] and allows to set common autoconf parameters. # # MAINTAINER: tcltk@FreeBSD.org .if ${USES:Mtk} || ${USES:Mtk\:*} . if !defined(_TCLTK_PORT) _TCLTK_IGNORE= yes . endif .endif .if !defined(_INCLUDE_USES_TCL_MK) && !defined(_TCLTK_IGNORE) _INCLUDE_USES_TCL_MK= yes # # List the currently available versions. # # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -_TCLTK_VALID_VERSIONS= 85 86 87 +_TCLTK_VALID_VERSIONS= 86 87 # # Bring in the default and check that the specified version is in the list of # valid versions. # _TCLTK_DEFAULT_VERSION= ${TCLTK_DEFAULT:S/.//} . if ! ${_TCLTK_VALID_VERSIONS:M${_TCLTK_DEFAULT_VERSION}} IGNORE= Invalid tcltk version ${TCLTK_DEFAULT} . endif # # _TCLTK_PORT tells us whether we're depending on Tcl or Tk. When using # USES+=tk, the included file tk.mk sets this before including this file. # _TCLTK_PORT?= tcl # # Parse a ver+ argument. # . if ${tcl_ARGS:M*+} _TCLTK_MIN_VERSION:= ${tcl_ARGS:M*+:S/+//} _TCLTK_WANTED_VERSIONS:=${_TCLTK_DEFAULT_VERSION} -. if ${_TCLTK_MIN_VERSION} == "85" -IGNORE= Minimum tcltk version 85+ is meaningless -. endif . endif # # Parse one or more ver arguments. # -. if ${tcl_ARGS:M8[5-7]} -_TCLTK_WANTED_VERSIONS:=${tcl_ARGS:M8[5-7]} +. if ${tcl_ARGS:M8[6-7]} +_TCLTK_WANTED_VERSIONS:=${tcl_ARGS:M8[6-7]} . endif # # It makes little sense to specify both the wrapper and a specific version. # . if ${tcl_ARGS:Mwrapper} && defined(_TCLTK_WANTED_VERSIONS) IGNORE= USES=${_TCLTK_PORT}: it is not possible to specify both a version and the wrapper: ${tcl_ARGS} . endif # # If no version was specified with any of the ver or ver+ arguments, set the # default version. # . if !defined(_TCLTK_WANTED_VERSIONS) _TCLTK_WANTED_VERSIONS= ${_TCLTK_DEFAULT_VERSION} . endif # # Resolve minimum versions (ver+). Append anything greater or equal than the # specified minimum version to the list of wanted versions. # . if defined(_TCLTK_MIN_VERSION) . for _v in ${_TCLTK_VALID_VERSIONS} . if ${_TCLTK_MIN_VERSION} <= ${_v} _TCLTK_WANTED_VERSIONS+=${_v} . endif . endfor . endif # # Right now we have built a list of potential versions that we may depend on. # Let's sort them and remove any duplicates. We then locate the highest one # already installed, if any. # . for _v in ${_TCLTK_WANTED_VERSIONS:O:u} _TCLTK_HIGHEST_VERSION:=${_v} . if exists(${LOCALBASE}/lib/lib${_TCLTK_PORT}${_v}.so) _TCLTK_WANTED_VERSION:= ${_v} . endif . endfor # # If we couldn't find any wanted version installed, depend on the default or the highest one. . if !defined(_TCLTK_WANTED_VERSION) . if ${_TCLTK_WANTED_VERSIONS:M${_TCLTK_DEFAULT_VERSION}} _TCLTK_WANTED_VERSION:= ${_TCLTK_DEFAULT_VERSION} . else _TCLTK_WANTED_VERSION:= ${_TCLTK_HIGHEST_VERSION} . endif . endif -# -# Deprecate by default all ports depending on 8.5 -. if ${_TCLTK_WANTED_VERSION} == "85" -DEPRECATED= Tcl/Tk 8.5 is nearing EOL, please consider porting to Tcl/Tk 8.6 -. endif - # # Exported variables # TCL_VER:= ${_TCLTK_WANTED_VERSION:S/8/8./} TCL_SHLIB_VER:= ${_TCLTK_WANTED_VERSION} TCLSH:= ${LOCALBASE}/bin/tclsh${TCL_VER} TCL_LIBDIR:= ${LOCALBASE}/lib/tcl${TCL_VER} TCL_INCLUDEDIR:=${LOCALBASE}/include/tcl${TCL_VER} . if ${_TCLTK_PORT} == "tk" TK_VER:= ${_TCLTK_WANTED_VERSION:S/8/8./} TK_SHLIB_VER:= ${_TCLTK_WANTED_VERSION} WISH:= ${LOCALBASE}/bin/wish${TCL_VER} TK_LIBDIR:= ${LOCALBASE}/lib/tk${TK_VER} TK_INCLUDEDIR:= ${LOCALBASE}/include/tk${TK_VER} . endif # # Dependencies # _TCLTK_BUILD_DEPENDS= _TCLTK_RUN_DEPENDS= _TCLTK_LIB_DEPENDS= # Construct the correct dependency lines (wrapper) . if ${tcl_ARGS:Mwrapper} . if ${_TCLTK_PORT} == "tcl" _TCLTK_WRAPPER_PORT= tclsh:lang/tcl-wrapper . elif ${_TCLTK_PORT} == "tk" _TCLTK_WRAPPER_PORT= wish:x11-toolkits/tk-wrapper . endif . endif # Construct the correct dependency lines (Tcl/Tk) . if ${_TCLTK_PORT} == "tcl" _TCLTK_EXE_LINE= tclsh${TCL_VER}:lang/tcl${_TCLTK_WANTED_VERSION} _TCLTK_LIB_LINE= libtcl${TCL_SHLIB_VER}.so:lang/tcl${_TCLTK_WANTED_VERSION} . elif ${_TCLTK_PORT} == "tk" _TCLTK_EXE_LINE= wish${TK_VER}:x11-toolkits/tk${_TCLTK_WANTED_VERSION} _TCLTK_LIB_LINE= libtk${TK_SHLIB_VER}.so:x11-toolkits/tk${_TCLTK_WANTED_VERSION} \ libtcl${TCL_SHLIB_VER}.so:lang/tcl${_TCLTK_WANTED_VERSION} . endif . if ${tcl_ARGS:Mbuild} BUILD_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} . elif ${tcl_ARGS:Mrun} RUN_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} . elif ${tcl_ARGS:Mtest} TEST_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} . else RUN_DEPENDS+= ${_TCLTK_WRAPPER_PORT} LIB_DEPENDS+= ${_TCLTK_LIB_LINE} . endif # Setup TEA stuff . if ${tcl_ARGS:Mtea} GNU_CONFIGURE= yes TCL_PKG?= ${PORTNAME:C/^tcl(-?)//:C/(-?)tcl\$//}${PORTVERSION} PLIST_SUB+= TCL_PKG=${TCL_PKG} CONFIGURE_ARGS+=--exec-prefix=${PREFIX} \ --with-tcl=${TCL_LIBDIR} \ --with-tclinclude=${TCL_INCLUDEDIR} . if ${_TCLTK_PORT} == "tk" CONFIGURE_ARGS+=--with-tk=${TK_LIBDIR} --with-tkinclude=${TK_INCLUDEDIR} . endif . endif .endif # defined(_INCLUDE_USES_TCL_MK) .undef _TCLTK_IGNORE diff --git a/lang/tclX/Makefile b/lang/tclX/Makefile index 634ea40236bb..9b667a83cc18 100644 --- a/lang/tclX/Makefile +++ b/lang/tclX/Makefile @@ -1,70 +1,65 @@ PORTNAME= tclX PORTVERSION= 8.4.1 PORTREVISION= 1 CATEGORIES= lang tcl devel MASTER_SITES= SF/${PORTNAME:tl}/TclX/${PORTVERSION}:tclx \ http://core.tcl.tk/tclconfig/raw/:tclm4 DISTFILES= tclx${PORTVERSION}${EXTRACT_SUFX}:tclx \ ${TCLM4}:tclm4 EXTRACT_ONLY= tclx${PORTVERSION}${EXTRACT_SUFX} DIST_SUBDIR= ${PORTNAME} MAINTAINER= mi@aldan.algebra.com COMMENT= Extended TCL WWW= https://tclx.sourceforge.net/ LICENSE= TclTk LICENSE_NAME= Tcl/Tk License LICENSE_FILE= ${WRKSRC}/license.terms LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept WRKSRC= ${WRKDIR}/${PORTNAME:tl}${PORTVERSION:R} USES= autoreconf alias tcl:tea tar:bzip2 USE_LDCONFIG= ${PREFIX}/lib/tclx${PORTVERSION:R} GNU_CONFIGURE= yes CONFIGURE_ARGS+=--enable-shared \ --with-help=Help PLIST_SUB= TCLX_VER=${PORTVERSION:R} ALL_TARGET= binaries libraries INSTALL_TARGET= install-binaries install-libraries LLD_UNSAFE= yes TCLM4= tcl.m4?name=2e84c8 .include -.if ${TCL_VER} > 8.4 -EXTRA_PATCHES+= ${FILESDIR}/tcl85-test-patch -.endif -.if ${TCL_VER} > 8.5 EXTRA_PATCHES+= ${FILESDIR}/tcl86-test-patch -.endif post-extract: ${CP} ${DISTDIR}/${DIST_SUBDIR}/${TCLM4} ${WRKSRC}/tclconfig/tcl.m4 post-configure: # Disabling the failing help.test ${MV} ${WRKSRC}/tests/help.test ${WRKSRC}/tests/help.test.dis post-install: ${INSTALL_DATA} ${WRKSRC}/doc/TclX.n ${STAGEDIR}${PREFIX}/share/man/mann .for l in CmdWrite Handles Keylist ObjCmdWrite TclXInit ${INSTALL_DATA} ${WRKSRC}/doc/${l}.3 ${STAGEDIR}${PREFIX}/share/man/man3 .endfor ${LN} -s CmdWrite.3.gz ${STAGEDIR}${PREFIX}/share/man/man3/TclCommandWriting.3.gz ${LN} -s KeyList.3.gz ${STAGEDIR}${PREFIX}/share/man/man3/TclX_NewKeyedListObj.3.gz .for l in Delete Get GetKeys Set TclX_Main TclX_NewKeyedListObj ${LN} -s KeyList.3.gz ${STAGEDIR}${PREFIX}/share/man/man3/TclX_KeyedList${l}.3.gz .endfor .for l in Alloc Free TblInit TblRelease TblUseCount Walk Xlate ${LN} -s Handles.3.gz ${STAGEDIR}${PREFIX}/share/man/man3/TclX_Handle${l}.3.gz .endfor .for l in Tclxcmd_Init TclX_Main Tkx_Init TkX_Main ${LN} -s TclXInit.3.gz ${STAGEDIR}${PREFIX}/share/man/man3/${l}.3.gz .endfor regression-test test: build ${SETENV} ${MAKE_ENV} ${MAKE} -C ${WRKSRC} test .include diff --git a/lang/tclX/files/tcl85-test-patch b/lang/tclX/files/tcl85-test-patch deleted file mode 100644 index cfd07de15ec8..000000000000 --- a/lang/tclX/files/tcl85-test-patch +++ /dev/null @@ -1,134 +0,0 @@ -The half-baked set of hunks attempts to chase the wording-changes, -that Tcl-8.5 has compared to the earlier releases. It allows TclX -to pass self-tests, when compiled against Tcl-8.5, but is not -suitable for merging into TclX' own tree. - -Someone with enough time to make the tests work with all supported -Tcl-versions, should still do that... - - -mi - ---- tests/cmdtrace.test 2005-11-17 19:01:35.000000000 -0500 -+++ tests/cmdtrace.test 2009-10-13 18:11:52.000000000 -0400 -@@ -92,5 +92,5 @@ - cmdtrace off - GetTrace $cmdtraceFH --} 0 "DoStuff4\\n -+} 0 "DoStuff4 - DoStuff3 - DoStuff2 -@@ -103,5 +103,5 @@ - if {\$wap} {\\n set wap 0\\n } else \{\\n set wap 1... - set wap 0 --cmdtrace off\\n -+cmdtrace off - " - -@@ -132,5 +132,5 @@ - cmdtrace off - GetTrace $cmdtraceFH --} 0 {DoStuff4\n -+} 0 {DoStuff4 - DoStuff3 - DoStuff2 -@@ -143,5 +143,5 @@ - if {$wap} {\n set wap 0\n } else {\n set wap 1\n } - set wap 0 --cmdtrace off\n -+cmdtrace off - } - -@@ -188,6 +188,5 @@ - lappend traceout $errorInfo $errorCode - set traceout --} 0 [list {CD {{DoStuff4 --}} DoStuff4 {}} \ -+} 0 [list {CD DoStuff4 DoStuff4 {}} \ - {CD DoStuff3 DoStuff3 {}} \ - {CD DoStuff2 DoStuff2 {}} \ -@@ -208,6 +207,5 @@ - }}} {}} \ - {CD {{set wap 0}} {{set wap 0}} {}} \ --{CD {{cmdtrace off --}} {{cmdtrace off}} {}}\ -+{CD {{cmdtrace off}} {{cmdtrace off}} {}}\ - ERRORINFO \ - ERRORCODE] ---- tests/string.test 2002-09-25 20:19:02.000000000 -0400 -+++ tests/string.test 2009-10-13 18:25:03.000000000 -0400 -@@ -47,9 +47,18 @@ - } 0 {E} - -+switch $tcl_version { -+8.3 { -+ set anticipate "syntax error in expression \"4x-3\"" -+} 8.4 { -+ set anticipate "syntax error in expression \"4x-3\": extra tokens at end of expression" -+} default { -+ set anticipate {invalid bareword "4x" -+in expression "4x-3"; -+should be "$4x" or "{4x}" or "4x(...)" or ...} -+}} -+ - Test string-1.7 {cindex tests} { -- cindex ABCDEFG lenx-3 --} 1 "syntax error in expression \"7x-3\"[expr { -- ($tcl_version>8.3) ? ": extra tokens at end of expression" : "" --}]" -+ cindex ABCD lenx-3 -+} 1 $anticipate - - Test string-1.8 {cindex tests} { -@@ -146,7 +156,5 @@ - # 8.4+ enhanced the error return from expressions - crange ABCD lenx-3 end-1 --} 1 "syntax error in expression \"4x-3\"[expr { -- ($tcl_version>8.3) ? ": extra tokens at end of expression" : "" --}]" -+} 1 $anticipate - - Test string-3.9 {crange tests} { ---- tests/tryeval.test 2002-04-04 01:10:30.000000000 -0500 -+++ tests/tryeval.test 2009-10-13 18:31:28.000000000 -0400 -@@ -110,10 +110,10 @@ - global final - concat $result $final --} {1 {cont: try_eval error 3.1} {cont: errorInfo-error-3.1 -- invoked from within -+} {1 {cont: try_eval error 3.1} {cont: try_eval error 3.1 -+ while executing - "try_eval $code $catch $finally" - (procedure "test_try_eval" line 2) - invoked from within --"test_try_eval $code $catch $finally"} {cont: errorCode-error-3.1} finally-3.1} -+"test_try_eval $code $catch $finally"} NONE finally-3.1} - - -@@ -148,10 +148,10 @@ - global final - concat $result $final --} {1 {try_eval error 3.3} {errorInfo-error-3.3 -- invoked from within -+} {1 {try_eval error 3.3} {try_eval error 3.3 -+ while executing - "try_eval $code $catch $finally" - (procedure "test_try_eval" line 2) - invoked from within --"test_try_eval $code $catch $finally"} errorCode-error-3.3 finally-3.3} -+"test_try_eval $code $catch $finally"} NONE finally-3.3} - - test try_eval-3.4 {try_eval error result} { -@@ -168,10 +168,10 @@ - global final - list $result $final --} {{1 {try_eval error 3.4} {errorInfo-error-3.4 -- invoked from within -+} {{1 {try_eval error 3.4} {try_eval error 3.4 -+ while executing - "try_eval $code $catch $finally" - (procedure "test_try_eval" line 2) - invoked from within --"test_try_eval $code $catch $finally"} errorCode-error-3.4} finally-3.4} -+"test_try_eval $code $catch $finally"} NONE} finally-3.4} - - diff --git a/x11-toolkits/tk85/Makefile b/x11-toolkits/tk85/Makefile index 0a4ca9522eb9..72130c149f77 100644 --- a/x11-toolkits/tk85/Makefile +++ b/x11-toolkits/tk85/Makefile @@ -1,89 +1,95 @@ PORTNAME= tk PORTVERSION= 8.5.19 PORTREVISION= 3 CATEGORIES= x11-toolkits MASTER_SITES= TCLTK/tcl8_5 SF/tcl/Tcl/${PORTVERSION} PKGNAMESUFFIX= ${SHORT_TK_VER} DISTNAME= ${PORTNAME}${PORTVERSION}-src MAINTAINER= tcltk@FreeBSD.org COMMENT= Graphical toolkit for Tcl WWW= https://www.tcl.tk/ LICENSE= TclTk LICENSE_NAME= Tcl/Tk License LICENSE_FILE= ${WRKSRC}/../license.terms LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept DEPRECATED= Tcl/Tk 8.5 is nearing EOL, please consider switching to Tcl/Tk 8.6 -USES+= tcl:${SHORT_TK_VER},tea xorg +LIB_DEPENDS= libtcl${SHORT_TK_VER}.so:lang/tcl${SHORT_TK_VER} + +GNU_CONFIGURE= yes +USES+= xorg display USE_XORG= x11 xft xscrnsaver USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//}/unix TK_VER= ${PORTVERSION:R} SHORT_TK_VER= ${TK_VER:S/.//} GNU_CONFIGURE_MANPREFIX=${PREFIX}/share -CONFIGURE_ARGS= --enable-xss \ +CONFIGURE_ARGS= --exec-prefix=${PREFIX} \ + --with-tcl=${LOCALBASE}/lib/tcl${TK_VER} \ + --with-tclinclude=${LOCALBASE}/include/tcl${TK_VER} \ + --enable-xss \ --enable-xft \ --enable-man-suffix=.${MAN_SUFFIX} \ --includedir=${PREFIX}/include/tk${TK_VER} CONFIGURE_ENV= PORTSDIR=${PORTSDIR} TK_LIB_FILE=libtk${SHORT_TK_VER}.so.1 \ ac_cv_path_tclsh="${LOCALBASE}/bin/tclsh${TK_VER}" MAN_SUFFIX= ${PKGBASE} INSTALL_TARGET= install TEST_TARGET= do-test MAKE_ENV= SHORT_TK_VER=${SHORT_TK_VER} PLIST_SUB= TK_VER=${TK_VER} SHORT_TK_VER=${SHORT_TK_VER} NOPRECIOUSMAKEVARS= yes # Otherwise 'make readmes' is broken DATADIR= ${PREFIX}/share/${PORTNAME}${TK_VER} SUB_FILES= pkgIndex.tcl OPTIONS_DEFINE= TK85_MAN DEMOS THREADS OPTIONS_DEFAULT=TK85_MAN THREADS OPTIONS_SUB= yes TK85_MAN_DESC= Install tk 8.5 function manpages DEMOS_DESC= Install demos SUB_LIST+= TCLPATCHLEVEL="${PORTVERSION}" DATADIR= ${PREFIX}/share/${PORTNAME}${TCL_VER} THREADS_CONFIGURE_ENABLE= threads TK85_MAN_VARS= INSTALL_TARGET+=install-doc DEMOS_VARS= INSTALL_TARGET+=install-demos TKBASE?= ${PORTSDIR}/${PKGCATEGORY}/${PKGBASE} post-patch: ${REINPLACE_CMD} -e \ 's|@TK_BUILD_LIB_SPEC@|@TK_LIB_SPEC@|; \ s|@TK_BUILD_STUB_LIB_SPEC@|@TK_STUB_LIB_SPEC@|; \ s|@TK_BUILD_STUB_LIB_PATH@|@TK_STUB_LIB_PATH@|; \ s|@TK_SRC_DIR@|${PREFIX}/include/tk${TK_VER}|' \ ${WRKSRC}/tkConfig.sh.in ${REINPLACE_CMD} -e '/^Requires/s|tcl|tcl${SHORT_TK_VER}|' \ ${WRKSRC}/tk.pc.in @${REINPLACE_CMD} -e 's|X11/Intrinsic.h|X11/Xlib.h|g' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|@TK_SHARED_BUILD@|#@TK_SHARED_BUILD@|g; s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/Makefile.in post-configure: ${REINPLACE_CMD} \ -e 's|${WRKDIRPREFIX}${.CURDIR}|$${WRKDIRPREFIX}${TKBASE}|' \ ${WRKSRC}/tkConfig.sh ${REINPLACE_CMD} -e 's|-Wl,--rpath -Wl,/usr/local/lib||g' ${WRKSRC}/Makefile post-install: ${INSTALL_DATA} ${WRKDIR}/pkgIndex.tcl ${STAGEDIR}${PREFIX}/lib/tk${TK_VER}/ ${LN} -fs libtk${SHORT_TK_VER}.so.1.0 \ ${STAGEDIR}${PREFIX}/lib/libtk${SHORT_TK_VER}.so.1 do-test: cd ${WRKSRC} && ${MAKE} test ${ECHO_CMD} "package require Tk" | tclsh${TK_VER} ${ECHO_CMD} "load libtk${SHORT_TK_VER}.so" | tclsh${TK_VER} .include