libraries/tDOM: Added compatibility patch for tcl 8.6

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Willy Sudiarto Raharjo 2013-11-14 21:52:46 +07:00 committed by Robby Workman
parent d168a001be
commit 18578fcf23
2 changed files with 40 additions and 6 deletions

View file

@ -0,0 +1,31 @@
diff -Nur tDOM-0.8.3.orig/generic/dom.h tDOM-0.8.3/generic/dom.h
--- tDOM-0.8.3.orig/generic/dom.h 2013-11-14 21:27:44.677606548 +0700
+++ tDOM-0.8.3/generic/dom.h 2013-11-14 21:28:45.463749065 +0700
@@ -87,6 +87,15 @@
#endif
/*
+ * Beginning with 8.6, interp->errorLine isn't public visible anymore
+ * (TIP 330)
+*/
+
+#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
+# define Tcl_GetErrorLine(interp) (interp)->errorLine
+#endif
+
+/*
* Beginning with 8.4, Tcl API is CONST'ified
*/
#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION <= 3)
diff -Nur tDOM-0.8.3.orig/generic/tcldom.c tDOM-0.8.3/generic/tcldom.c
--- tDOM-0.8.3.orig/generic/tcldom.c 2013-11-14 21:27:44.675606577 +0700
+++ tDOM-0.8.3/generic/tcldom.c 2013-11-14 21:30:34.804206653 +0700
@@ -5934,7 +5934,7 @@
if (ret == TCL_ERROR) {
char msg[64 + TCL_INTEGER_SPACE];
sprintf(msg, "\n (\"%s %s\" body line %d)", Tcl_GetString(objv[0]),
- Tcl_GetString(objv[1]), interp->errorLine);
+ Tcl_GetString(objv[1]), Tcl_GetErrorLine(interp));
Tcl_AddErrorInfo(interp, msg);
}

View file

@ -8,7 +8,7 @@
PRGNAM=tDOM
VERSION=${VERSION:-0.8.3}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -47,12 +47,15 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Upstream patch
# https://github.com/tDOM/tdom/commit/3dd529139d2f44bb9ecfdcddd27b3d6a8df5ff41#diff-0
patch -p1 < $CWD/tDOM-tcl8.6-compat.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \