summaryrefslogtreecommitdiff
path: root/community/xmoto
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/xmoto
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/xmoto')
-rw-r--r--community/xmoto/PKGBUILD48
-rw-r--r--community/xmoto/system.cpp.patch10
-rw-r--r--community/xmoto/xmoto-0.5.10-libpng15.patch10
-rw-r--r--community/xmoto/xmoto.install11
4 files changed, 79 insertions, 0 deletions
diff --git a/community/xmoto/PKGBUILD b/community/xmoto/PKGBUILD
new file mode 100644
index 000000000..4e0136457
--- /dev/null
+++ b/community/xmoto/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 90114 2013-05-06 19:40:20Z foutrelis $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Travis Willard <travisw@wmpub.ca>
+# Contributor: Denis (dtonator@gmail.com)
+
+pkgname=xmoto
+pkgver=0.5.10
+pkgrel=4
+pkgdesc="A challenging 2D motocross platform game, where physics play an important role."
+arch=('i686' 'x86_64')
+url="http://xmoto.tuxfamily.org"
+license=('GPL')
+depends=('libjpeg' 'libpng' 'lua' 'sdl_mixer' 'ode' 'curl'
+ 'sqlite3' 'sdl_ttf' 'desktop-file-utils' 'sdl_net' 'glu'
+ 'libxdg-basedir' 'libxml++')
+makedepends=('mesa')
+install=xmoto.install
+source=("http://download.tuxfamily.org/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}-src.tar.gz"
+ 'xmoto-0.5.10-libpng15.patch'
+ 'system.cpp.patch')
+sha1sums=('692d50a9c91791cd06ee84846632651b44544fcc'
+ '9d13fa09f1c558a0fc504f7e7b1ceac6b4b7b20d'
+ 'e741f769d1fc5779a6688970ee97e2a61a50c7ae')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ patch -Np1 -i "${srcdir}/xmoto-0.5.10-libpng15.patch"
+ patch -Np1 -i "${srcdir}/system.cpp.patch"
+
+ # build and install
+ ./configure LDFLAGS="-L/usr/lib" --prefix=/usr --disable-sdltest
+
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} mangdir=/usr/share/man/man6 install
+
+ # install desktop file
+ install -Dm0644 ${srcdir}/${pkgname}-${pkgver}/extra/xmoto.desktop \
+ ${pkgdir}/usr/share/applications/xmoto.desktop
+
+ # install icon for desktop file
+ install -Dm0644 ${srcdir}/${pkgname}-${pkgver}/extra/xmoto.xpm \
+ ${pkgdir}/usr/share/pixmaps/xmoto.xpm
+}
diff --git a/community/xmoto/system.cpp.patch b/community/xmoto/system.cpp.patch
new file mode 100644
index 000000000..df42e3a7c
--- /dev/null
+++ b/community/xmoto/system.cpp.patch
@@ -0,0 +1,10 @@
+--- a/src/helpers/System.cpp 2011-10-11 22:18:14.000000000 +0200
++++ b/src/helpers/System.cpp 2012-07-21 21:28:40.000000000 +0200
+@@ -24,6 +24,7 @@
+ #include "Log.h"
+ #include "VExcept.h"
+ #include <sstream>
++#include <unistd.h>
+
+ std::vector<std::string>* System::getDisplayModes(int windowed) {
+ std::vector<std::string>* modes = new std::vector<std::string>;
diff --git a/community/xmoto/xmoto-0.5.10-libpng15.patch b/community/xmoto/xmoto-0.5.10-libpng15.patch
new file mode 100644
index 000000000..aed175c7c
--- /dev/null
+++ b/community/xmoto/xmoto-0.5.10-libpng15.patch
@@ -0,0 +1,10 @@
+--- a/src/image/tim_png.cpp 2011-12-29 22:13:37.000000000 +0100
++++ b/src/image/tim_png.cpp 2012-07-21 21:36:34.000000000 +0200
+@@ -24,6 +24,7 @@
+ */
+ #include <stdio.h>
+ #include <string.h>
++#include <zlib.h>
+ #include "tim.h"
+ #include <png.h>
+ #include <zlib.h>
diff --git a/community/xmoto/xmoto.install b/community/xmoto/xmoto.install
new file mode 100644
index 000000000..e111ef946
--- /dev/null
+++ b/community/xmoto/xmoto.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}