diff options
author | mirandir | 2017-05-21 20:22:12 +0200 |
---|---|---|
committer | mirandir | 2017-05-21 20:22:12 +0200 |
commit | 39b4c925882b35744ac2879acebb5642202bd911 (patch) | |
tree | be0b909f00c5f2e0baa1dd8dad291efc0257d9ec | |
parent | 42838ef003e7c3104c4bb4600b8488a4fe2ef184 (diff) | |
download | aur-39b4c925882b35744ac2879acebb5642202bd911.tar.gz |
Source changed, menu added to the base package.
-rwxr-xr-x[-rw-r--r--] | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | desktop.patch | 13 | ||||
-rw-r--r-- | menu.patch | 31 | ||||
-rw-r--r-- | safe-temporary-files.patch | 86 |
5 files changed, 63 insertions, 104 deletions
diff --git a/.SRCINFO b/.SRCINFO index 007a3e71b6c1..5e4d3f54827c 100644..100755 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = jumpnbump pkgdesc = You, as a bunny, have to jump on your opponents to make them explode. It's a true multiplayer game which can't be played alone. It has network support. This program is a Unix port of the old DOS game by brainchilddesign. SDL2 port. pkgver = 1.60 - pkgrel = 4 + pkgrel = 5 url = https://github.com/MCMic/jumpnbump arch = i686 arch = x86_64 @@ -10,11 +10,13 @@ pkgbase = jumpnbump depends = sdl2_mixer depends = sdl2_net optdepends = jumpnbump-levels: more levels for jumpnbump - optdepends = jumpnbump-menu: a launcher for jumpnbump - source = jumpnbump::git+https://github.com/MCMic/jumpnbump#commit=0785e55 - source = safe-temporary-files.patch + conflicts = jumpnbump-menu + source = jumpnbump::git+https://gitlab.com/LibreGames/jumpnbump.git + source = menu.patch + source = desktop.patch sha256sums = SKIP - sha256sums = f99113c04b988d2e2048b79bb58bfeba26b3aeea3937936b97b06334d34a5c4c + sha256sums = 824c16bd23e2cac4d5f9f6fc891f915f2fc5b64a2a27bddcc457cf614350fb34 + sha256sums = e8c4fa81af736eca98c49b0e9a36fba79f7bcd5cb1909af30f4e039a5863798c pkgname = jumpnbump @@ -4,24 +4,24 @@ pkgname=jumpnbump pkgver=1.60 -pkgrel=4 +pkgrel=5 pkgdesc="You, as a bunny, have to jump on your opponents to make them explode. It's a true multiplayer game which can't be played alone. It has network support. This program is a Unix port of the old DOS game by brainchilddesign. SDL2 port." arch=('i686' 'x86_64') url="https://github.com/MCMic/jumpnbump" license=('GPL') depends=('sdl2' 'sdl2_mixer' 'sdl2_net') -optdepends=('jumpnbump-levels: more levels for jumpnbump' 'jumpnbump-menu: a launcher for jumpnbump') -source=(jumpnbump::git+https://github.com/MCMic/jumpnbump#commit=0785e55 safe-temporary-files.patch) +optdepends=('jumpnbump-levels: more levels for jumpnbump') +conflicts=('jumpnbump-menu') +source=(jumpnbump::git+https://gitlab.com/LibreGames/jumpnbump.git menu.patch desktop.patch) sha256sums=('SKIP' - 'f99113c04b988d2e2048b79bb58bfeba26b3aeea3937936b97b06334d34a5c4c') + '824c16bd23e2cac4d5f9f6fc891f915f2fc5b64a2a27bddcc457cf614350fb34' + 'e8c4fa81af736eca98c49b0e9a36fba79f7bcd5cb1909af30f4e039a5863798c') build() { - cd "${srcdir}/${pkgname}/" + cd $srcdir/${pkgname}/menu + patch -p0 < ../../../menu.patch || return 1 - for i in 'safe-temporary-files.patch' - do - patch -p1 < ${srcdir}/$i - done + cd "${srcdir}/${pkgname}/" make PREFIX=/usr } @@ -30,8 +30,7 @@ package() { cd "${srcdir}/${pkgname}" make PREFIX="${pkgdir}/usr/" install - install -d $pkgdir/usr/lib/jumpnbump - mv $pkgdir/usr/bin/gobpack $pkgdir/usr/lib/jumpnbump/gobpack - mv $pkgdir/usr/bin/jnbpack $pkgdir/usr/lib/jumpnbump/pack - mv $pkgdir/usr/bin/jnbunpack $pkgdir/usr/lib/jumpnbump/unpack + cd ${pkgdir}/usr/share/applications/ + rm "jumpnbump.desktop" + patch -p0 < ${srcdir}/desktop.patch || return 1 } diff --git a/desktop.patch b/desktop.patch new file mode 100644 index 000000000000..04a2b4bd786c --- /dev/null +++ b/desktop.patch @@ -0,0 +1,13 @@ +--- jumpnbump-menu.desktop.orig 2017-05-21 20:14:40.172306054 +0200 ++++ jumpnbump-menu.desktop 2017-05-21 20:15:00.565445873 +0200 +@@ -1,10 +1,10 @@ + [Desktop Entry] + Name=Jump 'n Bump Menu +-Comment=Level selection and config menu for the Jump 'n Bump game ++Comment=Jump on your opponents to make them explode + GenericName=Launcher for Jump 'n Bump + Exec=jumpnbump-menu + Icon=jumpnbump + Terminal=false + Type=Application + Categories=Game;ArcadeGame; diff --git a/menu.patch b/menu.patch new file mode 100644 index 000000000000..0fa3ab4e11cc --- /dev/null +++ b/menu.patch @@ -0,0 +1,31 @@ +--- jumpnbump_menu.py.pre.orig 2017-05-21 20:06:53.393232483 +0200 ++++ jumpnbump_menu.py.pre 2017-05-21 20:10:36.387911904 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + + # Author: Martin Willemoes Hansen + # License: Gnu GPL +@@ -147,11 +147,8 @@ + + def get_level(): + level = [] +- if (mirror.get_active()): +- level.append('-mirror') +- else: +- level.append('-dat') +- level.append(choosen_level) ++ level.append('-dat') ++ level.append(choosen_level) + + return level + +@@ -224,6 +221,8 @@ + noflies = gui.get_widget('noflies') + withmusic = gui.get_widget('withmusic') + image = gui.get_widget('image') ++ mainwindow = gui.get_widget('main') ++ mainwindow.set_icon_from_file('/usr/share/icons/jumpnbump.png') + + gui.signal_autoconnect({'standalone_mode': standalone_mode, + 'client_mode': client_mode, diff --git a/safe-temporary-files.patch b/safe-temporary-files.patch deleted file mode 100644 index e1e13c6f3e66..000000000000 --- a/safe-temporary-files.patch +++ /dev/null @@ -1,86 +0,0 @@ -Subject: Handle temporary files in a safe way -From: Ansgar Burchardt <ansgar@43-1.org> -Date: Mon, 29 Sep 2008 22:01:59 +0200 - -See http://bugs.debian.org/500611. - ---- a/modify/jnbunpack.c -+++ b/modify/jnbunpack.c -@@ -23,6 +23,7 @@ - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -+#include <errno.h> - #include <stdio.h> - #include <stdlib.h> - #include <fcntl.h> -@@ -83,8 +84,13 @@ int main(int argc, char **argv) - memset(filename, 0, sizeof(filename)); - strncpy(filename, datafile[i].filename, 12); - printf("Extracting %s ", filename); -+ fflush(stdout); - -- outfd = open(filename, O_RDWR | O_CREAT | O_BINARY, 0644); -+ if (unlink(filename) == -1 && errno != ENOENT) { -+ perror("cannot unlink file"); -+ exit(1); -+ } -+ outfd = open(filename, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0644); - if (!outfd) { - perror("cant open file"); - exit(1); ---- a/sdl/sound.c -+++ b/sdl/sound.c -@@ -23,6 +23,8 @@ - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -+#include <stdlib.h> -+#include <string.h> - #include "globals.h" - #include <limits.h> - #ifndef _MSC_VER -@@ -463,11 +465,8 @@ char dj_ready_mod(char mod_num) - { - #ifndef NO_SDL_MIXER - FILE *tmp; --# if ((defined _MSC_VER) || (defined __MINGW32__)) -- char filename[] = "jnb.tmpmusic.mod"; --# else -- char filename[] = "/tmp/jnb.tmpmusic.mod"; --# endif -+ int tmp_fd; -+ char* filename; - unsigned char *fp; - int len; - -@@ -506,15 +505,24 @@ char dj_ready_mod(char mod_num) - return 0; - } - -- tmp = fopen(filename, "wb"); -- if (tmp) { -- fwrite(fp, len, 1, tmp); -- fflush(tmp); -- fclose(tmp); -+ filename = strdup("/tmp/jumpnbump.mod.XXXXXX"); -+ tmp_fd = mkstemp(filename); -+ if (tmp_fd == -1) { -+ free(filename); -+ return 0; -+ } -+ tmp = fdopen(tmp_fd, "wb"); -+ if (!tmp) { -+ free(filename); -+ return 0; - } -+ fwrite(fp, len, 1, tmp); -+ fflush(tmp); -+ fclose(tmp); - - current_music = Mix_LoadMUS(filename); - unlink(filename); -+ free(filename); - if (current_music == NULL) { - fprintf(stderr, "Couldn't load music: %s\n", SDL_GetError()); - return 0; |