Date: 22 Aug 2004 15:06:23 -0000 From: nivit@email.it (Nicola Vitale) To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/70845: [NEW PORT] devel/tkshape - A Tk library to access to X Shaped Window Extension Message-ID: <20040822150623.83076.qmail@psyllobora> Resent-Message-ID: <200408230750.i7N7oHVq016186@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 70845 >Category: ports >Synopsis: [NEW PORT] devel/tkshape - A Tk library to access to X Shaped Window Extension >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Aug 23 07:50:17 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Nicola Vitale >Release: FreeBSD 4.10-STABLE i386 >Organization: >Environment: >Description: New port - devel/tkshape This Tcl/Tk extension offers raw access to the X Shaped-Window extension. WWW: http://www.cs.man.ac.uk/~fellowsd/tcl/shapeidx.html >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # tkshape # tkshape/files # tkshape/files/patch-demos-dragger.tcl # tkshape/files/patch-demos-fancytext.tcl # tkshape/files/patch-demos-fingerprint.tcl # tkshape/files/patch-generic-shape.c # tkshape/files/patch-unix-configure.patch # tkshape/files/patch-unix-pkgIndex.tcl # tkshape/files/patch-unix-shapeUnixImpl.c # tkshape/Makefile # tkshape/distinfo # tkshape/pkg-descr # tkshape/pkg-plist # echo c - tkshape mkdir -p tkshape > /dev/null 2>&1 echo c - tkshape/files mkdir -p tkshape/files > /dev/null 2>&1 echo x - tkshape/files/patch-demos-dragger.tcl sed 's/^X//' >tkshape/files/patch-demos-dragger.tcl << 'END-of-tkshape/files/patch-demos-dragger.tcl' X--- demos/dragger.tcl Mon Sep 11 12:01:58 2000 X+++ demos/dragger.tcl.new Sun Mar 14 14:36:20 2004 X@@ -32,9 +32,9 @@ X # $Id: demo.tcl,v 1.1 1997/09/17 21:10:23 donal Exp donal $ X X # Now we make cunning use of the backslash/shell trick \ X-[ -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+[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec %%WISH%% $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; } X X-set dir [file join [pwd] [file dirname [info script]] ..] X+set dir [file join [pwd] [file dirname [info script]]] X lappend auto_path [file join $dir ..] X package require Shape X END-of-tkshape/files/patch-demos-dragger.tcl echo x - tkshape/files/patch-demos-fancytext.tcl sed 's/^X//' >tkshape/files/patch-demos-fancytext.tcl << 'END-of-tkshape/files/patch-demos-fancytext.tcl' X--- demos/fancytext.tcl Mon Sep 11 12:01:58 2000 X+++ demos/fancytext.tcl.new Sun Mar 14 14:36:43 2004 X@@ -32,9 +32,9 @@ X # $Id: demo.tcl,v 1.1 1997/09/17 21:10:23 donal Exp donal $ X X # Now we make cunning use of the backslash/shell trick \ X-[ -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+[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec %%WISH%% $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; } X X-set dir [file join [pwd] [file dirname [info script]] ..] X+set dir [file join [pwd] [file dirname [info script]]] X lappend auto_path [file join $dir ..] X package require Shape X END-of-tkshape/files/patch-demos-fancytext.tcl echo x - tkshape/files/patch-demos-fingerprint.tcl sed 's/^X//' >tkshape/files/patch-demos-fingerprint.tcl << 'END-of-tkshape/files/patch-demos-fingerprint.tcl' X--- demos/fingerprint.tcl Mon Sep 11 12:01:58 2000 X+++ demos/fingerprint.tcl.new Sun Mar 14 14:37:13 2004 X@@ -5,9 +5,9 @@ X # a little in order to increase its effectiveness. X X # Now we make cunning use of the backslash/shell trick \ X-[ -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+[ -x `dirname $0`/../shapewish ] && exec `dirname $0`/../shapewish $0 ${1+"$@"} || exec %%WISH%% $0 ${1+"$@"} || { echo "`basename $0`: couldn't start wish" >&2 ; exit 1; } X X-set dir [file join [pwd] [file dirname [info script]] ..] X+set dir [file join [pwd] [file dirname [info script]]] X lappend auto_path [file join $dir ..] X package require Shape X END-of-tkshape/files/patch-demos-fingerprint.tcl echo x - tkshape/files/patch-generic-shape.c sed 's/^X//' >tkshape/files/patch-generic-shape.c << 'END-of-tkshape/files/patch-generic-shape.c' Xdiff -ur generic/shape.c shape0.4.new/generic/shape.c.new X--- generic/shape.c Mon Sep 11 17:16:31 2000 X+++ generic/shape.c.new Fri Jan 30 15:20:15 2004 X@@ -25,7 +25,6 @@ X #include <tkInt.h> X #endif X #include <X11/Xutil.h> X-#include "panic.h" X X #define min(x,y) ((x)<(y)?(x):(y)) X #define max(x,y) ((x)<(y)?(y):(x)) X@@ -38,6 +37,10 @@ X _ANSI_ARGS_((Tk_Window tkwin, Tcl_Interp *interp, int x, int y, int op, X int kind, int objc, Tcl_Obj *CONST objv[])); X X+static Tk_Window getWindow(Tk_Window, Tcl_Interp*, Tcl_Obj*, int *); X+ X+int Shape_Init(Tcl_Interp *); X+ X static int X shapeBoundClipOps _ANSI_ARGS_((Tk_Window tkwin, Tcl_Interp *interp, int opnum, X int objc, Tcl_Obj *CONST objv[])); X@@ -76,7 +79,7 @@ X enum { X boundsCmd, getCmd, offsetCmd, setCmd, updateCmd, versionCmd X }; X-static char *subcommands[] = { X+static CONST char *subcommands[] = { X "bounds", "get", "offset", "set", "update", "version", NULL X }; X static shapeCommandHandler shapeCommandHandlers[] = { X@@ -133,7 +136,7 @@ X int opnum, objc; X Tcl_Obj *CONST objv[]; X { X- static char *options[] = { X+ static CONST char *options[] = { X "-bounding", "-clip", NULL X }; X int idx = 0,toplevel; X@@ -160,7 +163,7 @@ X return TCL_ERROR; X } X if (valid) { X- Tcl_Obj *r, *result[4]; X+ Tcl_Obj /* *r, */ *result[4]; X X result[0] = Tcl_NewIntObj(x1); X result[1] = Tcl_NewIntObj(y1); X@@ -178,6 +181,8 @@ X default: /* should be impossible to get here! */ X panic("unexpected operation number %d", opnum); X } X+ X+ return TCL_OK; X } X X static int X@@ -187,12 +192,14 @@ X int opnum, objc; X Tcl_Obj *CONST objv[]; X { X- static char *opts[] = { X+ static CONST char *opts[] = { X "-bounding", "-clip", "-both", NULL X }; X int x,y,toplevel, i = SHAPE_KIND_BOTH-1; X Tk_Window tkwin; X X+ opnum = 0; /* unused */ X+ X /* Argument parsing */ X switch (objc) { X default: X@@ -256,6 +263,8 @@ X XRectangle *rects; X int count,i,result; X X+ x = y = op = 0; /* unused */ X+ X if (objc != 1) { X Tcl_AppendResult(interp, "rectangles requires one argument; " X "a list of rectangles", NULL); X@@ -309,6 +318,10 @@ X int x, y, op, kind, objc; X Tcl_Obj *CONST objv[]; X { X+ X+ x = y = op; /* unused */ X+ objv = NULL; /* unused */ X+ X if (objc != 0) { X Tcl_AppendResult(interp, "reset takes no arguments", NULL); X return TCL_ERROR; X@@ -327,6 +340,8 @@ X XRectangle *rects; X int count, result; X X+ x = y; /* unused */ X+ X if (objc != 2) { X Tcl_AppendResult(interp, "text requires two arguments; the string " X "to display and the font to use to display it", X@@ -356,8 +371,7 @@ X Tcl_Obj *CONST objv[]; X { X Tk_Window srcwin; X- int ignore, result; X- Display *dpy; X+ int ignore; X X if (objc != 1) { X Tcl_AppendResult(interp, "window requires one argument; a window " X@@ -388,7 +402,7 @@ X return TCL_ERROR; X } X X- imageName = Tcl_GetStringFromObj(objv[0], &NULL); X+ imageName = Tcl_GetStringFromObj(objv[0], NULL); X handle = Tk_FindPhoto(interp, imageName); X if (handle == NULL) { X return TCL_ERROR; X@@ -418,19 +432,19 @@ X enum optkind { X shapekind, offsetargs, sourceargs X }; X- static char *options[] = { X+ static CONST char *options[] = { X "-offset", X "-bounding", "-clip", "-both", X "bitmap", "rectangles", "reset", "text", "window", X #ifdef SUPPORTS_PHOTO_REGION X- "photo" X+ "photo", X #endif X NULL X }; X static enum optkind optk[] = { X offsetargs, X shapekind, shapekind, shapekind, X- sourceargs, sourceargs, sourceargs, sourceargs, sourceargs X+ sourceargs, sourceargs, sourceargs, sourceargs, sourceargs, X #ifdef SUPPORTS_PHOTO_REGION X sourceargs X #endif X@@ -458,7 +472,7 @@ X idx = 3; X break; X case updateCmd: { X- static char *operations[] = { X+ static CONST char *operations[] = { X "set", "union", "intersect", "subtract", "invert", X ":=", "+=", "*=", "-=", "=", "||", "&&", NULL X }; X@@ -570,6 +584,8 @@ X default: /* should be impossible to get here! */ X panic("switch fallthrough"); X } X+ X+ return TCL_OK; X } X X int END-of-tkshape/files/patch-generic-shape.c echo x - tkshape/files/patch-unix-configure.patch sed 's/^X//' >tkshape/files/patch-unix-configure.patch << 'END-of-tkshape/files/patch-unix-configure.patch' Xdiff -ur unix/configure unix/configure.new X--- unix/configure Thu Sep 14 12:15:35 2000 X+++ unix/configure.new Sat Mar 13 11:15:06 2004 X@@ -448,13 +448,13 @@ X CC=$TCL_CC X SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS X SHLIB_LD=$TCL_SHLIB_LD X-SHLIB_LD_LIBS="-lXext $TCL_SHLIB_LD_LIBS" X+SHLIB_LD_LIBS="$TCL_SHLIB_LD_LIBS $TK_LIBS -lXext" X SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX X SHLIB_VERSION=$TCL_SHLIB_VERSION X TCL_LIBS=$TCL_LIBS X TCL_VERSION=$TCL_VERSION X-TCL_INCLUDE=$TCL_PREFIX/include X-TK_INCLUDE=$TK_PREFIX/include X+TCL_INCLUDE=$TCL_PREFIX/include/tcl$TCL_VERSION X+TK_INCLUDE=$TK_PREFIX/include/tk$TK_VERSION X TCL_BIN_DIR=$TK_EXEC_PREFIX/bin X X echo $ac_n "checking for -lXext""... $ac_c" 1>&6 END-of-tkshape/files/patch-unix-configure.patch echo x - tkshape/files/patch-unix-pkgIndex.tcl sed 's/^X//' >tkshape/files/patch-unix-pkgIndex.tcl << 'END-of-tkshape/files/patch-unix-pkgIndex.tcl' X--- unix/pkgIndex.tcl Mon Sep 11 16:27:28 2000 X+++ unix/pkgIndex.tcl.new Sun Mar 14 13:29:27 2004 X@@ -5,4 +5,4 @@ X # broken OSes like SunOS4. If you have a problem with this, tough! X X package ifneeded Shape 0.4 "package require Tk 8\n\ X- [list tclPkgSetup $dir Shape 0.4 {{libshape04.so.1.0 load shape}}]" X+ [list tclPkgSetup $dir Shape 0.4 {{libshape04.so.1 load shape}}]" END-of-tkshape/files/patch-unix-pkgIndex.tcl echo x - tkshape/files/patch-unix-shapeUnixImpl.c sed 's/^X//' >tkshape/files/patch-unix-shapeUnixImpl.c << 'END-of-tkshape/files/patch-unix-shapeUnixImpl.c' Xdiff -ur unix/shapeUnixImpl.c unix/shapeUnixImpl.c.new X--- unix/shapeUnixImpl.c Mon Sep 11 16:27:28 2000 X+++ unix/shapeUnixImpl.c Sat Mar 13 11:25:54 2004 X@@ -16,6 +16,7 @@ X #include <X11/Xutil.h> /* For Region declaration. */ X #include <X11/extensions/shape.h> X #include "shape.h" X+#include "shapeInt.h" X X #ifdef DKF_SHAPE_DEBUGGING X static int END-of-tkshape/files/patch-unix-shapeUnixImpl.c echo x - tkshape/Makefile sed 's/^X//' >tkshape/Makefile << 'END-of-tkshape/Makefile' X# New ports collection makefile for: tkshape X# Date created: 13 March 2004 X# Whom: nivit@users.sourceforge.net X# X# $FreeBSD$ X XPORTNAME= tkshape XPORTVERSION= 0.4 XCATEGORIES= devel XMASTER_SITES= http://www.cs.man.ac.uk/~fellowsd/tcl/ XDISTNAME= shape04 X XMAINTAINER= nivit@users.sourceforge.net XCOMMENT= A Tk library to access to X Shaped Window Extension X XLIB_DEPENDS= tk84.1:${PORTSDIR}/x11-toolkits/tk84 X XPLIST_SUB= PORTNAME="${PORTNAME}" X XINSTALLS_SHLIB= yes X X.if !defined(NO_INSTALL_MANPAGES) XMAN3= CombShape.3 QuryShape.3 XMANN= shape.n X.endif X XWRKSRC= ${WRKDIR}/${PORTNAME:C/^tk//1}${PORTVERSION} X XTCL_VER?= 8.4 XTK_VER?= 8.4 XWISH?= wish${TK_VER} X XUSE_GMAKE= yes XGNU_CONFIGURE= yes XCONFIGURE_ARGS= --with-tclconf=${LOCALBASE}/lib/tcl${TCL_VER} \ X --with-tkconf=${LOCALBASE}/lib/tk${TK_VER} XCONFIGURE_WRKSRC= ${WRKSRC}/unix XBUILD_WRKSRC= ${CONFIGURE_WRKSRC} X XWHERE_REPLACE= ${WRKSRC}/demos XREPLACE_FILES= ${WHERE_REPLACE}/dragger.tcl \ X ${WHERE_REPLACE}/fancytext.tcl \ X ${WHERE_REPLACE}/fingerprint.tcl X Xpost-patch: .SILENT X for FILE in ${REPLACE_FILES}; do \ X ${SED} -i .bak\ X -e "/%%WISH%%/s//${WISH:S/\//\\\//g}/g" \ X $${FILE}; \ X done; X XFIND_DIRS= -type d \! -empty XFIND_DEMOS= demos -type f -and -name "*.tcl" -maxdepth 1 XFIND_IMAGES= demos/images -type f \ X -and \( -name "*.gif" -or -name "*.xbm" \ X -or -name "*.cur" \) X XTARGET_DIR= ${PREFIX}/lib/${PORTNAME} XMANPAGES= ${MAN3} ${MANN} X Xdo-install: .SILENT X# script, library X cd ${WRKSRC}; \ X ${MKDIR} ${TARGET_DIR}/demos; \ X FILES=$$(${FIND} ${FIND_DEMOS}); \ X for FILE in $${FILES}; do \ X ${INSTALL_SCRIPT} $${FILE} ${TARGET_DIR}/$${FILE}; \ X done; \ X ${INSTALL_SCRIPT} unix/libshape04.so.1.0 ${TARGET_DIR}/libshape04.so.1; X X# images, pkgIndex.tcl X cd ${WRKSRC}; \ X ${MKDIR} ${TARGET_DIR}/demos/images; \ X FILES=$$(${FIND} ${FIND_IMAGES}); \ X for FILE in $${FILES}; do \ X ${INSTALL_DATA} $${FILE} ${TARGET_DIR}/$${FILE}; \ X done; \ X ${INSTALL_DATA} unix/pkgIndex.tcl ${TARGET_DIR}/pkgIndex.tcl; X X# manpages X.if !defined(NO_INSTALL_MANPAGES) X cd ${WRKSRC}; \ X for m in ${MANPAGES} ; do \ X s=$${m##*.}; \ X ${INSTALL_MAN} doc/$${m} ${MANPREFIX}/man/man$${s}/$${m}; \ X done; X.endif X X.include <bsd.port.mk> END-of-tkshape/Makefile echo x - tkshape/distinfo sed 's/^X//' >tkshape/distinfo << 'END-of-tkshape/distinfo' XMD5 (shape04.tar.gz) = bd05d36795b00195bb072fac9c35dc8d XSIZE (shape04.tar.gz) = 62205 END-of-tkshape/distinfo echo x - tkshape/pkg-descr sed 's/^X//' >tkshape/pkg-descr << 'END-of-tkshape/pkg-descr' XThis Tcl/Tk extension offers raw access to the X Shaped-Window Xextension. X XWWW: http://www.cs.man.ac.uk/~fellowsd/tcl/shapeidx.html X X-- XNicola Vitale Xnivit@users.sourceforge.net END-of-tkshape/pkg-descr echo x - tkshape/pkg-plist sed 's/^X//' >tkshape/pkg-plist << 'END-of-tkshape/pkg-plist' Xlib/%%PORTNAME%%/libshape04.so.1 Xlib/%%PORTNAME%%/pkgIndex.tcl Xlib/%%PORTNAME%%/demos/dragger.tcl Xlib/%%PORTNAME%%/demos/fancytext.tcl Xlib/%%PORTNAME%%/demos/fingerprint.tcl Xlib/%%PORTNAME%%/demos/images/doc-img.gif Xlib/%%PORTNAME%%/demos/images/doc-mask.xbm Xlib/%%PORTNAME%%/demos/images/fingerprint.xbm Xlib/%%PORTNAME%%/demos/images/none.cur Xlib/%%PORTNAME%%/demos/images/ptr-green.gif Xlib/%%PORTNAME%%/demos/images/ptr-mask.xbm Xlib/%%PORTNAME%%/demos/images/ptr-red.gif X@dirrm lib/%%PORTNAME%%/demos/images X@dirrm lib/%%PORTNAME%%/demos X@dirrm lib/%%PORTNAME%% END-of-tkshape/pkg-plist exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040822150623.83076.qmail>