GNU bug report logs - #38925
[PATCH] Add Tuxmath

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Nicolas Goaziou <mail@HIDDEN>; Keywords: patch; dated Sat, 4 Jan 2020 19:46:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jan 2020 19:45:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 14:45:37 2020
Received: from localhost ([127.0.0.1]:43413 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1inpMZ-0003dB-UI
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2020 14:45:37 -0500
Received: from lists.gnu.org ([209.51.188.17]:43529)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1inpMS-0003cv-7W
 for submit <at> debbugs.gnu.org; Sat, 04 Jan 2020 14:45:30 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:49164)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <mail@HIDDEN>) id 1inpMO-0004Oz-TK
 for guix-patches@HIDDEN; Sat, 04 Jan 2020 14:45:24 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mail@HIDDEN>) id 1inpML-0004D7-1V
 for guix-patches@HIDDEN; Sat, 04 Jan 2020 14:45:20 -0500
Received: from relay10.mail.gandi.net ([217.70.178.230]:44969)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <mail@HIDDEN>)
 id 1inpMK-0004Bc-Iq
 for guix-patches@HIDDEN; Sat, 04 Jan 2020 14:45:16 -0500
Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67])
 (Authenticated sender: admin@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id F2C5D240005
 for <guix-patches@HIDDEN>; Sat,  4 Jan 2020 19:45:13 +0000 (UTC)
From: Nicolas Goaziou <mail@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] Add Tuxmath
Date: Sat, 04 Jan 2020 20:45:12 +0100
Message-ID: <875zhruhtj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 217.70.178.230
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

--=-=-=
Content-Type: text/plain

Hello,

The following set of patches add Tuxmath. Unfortunately, my keyboard
doesn't respond when playing the game, but leoprikler on #guix reported
it was working fine there. I guess I'm out of luck.

Anyway, here are the patches.

Regards,

-- 
Nicolas Goaziou

--=-=-=
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename=0001-gnu-Add-sdl-pango.patch
Content-Transfer-Encoding: quoted-printable

From a0d54545e463931227c70ebc858f28b2f2a0de13 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@HIDDEN>
Date: Fri, 3 Jan 2020 17:20:27 +0100
Subject: [PATCH 1/3] gnu: Add sdl-pango.

* gnu/packages/sdl.scm (sdl-pango): New variable.
* gnu/packages/patches/sdl-pango-api_additions.patch: New file.
* gnu/packages/patches/sdl-pango-blit_overflow.patch: New file.
* gnu/packages/patches/sdl-pango-fillrect_crash.patch: New file.
* gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurfac=
e.patch:
New file.
* gnu/packages/patches/sdl-pango-matrix_declarations.patch: New file.
* gnu/packages/patches/sdl-pango-sans-serif.patch: New file.
* gnu/local.mk (sdl-pango): Reference patches.

add
---
 gnu/local.mk                                  |   6 +
 .../patches/sdl-pango-api_additions.patch     | 128 +++++++++++++++++
 .../patches/sdl-pango-blit_overflow.patch     |  32 +++++
 .../patches/sdl-pango-fillrect_crash.patch    |  15 ++
 ...licit-SDLPango_CopyFTBitmapToSurface.patch |  20 +++
 .../sdl-pango-matrix_declarations.patch       | 131 ++++++++++++++++++
 .../patches/sdl-pango-sans-serif.patch        |  13 ++
 gnu/packages/sdl.scm                          |  52 ++++++-
 8 files changed, 396 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/sdl-pango-api_additions.patch
 create mode 100644 gnu/packages/patches/sdl-pango-blit_overflow.patch
 create mode 100644 gnu/packages/patches/sdl-pango-fillrect_crash.patch
 create mode 100644 gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_Co=
pyFTBitmapToSurface.patch
 create mode 100644 gnu/packages/patches/sdl-pango-matrix_declarations.patch
 create mode 100644 gnu/packages/patches/sdl-pango-sans-serif.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c7dcc65082..2cfeee7b6b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1245,6 +1245,12 @@ dist_patch_DATA =3D						\
   %D%/packages/patches/p7zip-CVE-2017-17969.patch		\
   %D%/packages/patches/p7zip-remove-unused-code.patch		\
   %D%/packages/patches/pam-mount-luks2-support.patch		\
