pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/xkobo Fall back to "fixed" when a font is missin...
details: https://anonhg.NetBSD.org/pkgsrc/rev/fcd2678e4753
branches: trunk
changeset: 604256:fcd2678e4753
user: abs <abs%pkgsrc.org@localhost>
date: Sun May 27 18:16:31 2012 +0000
description:
Fall back to "fixed" when a font is missing rather than crash. Add LICENSE. Bump PKGREVISION
diffstat:
games/xkobo/Makefile | 5 +++--
games/xkobo/distinfo | 3 ++-
games/xkobo/patches/patch-xlbacking.C | 30 ++++++++++++++++++++++++++++++
3 files changed, 35 insertions(+), 3 deletions(-)
diffs (69 lines):
diff -r abd2eb4a8863 -r fcd2678e4753 games/xkobo/Makefile
--- a/games/xkobo/Makefile Sun May 27 18:13:59 2012 +0000
+++ b/games/xkobo/Makefile Sun May 27 18:16:31 2012 +0000
@@ -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 @@
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 -r abd2eb4a8863 -r fcd2678e4753 games/xkobo/distinfo
--- a/games/xkobo/distinfo Sun May 27 18:13:59 2012 +0000
+++ b/games/xkobo/distinfo Sun May 27 18:16:31 2012 +0000
@@ -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-af) = 6557a35bc96e3967fd4c05d39f8054288dca76eb
SHA1 (patch-scenes.C) = 905a740848ab4b9cea901f8ee48016d3fb2fb3c9
SHA1 (patch-scenes.h) = 368ebaa483a04411896a606670ff38d651a1a6f5
+SHA1 (patch-xlbacking.C) = d96e7897dba8f171e09f827c868f9e689d301258
diff -r abd2eb4a8863 -r fcd2678e4753 games/xkobo/patches/patch-xlbacking.C
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xkobo/patches/patch-xlbacking.C Sun May 27 18:16:31 2012 +0000
@@ -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 <stdio.h>
+
+ //--------------------------------------------------------------------------//
+ // 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);
+ }
+
Home |
Main Index |
Thread Index |
Old Index