diff options
author | Fredy García | 2021-09-19 15:12:28 -0500 |
---|---|---|
committer | Fredy García | 2021-09-19 15:12:28 -0500 |
commit | 08428f5b59ea7519e062e6b3133736a81ec2b5fb (patch) | |
tree | e12ffb65b086cec30b8c782ec16ef56367ccb2f8 | |
parent | 5fbe43dcaabdddce09a3388d99a42bdcef8ee4f2 (diff) | |
download | aur-tuxmath.tar.gz |
Adding rename-blits-to-tmblits patch.
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch | 26 | ||||
-rw-r--r-- | 0002-rename-blits-to-tmblits.patch | 54 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | menu_lan.patch | 15 |
5 files changed, 92 insertions, 26 deletions
@@ -1,19 +1,19 @@ pkgbase = tuxmath pkgdesc = An educational math tutorial game starring Tux, the Linux Penguin pkgver = 2.0.3 - pkgrel = 5 + pkgrel = 6 url = https://github.com/tux4kids/tuxmath/ arch = i686 arch = x86_64 license = custom:OFL license = GPL - makedepends = gcc9 depends = t4kcommon options = !docs source = tuxmath-2.0.3.tar.gz::https://github.com/tux4kids/tuxmath/archive/upstream/2.0.3.tar.gz - source = menu_lan.patch + source = 0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch + source = 0002-rename-blits-to-tmblits.patch sha256sums = ab91bd6df17eb9377e5608701030bd32110a3588933bf0e4c26b5697fb2a4698 - sha256sums = f6dad4cb620bf11ad9608dd95190ae6cafc78f0345fd92d8fb43a2a427dbb0df + sha256sums = 852f82370e323ea34825864c063bd44a5dbd6dd60fb2c52338edbeb0b70fbafe + sha256sums = b5ede8e1a870cd19010890d8ca1867c8eae86c9dc3b78712c44e5e7576c05b91 pkgname = tuxmath - diff --git a/0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch b/0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch new file mode 100644 index 000000000000..ee192e947066 --- /dev/null +++ b/0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch @@ -0,0 +1,26 @@ +From c471e2a94798787afbad4e547a1e2485ef9835db Mon Sep 17 00:00:00 2001 +From: Adrian Bunk <bunk@debian.org> +Date: Sun, 3 Jan 2021 14:22:29 +0200 +Subject: src/menu_lan.c: Remove unused duplicate lan_player_info definition + +This broke the build with gcc 10: +https://bugs.debian.org/976513 +--- + src/menu_lan.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/menu_lan.c b/src/menu_lan.c +index 4512eb1..d85f2c6 100644 +--- a/src/menu_lan.c ++++ b/src/menu_lan.c +@@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ + + + /* lan_player_type now defined in network.h */ +-lan_player_type lan_player_info[MAX_CLIENTS]; + + /* Local function prototypes: ------------------- */ + void draw_player_table(void); +-- +2.20.1 + diff --git a/0002-rename-blits-to-tmblits.patch b/0002-rename-blits-to-tmblits.patch new file mode 100644 index 000000000000..c5b5108acf23 --- /dev/null +++ b/0002-rename-blits-to-tmblits.patch @@ -0,0 +1,54 @@ +Bug-Debian: https://bugs.debian.org/986623 +Forwarded: no +Last-Update: 2021-04-20 + +--- tuxmath-2.0.3.orig/src/titlescreen.c ++++ tuxmath-2.0.3/src/titlescreen.c +@@ -55,7 +55,7 @@ struct blit { + SDL_Rect *srcrect; + SDL_Rect *dstrect; + unsigned char type; +-} blits[MAX_UPDATES]; ++} tmblits[MAX_UPDATES]; + + // Lessons available for play + char **lesson_list_titles = NULL; +@@ -1019,8 +1019,8 @@ void init_blits(void) { + int i; + + for (i = 0; i < MAX_UPDATES; ++i) { +- blits[i].srcrect = &srcupdate[i]; +- blits[i].dstrect = &dstupdate[i]; ++ tmblits[i].srcrect = &srcupdate[i]; ++ tmblits[i].dstrect = &dstupdate[i]; + } + } + +@@ -1032,14 +1032,14 @@ void update_screen(int *frame) { + + /* -- First erase everything we need to -- */ + for (i = 0; i < numupdates; i++) +- if (blits[i].type == 'E') +- SDL_LowerBlit(blits[i].src, blits[i].srcrect, screen, blits[i].dstrect); ++ if (tmblits[i].type == 'E') ++ SDL_LowerBlit(tmblits[i].src, tmblits[i].srcrect, screen, tmblits[i].dstrect); + // SNOW_erase(); + + /* -- then draw -- */ + for (i = 0; i < numupdates; i++) +- if (blits[i].type == 'D') +- SDL_BlitSurface(blits[i].src, blits[i].srcrect, screen, blits[i].dstrect); ++ if (tmblits[i].type == 'D') ++ SDL_BlitSurface(tmblits[i].src, tmblits[i].srcrect, screen, tmblits[i].dstrect); + // SNOW_draw(); + + /* -- update the screen only where we need to! -- */ +@@ -1067,7 +1067,7 @@ void add_rect(SDL_Rect* src, SDL_Rect* d + return; + } + +- update = &blits[numupdates++]; ++ update = &tmblits[numupdates++]; + + update->srcrect->x = src->x; + update->srcrect->y = src->y; @@ -8,33 +8,34 @@ pkgname=tuxmath pkgver=2.0.3 -pkgrel=5 +pkgrel=6 pkgdesc="An educational math tutorial game starring Tux, the Linux Penguin" arch=("i686" "x86_64") url="https://github.com/tux4kids/${pkgname}/" license=("custom:OFL" "GPL") depends=("t4kcommon") -makedepends=("gcc9") options=(!docs) source=( "${pkgname}-${pkgver}.tar.gz::https://github.com/tux4kids/${pkgname}/archive/upstream/${pkgver}.tar.gz" - "menu_lan.patch" + "0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch" + "0002-rename-blits-to-tmblits.patch" ) sha256sums=( "ab91bd6df17eb9377e5608701030bd32110a3588933bf0e4c26b5697fb2a4698" - "f6dad4cb620bf11ad9608dd95190ae6cafc78f0345fd92d8fb43a2a427dbb0df" + "852f82370e323ea34825864c063bd44a5dbd6dd60fb2c52338edbeb0b70fbafe" + "b5ede8e1a870cd19010890d8ca1867c8eae86c9dc3b78712c44e5e7576c05b91" ) prepare() { cd "${srcdir}/${pkgname}-upstream-${pkgver}" - patch -Np1 -i "${srcdir}/menu_lan.patch" + patch -Np1 -i "${srcdir}/0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch" + patch -Np1 -i "${srcdir}/0002-rename-blits-to-tmblits.patch" } build() { cd "${srcdir}/${pkgname}-upstream-${pkgver}" - export CC=/usr/bin/gcc-9 ./configure \ --prefix=/usr \ --localstatedir=/usr/share/games \ diff --git a/menu_lan.patch b/menu_lan.patch deleted file mode 100644 index d533c07821e0..000000000000 --- a/menu_lan.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/menu_lan.c b/src/menu_lan.c -index 001ed23..265084e 100644 ---- a/src/menu_lan.c -+++ b/src/menu_lan.c -@@ -35,10 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #include "network.h" - #include "menu_lan.h" - -- --/* lan_player_type now defined in network.h */ --lan_player_type lan_player_info[MAX_CLIENTS]; -- - /* Local function prototypes: ------------------- */ - void draw_player_table(void); - |