+  %D%/packages/patches/sdl-pango-api_additions.patch		\
+  %D%/packages/patches/sdl-pango-blit_overflow.patch		\
+  %D%/packages/patches/sdl-pango-fillrect_crash.patch		\
+  %D%/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurfa=
ce.patch	\
+  %D%/packages/patches/sdl-pango-matrix_declarations.patch	\
+  %D%/packages/patches/sdl-pango-sans-serif.patch		\
   %D%/packages/patches/patchutils-test-perms.patch		\
   %D%/packages/patches/patch-hurd-path-max.patch		\
   %D%/packages/patches/pcre2-fix-jit_match-crash.patch		\
diff --git a/gnu/packages/patches/sdl-pango-api_additions.patch b/gnu/packa=
ges/patches/sdl-pango-api_additions.patch
new file mode 100644
index 0000000000..5c02e79910
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-api_additions.patch
@@ -0,0 +1,128 @@
+Index: SDL_Pango-0.1.2/src/SDL_Pango.c
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2004-12-10 10:06:33.000000000 +01=
00
++++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 14:56:35.362379428 +0200
+@@ -723,13 +723,9 @@
+     SDL_UnlockSurface(surface);=0D
+ }=0D
+ =0D
+-/*!=0D
+-    Create a context which contains Pango objects.=0D
+ =0D
+-    @return A pointer to the context as a SDLPango_Context*.=0D
+-*/=0D
+ SDLPango_Context*=0D
+-SDLPango_CreateContext()=0D
++SDLPango_CreateContext_GivenFontDesc(const char* font_desc)=0D
+ {=0D
+     SDLPango_Context *context =3D g_malloc(sizeof(SDLPango_Context));=0D
+     G_CONST_RETURN char *charset;=0D
+@@ -743,8 +739,7 @@
+     pango_context_set_language (context->context, pango_language_from_str=
ing (charset));=0D
+     pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR);=0D
+ =0D
+-    context->font_desc =3D pango_font_description_from_string(=0D
+-	MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));=0D
++    context->font_desc =3D pango_font_description_from_string(font_desc);=
=0D
+ =0D
+     context->layout =3D pango_layout_new (context->context);=0D
+ =0D
+@@ -762,6 +757,17 @@
+ }=0D
+ =0D
+ /*!=0D
++    Create a context which contains Pango objects.=0D
++=0D
++    @return A pointer to the context as a SDLPango_Context*.=0D
++*/=0D
++SDLPango_Context*=0D
++SDLPango_CreateContext()=0D
++{=0D
++    SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMI=
LY, DEFAULT_FONT_SIZE));=0D
++}=0D
++=0D
++/*!=0D
+     Free a context.=0D
+ =0D
+     @param *context [i/o] Context to be free=0D
+@@ -1053,6 +1059,20 @@
+     pango_layout_set_font_description (context->layout, context->font_des=
c);=0D
+ }=0D
+ =0D
++void=0D
++SDLPango_SetText_GivenAlignment(=0D
++    SDLPango_Context *context,=0D
++    const char *text,=0D
++    int length,=0D
++    SDLPango_Alignment alignment)=0D
++{=0D
++    pango_layout_set_attributes(context->layout, NULL);=0D
++    pango_layout_set_text (context->layout, text, length);=0D
++    pango_layout_set_auto_dir (context->layout, TRUE);=0D
++    pango_layout_set_alignment (context->layout, alignment);=0D
++    pango_layout_set_font_description (context->layout, context->font_des=
c);=0D
++}=0D
++=0D
+ /*!=0D
+     Set plain text to context.=0D
+     Text must be utf-8.=0D
+@@ -1067,11 +1087,7 @@
+     const char *text,=0D
+     int length)=0D
+ {=0D
+-    pango_layout_set_attributes(context->layout, NULL);=0D
+-    pango_layout_set_text (context->layout, text, length);=0D
+-    pango_layout_set_auto_dir (context->layout, TRUE);=0D
+-    pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT);=0D
+-    pango_layout_set_font_description (context->layout, context->font_des=
c);=0D
++    SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN=
_LEFT);=0D
+ }=0D
+ =0D
+ /*!=0D
+Index: SDL_Pango-0.1.2/src/SDL_Pango.h
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h	2004-12-10 10:06:33.000000000 +01=
00
++++ SDL_Pango-0.1.2/src/SDL_Pango.h	2007-09-18 15:00:41.736419485 +0200
+@@ -26,6 +26,7 @@
+ =0D
+ #ifndef SDL_PANGO_H=0D
+ #define SDL_PANGO_H=0D
++#define SDL_PANGO_HAS_GC_EXTENSIONS=0D
+ =0D
+ #include "SDL.h"=0D
+ =0D
+@@ -109,12 +110,20 @@
+     SDLPANGO_DIRECTION_NEUTRAL	/*! Neutral */=0D
+ } SDLPango_Direction;=0D
+ =0D
+-=0D
++/*!=0D
++    Specifies alignment of text. See Pango reference for detail=0D
++*/=0D
++typedef enum {=0D
++    SDLPANGO_ALIGN_LEFT,=0D
++    SDLPANGO_ALIGN_CENTER,=0D
++    SDLPANGO_ALIGN_RIGHT=0D
++} SDLPango_Alignment;=0D
+ =0D
+ extern DECLSPEC int SDLCALL SDLPango_Init();=0D
+ =0D
+ extern DECLSPEC int SDLCALL SDLPango_WasInit();=0D
+ =0D
++extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFon=
tDesc(const char* font_desc);=0D
+ extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();=0D
+ =0D
+ extern DECLSPEC void SDLCALL SDLPango_FreeContext(=0D
+@@ -157,6 +166,12 @@
+     const char *markup,=0D
+     int length);=0D
+ =0D
++extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(=0D
++    SDLPango_Context *context,=0D
++    const char *text,=0D
++    int length,=0D
++    SDLPango_Alignment alignment);=0D
++=0D
+ extern DECLSPEC void SDLCALL SDLPango_SetText(=0D
+     SDLPango_Context *context,=0D
+     const char *markup,=0D
diff --git a/gnu/packages/patches/sdl-pango-blit_overflow.patch b/gnu/packa=
ges/patches/sdl-pango-blit_overflow.patch
new file mode 100644
index 0000000000..411d066a74
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-blit_overflow.patch
@@ -0,0 +1,32 @@
+Index: sdlpango-0.1.2/src/SDL_Pango.c
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+--- sdlpango-0.1.2.orig/src/SDL_Pango.c	2007-10-08 19:44:15.000000000 +0000
++++ sdlpango-0.1.2/src/SDL_Pango.c	2007-10-08 19:45:27.000000000 +0000
+@@ -725,16 +725,23 @@
+     int x =3D rect->x;=0D
+     int y =3D rect->y;=0D
+ =0D
++    if(x < 0) {=0D
++	width +=3D x; x =3D 0;=0D
++    }=0D
+     if(x + width > surface->w) {=0D
+ 	width =3D surface->w - x;=0D
+-	if(width <=3D 0)=0D
+-	    return;=0D
++    }=0D
++    if(width <=3D 0)=0D
++	return;=0D
++=0D
++    if(y < 0) {=0D
++	height +=3D y; y =3D 0;=0D
+     }=0D
+     if(y + height > surface->h) {=0D
+ 	height =3D surface->h - y;=0D
+-	if(height <=3D 0)=0D
+-	    return;=0D
+     }=0D
++    if(height <=3D 0)=0D
++	return;=0D
+ =0D
+     if(SDL_LockSurface(surface)) {=0D
+ 	SDL_SetError("surface lock failed");=0D
diff --git a/gnu/packages/patches/sdl-pango-fillrect_crash.patch b/gnu/pack=
ages/patches/sdl-pango-fillrect_crash.patch
new file mode 100644
index 0000000000..7a41bbf2fe
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-fillrect_crash.patch
@@ -0,0 +1,15 @@
+Index: SDL_Pango-0.1.2/src/SDL_Pango.c
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:56:12.406223540 +02=
00
++++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:57:27.986530616 +0200
+@@ -932,7 +932,9 @@
+     width =3D PANGO_PIXELS (logical_rect.width);=0D
+     height =3D PANGO_PIXELS (logical_rect.height);=0D
+ =0D
+-    SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0))=
;=0D
++    if (width && height) {=0D
++        SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0,=
 0));=0D
