diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-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 | 65 |
5 files changed, 137 insertions, 33 deletions
@@ -1,18 +1,19 @@ pkgbase = tuxmath - pkgdesc = An arcade game that helps kids practice their math facts + pkgdesc = An educational math tutorial game starring Tux, the Linux Penguin pkgver = 2.0.3 - pkgrel = 2 - url = http://tux4kids.alioth.debian.org/tuxmath/ + pkgrel = 6 + url = https://github.com/tux4kids/tuxmath/ arch = i686 arch = x86_64 - license = GPL license = custom:OFL - license = custom - makedepends = make + license = GPL depends = t4kcommon options = !docs - source = https://github.com/tux4kids/tuxmath/archive/upstream/2.0.3.tar.gz + source = tuxmath-2.0.3.tar.gz::https://github.com/tux4kids/tuxmath/archive/upstream/2.0.3.tar.gz + source = 0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch + source = 0002-rename-blits-to-tmblits.patch sha256sums = ab91bd6df17eb9377e5608701030bd32110a3588933bf0e4c26b5697fb2a4698 + sha256sums = 852f82370e323ea34825864c063bd44a5dbd6dd60fb2c52338edbeb0b70fbafe + sha256sums = b5ede8e1a870cd19010890d8ca1867c8eae86c9dc3b78712c44e5e7576c05b91 pkgname = tuxmath - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..6bcc0d60805a --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +tuxmath-*.pkg.tar.zst +tuxmath-*.pkg.tar.xz +tuxmath-*.tar.gz +tuxmath-*.log +PKGBUILD-namcap.log +tuxmath-upstream-*/ +pkg/ +src/ 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; @@ -1,4 +1,5 @@ -# Maintainer: Alexandre Moine < nobrakal at cthugha dot org > +# Maintainer: Fredy GarcĂa <frealgagu at gmail dot com> +# Contributor: Alexandre Moine < nobrakal at moine dot org > # Contributor: Tasos Latsas < tlatsas2000 at gmail dot com > # Contributor: Anton Bazhenov <anton.bazhenov at gmail> # Contributor: arjan <arjan@archlinux.org> @@ -7,42 +8,56 @@ pkgname=tuxmath pkgver=2.0.3 -pkgrel=2 -pkgdesc="An arcade game that helps kids practice their math facts" -arch=('i686' 'x86_64') -url="http://tux4kids.alioth.debian.org/tuxmath/" -license=('GPL' 'custom:OFL' 'custom') -depends=('t4kcommon') -makedepends=('make') -options=('!docs') -source=(https://github.com/tux4kids/$pkgname/archive/upstream/$pkgver.tar.gz) -sha256sums=('ab91bd6df17eb9377e5608701030bd32110a3588933bf0e4c26b5697fb2a4698') +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") +options=(!docs) +source=( + "${pkgname}-${pkgver}.tar.gz::https://github.com/tux4kids/${pkgname}/archive/upstream/${pkgver}.tar.gz" + "0001-src-menu_lan.c-Remove-unused-duplicate-lan_player_in.patch" + "0002-rename-blits-to-tmblits.patch" +) +sha256sums=( + "ab91bd6df17eb9377e5608701030bd32110a3588933bf0e4c26b5697fb2a4698" + "852f82370e323ea34825864c063bd44a5dbd6dd60fb2c52338edbeb0b70fbafe" + "b5ede8e1a870cd19010890d8ca1867c8eae86c9dc3b78712c44e5e7576c05b91" +) + +prepare() { + cd "${srcdir}/${pkgname}-upstream-${pkgver}" + + 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" + cd "${srcdir}/${pkgname}-upstream-${pkgver}" - ./configure --prefix=/usr + ./configure \ + --prefix=/usr \ + --localstatedir=/usr/share/games \ + --sysconfdir=/etc make } package() { - cd "$srcdir/${pkgname}-upstream-$pkgver" + cd "${srcdir}/${pkgname}-upstream-${pkgver}" - make DESTDIR=$pkgdir install + make DESTDIR="${pkgdir}" install # install .desktop file and icons - mkdir -p $pkgdir/usr/share/{applications,pixmaps} - install -D -m644 tuxmath.desktop $pkgdir/usr/share/applications/$pkgname.desktop - install -D -m644 data/images/icons/icon.png $pkgdir/usr/share/pixmaps/$pkgname.png + install -dm755 "${pkgdir}/usr/share/"{applications,pixmaps} + install -Dm644 "${srcdir}/${pkgname}-upstream-${pkgver}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" + install -Dm644 "${srcdir}/${pkgname}-upstream-${pkgver}/data/images/icons/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png" # Install doc - mkdir -p $pkgdir/usr/share/doc/$pkgname - install -D -m644 doc/README \ - $pkgdir/usr/share/doc/$pkgname/README + install -dm755 "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm644 "${srcdir}/${pkgname}-upstream-${pkgver}/doc/README" "${pkgdir}/usr/share/doc/${pkgname}/README" # install licenses - install -D -m644 doc/OFL \ - $pkgdir/usr/share/licenses/$pkgname/OFL - install -D -m644 doc/README_DATA_LICENSES \ - $pkgdir/usr/share/licenses/$pkgname/DATA_LICENSES + install -Dm644 "${srcdir}/${pkgname}-upstream-${pkgver}/doc/OFL" "${pkgdir}/usr/share/licenses/${pkgname}/OFL" + install -Dm644 "${srcdir}/${pkgname}-upstream-${pkgver}/doc/README_DATA_LICENSES" "${pkgdir}/usr/share/licenses/${pkgname}/DATA_LICENSES" } |