Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jul 2006 12:18:14 +0400 (MSD)
From:      Stanislav Sedov <ssedov@mbsd.msk.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/100227: [MAINTAINER] math/calctool: add XView support
Message-ID:  <20060713081814.988D912626@fonon.realnet>
Resent-Message-ID: <200607131820.k6DIKVdR099263@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         100227
>Category:       ports
>Synopsis:       [MAINTAINER] math/calctool: add XView support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 13 18:20:31 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Stanislav Sedov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
MBSD labs, Inc.
>Environment:
System: FreeBSD fonon.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #7: Sun Jun 18 20:51:36 MSD 2006
>Description:
Add XView frontend support for calctool

Added file(s):
- files/patch-ac

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- calctool-2.4.13_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/math/calctool/Makefile /work/src/ports/calctool/Makefile
--- /usr/ports/math/calctool/Makefile	Thu Jul 13 02:23:35 2006
+++ /work/src/ports/calctool/Makefile	Thu Jul 13 12:16:50 2006
@@ -7,19 +7,20 @@
 
 PORTNAME=	calctool
 PORTVERSION=	2.4.13
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	math
 MASTER_SITES=	${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	nsayer
 DISTNAME=	calctool-2.4pl13
 
 MAINTAINER=	ssedov@mbsd.msk.ru
-COMMENT=	A multi-GUI (terminal, X) calculator program
+COMMENT=	A multi-GUI (terminal, X, XView) calculator program
 
 USE_LDCONFIG=	yes
 
-OPTIONS=	X11 "Build X11 version of calctool" on \
-		TTY "Build tty version of calctool" on
+OPTIONS=	X11	"Build X11 version of calctool" on \
+		TTY	"Build tty version of calctool" on \
+		XVIEW	"Build tty version of calctool" off
 
 MAN1=		calctool.1
 
@@ -38,6 +39,14 @@
 PLIST_SUB+=	TTY=""
 .else
 PLIST_SUB+=	TTY="@comment "
+.endif
+
+.if defined(WITH_XVIEW)
+BINARIES+=	xv_calctool
+LIB_DEPENDS+=	xview.3:${PORTSDIR}/x11-toolkits/xview
+PLIST_SUB+=	XVIEW=""
+.else
+PLIST_SUB+=	XVIEW="@comment "
 .endif
 
 .if ${ARCH} == "sparc64"
diff -ruN --exclude=CVS /usr/ports/math/calctool/files/patch-ab /work/src/ports/calctool/files/patch-ab
--- /usr/ports/math/calctool/files/patch-ab	Thu Jul 13 02:23:35 2006
+++ /work/src/ports/calctool/files/patch-ab	Thu Jul 13 12:06:54 2006
@@ -1,5 +1,5 @@
 --- Makefile.orig	Sat May 29 20:35:43 1993
-+++ Makefile	Thu Jul 13 01:33:02 2006
++++ Makefile	Thu Jul 13 12:05:36 2006
 @@ -28,7 +28,7 @@
  #  It can also be specified here by uncommenting the following
  #  macro definition and setting appropriately.
@@ -42,8 +42,8 @@
  #
 -XVIEWINCDIR      = -I$(OPENWINHOME)/include
 -XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
-+#XVIEWINCDIR      = -I$(OPENWINHOME)/include
-+#XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
++XVIEWINCDIR      = -I%%X11BASE%%/include
++XVIEWLIBDIR      = -L%%X11BASE%%/lib
  #
  #=========================================================================
  #
@@ -78,7 +78,7 @@
  
  LIBSRCS         = graphics.c display.c functions.c get.c
  LIBOBJS         = graphics.o display.o functions.o get.o
-@@ -208,11 +207,10 @@
+@@ -208,19 +207,16 @@
  		$(CC) -o sv_calctool $(CFLAGS) $(STDOBJS) sunview.o $(SVIEWLIBS)
  		-cp sv_calctool calctool
  
@@ -91,8 +91,17 @@
 +xcalctool:      $(OBJS) x11.o
  		$(CC) -o xcalctool $(X11LIBDIR) $(CFLAGS) $(STDOBJS) x11.o \
  				$(X11LIBS)
- 		-cp xcalctool calctool
-@@ -229,8 +227,9 @@
+-		-cp xcalctool calctool
+ 
+-xview:          $(OBJS) xview.o
++xv_calctool:    $(OBJS) xview.o
+ 		$(CC) -o xv_calctool $(XVIEWLIBDIR) $(CFLAGS) $(STDOBJS) \
+ 				xview.o $(XVIEWLIBS)
+-		-cp xv_calctool calctool
+ 
+ libcalctool.a:  $(LIBOBJS)
+ 		ar rv $@ $?
+@@ -229,8 +225,9 @@
  #  These are the library creation rules for making the shared calctool
  #  library (available with SunOS v4.x).
   
diff -ruN --exclude=CVS /usr/ports/math/calctool/files/patch-ac /work/src/ports/calctool/files/patch-ac
--- /usr/ports/math/calctool/files/patch-ac	Thu Jan  1 03:00:00 1970
+++ /work/src/ports/calctool/files/patch-ac	Thu Jul 13 12:11:51 2006
@@ -0,0 +1,20 @@
+--- xview.c.orig	Thu Jul 13 12:10:02 2006
++++ xview.c	Thu Jul 13 12:11:30 2006
+@@ -525,7 +525,7 @@
+                       XV_HEIGHT,         16,
+                       SERVER_IMAGE_BITS, help_cursor_array,
+                       0) ;
+-  help_cursor = xv_create(NULL, CURSOR,
++  help_cursor = xv_create(0, CURSOR,
+                           CURSOR_XHOT,  0,
+                           CURSOR_YHOT,  0,
+                           CURSOR_OP,    PIX_SRC | PIX_DST,
+@@ -590,7 +590,7 @@
+ {
+   int choice ;
+ 
+-  choice = (int) menu_get(menu_item, MENU_VALUE,NULL) ;
++  choice = (int) menu_get(menu_item, MENU_VALUE, 0) ;
+   if (choice) handle_menu_selection(curmenu, choice) ;
+ }
+ 
diff -ruN --exclude=CVS /usr/ports/math/calctool/pkg-descr /work/src/ports/calctool/pkg-descr
--- /usr/ports/math/calctool/pkg-descr	Thu Jul 13 02:23:35 2006
+++ /work/src/ports/calctool/pkg-descr	Thu Jul 13 12:17:02 2006
@@ -3,7 +3,7 @@
 calctool  -  README  -  November 1989.
 
 This is V2.4 of a simple desktop calculator.
-This version works under X11 and dumb tty terminals.
+This version works under X11, XView and dumb tty terminals.
 
 It is almost visually identical to V2.1 which was released in August
 1988, but internally most of the code has been reworked to include a
diff -ruN --exclude=CVS /usr/ports/math/calctool/pkg-plist /work/src/ports/calctool/pkg-plist
--- /usr/ports/math/calctool/pkg-plist	Thu Jul 13 02:23:35 2006
+++ /work/src/ports/calctool/pkg-plist	Thu Jul 13 12:08:37 2006
@@ -1,5 +1,6 @@
 %%TTY%%bin/tty_calctool
 %%X11%%bin/xcalctool
+%%XVIEW%%bin/xv_calctool
 lib/libcalctool.so
 lib/libcalctool.so.1
 %%DATADIR%%/calctool.help
--- calctool-2.4.13_2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060713081814.988D912626>