summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsoloturn2020-05-31 12:42:33 +0200
committersoloturn2020-06-01 09:26:28 +0200
commit3736f2f2fc081da9e770eec341b4993638a7f400 (patch)
tree60213c6515d6d4a21dabb098ea2cafe02fa21d03
parent23ccd2242828f38449bb40ec18e400095e68d1b0 (diff)
downloadaur-3736f2f2fc081da9e770eec341b4993638a7f400.tar.gz
upgrade to xmoto-0.6.0
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD62
-rw-r--r--gcc-7.patch51
-rw-r--r--lua52_compat.patch45
-rw-r--r--utf8.patch16
6 files changed, 36 insertions, 164 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 277c3e9418f6..b3813e7d0d1d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
pkgbase = xmoto
pkgdesc = A challenging 2D motocross platform game, where physics play an important role.
- pkgver = 0.5.11
- pkgrel = 7
+ pkgver = 0.6.0
+ pkgrel = 1
url = http://xmoto.tuxfamily.org
arch = i686
arch = x86_64
license = GPL
- makedepends = mesa
+ makedepends = cmake
+ makedepends = ninja
+ makedepends = git
depends = libjpeg
depends = libpng
- depends = lua52
+ depends = lua51
depends = sdl_mixer
depends = ode
depends = curl
@@ -19,14 +21,10 @@ pkgbase = xmoto
depends = glu
depends = libxdg-basedir
depends = libxml2
- source = http://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-0.5.11-src.tar.gz
- source = gcc-7.patch
- source = utf8.patch
- source = lua52_compat.patch
- sha1sums = a795616fb359e60be343e339f7acf5e95e0f1ce2
- sha1sums = d30fad6a138de36566c5343ea04e6c7141e767f8
- sha1sums = 1a64966b887ecbd7280d97988cd8526813820611
- sha1sums = 104542546fbbd24172ddaa179f87e1b26df8b761
+ provides = xmoto
+ conflicts = xmoto
+ source = xmoto-0.6.0.tar.gz::https://github.com/xmoto/xmoto/archive/0.6.0.tar.gz
+ sha1sums = SKIP
pkgname = xmoto
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..cf6501d25c66
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg
+/src
+xmoto*gz*
+xmoto*xz*
diff --git a/PKGBUILD b/PKGBUILD
index 866496d1202c..fef5efff0132 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,61 +1,43 @@
-# $Id$
# Maintainer: soloturn@gmail.com
# Contributor: Ronald van Haren <ronald.archlinux.org>
# Contributor: Travis Willard <travisw@wmpub.ca>
# Contributor: Denis (dtonator@gmail.com)
-pkgname=xmoto
-pkgver=0.5.11
-pkgrel=7
+_basename=xmoto
+pkgname="$_basename"
+pkgver=0.6.0
+pkgrel=1
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' 'lua52' 'sdl_mixer' 'ode' 'curl' 'sqlite' 'sdl_ttf'
+depends=('libjpeg' 'libpng' 'lua51' 'sdl_mixer' 'ode' 'curl' 'sqlite' 'sdl_ttf'
'sdl_net' 'glu' 'libxdg-basedir' 'libxml2')
-makedepends=('mesa')
-source=("http://download.tuxfamily.org/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}-src.tar.gz"
- 'gcc-7.patch'
- 'utf8.patch'
- 'lua52_compat.patch')
-sha1sums=('a795616fb359e60be343e339f7acf5e95e0f1ce2'
- 'd30fad6a138de36566c5343ea04e6c7141e767f8'
- '1a64966b887ecbd7280d97988cd8526813820611'
- '104542546fbbd24172ddaa179f87e1b26df8b761')
+makedepends=('cmake' 'ninja' 'git')
+conflicts=("$_basename")
+provides=("$_basename")
-prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- patch -Np1 -i "${srcdir}/gcc-7.patch"
- patch -Np1 -i "${srcdir}/utf8.patch"
- patch -Np1 -i "${srcdir}/lua52_compat.patch"
- ./bootstrap
+source=("$pkgname-$pkgver.tar.gz::https://github.com/$_basename/$_basename/archive/$pkgver.tar.gz")
+sha1sums=('SKIP')
- # Remove bundled ode library because its headers get picked up during build
- rm -r src/ode
+prepare() {
+ mkdir -p build
}
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # Build using the old C++ ABI to fix issue with missing text; the issue
- # should be fixed in the next stable release (if that ever does happen)
- CPPFLAGS+=' -D_GLIBCXX_USE_CXX11_ABI=0'
-
- ./configure --prefix=/usr --disable-sdltest
- make
+ cd build
+ cmake ../${pkgbase}-$pkgver -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DLUA_INCLUDE_DIR=/usr/include/lua5.1
+ ninja
+ ninja xmoto_pack
}
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"
+ cd build
+ DESTDIR="${pkgdir}" ninja install
- # install icon for desktop file
- install -Dm0644 "${srcdir}/${pkgname}-${pkgver}/extra/xmoto.xpm" \
- "${pkgdir}/usr/share/pixmaps/xmoto.xpm"
+ # install man page
+ mandir=/usr/share/man/man6
+ mkdir -p ${pkgdir}/${mandir}
+ gzip -c "${srcdir}/${pkgbase}-$pkgver/xmoto.6" > "${pkgdir}/${mandir}/xmoto.6.gz"
}
diff --git a/gcc-7.patch b/gcc-7.patch
deleted file mode 100644
index 4226b32e8221..000000000000
--- a/gcc-7.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Description: Avoid comparing pointers with booleans
-Author: Stephen Kitt <skitt@debian.org>
-Forwarded: https://github.com/xmoto/xmoto/pull/16
-
---- a/src/WWW.cpp
-+++ b/src/WWW.cpp
-@@ -206,7 +206,7 @@
- std::string v_www_agent = WWW_AGENT;
-
- /* open the file */
-- if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) {
-+ if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == NULL) {
- throw Exception("error : unable to open output file "
- + v_local_file_tmp);
- }
-@@ -320,7 +320,7 @@
- LogInfo(std::string("Uploading replay " + p_replayFilename).c_str());
-
- /* open the file */
-- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
-+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
- throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR"));
- }
-
-@@ -478,7 +478,7 @@
- LogInfo("Sending vote");
-
- /* open the file */
-- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
-+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
- throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV"));
- }
-
-@@ -562,7 +562,7 @@
- LogInfo("Sending report");
-
- /* open the file */
-- if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
-+ if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
- throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR"));
- }
-
-@@ -677,7 +677,7 @@
- LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str());
-
- /* open the file */
-- if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) {
-+ if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == NULL) {
- throw Exception("error : unable to open output file " + p_answerFile);
- }
-
diff --git a/lua52_compat.patch b/lua52_compat.patch
deleted file mode 100644
index 54aaf20d6a6a..000000000000
--- a/lua52_compat.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff --git a/configure.in b/configure.in
-index 452f196..dbceb05 100644
---- a/configure.in
-+++ b/configure.in
-@@ -157,8 +157,8 @@ AM_CONDITIONAL([USE_SDLGFX], test "$USE_SDLGFX" = "1")
- # m
- AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found))
-
--AC_SEARCH_LIBS(lua_pushboolean,lua lua5.1 lua50, [], [AC_MSG_ERROR(liblua5.1, liblua50, or liblua required)])
--AC_SEARCH_LIBS(luaopen_math,lualib lualib5.1 lualib50, [], [AC_MSG_ERROR(liblualib5.1, liblualib50, or liblualib required)])
-+AC_SEARCH_LIBS(lua_pushboolean,lua lua5.2 lua5.1 lua50, [], [AC_MSG_ERROR(liblua5.2 liblua5.1, liblua50, or liblua required)])
-+AC_SEARCH_LIBS(luaopen_math,lualib liblua5.2 lualib5.1 lualib50, [], [AC_MSG_ERROR(liblualib5.2 liblualib5.1, liblualib50, or liblualib required)])
-
- dnl ***** Check lua headers, as they are prone to be located random places on random systems! *****
- dnl The following three lines where suggested by Eric Piel, but they don't seem to work on my system
-@@ -174,6 +174,8 @@ AC_CHECK_HEADER(lua/lua.h, AC_DEFINE(HAVE_LUA_LUA_H) [USE_LUA_VERSION="unkn
- AC_CHECK_HEADER(lua50/lua.h, AC_DEFINE(HAVE_LUA50_LUA_H) [USE_LUA_VERSION="5.0"])
- AC_CHECK_HEADER(lua51/lua.h, AC_DEFINE(HAVE_LUA51_LUA_H) [USE_LUA_VERSION="5.1"])
- AC_CHECK_HEADER(lua5.1/lua.h, AC_DEFINE(HAVE_LUA5_1_LUA_H)[USE_LUA_VERSION="5.1"])
-+AC_CHECK_HEADER(lua52/lua.h, AC_DEFINE(HAVE_LUA52_LUA_H) [USE_LUA_VERSION="5.2"])
-+AC_CHECK_HEADER(lua5.2/lua.h, AC_DEFINE(HAVE_LUA5_2_LUA_H)[USE_LUA_VERSION="5.2"])
- AC_DEFINE(LUA_COMPAT_MODULE, 1)
-
- AC_LANG_PUSH([C++])
-diff --git a/src/include/xm_lua.h b/src/include/xm_lua.h
-index 8a2cc17..f470de2 100644
---- a/src/include/xm_lua.h
-+++ b/src/include/xm_lua.h
-@@ -4,7 +4,15 @@ extern "C" {
- #include "lauxlib.h"
- #include "lualib.h"
- #else
-- #if defined(HAVE_LUA5_1_LUA_H)
-+ #if defined(HAVE_LUA5_2_LUA_H)
-+ #include <lua5.2/lua.h>
-+ #include <lua5.2/lauxlib.h>
-+ #include <lua5.2/lualib.h>
-+ #elif defined(HAVE_LUA52_LUA_H)
-+ #include <lua52/lua.h>
-+ #include <lua52/lauxlib.h>
-+ #include <lua52/lualib.h>
-+ #elif defined(HAVE_LUA5_1_LUA_H)
- #include <lua5.1/lua.h>
- #include <lua5.1/lauxlib.h>
- #include <lua5.1/lualib.h>
diff --git a/utf8.patch b/utf8.patch
deleted file mode 100644
index e5d0dfb2a4be..000000000000
--- a/utf8.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Build with g++'s new utf8.h
-Author: Stephen Kitt <skitt@debian.org>
-
---- a/src/helpers/utf8.h
-+++ b/src/helpers/utf8.h
-@@ -18,8 +18,8 @@
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- =============================================================================*/
-
--#ifndef __UTF8_H__
--#define __UTF8_H__
-+#ifndef __XMOTO_UTF8_H__
-+#define __XMOTO_UTF8_H__
-
- #include <vector>
- #include <string>