++    }=0D
+ =0D
+     if((! context->tmp_ftbitmap) || context->tmp_ftbitmap->width < width=
=0D
+ 	|| context->tmp_ftbitmap->rows < height)=0D
diff --git a/gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBit=
mapToSurface.patch b/gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_C=
opyFTBitmapToSurface.patch
new file mode 100644
index 0000000000..3d4b10cc10
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSu=
rface.patch
@@ -0,0 +1,20 @@
+--- a/src/SDL_Pango.h
++++ b/src/SDL_Pango.h
+@@ -171,7 +171,7 @@
+     SDLPango_Direction direction);=0D
+ =0D
+ =0D
+-#ifdef __FT2_BUILD_UNIX_H__=0D
++#ifdef FT2BUILD_H_=0D
+ =0D
+ extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(=0D
+     const FT_Bitmap *bitmap,=0D
+@@ -179,7 +179,7 @@
+     const SDLPango_Matrix *matrix,=0D
+     SDL_Rect *rect);=0D
+ =0D
+-#endif	/* __FT2_BUILD_UNIX_H__ */=0D
++#endif=0D
+ =0D
+ =0D
+ #ifdef __PANGO_H__=0D
diff --git a/gnu/packages/patches/sdl-pango-matrix_declarations.patch b/gnu=
/packages/patches/sdl-pango-matrix_declarations.patch
new file mode 100644
index 0000000000..c35d0a708d
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-matrix_declarations.patch
@@ -0,0 +1,131 @@
+Index: SDL_Pango-0.1.2/src/SDL_Pango.c
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:03:10.732910311 +02=
00
++++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:04:41.970109622 +0200
+@@ -286,6 +286,59 @@
+ } contextImpl;=0D
+ =0D
+ =0D
++const SDLPango_Matrix _MATRIX_WHITE_BACK=0D
++    =3D {255, 0, 0, 0,=0D
++       255, 0, 0, 0,=0D
++       255, 0, 0, 0,=0D
++       255, 255, 0, 0,};=0D
++=0D
++/*!=0D
++    Specifies white back and black letter.=0D
++*/=0D
++const SDLPango_Matrix *MATRIX_WHITE_BACK =3D &_MATRIX_WHITE_BACK;=0D
++=0D
++const SDLPango_Matrix _MATRIX_BLACK_BACK=0D
++    =3D {0, 255, 0, 0,=0D
++       0, 255, 0, 0,=0D
++       0, 255, 0, 0,=0D
++       255, 255, 0, 0,};=0D
++/*!=0D
++    Specifies black back and white letter.=0D
++*/=0D
++const SDLPango_Matrix *MATRIX_BLACK_BACK =3D &_MATRIX_BLACK_BACK;=0D
++=0D
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER=0D
++    =3D {0, 0, 0, 0,=0D
++       0, 0, 0, 0,=0D
++       0, 0, 0, 0,=0D
++       0, 255, 0, 0,};=0D
++/*!=0D
++    Specifies transparent back and black letter.=0D
++*/=0D
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER =3D &_MATRIX_=
TRANSPARENT_BACK_BLACK_LETTER;=0D
++=0D
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER=0D
++    =3D {255, 255, 0, 0,=0D
++       255, 255, 0, 0,=0D
++       255, 255, 0, 0,=0D
++       0, 255, 0, 0,};=0D
++/*!=0D
++    Specifies transparent back and white letter.=0D
++*/=0D
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER =3D &_MATRIX_=
TRANSPARENT_BACK_WHITE_LETTER;=0D
++=0D
++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER=0D
++    =3D {255, 255, 0, 0,=0D
++       255, 255, 0, 0,=0D
++       255, 255, 0, 0,=0D
++       0, 0, 0, 0,};=0D
++/*!=0D
++    Specifies transparent back and transparent letter.=0D
++    This is useful for KARAOKE like rendering.=0D
++*/=0D
++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER =3D &_M=
ATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;=0D
++=0D
++=0D
+ /*!=0D
+     Initialize the Glib and Pango API.=0D
+     This must be called before using other functions in this library,=0D
+Index: SDL_Pango-0.1.2/src/SDL_Pango.h
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h	2007-09-18 15:03:10.732910311 +02=
00
++++ SDL_Pango-0.1.2/src/SDL_Pango.h	2007-09-18 15:06:24.919976401 +0200
+@@ -47,57 +47,27 @@
+     Uint8 m[4][4];  /*! Matrix variables */=0D
+ } SDLPango_Matrix;=0D
+ =0D
+-const SDLPango_Matrix _MATRIX_WHITE_BACK=0D
+-    =3D {255, 0, 0, 0,=0D
+-       255, 0, 0, 0,=0D
+-       255, 0, 0, 0,=0D
+-       255, 255, 0, 0,};=0D
+-=0D
+ /*!=0D
+     Specifies white back and black letter.=0D
+ */=0D
+-const SDLPango_Matrix *MATRIX_WHITE_BACK =3D &_MATRIX_WHITE_BACK;=0D
+-=0D
+-const SDLPango_Matrix _MATRIX_BLACK_BACK=0D
+-    =3D {0, 255, 0, 0,=0D
+-       0, 255, 0, 0,=0D
+-       0, 255, 0, 0,=0D
+-       255, 255, 0, 0,};=0D
++extern const SDLPango_Matrix *MATRIX_WHITE_BACK;=0D
+ /*!=0D
+     Specifies black back and white letter.=0D
+ */=0D
+-const SDLPango_Matrix *MATRIX_BLACK_BACK =3D &_MATRIX_BLACK_BACK;=0D
+-=0D
+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER=0D
+-    =3D {0, 0, 0, 0,=0D
+-       0, 0, 0, 0,=0D
+-       0, 0, 0, 0,=0D
+-       0, 255, 0, 0,};=0D
++extern const SDLPango_Matrix *MATRIX_BLACK_BACK;=0D
+ /*!=0D
+     Specifies transparent back and black letter.=0D
+ */=0D
+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER =3D &_MATRIX_=
TRANSPARENT_BACK_BLACK_LETTER;=0D
+-=0D
+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER=0D
+-    =3D {255, 255, 0, 0,=0D
+-       255, 255, 0, 0,=0D
+-       255, 255, 0, 0,=0D
+-       0, 255, 0, 0,};=0D
++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;=0D
+ /*!=0D
+     Specifies transparent back and white letter.=0D
+ */=0D
+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER =3D &_MATRIX_=
TRANSPARENT_BACK_WHITE_LETTER;=0D
+-=0D
+-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER=0D
+-    =3D {255, 255, 0, 0,=0D
+-       255, 255, 0, 0,=0D
+-       255, 255, 0, 0,=0D
+-       0, 0, 0, 0,};=0D
++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;=0D
+ /*!=0D
+     Specifies transparent back and transparent letter.=0D
+     This is useful for KARAOKE like rendering.=0D
+ */=0D
+-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER =3D &_M=
ATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;=0D
++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;=
=0D
+ =0D
+ /*!=0D
+     Specifies direction of text. See Pango reference for detail=0D
diff --git a/gnu/packages/patches/sdl-pango-sans-serif.patch b/gnu/packages=
/patches/sdl-pango-sans-serif.patch
new file mode 100644
index 0000000000..ccdc8150a7
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-sans-serif.patch
@@ -0,0 +1,13 @@
+Index: SDL_Pango-0.1.2/src/SDL_Pango.c
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:12:20.736253215 +02=
00
++++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:12:44.621614364 +0200
+@@ -234,7 +234,7 @@
+ //! non-zero if initialized=0D
+ static int IS_INITIALIZED =3D 0;=0D
+ =0D
+-#define DEFAULT_FONT_FAMILY "Sans"=0D
++#define DEFAULT_FONT_FAMILY "sans-serif"=0D
+ #define DEFAULT_FONT_SIZE 12=0D
+ #define DEFAULT_DPI 96=0D
+ #define _MAKE_FONT_NAME(family, size) family " " #size=0D
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index f7a34003d1..930da592e3 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -8,7 +8,7 @@
 ;;; Copyright =C2=A9 2018, 2019 Tobias Geerinckx-Rice <me@HIDDEN>
 ;;; Copyright =C2=A9 2018, 2019 Ricardo Wurmus <rekado@HIDDEN>
 ;;; Copyright =C2=A9 2019 Kei Kebreau <kkebreau@HIDDEN>
-;;; Copyright =C2=A9 2019 Nicolas Goaziou <mail@HIDDEN>
+;;; Copyright =C2=A9 2019, 2020 Nicolas Goaziou <mail@HIDDEN>
 ;;; Copyright =C2=A9 2019 Marius Bakke <mbakke@HIDDEN>
 ;;; Copyright =C2=A9 2019 Pierre Neidhardt <mail@HIDDEN>
 ;;;
@@ -40,10 +40,12 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages fcitx)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages ibus)
   #:use-module (gnu packages image)
@@ -308,6 +310,54 @@ SDL.")
     (home-page "https://www.libsdl.org/projects/SDL_net/")
     (license zlib)))
=20
+(define-public sdl-pango
+  (package
+    (name "sdl-pango")
+    (version "0.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://sourceforge/sdlpango/SDL_Pango/" version "/"
+             "SDL_Pango-" version  ".tar.gz"))
+       (sha256
+        (base32 "197baw1dsg0p4pljs5k0fshbyki00r4l49m1drlpqw6ggawx6xbz"))
+       (patches
+        (search-patches
+         "sdl-pango-api_additions.patch"
+         "sdl-pango-blit_overflow.patch"
+         "sdl-pango-fillrect_crash.patch"
+         "sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurface.patch"
+         "sdl-pango-matrix_declarations.patch"
+         "sdl-pango-sans-serif.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list "--disable-static")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autogen
+           ;; Force reconfiguration because the included libtool
+           ;; generates linking errors.
+           (lambda _ (invoke "autoreconf" "-vif"))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("fontconfig" ,fontconfig)
+       ("freetype" ,freetype)
+       ("glib" ,glib)
+       ("harfbuzz" ,harfbuzz)
+       ("pango" ,pango)
+       ("sdl" ,sdl)))
+    (home-page "http://sdlpango.sourceforge.net")
+    (synopsis "Pango SDL binding")
+    (description "This library is a wrapper around the Pango library.
+It allows you to use TrueType fonts to render internationalized and
+tagged text in SDL applications.")
+    (license lgpl2.1)))
+
 (define-public sdl-ttf
   (package
     (name "sdl-ttf")
--=20
2.24.1


--=-=-=
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename=0002-gnu-Add-t4k-common.patch
Content-Transfer-Encoding: quoted-printable

From 7544109175a91b911f636475f077dda1c9a6f22c Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@HIDDEN>
Date: Fri, 3 Jan 2020 17:24:22 +0100
Subject: [PATCH 2/3] gnu: Add t4k-common.

* gnu/packages/education.scm (t4k-common): New variable.
---
 gnu/packages/education.scm | 49 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index ecb8678b02..190d3a54eb 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -4,7 +4,7 @@
 ;;; Copyright =C2=A9 2016 Hartmut Goebel <h.goebel@HIDDEN>
 ;;; Copyright =C2=A9 2017, 2018, 2019 Efraim Flashner <efraim@HIDDEN=
il>
 ;;; Copyright =C2=A9 2018, 2019 Tobias Geerinckx-Rice <me@HIDDEN>
-;;; Copyright =C2=A9 2018, 2019 Nicolas Goaziou <mail@HIDDEN>
+;;; Copyright =C2=A9 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou=
.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,6 +36,7 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages javascript)
   #:use-module (gnu packages kde)
   #:use-module (gnu packages kde-frameworks) ; extra-cmake-modules
@@ -612,3 +613,49 @@ each key.  A collection of lessons are included for a =
wide range of different
 languages and keyboard layouts, and typing statistics are used to dynamica=
lly
 adjust the level of difficulty.")
     (license license:gpl2)))
+
+(define-public t4k-common
+  (package
+    (name "t4k-common")
+    (version "0.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tux4kids/t4kcommon")
+             (commit (string-append "upstream/" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "13q02xpmps9qg8zrzzy2gzv4a6afgi28lxk4z242j780v0gphchp"))
+       (patches
+        (search-patches "t4k-common-libpng16.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ;FIXME: cannot find how to run tes=
ts
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'set-paths 'set-sdl-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CPATH" (string-append (assoc-ref inputs "sdl")
+                                            "/include/SDL:"
+                                            (or (getenv "CPATH") "")))))
+         (add-after 'unpack 'fix-andika-font-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "src/t4k_sdl.c"
+               (("(/usr/share/.*?)/AndikaDesRevG\\.ttf")
+                (string-append (assoc-ref inputs "font-andika")
+                               "/share/fonts/truetype")))
+             #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("font-andika" ,font-sil-andika)
+       ("libpng" ,libpng)
+       ("librsvg" ,librsvg)
+       ("libxml2" ,libxml2)
+       ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)=
))))
+    (home-page "https://github.com/tux4kids/t4kcommon")
+    (synopsis "Library of code shared between TuxMath and TuxType")
+    (description "Tux4Kids-Common is a library of code shared between
+TuxMath and TuxType.")
+    (license license:gpl3+)))
--=20
2.24.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment; filename=0003-gnu-Add-tuxmath.patch

From b9aac45a35b8314466a260da1cd58a2b5739aa8b Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@HIDDEN>
Date: Fri, 3 Jan 2020 17:26:15 +0100
Subject: [PATCH 3/3] gnu: Add tuxmath.

* gnu/packages/education.scm (tuxmath): New variable.
---
 gnu/packages/education.scm | 61 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm
index 190d3a54eb..8c68418d86 100644
--- a/gnu/packages/education.scm
+++ b/gnu/packages/education.scm
@@ -659,3 +659,64 @@ adjust the level of difficulty.")
     (description "Tux4Kids-Common is a library of code shared between
 TuxMath and TuxType.")
     (license license:gpl3+)))
+
+(define-public tuxmath
+  (package
+    (name "tuxmath")
+    (version "2.0.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tux4kids/tuxmath")
+             (commit (string-append "upstream/" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1f1pz83w6d3mbik2h6xavfxmk5apxlngxbkh80x0m55lhniwkdxv"))
+       (modules '((guix build utils)))
+       ;; Unbundle fonts.
+       (snippet
+        `(begin
+           (for-each delete-file (find-files "data/fonts" "\\.ttf$"))
+           #t))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ;no test
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'set-paths 'set-sdl-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CPATH"
+                     (string-append (assoc-ref inputs "sdl")
+                                    "/include/SDL:"
+                                    (or (getenv "CPATH") "")))))
+         (add-after 'install 'install-desktop-file
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (apps (string-append out "/share/applications"))
+                    (pixmaps (string-append out "/share/pixmaps")))
+               (install-file "tuxmath.desktop" apps)
+               (for-each (lambda (f) (install-file f pixmaps))
+                         (find-files "data/images/icons/"
+                                     "tuxmath\\.(png|ico|svg)$"))
+               #t))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("librsvg" ,librsvg)
+       ("libxml2" ,libxml2)
+       ("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer sdl-net sdl-pango)))
+       ("t4k-common" ,t4k-common)))
+    (home-page "https://github.com/tux4kids/tuxmath")
+    (synopsis "Educational math tutorial game")
+    (description "@emph{Tux, of Math Command} is an educational math
+tutorial game starring Tux, the Linux penguin, in which you play the
+part of Commander Tux, as he defends his friends from an attack of
+math equations.  Comets are crashing towards the friendly penguins in
+their igloos, and you must destroy the comets by solving their
+equations.
+
+TuxMath also includes Factoroids, a game that gives practice in
+factoring numbers and simplifying fractions, as well as zapping rocks
+floating through space.")
+    (license license:gpl3+)))
-- 
2.24.1


--=-=-=--




Acknowledgement sent to Nicolas Goaziou <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#38925; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 4 Jan 2020 20:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.