summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose17112016-01-18 12:58:01 +0100
committerjose17112016-01-18 12:58:01 +0100
commit36081cff53c44584c1fbeb404380cfb6c358b549 (patch)
tree02bb17262f5a95663b5199a706b7be5b933e5ce5
downloadaur-36081cff53c44584c1fbeb404380cfb6c358b549.tar.gz
adopted from aur3
-rw-r--r--.SRCINFO30
-rw-r--r--MotoGT.desktop7
-rw-r--r--MotoGT.pngbin0 -> 6611 bytes
-rw-r--r--PKGBUILD61
-rw-r--r--motogt4
-rw-r--r--motogt-init.patch15
-rw-r--r--motogt-png15.patch27
-rw-r--r--motogt-savedir.patch38
8 files changed, 182 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f73fc327a858
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+# Generated by mksrcinfo v8
+# Mon Jan 18 11:57:58 UTC 2016
+pkgbase = motogt
+ pkgdesc = MotoGT is a 2D top-viewed game where you drive a MotoGP bike
+ pkgver = 20110505
+ pkgrel = 3
+ url = http://motogt.sourceforge.net/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = freeglut
+ depends = libpng
+ depends = sfml1.6
+ source = http://prdownloads.sourceforge.net/motogt/MotoGT-20110505.zip
+ source = motogt
+ source = motogt-init.patch
+ source = motogt-png15.patch
+ source = motogt-savedir.patch
+ source = MotoGT.desktop
+ source = MotoGT.png
+ md5sums = 5fa3a8ba52ea75bc46f011906ddc6747
+ md5sums = fe654d2910156d66efce53f82a1add08
+ md5sums = 70eee66a05be2b7bf799bbf392e10fc6
+ md5sums = b653c830225c2fe5abccd6b7134a2e51
+ md5sums = 03f67136094c2eafea5daa05ea7f44b9
+ md5sums = 969b607bd91ebf06f2efd6e0d6595a28
+ md5sums = 7d426217b802a5691e568134cef89160
+
+pkgname = motogt
+
diff --git a/MotoGT.desktop b/MotoGT.desktop
new file mode 100644
index 000000000000..3804838ced06
--- /dev/null
+++ b/MotoGT.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=MotoGT
+GenericName=MotoGT Racing
+Exec=motogt
+Icon=/usr/share/pixmaps/MotoGT.png
+Categories=Game;ArcadeGame
diff --git a/MotoGT.png b/MotoGT.png
new file mode 100644
index 000000000000..73851460da4b
--- /dev/null
+++ b/MotoGT.png
Binary files differ
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..65db50330f76
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Jose Riha <jose1711 gmail com>
+# Contributor: archtux <antonio dot arias99999 at gmail dot com>
+
+pkgname=motogt
+pkgver=20110505
+pkgrel=3
+pkgdesc="MotoGT is a 2D top-viewed game where you drive a MotoGP bike"
+arch=('i686' 'x86_64')
+url="http://motogt.sourceforge.net/"
+license=('GPL2')
+depends=('freeglut' 'libpng' 'sfml1.6')
+source=(http://prdownloads.sourceforge.net/motogt/MotoGT-$pkgver.zip
+ motogt
+ motogt-init.patch
+ motogt-png15.patch
+ motogt-savedir.patch
+ MotoGT.desktop
+ MotoGT.png)
+md5sums=('5fa3a8ba52ea75bc46f011906ddc6747'
+ 'fe654d2910156d66efce53f82a1add08'
+ '70eee66a05be2b7bf799bbf392e10fc6'
+ 'b653c830225c2fe5abccd6b7134a2e51'
+ '03f67136094c2eafea5daa05ea7f44b9'
+ '969b607bd91ebf06f2efd6e0d6595a28'
+ '7d426217b802a5691e568134cef89160')
+
+
+build() {
+ cd $srcdir
+
+ patch -p0 -i ../motogt-init.patch
+ patch -p0 -i ../motogt-png15.patch
+ patch -p0 -i ../motogt-savedir.patch
+
+ # Patches (Add glut, OpenGL and use sfml1.6 libraries in Makefile.lnx)
+ cd MotoGT
+ sed -i 's%ffast-math%& -I/usr/include/sfml-1.6%' src/Makefile.lnx
+ sed -i '4d' src/Makefile.lnx
+ #sed -i '4iLIBS= -s -lglut -lGL -lpng -lsfml1.6-window -lsfml1.6-graphics -lsfml1.6-system -lsfml1.6-audio' src/Makefile.lnx
+ sed -i '4iLIBS= -s -lglut -lGL -lpng -lsfml-window-1.6 -lsfml-graphics-1.6 -lsfml-system-1.6 -lsfml-audio-1.6' src/Makefile.lnx
+
+ # Build
+ make
+}
+
+package() {
+ cd $srcdir/MotoGT
+
+ # Installation
+ mkdir -p $pkgdir/usr/share/MotoGT
+ install -Dm755 MotoGT.bin $pkgdir/usr/share/MotoGT/MotoGT.bin
+ cp -R data/ data_low/ $pkgdir/usr/share/MotoGT
+
+ # Start file
+ cd $startdir
+ install -Dm755 motogt $pkgdir/usr/bin/motogt
+
+ # Desktop icon
+ install -Dm644 MotoGT.png $pkgdir/usr/share/pixmaps/MotoGT.png
+ install -Dm644 MotoGT.desktop $pkgdir/usr/share/applications/MotoGT.desktop
+}
diff --git a/motogt b/motogt
new file mode 100644
index 000000000000..b71e16e00258
--- /dev/null
+++ b/motogt
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd /usr/share/MotoGT
+./MotoGT.bin \ No newline at end of file
diff --git a/motogt-init.patch b/motogt-init.patch
new file mode 100644
index 000000000000..c19ef381ba91
--- /dev/null
+++ b/motogt-init.patch
@@ -0,0 +1,15 @@
+diff -urN MotoGT/src/main.cpp MotoGT-patched/src/main.cpp
+--- MotoGT/src/main.cpp 2011-01-18 13:50:57.000000000 +1000
++++ MotoGT-patched/src/main.cpp 2012-02-29 19:58:39.000000000 +1100
+@@ -82,7 +82,10 @@
+ }
+ #endif
+ if (home_dir.size()&&home_dir[home_dir.size()]!='/'&&home_dir[home_dir.size()]!='\\') home_dir+=SLASH;
+- home_dir+=".motogt"; system((string("mkdir \"")+home_dir+"\"").c_str()); home_dir+=SLASH;
++ home_dir+=".motogt";
++ system((string("mkdir \"")+home_dir+"\"").c_str());
++ system((string("touch \"")+home_dir+"\""+SLASH+"settings.lst").c_str());
++ home_dir+=SLASH;
+
+ config = new Config();
+ if (argc==2 && string(argv[1])=="--nosound") {
diff --git a/motogt-png15.patch b/motogt-png15.patch
new file mode 100644
index 000000000000..0e698ce0ea3c
--- /dev/null
+++ b/motogt-png15.patch
@@ -0,0 +1,27 @@
+
+diff -urN MotoGT/src/MakeData.cpp MotoGT-patched/src/MakeData.cpp
+--- MotoGT/src/MakeData.cpp 2011-01-11 03:40:30.000000000 +1000
++++ MotoGT-patched/src/MakeData.cpp 2012-03-01 04:19:47.203309829 +1100
+@@ -109,10 +109,10 @@
+
+ png_read_info(png_ptr, info_ptr);
+
+- width = info_ptr->width;
+- height = info_ptr->height;
+- color_type = info_ptr->color_type;
+- bit_depth = info_ptr->bit_depth;
++ width = png_get_image_width(png_ptr, info_ptr);
++ height = png_get_image_height(png_ptr, info_ptr);
++ color_type = png_get_color_type(png_ptr, info_ptr);
++ bit_depth = png_get_bit_depth(png_ptr, info_ptr);
+
+ number_of_passes = png_set_interlace_handling(png_ptr);
+ png_read_update_info(png_ptr, info_ptr);
+@@ -125,7 +125,7 @@
+
+ row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * height);
+ for (int y=0; y<height; y++)
+- row_pointers[y] = (png_byte*) malloc(info_ptr->rowbytes);
++ row_pointers[y] = (png_byte*) malloc(png_get_rowbytes(png_ptr,info_ptr));
+
+ png_read_image(png_ptr, row_pointers); \ No newline at end of file
diff --git a/motogt-savedir.patch b/motogt-savedir.patch
new file mode 100644
index 000000000000..b42eb9cb9e4c
--- /dev/null
+++ b/motogt-savedir.patch
@@ -0,0 +1,38 @@
+
+diff -urN MotoGT/src/Circuito.cpp MotoGT-patched/src/Circuito.cpp
+--- MotoGT/src/Circuito.cpp 2011-01-13 03:20:23.000000000 +1000
++++ MotoGT-patched/src/Circuito.cpp 2012-02-29 19:42:21.361908658 +1100
+@@ -171,7 +171,7 @@
+ if (!osd) {image=NULL; sprite=NULL; return; }
+ image = new Image*[image_c];
+ sprite = new Sprite*[image_c];
+- string image_dir=data->tracks[track_index].dir+"t00.png";
++ string image_dir=home_dir + data->tracks[track_index].dir + "t00.png";
+ for (int i=0;i<image_c;i++) {
+ image[i]=new Image[image_r];
+ sprite[i]=new Sprite[image_r];
+diff -urN MotoGT/src/MakeData.cpp MotoGT-patched/src/MakeData.cpp
+--- MotoGT/src/MakeData.cpp 2011-01-11 03:40:30.000000000 +1000
++++ MotoGT-patched/src/MakeData.cpp 2012-02-29 19:42:24.684908507 +1100
+@@ -5,6 +5,7 @@
+ #define PNG_DEBUG 3
+ #include <png.h>
+ #include <fstream>
++#include <sys/stat.h>
+ #include "global.h"
+ #include "Config.h"
+ #include "Confirm.h"
+@@ -376,7 +377,12 @@
+ }
+ fname[2]='0'+i;
+ fname[1]='0'+j;
+- if (!f2->Save((dir+fname).c_str()))
++ size_t pos = 0;
++ do {
++ pos = dir.find('/', pos+1);
++ mkdir((home_dir+dir.substr(0, pos)).c_str(), 0755);
++ } while (pos != string::npos);
++ if (!f2->Save((home_dir+dir+fname).c_str()))
+ return false;
+ f2->width=ancho2; f2->height=ancho2;
+ } \ No newline at end of file