aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/tkshape
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2005-03-17 11:55:31 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2005-03-17 11:55:31 +0000
commita196bc0545391788d1d0440b9c0b5f895a4ae369 (patch)
treeda301f37dc05a953ba0fecb440b251792d5dbfaf /x11-toolkits/tkshape
parent1d601be25d21988f621d914eee5c060d05d1ea7c (diff)
downloadports-a196bc0545391788d1d0440b9c0b5f895a4ae369.tar.gz
ports-a196bc0545391788d1d0440b9c0b5f895a4ae369.zip
Notes
Diffstat (limited to 'x11-toolkits/tkshape')
-rw-r--r--x11-toolkits/tkshape/Makefile95
-rw-r--r--x11-toolkits/tkshape/distinfo2
-rw-r--r--x11-toolkits/tkshape/files/patch-demos-dragger.tcl14
-rw-r--r--x11-toolkits/tkshape/files/patch-demos-fancytext.tcl14
-rw-r--r--x11-toolkits/tkshape/files/patch-demos-fingerprint.tcl14
-rw-r--r--x11-toolkits/tkshape/files/patch-generic-shape.c163
-rw-r--r--x11-toolkits/tkshape/files/patch-unix-configure.patch20
-rw-r--r--x11-toolkits/tkshape/files/patch-unix-pkgIndex.tcl8
-rw-r--r--x11-toolkits/tkshape/files/patch-unix-shapeUnixImpl.c11
-rw-r--r--x11-toolkits/tkshape/pkg-descr8
-rw-r--r--x11-toolkits/tkshape/pkg-plist15
11 files changed, 364 insertions, 0 deletions
diff --git a/x11-toolkits/tkshape/Makefile b/x11-toolkits/tkshape/Makefile
new file mode 100644
index 000000000000..0987b9cc20d9
--- /dev/null
+++ b/x11-toolkits/tkshape/Makefile
@@ -0,0 +1,95 @@
+# New ports collection makefile for: TkShape
+# Date created: 13 March 2004
+# Whom: nivit@users.sourceforge.net
+#
+# $FreeBSD$
+
+PORTNAME= tkshape
+PORTVERSION= 0.4
+CATEGORIES= x11-toolkits
+MASTER_SITES= http://www.cs.man.ac.uk/~fellowsd/tcl/
+DISTNAME= shape${PORTVERSION:S/.//g}
+
+MAINTAINER= nivit@users.sourceforge.net
+COMMENT= A Tk library to access to X Shaped Window Extension
+
+LIB_DEPENDS= tk84.1:${PORTSDIR}/x11-toolkits/tk84
+
+PLIST_SUB= PORTNAME="${PORTNAME}"
+
+INSTALLS_SHLIB= yes
+
+OPTIONS= MANPAGES "Install manual pages" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_MANPAGES)
+MAN3= CombShape.3 QuryShape.3
+MANN= shape.n
+.endif
+
+WRKSRC= ${WRKDIR}/${PORTNAME:C/^tk//1}${PORTVERSION}
+
+TCL_VER?= 8.4
+TK_VER?= 8.4
+WISH?= wish${TK_VER}
+
+USE_GMAKE= yes
+USE_REINPLACE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-tclconf=${LOCALBASE}/lib/tcl${TCL_VER} \
+ --with-tkconf=${LOCALBASE}/lib/tk${TK_VER}
+CONFIGURE_WRKSRC= ${WRKSRC}/unix
+BUILD_WRKSRC= ${CONFIGURE_WRKSRC}
+
+WHERE_REPLACE= ${WRKSRC}/demos
+REPLACE_FILES= ${WHERE_REPLACE}/dragger.tcl \
+ ${WHERE_REPLACE}/fancytext.tcl \
+ ${WHERE_REPLACE}/fingerprint.tcl
+
+post-patch: .SILENT
+ for FILE in ${REPLACE_FILES}; do \
+ ${REINPLACE_CMD} -e "/%%WISH%%/s//${WISH:S/\//\\\//g}/g" \
+ $${FILE}; \
+ done;
+ ${REINPLACE_CMD} -E 's,(^CFLAGS = )-g,\1${CFLAGS},' \
+ ${BUILD_WRKSRC}/Makefile.in
+
+FIND_DIRS= -type d \! -empty
+FIND_DEMOS= demos -type f -and -name "*.tcl" -maxdepth 1
+FIND_IMAGES= demos/images -type f \
+ -and \( -name "*.gif" -or -name "*.xbm" \
+ -or -name "*.cur" \)
+
+TARGET_DIR= ${PREFIX}/lib/${PORTNAME}
+MANPAGES= ${MAN3} ${MANN}
+
+do-install:
+# script, library
+ cd ${WRKSRC}; \
+ ${MKDIR} ${TARGET_DIR}/demos; \
+ FILES=$$(${FIND} ${FIND_DEMOS}); \
+ for FILE in $${FILES}; do \
+ ${INSTALL_SCRIPT} $${FILE} ${TARGET_DIR}/$${FILE}; \
+ done; \
+ ${INSTALL_SCRIPT} unix/libshape04.so.1.0 ${TARGET_DIR}/libshape04.so.1;
+
+# images, pkgIndex.tcl
+ cd ${WRKSRC}; \
+ ${MKDIR} ${TARGET_DIR}/demos/images; \
+ FILES=$$(${FIND} ${FIND_IMAGES}); \
+ for FILE in $${FILES}; do \
+ ${INSTALL_DATA} $${FILE} ${TARGET_DIR}/$${FILE}; \
+ done; \
+ ${INSTALL_DATA} unix/pkgIndex.tcl ${TARGET_DIR}/pkgIndex.tcl;
+
+# manpages
+.if defined(WITH_MANPAGES)
+ cd ${WRKSRC}; \
+ for m in ${MANPAGES} ; do \
+ s=$${m##*.}; \
+ ${INSTALL_MAN} doc/$${m} ${MANPREFIX}/man/man$${s}/$${m}; \
+ done;
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/x11-toolkits/tkshape/distinfo b/x11-toolkits/tkshape/distinfo
new file mode 100644
index 000000000000..91b464e2f0d7
--- /dev/null
+++ b/x11-toolkits/tkshape/distinfo
@@ -0,0 +1,2 @@
+MD5 (shape04.tar.gz) = bd05d36795b00195bb072fac9c35dc8d
+SIZE (shape04.tar.gz) = 62205
diff --git a/x11-toolkits/tkshape/files/patch-demos-dragger.tcl b/x11-toolkits/tkshape/files/patch-demos-dragger.tcl
new file mode 100644
index 000000000000..9525029abbd0
--- /dev/null
+++ b/x11-toolkits/tkshape/files/patch-demos-dragger.tcl
@@ -0,0 +1,14 @@
+--- demos/dragger.tcl Mon Sep 11 12:01:58 2000
++++ demos/dragger.tcl.new Sun Mar 14 14:36:20 2004
+@@ -32,9 +32,9 @@
+ # $Id: demo.tcl,v 1.1 1997/09/17 21:10:23 donal Exp donal $
+
+ # Now we make cunning use of the backslash/shell trick \
+-[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec wish8.0 $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; }
++[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec %%WISH%% $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; }
+
+-set dir [file join [pwd] [file dirname [info script]] ..]
++set dir [file join [pwd] [file dirname [info script]]]
+ lappend auto_path [file join $dir ..]
+ package require Shape
+
diff --git a/x11-toolkits/tkshape/files/patch-demos-fancytext.tcl b/x11-toolkits/tkshape/files/patch-demos-fancytext.tcl
new file mode 100644
index 000000000000..f3423a9b712b
--- /dev/null
+++ b/x11-toolkits/tkshape/files/patch-demos-fancytext.tcl
@@ -0,0 +1,14 @@
+--- demos/fancytext.tcl Mon Sep 11 12:01:58 2000
++++ demos/fancytext.tcl.new Sun Mar 14 14:36:43 2004
+@@ -32,9 +32,9 @@
+ # $Id: demo.tcl,v 1.1 1997/09/17 21:10:23 donal Exp donal $
+
+ # Now we make cunning use of the backslash/shell trick \
+-[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec wish8.0 $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; }
++[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec %%WISH%% $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; }
+
+-set dir [file join [pwd] [file dirname [info script]] ..]
++set dir [file join [pwd] [file dirname [info script]]]
+ lappend auto_path [file join $dir ..]
+ package require Shape
+
diff --git a/x11-toolkits/tkshape/files/patch-demos-fingerprint.tcl b/x11-toolkits/tkshape/files/patch-demos-fingerprint.tcl
new file mode 100644
index 000000000000..a43a5e85765a
--- /dev/null
+++ b/x11-toolkits/tkshape/files/patch-demos-fingerprint.tcl
@@ -0,0 +1,14 @@
+--- demos/fingerprint.tcl Mon Sep 11 12:01:58 2000
++++ demos/fingerprint.tcl.new Sun Mar 14 14:37:13 2004
+@@ -5,9 +5,9 @@
+ # a little in order to increase its effectiveness.
+
+ # Now we make cunning use of the backslash/shell trick \
+-[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec wish8.0 $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; }
++[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec %%WISH%% $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; }
+
+-set dir [file join [pwd] [file dirname [info script]] ..]
++set dir [file join [pwd] [file dirname [info script]]]
+ lappend auto_path [file join $dir ..]
+ package require Shape
+
diff --git a/x11-toolkits/tkshape/files/patch-generic-shape.c b/x11-toolkits/tkshape/files/patch-generic-shape.c
new file mode 100644
index 000000000000..5394fbe9baa7
--- /dev/null
+++ b/x11-toolkits/tkshape/files/patch-generic-shape.c
@@ -0,0 +1,163 @@
+diff -ur generic/shape.c shape0.4.new/generic/shape.c.new
+--- generic/shape.c Mon Sep 11 17:16:31 2000
++++ generic/shape.c.new Fri Jan 30 15:20:15 2004
+@@ -25,7 +25,6 @@
+ #include <tkInt.h>
+ #endif
+ #include <X11/Xutil.h>
+-#include "panic.h"
+
+ #define min(x,y) ((x)<(y)?(x):(y))
+ #define max(x,y) ((x)<(y)?(y):(x))
+@@ -38,6 +37,10 @@
+ _ANSI_ARGS_((Tk_Window tkwin, Tcl_Interp *interp, int x, int y, int op,
+ int kind, int objc, Tcl_Obj *CONST objv[]));
+
++static Tk_Window getWindow(Tk_Window, Tcl_Interp*, Tcl_Obj*, int *);
++
++int Shape_Init(Tcl_Interp *);
++
+ static int
+ shapeBoundClipOps _ANSI_ARGS_((Tk_Window tkwin, Tcl_Interp *interp, int opnum,
+ int objc, Tcl_Obj *CONST objv[]));
+@@ -76,7 +79,7 @@
+ enum {
+ boundsCmd, getCmd, offsetCmd, setCmd, updateCmd, versionCmd
+ };
+-static char *subcommands[] = {
++static CONST char *subcommands[] = {
+ "bounds", "get", "offset", "set", "update", "version", NULL
+ };
+ static shapeCommandHandler shapeCommandHandlers[] = {
+@@ -133,7 +136,7 @@
+ int opnum, objc;
+ Tcl_Obj *CONST objv[];
+ {
+- static char *options[] = {
++ static CONST char *options[] = {
+ "-bounding", "-clip", NULL
+ };
+ int idx = 0,toplevel;
+@@ -160,7 +163,7 @@
+ return TCL_ERROR;
+ }
+ if (valid) {
+- Tcl_Obj *r, *result[4];
++ Tcl_Obj /* *r, */ *result[4];
+
+ result[0] = Tcl_NewIntObj(x1);
+ result[1] = Tcl_NewIntObj(y1);
+@@ -178,6 +181,8 @@
+ default: /* should be impossible to get here! */
+ panic("unexpected operation number %d", opnum);
+ }
++
++ return TCL_OK;
+ }
+
+ static int
+@@ -187,12 +192,14 @@
+ int opnum, objc;
+ Tcl_Obj *CONST objv[];
+ {
+- static char *opts[] = {
++ static CONST char *opts[] = {
+ "-bounding", "-clip", "-both", NULL
+ };
+ int x,y,toplevel, i = SHAPE_KIND_BOTH-1;
+ Tk_Window tkwin;
+
++ opnum = 0; /* unused */
++
+ /* Argument parsing */
+ switch (objc) {
+ default:
+@@ -256,6 +263,8 @@
+ XRectangle *rects;
+ int count,i,result;
+
++ x = y = op = 0; /* unused */
++
+ if (objc != 1) {
+ Tcl_AppendResult(interp, "rectangles requires one argument; "
+ "a list of rectangles", NULL);
+@@ -309,6 +318,10 @@
+ int x, y, op, kind, objc;
+ Tcl_Obj *CONST objv[];
+ {
++
++ x = y = op; /* unused */
++ objv = NULL; /* unused */
++
+ if (objc != 0) {
+ Tcl_AppendResult(interp, "reset takes no arguments", NULL);
+ return TCL_ERROR;
+@@ -327,6 +340,8 @@
+ XRectangle *rects;
+ int count, result;
+
++ x = y; /* unused */
++
+ if (objc != 2) {
+ Tcl_AppendResult(interp, "text requires two arguments; the string "
+ "to display and the font to use to display it",
+@@ -356,8 +371,7 @@
+ Tcl_Obj *CONST objv[];
+ {
+ Tk_Window srcwin;
+- int ignore, result;
+- Display *dpy;
++ int ignore;
+
+ if (objc != 1) {
+ Tcl_AppendResult(interp, "window requires one argument; a window "
+@@ -388,7 +402,7 @@
+ return TCL_ERROR;
+ }
+
+- imageName = Tcl_GetStringFromObj(objv[0], &NULL);
++ imageName = Tcl_GetStringFromObj(objv[0], NULL);
+ handle = Tk_FindPhoto(interp, imageName);
+ if (handle == NULL) {
+ return TCL_ERROR;
+@@ -418,19 +432,19 @@
+ enum optkind {
+ shapekind, offsetargs, sourceargs
+ };
+- static char *options[] = {
++ static CONST char *options[] = {
+ "-offset",
+ "-bounding", "-clip", "-both",
+ "bitmap", "rectangles", "reset", "text", "window",
+ #ifdef SUPPORTS_PHOTO_REGION
+- "photo"
++ "photo",
+ #endif
+ NULL
+ };
+ static enum optkind optk[] = {
+ offsetargs,
+ shapekind, shapekind, shapekind,
+- sourceargs, sourceargs, sourceargs, sourceargs, sourceargs
++ sourceargs, sourceargs, sourceargs, sourceargs, sourceargs,
+ #ifdef SUPPORTS_PHOTO_REGION
+ sourceargs
+ #endif
+@@ -458,7 +472,7 @@
+ idx = 3;
+ break;
+ case updateCmd: {
+- static char *operations[] = {
++ static CONST char *operations[] = {
+ "set", "union", "intersect", "subtract", "invert",
+ ":=", "+=", "*=", "-=", "=", "||", "&&", NULL
+ };
+@@ -570,6 +584,8 @@
+ default: /* should be impossible to get here! */
+ panic("switch fallthrough");
+ }
++
++ return TCL_OK;
+ }
+
+ int
diff --git a/x11-toolkits/tkshape/files/patch-unix-configure.patch b/x11-toolkits/tkshape/files/patch-unix-configure.patch
new file mode 100644
index 000000000000..a607cf4e9268
--- /dev/null
+++ b/x11-toolkits/tkshape/files/patch-unix-configure.patch
@@ -0,0 +1,20 @@
+diff -ur unix/configure unix/configure.new
+--- unix/configure Thu Sep 14 12:15:35 2000
++++ unix/configure.new Sat Mar 13 11:15:06 2004
+@@ -448,13 +448,13 @@
+ CC=$TCL_CC
+ SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
+ SHLIB_LD=$TCL_SHLIB_LD
+-SHLIB_LD_LIBS="-lXext $TCL_SHLIB_LD_LIBS"
++SHLIB_LD_LIBS="$TCL_SHLIB_LD_LIBS $TK_LIBS -lXext"
+ SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
+ SHLIB_VERSION=$TCL_SHLIB_VERSION
+ TCL_LIBS=$TCL_LIBS
+ TCL_VERSION=$TCL_VERSION
+-TCL_INCLUDE=$TCL_PREFIX/include
+-TK_INCLUDE=$TK_PREFIX/include
++TCL_INCLUDE=$TCL_PREFIX/include/tcl$TCL_VERSION
++TK_INCLUDE=$TK_PREFIX/include/tk$TK_VERSION
+ TCL_BIN_DIR=$TK_EXEC_PREFIX/bin
+
+ echo $ac_n "checking for -lXext""... $ac_c" 1>&6
diff --git a/x11-toolkits/tkshape/files/patch-unix-pkgIndex.tcl b/x11-toolkits/tkshape/files/patch-unix-pkgIndex.tcl
new file mode 100644
index 000000000000..fd7023ba76ba
--- /dev/null
+++ b/x11-toolkits/tkshape/files/patch-unix-pkgIndex.tcl
@@ -0,0 +1,8 @@
+--- unix/pkgIndex.tcl Mon Sep 11 16:27:28 2000
++++ unix/pkgIndex.tcl.new Sun Mar 14 13:29:27 2004
+@@ -5,4 +5,4 @@
+ # broken OSes like SunOS4. If you have a problem with this, tough!
+
+ package ifneeded Shape 0.4 "package require Tk 8\n\
+- [list tclPkgSetup $dir Shape 0.4 {{libshape04.so.1.0 load shape}}]"
++ [list tclPkgSetup $dir Shape 0.4 {{libshape04.so.1 load shape}}]"
diff --git a/x11-toolkits/tkshape/files/patch-unix-shapeUnixImpl.c b/x11-toolkits/tkshape/files/patch-unix-shapeUnixImpl.c
new file mode 100644
index 000000000000..80f64037e9a8
--- /dev/null
+++ b/x11-toolkits/tkshape/files/patch-unix-shapeUnixImpl.c
@@ -0,0 +1,11 @@
+diff -ur unix/shapeUnixImpl.c unix/shapeUnixImpl.c.new
+--- unix/shapeUnixImpl.c Mon Sep 11 16:27:28 2000
++++ unix/shapeUnixImpl.c Sat Mar 13 11:25:54 2004
+@@ -16,6 +16,7 @@
+ #include <X11/Xutil.h> /* For Region declaration. */
+ #include <X11/extensions/shape.h>
+ #include "shape.h"
++#include "shapeInt.h"
+
+ #ifdef DKF_SHAPE_DEBUGGING
+ static int
diff --git a/x11-toolkits/tkshape/pkg-descr b/x11-toolkits/tkshape/pkg-descr
new file mode 100644
index 000000000000..24e473d97ea3
--- /dev/null
+++ b/x11-toolkits/tkshape/pkg-descr
@@ -0,0 +1,8 @@
+This Tcl/Tk extension offers raw access to the X Shaped Window
+Extension.
+
+WWW: http://www.cs.man.ac.uk/~fellowsd/tcl/shapeidx.html
+
+--
+Nicola Vitale
+nivit@users.sourceforge.net
diff --git a/x11-toolkits/tkshape/pkg-plist b/x11-toolkits/tkshape/pkg-plist
new file mode 100644
index 000000000000..51de76df6f54
--- /dev/null
+++ b/x11-toolkits/tkshape/pkg-plist
@@ -0,0 +1,15 @@
+lib/%%PORTNAME%%/libshape04.so.1
+lib/%%PORTNAME%%/pkgIndex.tcl
+lib/%%PORTNAME%%/demos/dragger.tcl
+lib/%%PORTNAME%%/demos/fancytext.tcl
+lib/%%PORTNAME%%/demos/fingerprint.tcl
+lib/%%PORTNAME%%/demos/images/doc-img.gif
+lib/%%PORTNAME%%/demos/images/doc-mask.xbm
+lib/%%PORTNAME%%/demos/images/fingerprint.xbm
+lib/%%PORTNAME%%/demos/images/none.cur
+lib/%%PORTNAME%%/demos/images/ptr-green.gif
+lib/%%PORTNAME%%/demos/images/ptr-mask.xbm
+lib/%%PORTNAME%%/demos/images/ptr-red.gif
+@dirrm lib/%%PORTNAME%%/demos/images
+@dirrm lib/%%PORTNAME%%/demos
+@dirrm lib/%%PORTNAME%%