aboutsummaryrefslogtreecommitdiff
path: root/math/calctool
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2006-07-13 20:21:04 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2006-07-13 20:21:04 +0000
commit74abb5223caf7f15b6a64a048baa273b7bc64812 (patch)
tree396191cfaf95cadfa3564a39128bdb554131f3f2 /math/calctool
parent5c625e646d45762dc8c84c8289f2a074df8577ab (diff)
Notes
Diffstat (limited to 'math/calctool')
-rw-r--r--math/calctool/Makefile17
-rw-r--r--math/calctool/files/patch-ab21
-rw-r--r--math/calctool/files/patch-xview.c20
-rw-r--r--math/calctool/pkg-descr2
-rw-r--r--math/calctool/pkg-plist1
5 files changed, 50 insertions, 11 deletions
diff --git a/math/calctool/Makefile b/math/calctool/Makefile
index c1064a9648e6..6dd60b310b10 100644
--- a/math/calctool/Makefile
+++ b/math/calctool/Makefile
@@ -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
@@ -40,6 +41,14 @@ PLIST_SUB+= TTY=""
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"
FPIC= -fPIC
.else
diff --git a/math/calctool/files/patch-ab b/math/calctool/files/patch-ab
index 6a7709c0853d..d7b779985d83 100644
--- a/math/calctool/files/patch-ab
+++ b/math/calctool/files/patch-ab
@@ -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 --git a/math/calctool/files/patch-xview.c b/math/calctool/files/patch-xview.c
new file mode 100644
index 000000000000..993c90c42bd8
--- /dev/null
+++ b/math/calctool/files/patch-xview.c
@@ -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 --git a/math/calctool/pkg-descr b/math/calctool/pkg-descr
index 28b7e219d090..3e9461e11402 100644
--- a/math/calctool/pkg-descr
+++ b/math/calctool/pkg-descr
@@ -3,7 +3,7 @@ From the README:
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 --git a/math/calctool/pkg-plist b/math/calctool/pkg-plist
index 7410150ae47e..a6c15834c0bb 100644
--- a/math/calctool/pkg-plist
+++ b/math/calctool/pkg-plist
@@ -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