- switch this to gtk+2,

This commit is contained in:
jasper 2010-03-24 22:32:16 +00:00
parent b77db1756c
commit 0a5f1272b5
8 changed files with 1981 additions and 37 deletions

View File

@ -1,28 +1,34 @@
# $OpenBSD: Makefile,v 1.12 2009/08/10 06:31:41 kili Exp $
# $OpenBSD: Makefile,v 1.13 2010/03/24 22:32:16 jasper Exp $
COMMENT= computer simulation game
DISTNAME= corewars-0.9.13
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= games x11
HOMEPAGE= http://corewars.sourceforge.net/
# 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 m pthread-stubs xcb
MODULES= devel/gettext
LIB_DEPENDS= gtk.>=1.2,gdk::x11/gtk+
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
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=corewars/}
CONFIGURE_STYLE=gnu
AUTOCONF_VERSION= 2.59
CONFIGURE_STYLE=autoconf
USE_X11= Yes
post-install:

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-configure,v 1.3 2006/11/26 10:16:07 jasper Exp $
--- configure.orig Wed Oct 23 14:52:22 2002
+++ configure Sun Nov 26 11:13:59 2006
@@ -4471,20 +4471,7 @@ if test `eval echo '${'$as_ac_Header'}'`
_ACEOF
COREWARSCMD=corewars-cmd
else
- { echo "$as_me:$LINENO: WARNING:
-
- ********************************************************************************
- *** glibc >= 2.1 not installed - cannot build command line client without it ***
- *** (but this is ok if you want the GTK+ client only) ***
- ********************************************************************************
-" >&5
-echo "$as_me: WARNING:
-
- ********************************************************************************
- *** glibc >= 2.1 not installed - cannot build command line client without it ***
- *** (but this is ok if you want the GTK+ client only) ***
- ********************************************************************************
-" >&2;}
+ COREWARSCMD=corewars-cmd
fi
done

View File

@ -0,0 +1,52 @@
$OpenBSD: patch-configure_ac,v 1.1 2010/03/24 22:32:17 jasper Exp $
Swith to gtk+2.
From Debian's corewars_0.9.13+ds-1.diff.
--- configure.ac.orig Wed Oct 23 14:49:46 2002
+++ configure.ac Wed Mar 24 23:16:44 2010
@@ -36,38 +36,29 @@ AM_PROG_LEX
AC_PROG_LN_S
COREWARS=corewars
-AM_PATH_GLIB(1.2.0,,COREWARS=;AC_MSG_ERROR([
+AM_PATH_GLIB_2_0(2.0.0,,COREWARS=;AC_MSG_ERROR([
************************************************************************
- *** GLIB >= 1.2.0 not installed - cannot build GUI client without it ***
+ *** GLIB >= 2.0.0 not installed - cannot build GUI client without it ***
************************************************************************
]))
-AM_PATH_GTK(1.2.0,,COREWARS=;AC_MSG_ERROR([
+AM_PATH_GTK_2_0(2.0.0,,COREWARS=;AC_MSG_ERROR([
************************************************************************
- *** GTK+ >= 1.2.0 not installed - cannot build GUI client without it ***
+ *** GTK+ >= 2.0.0 not installed - cannot build GUI client without it ***
************************************************************************
]))
LIBS="$LIBS $GTK_LIBS"
-GTK_INCLUDE=`gtk-config --cflags`
AC_SUBST(INCLUDES)
-INCLUDES="$INCLUDES $GTK_INCLUDE"
+INCLUDES="$INCLUDES $GTK_CFLAGS"
dnl Checks for header files.
AC_HEADER_DIRENT
AC_STDC_HEADERS
AC_CHECK_HEADERS(limits.h malloc.h string.h unistd.h)
-dnl Check for libc >= 2.1
-COREWARSCMD=
-AC_CHECK_HEADERS(argp.h,COREWARSCMD=corewars-cmd,AC_MSG_WARN([
-
- ********************************************************************************
- *** glibc >= 2.1 not installed - cannot build command line client without it ***
- *** (but this is ok if you want the GTK+ client only) ***
- ********************************************************************************
-]))
+COREWARSCMD=corewars-cmd
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-doc-corewars_6,v 1.1 2006/11/26 10:16:07 jasper Exp $
$OpenBSD: patch-doc-corewars_6,v 1.2 2010/03/24 22:32:17 jasper Exp $
--- doc/corewars.6.orig Wed Apr 12 15:10:09 2000
+++ doc/corewars.6 Sun Nov 26 01:28:49 2006
@@ -38,7 +38,7 @@ called \fBRedcode\fP, is harder to learn
+++ doc/corewars.6 Wed Mar 24 23:04:18 2010
@@ -38,7 +38,7 @@ called \fBRedcode\fP, is harder to learn but also more
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
.SH OPTIONS

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_dirbrowser_c,v 1.1 2010/03/24 22:32:17 jasper Exp $
Swith to gtk+2.
From Debian's corewars_0.9.13+ds-1.diff.
--- src/dirbrowser.c.orig Wed Mar 24 23:07:32 2010
+++ src/dirbrowser.c Wed Mar 24 23:07:42 2010
@@ -232,7 +232,7 @@ GtkWidget *create_dir_browser(gchar *title,gchar *curr
DirNode *dirnode;
gboolean leaf;
- window=gtk_window_new(GTK_WINDOW_DIALOG);
+ window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window),title);
gtk_container_border_width(GTK_CONTAINER(window),10);

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_main-gui_c,v 1.1 2010/03/24 22:32:17 jasper Exp $
Swith to gtk+2.
From Debian's corewars_0.9.13+ds-1.diff.
--- src/main-gui.c.orig Wed Mar 24 23:07:02 2010
+++ src/main-gui.c Wed Mar 24 23:07:23 2010
@@ -348,7 +348,7 @@ void get_main_menu( GtkWidget *window,
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
/* Attach the new accelerator group to the window. */
- gtk_accel_group_attach (accel_group, GTK_OBJECT (window));
+ gtk_window_add_accel_group(GTK_OBJECT (window), accel_group);
menu_file_start = gtk_item_factory_get_widget (item_factory, "/File/Start");
menu_file_pause = gtk_item_factory_get_widget (item_factory, "/File/Pause");

View File

@ -1,6 +1,6 @@
@comment $OpenBSD: PLIST,v 1.4 2006/11/26 10:16:07 jasper Exp $
bin/corewars
bin/corewars-cmd
@comment $OpenBSD: PLIST,v 1.5 2010/03/24 22:32:17 jasper Exp $
@bin bin/corewars
@bin bin/corewars-cmd
@man man/man6/corewars-cmd.6
@man man/man6/corewars.6
share/corewars/