From 4eb61da9451f035b4861cee05a0d8b9cfeb22edb Mon Sep 17 00:00:00 2001 From: abs Date: Sun, 27 May 2012 18:16:31 +0000 Subject: Fall back to "fixed" when a font is missing rather than crash. Add LICENSE. Bump PKGREVISION --- games/xkobo/Makefile | 5 +++-- games/xkobo/distinfo | 3 ++- games/xkobo/patches/patch-xlbacking.C | 30 ++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 games/xkobo/patches/patch-xlbacking.C diff --git a/games/xkobo/Makefile b/games/xkobo/Makefile index 0c05197debb..9851e741b4c 100644 --- a/games/xkobo/Makefile +++ b/games/xkobo/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.21 2010/02/14 22:12:59 joerg Exp $ +# $NetBSD: Makefile,v 1.22 2012/05/27 18:16:31 abs Exp $ DISTNAME= xkobo-1.11 -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_XCONTRIB:=games/} @@ -10,6 +10,7 @@ HOMEPAGE= http://seki.math.hokudai.ac.jp:20080/xkobo-current.html COMMENT= Multi-way scrolling shoot 'em up game for X. Strangely addictive PKG_DESTDIR_SUPPORT= user-destdir +LICENSE= gnu-gpl-v2 SETGIDGAME= yes SPECIAL_PERMS+= bin/xoko ${SETGID_GAMES_PERMS} diff --git a/games/xkobo/distinfo b/games/xkobo/distinfo index 8fd526c9224..22a5e162b2b 100644 --- a/games/xkobo/distinfo +++ b/games/xkobo/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2011/12/05 22:48:03 joerg Exp $ +$NetBSD: distinfo,v 1.11 2012/05/27 18:16:31 abs Exp $ SHA1 (xkobo-1.11.tar.gz) = 6ac1c0fe86b7fa524eb86f40b89e86ee6cbe3c5d RMD160 (xkobo-1.11.tar.gz) = 874ed89a6ed7da56f41b3867cf2cc45f0bcf9683 @@ -11,3 +11,4 @@ SHA1 (patch-ae) = 48fb06d8089250a697d28df73638d364e98ab269 SHA1 (patch-af) = 6557a35bc96e3967fd4c05d39f8054288dca76eb SHA1 (patch-scenes.C) = 905a740848ab4b9cea901f8ee48016d3fb2fb3c9 SHA1 (patch-scenes.h) = 368ebaa483a04411896a606670ff38d651a1a6f5 +SHA1 (patch-xlbacking.C) = d96e7897dba8f171e09f827c868f9e689d301258 diff --git a/games/xkobo/patches/patch-xlbacking.C b/games/xkobo/patches/patch-xlbacking.C new file mode 100644 index 00000000000..03f406a4bab --- /dev/null +++ b/games/xkobo/patches/patch-xlbacking.C @@ -0,0 +1,30 @@ +$NetBSD: patch-xlbacking.C,v 1.1 2012/05/27 18:16:32 abs Exp $ + +--- xlbacking.C.orig 1996-03-13 16:34:42.000000000 +0000 ++++ xlbacking.C +@@ -21,6 +21,7 @@ + */ + + #include "xlbacking.h" ++#include + + //--------------------------------------------------------------------------// + // class win_backing // +@@ -104,7 +105,16 @@ void win_backing::background(int i) + + void win_backing::font(char *s) + { +- Font f1 = XLoadFont(disp,s); ++ char **fontnames; ++ int found; ++ Font f1; ++ ++ fontnames = XListFonts(disp, s, 1, &found); ++ XFreeFontNames(fontnames); ++ if (!found) ++ fprintf(stderr, "xkobo : font '%s' missing, using fixed\n", s); ++ ++ f1 = XLoadFont(disp, found ? s : "fixed"); + XSetFont(disp,gc,f1); + } + -- cgit v1.2.3