diff --git a/environment-modules-tcl86.patch b/environment-modules-tcl86.patch new file mode 100644 index 0000000..73b0b02 --- /dev/null +++ b/environment-modules-tcl86.patch @@ -0,0 +1,27 @@ +diff -up modules-3.2.10/cmdModule.c.tcl86 modules-3.2.10/cmdModule.c +--- modules-3.2.10/cmdModule.c.tcl86 2012-11-01 16:02:19.000000000 -0600 ++++ modules-3.2.10/cmdModule.c 2014-05-27 15:25:50.531554880 -0600 +@@ -56,7 +56,11 @@ static void *UseId[] = { &UseId, Id }; + /** MACROS **/ + /** ************************************************************************ **/ + +-/** not applicable **/ ++/** For Tcl < 8.6 compatibility **/ ++#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6) ++#define Tcl_GetErrorLine(interp) (interp->errorLine) ++#define Tcl_SetErrorLine(interp,lineNum) (interp->errorLine = lineNum) ++#endif + + /** ************************************************************************ **/ + /** LOCAL DATA **/ +@@ -640,8 +644,8 @@ int Execute_TclFile( Tcl_Interp *interp + case TCL_OK: gotPartial = 0; + continue; /** while **/ + +- case TCL_ERROR: interp->errorLine = ((linenum-1)-gotPartial) + +- interp->errorLine; ++ case TCL_ERROR: Tcl_SetErrorLine(interp, ((linenum-1)-gotPartial) + ++ Tcl_GetErrorLine(interp)); + /* FALLTHROUGH */ + + case TCL_LEVEL0_RETURN: diff --git a/environment-modules.spec b/environment-modules.spec index 6d55695..09fab5c 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -26,6 +26,9 @@ Patch3: environment-modules-avail.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1037053 # https://sourceforge.net/p/modules/patches/13/ Patch4: environment-modules-format.patch +# Support Tcl 8.6 +# https://sourceforge.net/p/modules/feature-requests/14/ +Patch5: environment-modules-tcl86.patch BuildRequires: tcl-devel, tclx-devel, libX11-devel BuildRequires: dejagnu @@ -68,6 +71,7 @@ have access to the module alias. %patch2 -p1 -b .clear %patch3 -p1 -b .avail %patch4 -p1 -b .format +%patch5 -p1 -b .tcl86 %build @@ -127,6 +131,9 @@ fi %changelog +* Tue May 27 2014 Orion Poplwski - 3.2.10-10 +- Add patch to support Tcl 8.6 + * Wed May 21 2014 Jaroslav Škarvada - 3.2.10-10 - Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86