diff options
author | Carsten Teibes | 2013-10-01 03:36:39 +0200 |
---|---|---|
committer | Carsten Teibes | 2013-10-01 03:36:39 +0200 |
commit | 628c71bd47b0bd951ade8c4c934dbc2ff3ec438f (patch) | |
tree | 755640ff919e8a89c6fe8d50bd00c31b47ff732a | |
download | aur-628c71bd47b0bd951ade8c4c934dbc2ff3ec438f.tar.gz |
[add] smw-svn
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | PKGBUILD | 79 | ||||
-rw-r--r-- | gcc.patch | 95 | ||||
-rw-r--r-- | libpng.patch | 29 | ||||
-rw-r--r-- | smw-svn.install | 13 | ||||
-rw-r--r-- | smw.desktop | 9 | ||||
-rw-r--r-- | smw.png | bin | 0 -> 3044 bytes |
7 files changed, 259 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..df51f4554fe0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = smw-svn + pkgdesc = Super Mario War multiplayer game (development version) + pkgver = 6 + pkgrel = 3 + url = http://smw.supersanctuary.net/ + install = smw-svn.install + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = dos2unix + makedepends = subversion + depends = sdl_mixer + depends = sdl_image + depends = desktop-file-utils + provides = smw + conflicts = smw + source = smw::svn+http://supermariowar.googlecode.com/svn/trunk/ + source = smw.desktop + source = smw.png + source = gcc.patch + source = libpng.patch + md5sums = SKIP + md5sums = 609f98c3bb5ef4961ae5eb12ea36d569 + md5sums = b7f5ef181e41eb0339be746ea03ff628 + md5sums = 586cf917af0a81912d8c5c0fcfddb64b + md5sums = ee4c6fd9e7f6f9a4dd699cdcd028b72f + sha256sums = SKIP + sha256sums = c01da67abdc1c7bd46fd2c0420ca2795d77d143df1da7ce0ad95260816d2b80d + sha256sums = 28299d22e9ed8ebdecc8d936bfebef4a13381d20afda881c87661debe33f17d6 + sha256sums = 7509d33b70b11742fc83cb62dd3e70a51d35596f20eb3a38b3553946261fe986 + sha256sums = be105515dbc850fcc8f73d894555ba71a7b89c52d7af2aa329a40f8088c2c75d + +pkgname = smw-svn + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0ffa059d5cc7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,79 @@ +# Maintainer: carstene1ns <arch carsten-teibes de> +# Contributor: Evangelos Foutras <foutrelis gmail com> +# Contributer: Matthew Bauer <mjbauer95 gmail com> + +pkgname=smw-svn +pkgver=6 +pkgrel=3 +pkgdesc="Super Mario War multiplayer game (development version)" +arch=('i686' 'x86_64') +url="http://smw.supersanctuary.net/" +license=('GPL2') +depends=('sdl_mixer' 'sdl_image' 'desktop-file-utils') +makedepends=('dos2unix' 'subversion') +provides=('smw') +conflicts=('smw') +install="${pkgname}.install" +source=("smw::svn+http://supermariowar.googlecode.com/svn/trunk/" + "smw.desktop" + "smw.png" + "gcc.patch" + "libpng.patch") +md5sums=('SKIP' + '609f98c3bb5ef4961ae5eb12ea36d569' + 'b7f5ef181e41eb0339be746ea03ff628' + '586cf917af0a81912d8c5c0fcfddb64b' + 'ee4c6fd9e7f6f9a4dd699cdcd028b72f') +sha256sums=('SKIP' + 'c01da67abdc1c7bd46fd2c0420ca2795d77d143df1da7ce0ad95260816d2b80d' + '28299d22e9ed8ebdecc8d936bfebef4a13381d20afda881c87661debe33f17d6' + '7509d33b70b11742fc83cb62dd3e70a51d35596f20eb3a38b3553946261fe986' + 'be105515dbc850fcc8f73d894555ba71a7b89c52d7af2aa329a40f8088c2c75d') + +build() { + cd "${srcdir}/smw" + + # Fix line breaks and permission + dos2unix configure + chmod +x configure + + # Fixes for gcc warnings and libpng >1.5 + patch --forward -p0 -i ../gcc.patch + patch --forward -p0 -i ../libpng.patch + + ./configure + + # Change data directory + sed -i "s|usr/share/games/smw|usr/share/smw|" configuration + + # Build + make +} + +package() { + cd "${srcdir}/smw" + + # Not using "make install" because of different data directory + + # Install binaries + msg2 "Installing binaries" + mkdir -p "${pkgdir}/usr/bin" + install -D smw "${pkgdir}/usr/bin" + install -D leveledit "${pkgdir}/usr/bin/smw-leveledit" + install -D worldedit "${pkgdir}/usr/bin/smw-worldedit" + + # Install data folders + msg2 "Installing data folders" + mkdir -p "${pkgdir}/usr/share/smw/" + for _datadir in gfx maps music sfx tours worlds; do + cp -r ${_datadir} "${pkgdir}/usr/share/smw/" + done + + # Set sane permissions + find "${pkgdir}/usr/share/smw" -type d -exec chmod 755 {} \; + find "${pkgdir}/usr/share/smw" -type f -exec chmod 644 {} \; + + # Install application shortcut and icon + install -D -m644 "${srcdir}/smw.desktop" "${pkgdir}/usr/share/applications/smw.desktop" + install -D -m644 "${srcdir}/smw.png" "${pkgdir}/usr/share/pixmaps/smw.png" +} diff --git a/gcc.patch b/gcc.patch new file mode 100644 index 000000000000..fb7e1d9fbb33 --- /dev/null +++ b/gcc.patch @@ -0,0 +1,95 @@ +Index: Makefile +=================================================================== +--- Makefile (revision 6) ++++ Makefile (working copy) +@@ -8,9 +8,13 @@ + build/savepng.o build/sfx.o
+ SMW_OBJS:= build/HashTable.o build/ai.o build/gamemodes.o build/main.o \
+ build/map.o build/menu.o build/object.o build/player.o \
+- build/splash.o build/uicontrol.o build/uimenu.o build/world.o
++ build/splash.o build/uicontrol.o build/uimenu.o build/world.o \
++ build/objecthazard.o build/objectgame.o build/modeoptionsmenu.o \
++ build/uicustomcontrol.o
+ LEVELEDIT_OBJS:=build/leveleditor.o
+-WORLDEDIT_OBJS:=build/sfx.o build/world.o build/worldeditor.o
++WORLDEDIT_OBJS:=build/sfx.o build/objecthazard.o build/object.o \
++ build/uicontrol.o build/uimenu.o build/modeoptionsmenu.o \
++ build/world.o build/worldeditor.o
+
+ include configuration
+ #here because of one .c file among a .cpp project (o_O)
+Index: _src/map.cpp +=================================================================== +--- _src/map.cpp (revision 6) ++++ _src/map.cpp (working copy) +@@ -628,7 +628,7 @@ +
+ for(short iBackground = 0; iBackground < 26; iBackground++)
+ {
+- char * szFindUnderscore = strstr(g_szBackgroundConversion[iBackground], "_");
++ const char * szFindUnderscore = strstr(g_szBackgroundConversion[iBackground], "_");
+
+ if(szFindUnderscore)
+ szFindUnderscore++;
+Index: _src/uicontrol.cpp +=================================================================== +--- _src/uicontrol.cpp (revision 6) ++++ _src/uicontrol.cpp (working copy) +@@ -2,6 +2,7 @@ + #include <math.h>
+
+ extern void LoadCurrentMapBackground();
++extern void LoadMapHazards(bool fPreview);
+
+ UI_Control::UI_Control(short x, short y)
+ {
+Index: _src/ai.cpp +=================================================================== +--- _src/ai.cpp (revision 6) ++++ _src/ai.cpp (working copy) +@@ -345,7 +345,8 @@ + {
+ delete itr->second;
+
+- itr = attentionObjects.erase(itr);
++ attentionObjects.erase(itr);
++ itr = attentionObjects.begin(); // do not blame me, just read http://msdn.microsoft.com/en-us/library/z2f3cb7h(v=vs.80).aspx
+ lim = attentionObjects.end();
+ }
+ }
+Index: _src/path.cpp +=================================================================== +--- _src/path.cpp (revision 6) ++++ _src/path.cpp (working copy) +@@ -1,4 +1,5 @@ + #include <string>
++#include <cstring>
+ #include <iostream>
+ #include <sys/stat.h>
+
+Index: _src/FileList.cpp +=================================================================== +--- _src/FileList.cpp (revision 6) ++++ _src/FileList.cpp (working copy) +@@ -16,6 +16,7 @@ + #include "dirlist.h"
+ #include <ctype.h>
+ #include <iostream>
++#include <algorithm>
+ using std::cout;
+ using std::endl;
+ using std::string;
+Index: _src/uicustomcontrol.cpp +=================================================================== +--- _src/uicustomcontrol.cpp (revision 6) ++++ _src/uicustomcontrol.cpp (working copy) +@@ -4649,7 +4649,8 @@ +
+ //Clear out all input from cpu controlled team
+ COutputControl * playerKeys = NULL;
+- for(short iTeamMember = 0; iTeamMember < game_values.teamcounts[iControllingTeam]; iTeamMember++)
++ short iTeamMember = 0;
++ for(; iTeamMember < game_values.teamcounts[iControllingTeam]; iTeamMember++)
+ {
+ playerKeys = &game_values.playerInput.outputControls[game_values.teamids[iControllingTeam][iTeamMember]];
+
diff --git a/libpng.patch b/libpng.patch new file mode 100644 index 000000000000..acfd9c5b28d7 --- /dev/null +++ b/libpng.patch @@ -0,0 +1,29 @@ +Index: _src/savepng.cpp +=================================================================== +--- _src/savepng.cpp (revision 6) ++++ _src/savepng.cpp (working copy) +@@ -94,7 +94,11 @@ + }
+
+ /* Set error handling. */
++#if PNG_LIBPNG_VER > 10399
++ if (setjmp(png_jmpbuf(png_ptr)))
++#else
+ if (setjmp(png_ptr->jmpbuf))
++#endif
+ {
+ /* If we get here, we had a problem reading the file */
+ IMG_SetError("Error writing the PNG file");
+@@ -142,10 +146,10 @@ + done:
+ if (row_pointers)
+ delete [] row_pointers;
+-
++#if PNG_LIBPNG_VER <= 10399
+ if (info_ptr->palette)
+ delete info_ptr->palette;
+-
++#endif
+ png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
+
+
diff --git a/smw-svn.install b/smw-svn.install new file mode 100644 index 000000000000..8785f8dc0ec5 --- /dev/null +++ b/smw-svn.install @@ -0,0 +1,13 @@ + +# Update for our .desktop file +post_install() { + update-desktop-database -q +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/smw.desktop b/smw.desktop new file mode 100644 index 000000000000..b5b10a8e32d1 --- /dev/null +++ b/smw.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Super Mario War +Exec=smw +Icon=smw +Type=Application +Comment=Super Mario multiplayer game +Categories=Game; +Terminal=false +Version=1.0 diff --git a/smw.png b/smw.png Binary files differnew file mode 100644 index 000000000000..03b2d3163491 --- /dev/null +++ b/smw.png |