- switch to gtk+2

This commit is contained in:
jasper 2010-03-23 20:38:20 +00:00
parent 9a8382dbb5
commit 128f88f2a9
11 changed files with 149 additions and 15 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.16 2009/08/10 06:32:43 kili Exp $
# $OpenBSD: Makefile,v 1.17 2010/03/23 20:38:20 jasper Exp $
COMMENT= graphical reverse polish notation calculator
DISTNAME= grpn-1.1.2
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p2
CATEGORIES= math x11
HOMEPAGE= http://lashwhip.com/grpn.html
@ -11,15 +11,21 @@ HOMEPAGE= http://lashwhip.com/grpn.html
MASTER_SITES= http://lashwhip.com/grpn/ \
ftp://lashwhip.com/pub/
# GPL
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= X11 Xext Xi c glib gmodule iconv intl m \
pthread-stubs xcb
LIB_DEPENDS= gtk.>=1.2,gdk.>=1.2::x11/gtk+
MODULES= devel/gettext
WANTLIB += X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB += Xi Xinerama Xrandr Xrender atk-1.0 c cairo expat fontconfig
WANTLIB += freetype gio-2.0 glib-2.0 glitz gmodule-2.0 gobject-2.0
WANTLIB += m pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1 png
WANTLIB += pthread-stubs xcb z
LIB_DEPENDS= gdk_pixbuf-2.0,gdk-x11-2.0,gtk-x11-2.0::x11/gtk+2
MAKE_FLAGS= CC="${CC}"
ALL_TARGET=

View File

@ -1,18 +1,30 @@
$OpenBSD: patch-Makefile,v 1.4 2002/12/22 01:30:45 margarida Exp $
--- Makefile.orig Fri Apr 5 04:56:05 2002
+++ Makefile Sun Dec 22 01:06:20 2002
@@ -20,9 +20,7 @@ GTK_DIR =
$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
+CFLAGS +=`$(GTK_DIR)gtk-config --cflags` -DGTK_VER_1_1
-
# end of user configurable section
@@ -41,7 +39,7 @@ LIBS = `$(GTK_DIR)gtk-config --libs` -
@@ -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)

View File

@ -0,0 +1,11 @@
$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"

View File

@ -0,0 +1,11 @@
$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"

View File

@ -0,0 +1,11 @@
$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"

View File

@ -0,0 +1,24 @@
$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,

View File

@ -0,0 +1,26 @@
$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); */
}

View File

@ -0,0 +1,11 @@
$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"

View File

@ -0,0 +1,11 @@
$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>

View File

@ -0,0 +1,11 @@
$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"

View File

@ -1,2 +1,2 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2000/12/18 02:17:12 obecian Exp $
bin/grpn
@comment $OpenBSD: PLIST,v 1.2 2010/03/23 20:38:20 jasper Exp $
@bin bin/grpn