math/grpn looks abandoned by its upstream.  Jens Getreu has put it
on GitHub and incorporated the various patches that are floating
around.

Do we want to update to this?
(I'm a bit hesitant.  How many projects have been forked on GitHub
and then promptly been abandoned again?)

Anyway, here's a possible update with some polishing.  It gets rid
of all the patches.

Index: Makefile
===================================================================
RCS file: /cvs/ports/math/grpn/Makefile,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile
--- Makefile    5 Nov 2013 15:33:06 -0000       1.27
+++ Makefile    5 Nov 2013 20:31:56 -0000
@@ -1,30 +1,34 @@
 # $OpenBSD: Makefile,v 1.27 2013/11/05 15:33:06 naddy Exp $
 
-COMMENT=       graphical reverse polish notation calculator
+COMMENT=       GTK+ reverse Polish notation calculator
 
-DISTNAME=      grpn-1.1.2
-REVISION=      7
+V=             1.4.0
+DISTNAME=      grpn-$V
 CATEGORIES=    math x11
 
-HOMEPAGE=      http://lashwhip.com/grpn.html
+HOMEPAGE=      https://github.com/getreu/grpn
 
-MASTER_SITES=  http://lashwhip.com/grpn/ \
-               ftp://lashwhip.com/pub/
+MASTER_SITES=  https://github.com/getreu/grpn/archive/
+DISTFILES=     ${DISTNAME}.tar.gz{$V.tar.gz}
 
-# GPLv2
+# GPLv2+
 PERMIT_PACKAGE_CDROM=  Yes
 
 MODULES=       devel/gettext
 
-WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes
-WANTLIB += Xi Xinerama Xrandr Xrender atk-1.0 c cairo fontconfig
-WANTLIB += freetype gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
-WANTLIB += gtk-x11-2.0 m pango-1.0 pangocairo-1.0 pangoft2-1.0 z
+WANTLIB=       X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama \
+               Xrandr Xrender atk-1.0 c cairo fontconfig freetype \
+               gdk-x11-2.0 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 \
+               gtk-x11-2.0 m pango-1.0 pangocairo-1.0 pangoft2-1.0 z
 
 LIB_DEPENDS=   x11/gtk+2
 
-MAKE_FLAGS=    CC="${CC}"
-ALL_TARGET=
+WRKSRC=                ${WRKDIST}/src
+
+CFLAGS+=       -DUSE_PANGO `pkg-config --cflags gtk+-2.0` -DGTK_VER_1_1
+MAKE_FLAGS=    CC="${CC}" CFLAGS="${CFLAGS}" DFLAGS="" \
+               LIBS="`pkg-config --libs gtk+-2.0` -lm"
+ALL_TARGET=    grpn
 NO_TEST=       Yes
 
 do-install:
