summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Straube2016-11-15 14:14:08 +0100
committerMichael Straube2016-11-15 14:14:08 +0100
commit9e8ead37041803f55402a98f6753c118e4fcb446 (patch)
tree652157162e9dc267173c95e0258b1d7d19929749
downloadaur-9e8ead37041803f55402a98f6753c118e4fcb446.tar.gz
Initial import
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD38
-rw-r--r--fix-compile-error.patch10
-rw-r--r--fix-logfile-path.patch24
-rw-r--r--fix-mp3-path.patch23
5 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5aa5366607f0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = megamario
+ pkgdesc = A Super Mario Bros. clone
+ pkgver = 1.7
+ pkgrel = 1
+ url = https://sourceforge.net/projects/mmario
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = glu
+ depends = sdl_ttf
+ depends = sdl_image
+ depends = sdl_mixer
+ depends = mesa
+ source = http://downloads.sourceforge.net/mmario/MegaMario_v1.7_full.zip
+ source = fix-compile-error.patch
+ source = fix-mp3-path.patch
+ source = fix-logfile-path.patch
+ sha1sums = 71d777f06109a157ad0df7612cca02d8fe462538
+ sha1sums = 7339e7d728a0dd4eb0ee9bbb3d508a64ea13794e
+ sha1sums = 0d0d7fd3625d4f0c42dcc113483882a8732c154f
+ sha1sums = fbc7b86caabf5985ce32ec58861bc110363c74ae
+
+pkgname = megamario
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c306957054f8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Michael Straube <michael_straube@web.de>
+
+pkgname=megamario
+pkgver=1.7
+pkgrel=1
+pkgdesc="A Super Mario Bros. clone"
+arch=('i686' 'x86_64')
+url="https://sourceforge.net/projects/mmario"
+license=('LGPL')
+depends=('sdl_ttf' 'sdl_image' 'sdl_mixer' 'mesa')
+makedepends=('glu')
+source=("http://downloads.sourceforge.net/mmario/MegaMario_v${pkgver}_full.zip"
+ "fix-compile-error.patch"
+ "fix-mp3-path.patch"
+ "fix-logfile-path.patch")
+sha1sums=('71d777f06109a157ad0df7612cca02d8fe462538'
+ '7339e7d728a0dd4eb0ee9bbb3d508a64ea13794e'
+ '0d0d7fd3625d4f0c42dcc113483882a8732c154f'
+ 'fbc7b86caabf5985ce32ec58861bc110363c74ae')
+
+prepare() {
+ patch -p0 -i "$srcdir"/fix-compile-error.patch
+ patch -p0 -i "$srcdir"/fix-mp3-path.patch
+ patch -p0 -i "$srcdir"/fix-logfile-path.patch
+}
+
+build() {
+ make PREFIX=/usr
+}
+
+package() {
+ make PREFIX="$pkgdir"/usr install
+
+ cp -r mp3music "$pkgdir"/usr/share/megamario
+
+ install -Dm644 megamario.desktop "$pkgdir"/usr/share/applications/megamario.desktop
+ install -Dm644 megamario.png "$pkgdir"/usr/share/pixmaps/megamario.png
+}
diff --git a/fix-compile-error.patch b/fix-compile-error.patch
new file mode 100644
index 000000000000..a0abdb68d947
--- /dev/null
+++ b/fix-compile-error.patch
@@ -0,0 +1,10 @@
+--- src/Global.h 2016-11-15 13:36:06.179558741 +0100
++++ src/Global.h 2016-11-15 13:36:36.495575590 +0100
+@@ -13,6 +13,7 @@
+ //C++'s
+
+ #include <stdlib.h>
++#include <limits.h>
+ //#include <stdio.h>
+
+ //#ifndef __unix__
diff --git a/fix-logfile-path.patch b/fix-logfile-path.patch
new file mode 100644
index 000000000000..f25c0f038c3f
--- /dev/null
+++ b/fix-logfile-path.patch
@@ -0,0 +1,24 @@
+--- src/main.cpp 2016-11-15 13:37:35.200989936 +0100
++++ src/main.cpp 2016-11-15 13:42:10.985191374 +0100
+@@ -28,6 +28,7 @@
+ int targetfps=60;
+
+ static char szIniFile [MAX_PATH];
++ static char szLogFile [MAX_PATH];
+ static char szAppName [MAX_PATH];
+
+
+@@ -58,10 +59,12 @@
+ check_and_create_dir(szIniFile);
+ snprintf(szIniFile, MAX_PATH, "%s/.megamario/mario.ini",
+ home_dir? home_dir:".");
++ snprintf(szLogFile, MAX_PATH, "%s/.megamario/log.txt",
++ home_dir? home_dir:".");
+
+ #endif /* defined __unix__ */
+
+- out_logfile.open ("log.txt");
++ out_logfile.open (szLogFile);
+
+ dictionary * d = iniparser_new(szIniFile);
+ pixelation = iniparser_getboolean (d, "Mario:Pixelation", 1);
diff --git a/fix-mp3-path.patch b/fix-mp3-path.patch
new file mode 100644
index 000000000000..7fca494c4b7f
--- /dev/null
+++ b/fix-mp3-path.patch
@@ -0,0 +1,23 @@
+--- src/main.cpp 2016-11-15 13:37:35.200989936 +0100
++++ src/main.cpp 2016-11-15 13:38:56.319271201 +0100
+@@ -413,7 +413,7 @@
+
+
+ fstream fin;
+-fin.open("mp3music/music_available.dat",ios::in);
++fin.open(DATADIR "mp3music/music_available.dat",ios::in);
+ if( fin.is_open() )
+ {
+ HighQualityMusicFound=1;
+
+--- src/functions.cpp 2016-11-15 13:39:30.621881376 +0100
++++ src/functions.cpp 2016-11-15 13:39:53.891391940 +0100
+@@ -447,7 +447,7 @@
+ }
+ else
+ {
+- sprintf(tmp, "mp3music/%s",filename);
++ sprintf(tmp, DATADIR "mp3music/%s",filename);
+ tmp[strlen(tmp)-3]='m';
+ tmp[strlen(tmp)-2]='p';
+ tmp[strlen(tmp)-1]='3';