Add patch to support Tcl 8.6
This commit is contained in:
parent
33fb121f8a
commit
493086ffdd
27
environment-modules-tcl86.patch
Normal file
27
environment-modules-tcl86.patch
Normal file
@ -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:
|
@ -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 <orion@cora.nwra.com> - 3.2.10-10
|
||||
- Add patch to support Tcl 8.6
|
||||
|
||||
* Wed May 21 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 3.2.10-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user