summaryrefslogtreecommitdiff
path: root/math/grpn
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2002-05-12 23:21:53 +0000
committerdmcmahill <dmcmahill>2002-05-12 23:21:53 +0000
commit1be1af9d51697ccfaa7992a11ed6c4f9c469a732 (patch)
tree7056fd1ee4c50fb1aa0786eb45e2302f8787051c /math/grpn
parent01a317cdc677543d3f1d666f1faddaaea50a2c7a (diff)
downloadpkgsrc-1be1af9d51697ccfaa7992a11ed6c4f9c469a732.tar.gz
update to grpn-1.1.2nb1
adds several constants found in science and engineering: - 'k' Boltzmanns constnat - 'q' Electron charge - 'e0' Free space permitivity - 'mu0'Free space permeability - 'c' Free space speed of light.
Diffstat (limited to 'math/grpn')
-rw-r--r--math/grpn/Makefile12
-rw-r--r--math/grpn/PLIST3
-rw-r--r--math/grpn/distinfo14
-rw-r--r--math/grpn/patches/patch-aa47
-rw-r--r--math/grpn/patches/patch-ab242
-rw-r--r--math/grpn/patches/patch-ac50
-rw-r--r--math/grpn/patches/patch-ad13
-rw-r--r--math/grpn/patches/patch-ae81
-rw-r--r--math/grpn/patches/patch-af12
9 files changed, 263 insertions, 211 deletions
diff --git a/math/grpn/Makefile b/math/grpn/Makefile
index 7a500a5b9a0..80ef51d7af9 100644
--- a/math/grpn/Makefile
+++ b/math/grpn/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2002/04/27 12:44:05 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.8 2002/05/12 23:21:53 dmcmahill Exp $
#
-DISTNAME= grpn-1.1.0
+DISTNAME= grpn-1.1.2
PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://lashwhip.com/pub/ \
@@ -11,8 +11,12 @@ MAINTAINER= dmcmahill@netbsd.org
HOMEPAGE= http://lashwhip.com/grpn.html
COMMENT= Graphical reverse polish notation (RPN) calculator
-DEPENDS+= gtk+-1.2.*:../../x11/gtk
+USE_BUILDLINK_ONLY= yes
+ALL_TARGET= grpn
-USE_X11= yes
+#DEPENDS+= gtk+-1.2.*:../../x11/gtk
+#USE_X11= yes
+.include "../../x11/gtk/buildlink.mk"
+.include "../../mk/x11.buildlink.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/math/grpn/PLIST b/math/grpn/PLIST
index 21ac7650d99..cac81f2360f 100644
--- a/math/grpn/PLIST
+++ b/math/grpn/PLIST
@@ -1,2 +1,3 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:12:30 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2002/05/12 23:21:53 dmcmahill Exp $
bin/grpn
+man/man1/grpn.1
diff --git a/math/grpn/distinfo b/math/grpn/distinfo
index 939cb6efa03..dd2195a5f48 100644
--- a/math/grpn/distinfo
+++ b/math/grpn/distinfo
@@ -1,13 +1,9 @@
-$NetBSD: distinfo,v 1.3 2002/04/02 02:01:23 dmcmahill Exp $
+$NetBSD: distinfo,v 1.4 2002/05/12 23:21:54 dmcmahill Exp $
-SHA1 (grpn-1.1.0.tar.gz) = c4f49494114946f7690c6a14f097f0a64e2e84e2
-Size (grpn-1.1.0.tar.gz) = 44336 bytes
-SHA1 (patch-aa) = 40cd39e5f77cbe38cc59f4f44ec5ee9efcefcbbf
-SHA1 (patch-ab) = b8c0aef12f797e5fbb39a902e211e9b1a1f7dc81
-SHA1 (patch-ac) = 34894e81d32575d31fdbaeadee1673675df641e9
-SHA1 (patch-ad) = 88603c905c38ae14d66cdf1a347626412e895ae6
-SHA1 (patch-ae) = 5287f6c5a7b661a3333e1768b64333b79422e0c9
-SHA1 (patch-af) = c77b8522a12759327abe69856bcfcbfe9b3ba396
+SHA1 (grpn-1.1.2.tar.gz) = c7a6b89d9d9316f89d02b000b77e35a48ec3343b
+Size (grpn-1.1.2.tar.gz) = 46153 bytes
+SHA1 (patch-aa) = 07316a77bbb366f9f28062207969f8eab2f8b3f2
+SHA1 (patch-ab) = 2aea4f5283d42491ef500ba637dc47228dc33f03
SHA1 (patch-ag) = c7e24d2786203b9eff6d1921bd82885ad412db09
SHA1 (patch-ah) = eaa503abd7ae9ee08efe63462eb9aae6591aad3a
SHA1 (patch-ai) = 01ae0b6476d5280f2420aec9f0bc878bfdb87c12
diff --git a/math/grpn/patches/patch-aa b/math/grpn/patches/patch-aa
index ea635b2a601..a9e783d1990 100644
--- a/math/grpn/patches/patch-aa
+++ b/math/grpn/patches/patch-aa
@@ -1,28 +1,39 @@
-$NetBSD: patch-aa,v 1.1.1.1 1999/06/08 14:34:48 frueauf Exp $
+$NetBSD: patch-aa,v 1.2 2002/05/12 23:21:54 dmcmahill Exp $
---- Makefile.orig Fri Jun 4 23:09:07 1999
-+++ Makefile Sat Jun 5 06:59:43 1999
-@@ -20,5 +20,6 @@
- CFLAGS = -g -O2 -I/usr/X11/include `$(GTK_DIR)gtk-config --cflags` -DGTK_VER_1_1
+--- Makefile.orig Thu Apr 4 22:56:05 2002
++++ Makefile
+@@ -3,10 +3,10 @@
+ # Please read the next few lines and enter the correct values.
+
+ # where to install GRPN
+-PREFIX = /usr/local/
++#PREFIX = /usr/local/
+
+ # What compiler should be used
+-CC = gcc
++#CC = gcc
+
+ # Where to find the gtk-config script
+ GTK_DIR =
+@@ -20,9 +20,10 @@
+ # add -DUSE_GNOME if you want to make grpn GNOME compliant.
+
+
+-CFLAGS = -g -O2 -I/usr/X11/include `$(GTK_DIR)gtk-config --cflags` -DGTK_VER_1_1
++#CFLAGS = -g -O2 -I/usr/X11/include `$(GTK_DIR)gtk-config --cflags` -DGTK_VER_1_1
++CFLAGS+=`$(GTK_CONFIG) --cflags` -DGTK_VER_1_1
-DFLAGS = -L/usr/X11/lib
+#DFLAGS = -L/usr/X11/lib
-+DFLAGS =
# end of user configurable section
-@@ -37,4 +38,5 @@
- LIBS = `$(GTK_DIR)gtk-config --libs` -lX11 -lm
-+all: grpn
+@@ -37,7 +38,7 @@
+
- grpn: $(OBJS)
-@@ -45,6 +47,7 @@
- install: grpn
-- cp grpn /usr/local/bin
-- chmod 755 /usr/local/bin/grpn
-+ #cp grpn /usr/local/bin
-+ #chmod 755 /usr/local/bin/grpn
-+ $(BSD_INSTALL_PROGRAM) grpn $(PREFIX)/bin
+-LIBS = `$(GTK_DIR)gtk-config --libs` -lX11 -lm
++LIBS = `$(GTK_DIR)$(GTK_CONFIG) --libs` -lX11 -lm
- .c.o:
+
+ grpn: $(OBJS)
diff --git a/math/grpn/patches/patch-ab b/math/grpn/patches/patch-ab
index 4ef200194cb..656f53df8c5 100644
--- a/math/grpn/patches/patch-ab
+++ b/math/grpn/patches/patch-ab
@@ -1,24 +1,220 @@
-$NetBSD: patch-ab,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
+$NetBSD: patch-ab,v 1.2 2002/05/12 23:21:54 dmcmahill Exp $
---- button_def.c.orig Wed May 26 17:27:42 1999
-+++ button_def.c
-@@ -42,6 +42,10 @@
- baseCmdCB, (void *)OCTAL },
- { "Bin", "bin", "Binary display mode.",
- baseCmdCB, (void *)BINARY },
-+ { "Db10", "db10", "Convert to dB (Power).",
-+ genericButtonCB, (void *)Db10Stack },
-+ { "Db20", "db20", "Convert to dB (Voltage).",
-+ genericButtonCB, (void *)Db20Stack },
- { "Rip", "rip", "Resistors in parallel.",
- genericButtonCB, (void *)RipStack },
- { "Cplx", "cplx", "Create a complex number.",
-@@ -133,7 +137,7 @@
- { 8, 8, num456 },
- { 8, 8, num123 },
- { 8, 8, num0 },
-- { 12, 0, invisible1 }
-+ { 14, 0, invisible1 }
- };
-
-
+adds physical constants: k,q,e0,mu0,c.
+
+*** button_def.c.orig Wed Apr 3 22:46:10 2002
+--- button_def.c Fri Apr 26 10:56:28 2002
+***************
+*** 34,39 ****
+--- 34,49 ----
+ extern void baseCmdCB(GtkWidget *, gpointer);
+
+ FuncInfo invisible1[] = {
++ { "k", "k", "Boltzmann's constant (Joules/Kelvin).",
++ genericButtonCB, (void *)BoltzmannStack },
++ { "q", "q", "Electron Charge (coulomb).",
++ genericButtonCB, (void *)ChargeStack },
++ { "e0", "e0", "Free space permitivitty (Farads/meter).",
++ genericButtonCB, (void *)E0Stack },
++ { "mu0", "mu0", "Free space permeability (Henries/meter).",
++ genericButtonCB, (void *)Mu0Stack },
++ { "c", "c", "Free space speed of light (meters/second).",
++ genericButtonCB, (void *)LightSpeedStack },
+ { "Hex", "hex", "Hexidecimal display mode.",
+ baseCmdCB, (void *)HEXIDECIMAL },
+ { "Dec", "dec", "Decimal display mode.",
+***************
+*** 137,143 ****
+ { 8, 8, num456 },
+ { 8, 8, num123 },
+ { 8, 8, num0 },
+! { 14, 0, invisible1 }
+ };
+
+
+--- 147,153 ----
+ { 8, 8, num456 },
+ { 8, 8, num123 },
+ { 8, 8, num0 },
+! { 19, 0, invisible1 }
+ };
+
+
+*** constant.c.orig Wed Apr 3 22:46:11 2002
+--- constant.c Fri Apr 26 10:51:06 2002
+***************
+*** 24,29 ****
+--- 24,34 ----
+ #include "real.h"
+ #include "complex.h"
+
++ Real *realBoltzmann;
++ Real *realCharge;
++ Real *realE0;
++ Real *realMu0;
++ Real *realLightSpeed;
+ Real *realPi;
+ Real *realPi2;
+ Real *realZero;
+***************
+*** 35,43 ****
+--- 40,56 ----
+ Real *real180Pi;
+ Cmplx *cmplxI;
+
++ #define LIGHTSPEED 2.997923e8
++ #define MU0 (4*M_PI*1.0e-7)
++
+ void setup_constant(){
+ Real *tmp;
+
++ realBoltzmann = setRealDouble(newReal(), 1.380622e-23);
++ realCharge = setRealDouble(newReal(), 1.6021917e-19);
++ realE0 = setRealDouble(newReal(), 1.0/(LIGHTSPEED*LIGHTSPEED*MU0));
++ realMu0 = setRealDouble(newReal(), MU0);
++ realLightSpeed = setRealDouble(newReal(), LIGHTSPEED);
+ realPi = setRealDouble(newReal(), M_PI);
+ realPi2 = setRealDouble(newReal(), M_PI/2.0);
+ realZero = setRealDouble(newReal(), 0.0);
+*** constant.h.orig Wed Apr 3 22:46:11 2002
+--- constant.h Fri Apr 26 10:55:24 2002
+***************
+*** 22,27 ****
+--- 22,32 ----
+ #ifndef __CONSTANT_H
+ #define __CONSTANT_H
+
++ extern Real *realBoltzmann;
++ extern Real *realCharge;
++ extern Real *realE0;
++ extern Real *realMu0;
++ extern Real *realLightSpeed;
+ extern Real *realPi;
+ extern Real *realPi2;
+ extern Real *realZero;
+*** funcs.c.orig Wed Apr 3 22:46:11 2002
+--- funcs.c Fri Apr 26 10:39:46 2002
+***************
+*** 95,100 ****
+--- 95,165 ----
+
+ }
+
++ void BoltzmannStack(){
++ Number *n1;
++
++ finishEditor();
++
++ SaveStackState(0);
++
++ n1 = setNumberReal(newNumber(), realBoltzmann);
++ Push(n1);
++
++ UndoStackState(1);
++ }
++
++ void ChargeStack(){
++ Number *n1;
++
++ finishEditor();
++
++ SaveStackState(0);
++
++ n1 = setNumberReal(newNumber(), realCharge);
++ Push(n1);
++
++ UndoStackState(1);
++ }
++
++ void E0Stack(){
++ Number *n1;
++
++ finishEditor();
++
++ SaveStackState(0);
++
++ n1 = setNumberReal(newNumber(), realE0);
++ Push(n1);
++
++ UndoStackState(1);
++ }
++
++ void Mu0Stack(){
++ Number *n1;
++
++ finishEditor();
++
++ SaveStackState(0);
++
++ n1 = setNumberReal(newNumber(), realMu0);
++ Push(n1);
++
++ UndoStackState(1);
++ }
++
++ void LightSpeedStack(){
++ Number *n1;
++
++ finishEditor();
++
++ SaveStackState(0);
++
++ n1 = setNumberReal(newNumber(), realLightSpeed);
++ Push(n1);
++
++ UndoStackState(1);
++ }
++
+ void PiStack(){
+ Number *n1;
+
+*** funcs.h.orig Wed Apr 3 22:46:11 2002
+--- funcs.h Fri Apr 26 10:40:27 2002
+***************
+*** 41,46 ****
+--- 41,51 ----
+ void PopStack();
+ void PushStack();
+
++ void BoltzmannStack();
++ void ChargeStack();
++ void E0Stack();
++ void Mu0Stack();
++ void LightSpeedStack();
+ void PiStack();
+
+ void NegStack();
+*** CHANGES.orig Wed Apr 3 22:37:30 2002
+--- CHANGES Fri Apr 26 16:46:35 2002
+***************
+*** 29,31 ****
+--- 29,38 ----
+
+ v1.1.2
+ Add db10 and db20 commands.
++
++ v1.1.2nb1
++ Add k,q,e0,mu0, and c commands for Boltzmann's constant
++ (Joules/Kelvin), electron charge (coulomb), free space
++ permitivitty (Farads/meter), free space permeability
++ (Henries/meter), and the speed of light in a vacuum
++ (meters/second).
+*** help.c.orig Wed Apr 3 22:46:11 2002
+--- help.c Fri Apr 26 16:47:46 2002
+***************
+*** 28,34 ****
+
+ #define HELP_TXT \
+ "\n\
+! GRPN v1.1.2\n\
+ \n\
+ By: Paul Wilkins\n\
+ paul.wilkins@analog.com\n\
+--- 28,34 ----
+
+ #define HELP_TXT \
+ "\n\
+! GRPN v1.1.2nb1\n\
+ \n\
+ By: Paul Wilkins\n\
+ paul.wilkins@analog.com\n\
diff --git a/math/grpn/patches/patch-ac b/math/grpn/patches/patch-ac
deleted file mode 100644
index 3f7d5f4b317..00000000000
--- a/math/grpn/patches/patch-ac
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
-
---- funcs.c.orig Mon May 31 19:44:50 1999
-+++ funcs.c
-@@ -313,6 +313,45 @@
- }
- }
-
-+void Db10Stack(){
-+ Number *n1, *n2;
-+
-+ finishEditor();
-+
-+ if(checkArgs("db10", 1)) return;
-+ SaveStackState(1);
-+
-+ n1 = Pop();
-+
-+ n2 = dbNumber(n1,10.0);
-+ if(n2){
-+ Push(n2); freeNumber(n1);
-+ UndoStackState(1);
-+ } else {
-+ Push(n1);
-+ CancelStackState();
-+ }
-+}
-+
-+void Db20Stack(){
-+ Number *n1, *n2;
-+
-+ finishEditor();
-+
-+ if(checkArgs("db20", 1)) return;
-+ SaveStackState(1);
-+
-+ n1 = Pop();
-+
-+ n2 = dbNumber(n1,20.0);
-+ if(n2){
-+ Push(n2); freeNumber(n1);
-+ UndoStackState(1);
-+ } else {
-+ Push(n1);
-+ CancelStackState();
-+ }
-+}
-
- void RipStack(){
- Number *n1, *n2, *n3;
diff --git a/math/grpn/patches/patch-ad b/math/grpn/patches/patch-ad
deleted file mode 100644
index 52782c6b115..00000000000
--- a/math/grpn/patches/patch-ad
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
-
---- funcs.h.orig Wed May 26 12:08:11 1999
-+++ funcs.h
-@@ -56,6 +56,8 @@
- void NrootStack();
-
- void RipStack();
-+void Db10Stack();
-+void Db20Stack();
-
- void SqrStack();
- void SqrtStack();
diff --git a/math/grpn/patches/patch-ae b/math/grpn/patches/patch-ae
deleted file mode 100644
index 73ca9d9f325..00000000000
--- a/math/grpn/patches/patch-ae
+++ /dev/null
@@ -1,81 +0,0 @@
-$NetBSD: patch-ae,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
-
---- number.c.orig Mon May 31 19:44:23 1999
-+++ number.c
-@@ -278,6 +278,76 @@
- return c;
- }
-
-+Number * dbNumber(Number *a,double sf){
-+ Real *r1,*rtmp1,*rtmp2;
-+ Cmplx *c1;
-+ Number *mul = newNumber();
-+ Number *c = newNumber();
-+
-+ if(a == NULL){ fprintf(stderr, "dbNumber(NULL)\n"); exit(0); }
-+
-+
-+ switch(a->type){
-+ case REAL:
-+ if(-1 == cmpReal(a->data, realZero)){
-+ /* log(<0) is complex ! */
-+ c1 = setCmplxReal(newCmplx(), a->data, realZero);
-+ c->type = COMPLEX;
-+ c->data = logCmplx(c1);
-+ rtmp1=newReal();
-+ rtmp2=newReal();
-+ setRealDouble(rtmp1, sf);
-+ setRealDouble(rtmp2, 0.0);
-+ mul->type = COMPLEX;
-+ mul->data = newCmplx();
-+ setCmplxReal(mul->data,rtmp1,rtmp2);
-+ freeReal(rtmp1);
-+ freeReal(rtmp2);
-+ freeCmplx(c1);
-+ } else {
-+ c->type = REAL;
-+ mul->type = REAL;
-+ mul->data = newReal();
-+ setRealDouble(mul->data, sf);
-+ c->data = logReal(a->data);
-+ }
-+ break;
-+ case COMPLEX:
-+ c->type = COMPLEX;
-+ c->data = logCmplx(a->data);
-+ rtmp1=newReal();
-+ rtmp2=newReal();
-+ setRealDouble(rtmp1, sf);
-+ setRealDouble(rtmp2, 0.0);
-+ mul->type = COMPLEX;
-+ mul->data = newCmplx();
-+ setCmplxReal(mul->data,rtmp1,rtmp2);
-+ freeReal(rtmp1);
-+ freeReal(rtmp2);
-+ break;
-+ case MATRIX:
-+ c->type = MATRIX;
-+ invalidTyprError("db");
-+ c->data = NULL;
-+ break;
-+ default:
-+ fprintf(stderr, "Error: Unknown number type\n");
-+ exit(0);
-+ }
-+
-+
-+ if(c->data == NULL){
-+ free(c);
-+ c = NULL;
-+ }
-+ else {
-+ c = mulNumber(c,mul);
-+ }
-+
-+ free(mul);
-+ return c;
-+}
-+
- Number * expNumber(Number *a){
- Number *c = newNumber();
-
diff --git a/math/grpn/patches/patch-af b/math/grpn/patches/patch-af
deleted file mode 100644
index caac514d8c0..00000000000
--- a/math/grpn/patches/patch-af
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-af,v 1.1 2002/04/02 02:01:24 dmcmahill Exp $
-
---- number.h.orig Wed May 26 12:08:57 1999
-+++ number.h
-@@ -65,6 +65,7 @@
-
- Number * powNumber(Number *, Number *);
-
-+Number * dbNumber(Number *, double);
- Number * ripNumber(Number *, Number *);
-
- Number * sinNumber(Number *);