summaryrefslogtreecommitdiff
path: root/lang/sather
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2014-06-28 23:10:39 +0000
committerdholland <dholland@pkgsrc.org>2014-06-28 23:10:39 +0000
commit5f17150fd32ff434d2fa3845ac50d9d410c6fff2 (patch)
treebbf88cbeea792ae7bb2f4bb768240140483a92f5 /lang/sather
parent3af72366c5273b7111a47874d2d4d7832e412cc4 (diff)
downloadpkgsrc-5f17150fd32ff434d2fa3845ac50d9d410c6fff2.tar.gz
Fix build with tcl/tk 8.6.
Diffstat (limited to 'lang/sather')
-rw-r--r--lang/sather/distinfo9
-rw-r--r--lang/sather/patches/patch-Library_System_Socket_socket__support__unix.c64
-rw-r--r--lang/sather/patches/patch-Library_System_TclTk_c__interface.c29
-rw-r--r--lang/sather/patches/patch-Library_System_TclTk_tkRaster.c180
-rw-r--r--lang/sather/patches/patch-Library_System_TclTk_tkRaster.h24
-rw-r--r--lang/sather/patches/patch-Library_System_TclTk_tkRasterBuiltIn.c14
-rw-r--r--lang/sather/patches/patch-aj6
7 files changed, 321 insertions, 5 deletions
diff --git a/lang/sather/distinfo b/lang/sather/distinfo
index cf94ab85c9d..c66ec0fe0b5 100644
--- a/lang/sather/distinfo
+++ b/lang/sather/distinfo
@@ -1,8 +1,13 @@
-$NetBSD: distinfo,v 1.13 2013/10/27 20:33:39 joerg Exp $
+$NetBSD: distinfo,v 1.14 2014/06/28 23:10:39 dholland Exp $
SHA1 (sather-1.2.3.tar.gz) = 85678468dc99ee1880a38d994d4231e799fcaae6
RMD160 (sather-1.2.3.tar.gz) = 219594b2621df4f4bb75bd41c67b1a26ecb04042
Size (sather-1.2.3.tar.gz) = 5535747 bytes
+SHA1 (patch-Library_System_Socket_socket__support__unix.c) = c8d31aacf1d36c7dea00462f6535d38e9443e2e0
+SHA1 (patch-Library_System_TclTk_c__interface.c) = 44667a9b8ce9d622e5bc030e80e822785d4712a2
+SHA1 (patch-Library_System_TclTk_tkRaster.c) = 49b6e788c2b511608d8f2613f2c8aaa1f6d1ef0d
+SHA1 (patch-Library_System_TclTk_tkRaster.h) = bb88dd405b071988075446a7a1e1cae9622a538a
+SHA1 (patch-Library_System_TclTk_tkRasterBuiltIn.c) = 4f32743b86c9b34d9f5b803187b1c7b8f2837873
SHA1 (patch-aa) = d326038193ce2fb459ed19f9ab2ae2b6dce1ace3
SHA1 (patch-ab) = e45f8a8230d1fbe3fc72babbecfa8148699f7906
SHA1 (patch-ac) = 586cdebde7a2c1b49f9b75a33d26980a2c0397f3
@@ -12,7 +17,7 @@ SHA1 (patch-af) = 1ab2a67446f48c088ec77550d199a9779c50ffb8
SHA1 (patch-ag) = 5cd0a0ab1c1fbf80c6ba424fa1926957ede35715
SHA1 (patch-ah) = 9dad48a3bc7e6af65eb51ae6070b8e67cab9ca2b
SHA1 (patch-ai) = 032b6a4355bdd059d5b88ebe00ae2c1bf35c8eba
-SHA1 (patch-aj) = a64522fa97e91cb8704f572f1670921590840976
+SHA1 (patch-aj) = c27e27a98c722ec09fd1b647c0ae20852d59fa33
SHA1 (patch-ak) = 9efae5b96d5e8b8040d74eebc20b3aa7153d2aee
SHA1 (patch-al) = 52d12bc03d041dfa28140842f46a423644952a91
SHA1 (patch-am) = b75d6812ee2bcb81205d82316c8215d500df077c
diff --git a/lang/sather/patches/patch-Library_System_Socket_socket__support__unix.c b/lang/sather/patches/patch-Library_System_Socket_socket__support__unix.c
new file mode 100644
index 00000000000..9ce9fc73f33
--- /dev/null
+++ b/lang/sather/patches/patch-Library_System_Socket_socket__support__unix.c
@@ -0,0 +1,64 @@
+$NetBSD: patch-Library_System_Socket_socket__support__unix.c,v 1.1 2014/06/28 23:10:39 dholland Exp $
+
+Silence warnings about pointer casts.
+
+--- Library/System/Socket/socket_support_unix.c~ 2007-07-01 03:53:35.000000000 +0000
++++ Library/System/Socket/socket_support_unix.c
+@@ -110,7 +110,7 @@ int make_initiating_socket_unix(char *se
+ current server socket */
+
+ old_int_handler = signal(SIGINT, unlink_server_and_exit);
+- if ((int)old_int_handler == -1)
++ if ((intptr_t)old_int_handler == -1)
+ {
+ socket_warn_errno("attempt to redirect SIGINT signal");
+ close(server_id);
+@@ -119,7 +119,7 @@ int make_initiating_socket_unix(char *se
+ }
+
+ old_term_handler = signal(SIGTERM, unlink_server_and_exit);
+- if ((int)old_term_handler == -1)
++ if ((intptr_t)old_term_handler == -1)
+ {
+ socket_warn_errno("attempt to redirect SIGTERM signal");
+ close(server_id);
+@@ -160,7 +160,7 @@ int make_initiating_socket_unix(char *se
+ /* re-install old handlers */
+
+ old_int_handler = signal(SIGINT, old_int_handler);
+- if ((int)old_int_handler == -1)
++ if ((intptr_t)old_int_handler == -1)
+ {
+ socket_warn_errno("attempt to restore original SIGINT handler");
+ close(server_id);
+@@ -170,7 +170,7 @@ int make_initiating_socket_unix(char *se
+ }
+
+ old_term_handler = signal(SIGTERM, old_term_handler);
+- if ((int)old_term_handler == -1)
++ if ((intptr_t)old_term_handler == -1)
+ {
+ socket_warn_errno("attempt to restore original SIGTERM handler");
+ close(server_id);
+@@ -686,16 +686,16 @@ int min_port_num(void)
+ */
+ void ignore_broken_pipe_signals(void)
+ {
+- int status;
+- status = (int)signal(SIGPIPE, SIG_IGN);
+- /* printf("*** First time, old SIGPIPE handler was %d\n",status); */
++ long status;
++ status = (long)(intptr_t)signal(SIGPIPE, SIG_IGN);
++ /* printf("*** First time, old SIGPIPE handler was %ld\n",status); */
+ if (status < 0)
+ {
+ socket_warn_errno("setting up ignoring of SIGPIPE signals (will \
+ ignore error)");
+ }
+- /* status = (int)signal(SIGPIPE, SIG_IGN); */
+- /* printf("*** Second time, old SIGPIPE handler was %d\n",status); */
++ /* status = (long)(intptr_t)signal(SIGPIPE, SIG_IGN); */
++ /* printf("*** Second time, old SIGPIPE handler was %ld\n",status); */
+ }
+
+ /***********************************************************************/
diff --git a/lang/sather/patches/patch-Library_System_TclTk_c__interface.c b/lang/sather/patches/patch-Library_System_TclTk_c__interface.c
new file mode 100644
index 00000000000..a2a9af0ddd8
--- /dev/null
+++ b/lang/sather/patches/patch-Library_System_TclTk_c__interface.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-Library_System_TclTk_c__interface.c,v 1.1 2014/06/28 23:10:39 dholland Exp $
+
+Fix build with tcl 8.6.
+
+--- Library/System/TclTk/c_interface.c~ 2007-07-01 03:53:35.000000000 +0000
++++ Library/System/TclTk/c_interface.c
+@@ -33,11 +33,11 @@ void *ConstTclVolatile() {
+
+ void delete_proc(ClientData client_data) {}
+
+-int tkkit_cb_cmd(ClientData user_data, Tcl_Interp *tcl, int argc, char **argv) {
++int tkkit_cb_cmd(ClientData user_data, Tcl_Interp *tcl, int argc, const char **argv) {
+ C_TCL_TK_tkkit_cb(argv);
+ }
+
+-int sather_cmd(ClientData user_data, Tcl_Interp *tcl, int argc, char **argv) {
++int sather_cmd(ClientData user_data, Tcl_Interp *tcl, int argc, const char **argv) {
+ return C_TCL_TK_sather_cb((int) tcl, argv);
+ }
+
+@@ -66,7 +66,7 @@ char *str_ind(char **argv, int i) {
+ }
+
+ char *Tcl_GetResult(Tcl_Interp *interpreter) {
+- return interpreter->result;
++ return Tcl_GetStringResult(interpreter);
+ }
+
+ int Tk_AddRaster(Tcl_Interp *interp)
diff --git a/lang/sather/patches/patch-Library_System_TclTk_tkRaster.c b/lang/sather/patches/patch-Library_System_TclTk_tkRaster.c
new file mode 100644
index 00000000000..e1565d7e370
--- /dev/null
+++ b/lang/sather/patches/patch-Library_System_TclTk_tkRaster.c
@@ -0,0 +1,180 @@
+$NetBSD: patch-Library_System_TclTk_tkRaster.c,v 1.1 2014/06/28 23:10:39 dholland Exp $
+
+Use standard headers.
+Fix build with tcl 8.6.
+
+--- Library/System/TclTk/tkRaster.c.orig 2007-07-01 03:53:35.000000000 +0000
++++ Library/System/TclTk/tkRaster.c
+@@ -37,8 +37,21 @@
+ #define LOW -32768
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <memory.h>
+ #include <ctype.h>
++
++/*
++ * Hack for tcl/tk 8.6: enable access to Tcl_Interp->result.
++ *
++ * As far as I can tell the method this code uses to set the result
++ * (sprintf directly into an existing result pointer of who knows what
++ * size) is insupportable and incorrect, but it should be fixed to
++ * call Tcl_SetResult by someone who knows more about tcl than I do.
++ * XXX.
++ */
++#define USE_INTERP_RESULT
++
+ #include <tk.h>
+ #include "tkRaster.h"
+ #include "tkRasterBuiltIn.h"
+@@ -182,15 +195,15 @@ static int PrimitiveCount = 0; /*
+ */
+
+ static int ConfigureRaster _ANSI_ARGS_((Tcl_Interp *, Raster *,
+- int argc, char **argv, int flags));
++ int argc, const char **argv, int flags));
+ static void DestroyRaster _ANSI_ARGS_((char *clientData));
+ static void DisplayRaster _ANSI_ARGS_((ClientData clientData));
+ static void RasterEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+ static int RasterWidgetCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *,
+- int argc, char **argv));
++ int argc, const char **argv));
+ static int RasterDraw _ANSI_ARGS_((Tcl_Interp*, Raster*, RasterImplement*,
+- int argc, char ** argv));
++ int argc, const char ** argv));
+ static void arrangeDisplay _ANSI_ARGS_((Raster*, int x0, int y0,
+ int x1, int y1));
+ static void arrangeExpose _ANSI_ARGS_((Raster*, int x0, int y0,
+@@ -198,18 +211,18 @@ static void arrangeExpose _ANSI_ARGS_((R
+ void RasterDisplay _ANSI_ARGS_ ((Tk_Raster *));
+
+ static int myOptionParse _ANSI_ARGS_((ClientData, Tcl_Interp *,
+- Tk_Window, char*, char*, int));
+-static char * myOptionPrint _ANSI_ARGS_((ClientData, Tk_Window, char*,
++ Tk_Window, const char*, char*, int));
++static const char * myOptionPrint _ANSI_ARGS_((ClientData, Tk_Window, char*,
+ int, Tcl_FreeProc ** ));
+
+ static int ConfigDrawEnv _ANSI_ARGS_((Tcl_Interp*, Raster*, DrawEnvironment*,
+- int argc, char * argv []));
++ int argc, const char ** argv ));
+ static int ConfigInfoDrawEnv _ANSI_ARGS_((Tcl_Interp*, Raster*,
+ DrawEnvironment*,
+- int argc, char * argv []));
++ int argc, const char ** argv ));
+
+ static int CreateDrawEnv _ANSI_ARGS_((Tcl_Interp *, Raster*,
+- int argc, char* argv []));
++ int argc, const char ** argv));
+ static void DestroyDrawEnv _ANSI_ARGS_((Raster*, DrawEnvironment*));
+
+ /*
+@@ -380,7 +393,7 @@ RasterCmd(clientData, interp, argc, argv
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+- char **argv; /* Argument strings. */
++ const char **argv; /* Argument strings. */
+ {
+ Tk_Window main = (Tk_Window) clientData;
+ Raster *RasterPtr;
+@@ -448,7 +461,7 @@ RasterCmd(clientData, interp, argc, argv
+
+ /* A new drawing environment numbered "0" must be created
+ and installed with the following command */
+- if (CreateDrawEnv (interp, RasterPtr, 0, (char**) NULL) != TCL_OK ||
++ if (CreateDrawEnv (interp, RasterPtr, 0, (const char**) NULL) != TCL_OK ||
+ DrawEnvIndex (interp, RasterPtr, 0, &newenv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+@@ -552,7 +565,7 @@ RasterWidgetCmd(clientData, interp, argc
+ ClientData clientData; /* Information about Raster widget. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+- char **argv; /* Argument strings. */
++ const char **argv; /* Argument strings. */
+ {
+ Raster *RasterPtr = (Raster *) clientData;
+ int result = TCL_OK;
+@@ -823,7 +836,7 @@ RasterDraw (interp, RasterPtr, implemPtr
+ Raster* RasterPtr;
+ RasterImplement* implemPtr;
+ int argc;
+- char ** argv;
++ const char ** argv;
+ {
+ RasterPtr->px0 = HIGH;
+ RasterPtr->py0 = HIGH;
+@@ -905,7 +918,7 @@ ConfigureRaster(interp, RasterPtr, argc,
+ Tcl_Interp *interp; /* Used for error reporting. */
+ Raster *RasterPtr; /* Information about widget. */
+ int argc; /* Number of valid entries in argv. */
+- char **argv; /* Arguments. */
++ const char **argv; /* Arguments. */
+ int flags; /* Flags to pass to
+ * Tk_ConfigureWidget. */
+ {
+@@ -1507,7 +1520,7 @@ static int ConfigDrawEnv (interp, Raster
+ Raster* RasterPtr;
+ DrawEnvironment* drawEnv;
+ int argc;
+- char * argv [];
++ const char ** argv;
+ {
+ if (Tk_ConfigureWidget(interp, RasterPtr->tkwin, DrawEnvSpecs,
+ argc, argv, (char *) drawEnv, TK_CONFIG_ARGV_ONLY) != TCL_OK) {
+@@ -1572,7 +1585,7 @@ static int ConfigInfoDrawEnv (interp, Ra
+ Raster* RasterPtr;
+ DrawEnvironment* drawEnv;
+ int argc;
+- char * argv [];
++ const char ** argv;
+ {
+ if (argc == 0) {
+ return Tk_ConfigureInfo (interp, RasterPtr->tkwin,
+@@ -1660,7 +1673,7 @@ static int CreateDrawEnv (interp, Raster
+ Tcl_Interp * interp;
+ Raster* RasterPtr;
+ int argc;
+- char* argv [];
++ const char **argv;
+ {
+ Tcl_HashEntry *entryPtr;
+ DrawEnvironment *drawEnvPtr;
+@@ -1733,7 +1746,7 @@ myOptionParse (clientData, interp, tkwin
+ ClientData clientData;
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+- char* value;
++ const char *value;
+ char* widgRec;
+ int offset;
+ {
+@@ -1762,7 +1775,7 @@ myOptionParse (clientData, interp, tkwin
+ return TCL_ERROR;
+ }
+
+-static char *
++static const char *
+ myOptionPrint (clientData, tkwin, widgRec, offset, freeProcPtr)
+ ClientData clientData;
+ Tk_Window tkwin;
+@@ -1776,7 +1789,7 @@ myOptionPrint (clientData, tkwin, widgRe
+ if (ptr->optionvalue == value) return ptr->optionname;
+ ptr++;
+ }
+- return (char*) NULL;
++ return (const char*) NULL;
+ }
+
+ /*======================================================================
+@@ -2175,7 +2188,7 @@ void RasterFillPolygon (raster, coord, n
+ int
+ CreateDrawEnviron(Tcl_Interp *interp,
+ Tk_Raster *RasterPtr,
+- int argc, char **argv)
++ int argc, const char **argv)
+ {
+ int result;
+
diff --git a/lang/sather/patches/patch-Library_System_TclTk_tkRaster.h b/lang/sather/patches/patch-Library_System_TclTk_tkRaster.h
new file mode 100644
index 00000000000..7c360883241
--- /dev/null
+++ b/lang/sather/patches/patch-Library_System_TclTk_tkRaster.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-Library_System_TclTk_tkRaster.h,v 1.1 2014/06/28 23:10:39 dholland Exp $
+
+Fix build with tcl 8.6.
+
+--- Library/System/TclTk/tkRaster.h.orig 2007-07-01 03:53:35.000000000 +0000
++++ Library/System/TclTk/tkRaster.h
+@@ -166,7 +166,7 @@ typedef int RasterPrimDrawProc _ANSI_ARG
+ Tk_Raster * raster,
+ ClientData data,
+ int argc,
+- char* argv []));
++ const char **argv));
+
+ typedef int RasterPrimInitProc _ANSI_ARGS_((Tcl_Interp * interp,
+ Tk_Raster* raster,
+@@ -196,7 +196,7 @@ EXTERN int RasterInit _ANSI_ARGS_((Tcl_I
+ *
+ */
+ EXTERN int RasterCmd _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp,
+- int argc, char **argv));
++ int argc, const char **argv));
+
+
+ /*---------------------------------------------------------------------------
diff --git a/lang/sather/patches/patch-Library_System_TclTk_tkRasterBuiltIn.c b/lang/sather/patches/patch-Library_System_TclTk_tkRasterBuiltIn.c
new file mode 100644
index 00000000000..ce9df1a6c1e
--- /dev/null
+++ b/lang/sather/patches/patch-Library_System_TclTk_tkRasterBuiltIn.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-Library_System_TclTk_tkRasterBuiltIn.c,v 1.1 2014/06/28 23:10:39 dholland Exp $
+
+Use standard headers.
+
+--- Library/System/TclTk/tkRasterBuiltIn.c~ 2007-07-01 03:53:35.000000000 +0000
++++ Library/System/TclTk/tkRasterBuiltIn.c
+@@ -11,6 +11,7 @@
+ /* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ /*------------> Please email comments to <bug-sather@gnu.org> <------------*/
+
++#include <stdlib.h>
+ #include <tk.h>
+ #include "tkRaster.h"
+ #include "tkRasterBuiltIn.h"
diff --git a/lang/sather/patches/patch-aj b/lang/sather/patches/patch-aj
index 41c1a45ebc6..e0b044bf0ae 100644
--- a/lang/sather/patches/patch-aj
+++ b/lang/sather/patches/patch-aj
@@ -1,9 +1,9 @@
-$NetBSD: patch-aj,v 1.3 2012/08/27 00:36:25 dholland Exp $
+$NetBSD: patch-aj,v 1.4 2014/06/28 23:10:39 dholland Exp $
--- System/Platforms/tcltk/Make.target.inc.orig Thu May 2 17:21:52 2002
+++ System/Platforms/tcltk/Make.target.inc Thu May 2 17:21:35 2002
@@ -1,2 +1,2 @@
-TCL_LIB_NAME = $(shell if [ -e /usr/lib/libtcl8.0.so ] ; then echo "tcl8.0" ; else echo "tcl"; fi)
-TK_LIB_NAME = $(shell if [ -e /usr/lib/libtk8.0.so ] ; then echo "tk8.0" ; else echo "tk"; fi)
-+TCL_LIB_NAME = tcl85
-+TK_LIB_NAME = tk85
++TCL_LIB_NAME = tcl86
++TK_LIB_NAME = tk86