Index: distinfo
===================================================================
RCS file: /cvs/ports/math/grpn/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo    5 Apr 2007 16:20:05 -0000       1.4
+++ distinfo    5 Nov 2013 20:31:56 -0000
@@ -1,5 +1,2 @@
-MD5 (grpn-1.1.2.tar.gz) = pgLx5N0xOLov50XhSyFwOQ==
-RMD160 (grpn-1.1.2.tar.gz) = KKQy7I5NIJWllEDE5AHxL4XXUkk=
-SHA1 (grpn-1.1.2.tar.gz) = x6a4nZ2TFvidArAAt341pI7DNDs=
-SHA256 (grpn-1.1.2.tar.gz) = OWJ0sxWI6d8m8ocE6VRWvSw7hZ5aoXQORxQ/wniE5WA=
-SIZE (grpn-1.1.2.tar.gz) = 46153
+SHA256 (grpn-1.4.0.tar.gz) = mLp8oX+Ax6FvgkwCTxJWOE7nt14gWAWmYrt6mnpWofE=
+SIZE (grpn-1.4.0.tar.gz) = 60565
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- patches/patch-Makefile      23 Mar 2010 20:38:20 -0000      1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.5 2010/03/23 20:38:20 jasper Exp $
-
-- Honor cflags
-- Port to gtk+2
-
---- Makefile.orig      Fri Apr  5 05:56:05 2002
-+++ Makefile   Tue Mar 23 21:27:40 2010
-@@ -19,11 +19,9 @@ GTK_DIR =
- #
- # add -DUSE_GNOME if you want to make grpn GNOME compliant.
- 
-+# We cheat by defining GTK_VER_1_1...
-+CFLAGS +=`pkg-config --cflags gtk+-2.0` -DGTK_VER_1_1
- 
--CFLAGS = -g -O2 -I/usr/X11/include  `$(GTK_DIR)gtk-config --cflags` 
-DGTK_VER_1_1
--
--DFLAGS =  -L/usr/X11/lib 
--
- # end of user configurable section
- 
- 
-@@ -37,11 +35,11 @@ OBJS = test_gtk_ver.o real.o complex.o matrix.o number
- 
- 
- 
--LIBS   = `$(GTK_DIR)gtk-config --libs` -lX11 -lm 
-+LIBS   = `pkg-config --libs gtk+-2.0`
- 
- 
- grpn: $(OBJS)
--      $(CC) $(DFLAGS) -o $@ $(OBJS) $(LIBS) 
-+      $(CC) -o $@ $(OBJS) $(LIBS) 
- 
- pure: $(OBJS)
-       $(PURIFY) $(CC) $(DFLAGS) -o $@ $(OBJS) $(LIBS) 
Index: patches/patch-callback_menu_c
===================================================================
RCS file: patches/patch-callback_menu_c
diff -N patches/patch-callback_menu_c
--- patches/patch-callback_menu_c       23 Mar 2010 20:38:20 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-callback_menu_c,v 1.1 2010/03/23 20:38:20 jasper Exp $
---- callback_menu.c.orig       Tue Mar 23 21:33:44 2010
-+++ callback_menu.c    Tue Mar 23 21:33:59 2010
-@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- /* callback_menu.h  by Paul Wilkins 3/15/97 */
- 
- #include <stdio.h>
-+#include <stdlib.h>
- #include <gtk/gtk.h>
- 
- #include "menu.h"
Index: patches/patch-complex_c
===================================================================
RCS file: patches/patch-complex_c
diff -N patches/patch-complex_c
--- patches/patch-complex_c     23 Mar 2010 20:38:20 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-complex_c,v 1.1 2010/03/23 20:38:20 jasper Exp $
---- complex.c.orig     Tue Mar 23 21:33:39 2010
-+++ complex.c  Tue Mar 23 21:34:09 2010
-@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
-+#include <string.h>
- 
- #include "complex.h"
- #include "real.h"
Index: patches/patch-help_c
===================================================================
RCS file: patches/patch-help_c
diff -N patches/patch-help_c
--- patches/patch-help_c        23 Mar 2010 20:38:20 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-help_c,v 1.1 2010/03/23 20:38:20 jasper Exp $
---- help.c.orig        Tue Mar 23 21:33:34 2010
-+++ help.c     Tue Mar 23 21:34:18 2010
-@@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- */
- #include <stdio.h>
- #include <stdlib.h>
-+#include <string.h>
- #include <gtk/gtk.h>
- 
- #include "help.h"
Index: patches/patch-lcd_c
===================================================================
RCS file: patches/patch-lcd_c
diff -N patches/patch-lcd_c
--- patches/patch-lcd_c 23 Mar 2010 20:38:20 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-lcd_c,v 1.1 2010/03/23 20:38:20 jasper Exp $
-
-Port to gtk+2.
-
---- lcd.c.orig Thu Apr  4 05:46:11 2002
-+++ lcd.c      Tue Mar 23 21:35:11 2010
-@@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- /* lcd.c   by Paul Wilkins 3/22/97 */
- 
- #include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
- #include <gtk/gtk.h>
- #include <gdk/gdkkeysyms.h>
- 
-@@ -677,7 +679,7 @@ void convertSelection(
- #else
-       switch(selection->target){
- #endif
--         case GDK_TARGET_STRING:
-+/*         case GDK_TARGET_STRING:*/
-          case TARGET_STRING:
-           gtk_selection_data_set(
-              selection,
Index: patches/patch-main_c
===================================================================
RCS file: patches/patch-main_c
diff -N patches/patch-main_c
--- patches/patch-main_c        23 Mar 2010 20:38:20 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-main_c,v 1.1 2010/03/23 20:38:20 jasper Exp $
-
-Port to gtk+2.
-
---- main.c.orig        Thu Apr  4 05:46:11 2002
-+++ main.c     Tue Mar 23 21:33:01 2010
-@@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-  */
- 
- #include <stdio.h>
-+#include <stdlib.h>
-+#include <locale.h>
- #ifdef USE_GNOME
- #include <gnome.h>
- #endif
-@@ -156,8 +158,8 @@ main(int argc, char *argv[])
-          exit(0);
-       }
-       new_style = gtk_style_copy(default_style);
--      new_style->font = new_font;
--      gtk_widget_set_default_style(new_style);
-+      new_style->font_desc = new_font;
-+/*      gtk_widget_set_default_style(new_style); */
-    }
-    
- 
Index: patches/patch-mode_c
===================================================================
RCS file: patches/patch-mode_c
diff -N patches/patch-mode_c
--- patches/patch-mode_c        23 Mar 2010 20:38:20 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-mode_c,v 1.1 2010/03/23 20:38:20 jasper Exp $
---- mode.c.orig        Tue Mar 23 21:32:07 2010
-+++ mode.c     Tue Mar 23 21:32:17 2010
-@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- /* setup mode.c  by Paul Wilkins  2/8/98 */
- 
- #include <stdio.h>
-+#include <string.h>
- #include <gtk/gtk.h>
- 
- #include "mode.h"
Index: patches/patch-process_input_c
===================================================================
RCS file: patches/patch-process_input_c
diff -N patches/patch-process_input_c
--- patches/patch-process_input_c       23 Mar 2010 20:38:20 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-process_input_c,v 1.1 2010/03/23 20:38:20 jasper Exp $
---- process_input.c.orig       Tue Mar 23 21:31:46 2010
-+++ process_input.c    Tue Mar 23 21:32:01 2010
-@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- /* process_input.c  by Paul Wilkins 3/21/97 */
- 
- #include <stdio.h>
-+#include <stdlib.h>
- #include <gtk/gtk.h>
- #include <gdk/gdkkeysyms.h>
- 
Index: patches/patch-run_cmd_c
===================================================================
RCS file: patches/patch-run_cmd_c
diff -N patches/patch-run_cmd_c
--- patches/patch-run_cmd_c     23 Mar 2010 20:38:20 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-run_cmd_c,v 1.1 2010/03/23 20:38:20 jasper Exp $
---- run_cmd.c.orig     Tue Mar 23 21:31:29 2010
-+++ run_cmd.c  Tue Mar 23 21:31:38 2010
-@@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- /* run_cmd.c  by Paul Wilkins */
- 
- #include <stdio.h>
-+#include <string.h>
- #include <gtk/gtk.h>
- 
- #include "buttons.h"
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/math/grpn/pkg/DESCR,v
retrieving revision 1.2
diff -u -p -r1.2 DESCR
--- pkg/DESCR   2 Nov 2003 19:58:21 -0000       1.2
+++ pkg/DESCR   5 Nov 2013 20:31:56 -0000
@@ -1,9 +1,6 @@
-GRPN is a graphical (GTK) reverse polish notation (RPN) calculator.
-GRPN works with real numbers and complex numbers.  Numbers can be
-displayed in 4 different radix modes, and complex numbers can be
-displayed in either Cartesian or polar form.
+GRPN is a graphical reverse Polish notation (RPN) calculator.
 
-General Math Functions: + - * / sqrt sqr pow neg
-Exponential and Logarithmic Functions: log alog exp ln
-Trigonometric Functions: sin asin cos acos tan atan
-Numerical Bases: binary, octal, decimal and hex
+GRPN works with real numbers, complex numbers, matrices, and
+complex matrices.  Numbers can be displayed in four different
+radix modes, and complex numbers can be displayed in either
+Cartesian or polar form.
-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to