gnu: xmoto: Update to 0.6.0-0-f7ca787.

* gnu/packages/games.scm (xmoto): Update to 0.6.0-0-f7ca787.
[source]: Remove patches.
[arguments]: Remove make-flags keyword.
* gnu/packages/patches/xmoto-remove-glext.patch:
* gnu/packages/patches/xmoto-reproducible.patch:
* gnu/packages/patches/xmoto-utf8.patch: Delete files.
* gnu/local.mk: Register previous deletions.
This commit is contained in:
Nicolas Goaziou 2020-06-21 00:45:08 +02:00
parent a70e2f0f07
commit fb5296605e
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D
5 changed files with 104 additions and 149 deletions

View file

@ -1609,9 +1609,6 @@ dist_patch_DATA = \
%D%/packages/patches/xf86-video-voodoo-pcitag.patch \ %D%/packages/patches/xf86-video-voodoo-pcitag.patch \
%D%/packages/patches/xfce4-panel-plugins.patch \ %D%/packages/patches/xfce4-panel-plugins.patch \
%D%/packages/patches/xfce4-settings-defaults.patch \ %D%/packages/patches/xfce4-settings-defaults.patch \
%D%/packages/patches/xmoto-utf8.patch \
%D%/packages/patches/xmoto-remove-glext.patch \
%D%/packages/patches/xmoto-reproducible.patch \
%D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \ %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \
%D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \ %D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \
%D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \ %D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \

View file

@ -10420,89 +10420,110 @@ (define-public kjumpingcube
(license (list license:gpl2+ license:fdl1.2+)))) (license (list license:gpl2+ license:fdl1.2+))))
(define-public xmoto (define-public xmoto
(package ;; The commit below includes a fix to a build error.
(name "xmoto") (let ((commit "f7ca787d02bd876c6eb989a28b180a05220621ee")
(version "0.5.11") (revision "0"))
(source (package
(origin (name "xmoto")
(method url-fetch) (version (git-version "0.6.0" revision commit))
(uri (string-append (source
"http://download.tuxfamily.org/xmoto/xmoto/" version "/" (origin
"xmoto-" version "-src.tar.gz")) (method git-fetch)
(sha256 (uri (git-reference
(base32 "1ci6r8zd0l7z28cy92ddf9dmqbdqwinz2y1cny34c61b57wsd155")) (url "https://github.com/xmoto/xmoto.git")
(patches (commit commit)))
(search-patches (file-name (git-file-name name version))
"xmoto-remove-glext.patch" ;fixes licensing issue (sha256
"xmoto-reproducible.patch" (base32 "1kiwqni58vjdqfb289d1dqcb758hdl2k970dawxq5vdaqrbnsxv4"))
"xmoto-utf8.patch")) (modules '((guix build utils)
;; Unbundle ODE. (ice-9 ftw)
(modules '((guix build utils))) (srfi srfi-1)))
(snippet ;; XXX: Remove some bundled libraries. Guix provides
`(begin ;; Chipmunk, but it appears to be incompatible with the
(delete-file-recursively "src/ode") ;; (older) one bundled. Likewise, Guix provides ODE, but
#t)))) ;; using it induces rendering issues. Eventually, libccd is
(build-system gnu-build-system) ;; required to compile built-in ODE.
(arguments (snippet
;; XXX: First flag prevents a build error with GCC7+. The second `(begin
;; flag works around missing text in game. Both are fixed (let ((keep '("chipmunk" "glad" "libccd" "md5sum" "ode")))
;; upstream. Remove once xmoto 0.5.12+ is released. (with-directory-excursion "vendor"
`(#:make-flags '("CXXFLAGS=-fpermissive -D_GLIBCXX_USE_CXX11_ABI=0") (for-each delete-file-recursively
#:phases (lset-difference string=?
(modify-phases %standard-phases (scandir ".")
(add-after 'install 'install-desktop-file (cons* "." ".." keep))))
(lambda* (#:key outputs #:allow-other-keys) (substitute* "src/CMakeLists.txt"
(let* ((out (assoc-ref outputs "out")) (("add_subdirectory\\(.*?/vendor/(.+?)\".*" line library)
(apps (string-append out "/share/applications")) (if (member library keep) line ""))))
(pixmaps (string-append out "/share/pixmaps"))) #t))))
(install-file "extra/xmoto.desktop" apps) (build-system cmake-build-system)
(install-file "extra/xmoto.xpm" pixmaps) (arguments
#t))) `(#:tests? #f ;no test
(add-after 'install-desktop-file 'install-fonts #:phases
(lambda* (#:key outputs inputs #:allow-other-keys) (modify-phases %standard-phases
(let ((font-dir (string-append (assoc-ref inputs "font-dejavu") ;; Install phase ignores this man page. Install it early,
"/share/fonts/truetype/")) ;; because the process moves to another directory shortly
(target-dir (string-append (assoc-ref outputs "out") ;; after.
"/share/xmoto/Textures/Fonts/"))) (add-after 'unpack 'install-man-page
(for-each (lambda (f) (lambda* (#:key outputs #:allow-other-keys)
(let ((font (string-append font-dir f)) (install-file "xmoto.6"
(target (string-append target-dir f))) (string-append (assoc-ref outputs "out")
(delete-file target) "/share/man/man6"))
(symlink font target))) #t))
'("DejaVuSans.ttf" "DejaVuSansMono.ttf")) (add-after 'unpack 'fix-hard-coded-directory
#t))) (lambda* (#:key outputs #:allow-other-keys)
(add-after 'install-fonts 'install-man-page (substitute* "src/common/VFileIO.cpp"
(lambda* (#:key outputs #:allow-other-keys) (("/usr/share")
(install-file "xmoto.6" (string-append (assoc-ref outputs "out") "/share")))
(string-append (assoc-ref outputs "out") #t))
"/share/man/man6")) (add-before 'build 'set-SDL
#t))))) ;; Set correct environment for SDL.
(native-inputs (lambda* (#:key inputs #:allow-other-keys)
`(("gettext" ,gettext-minimal))) (setenv "CPATH"
(inputs (string-append
`(("curl" ,curl) (assoc-ref inputs "sdl") "/include/SDL:"
("font-dejavu" ,font-dejavu) (or (getenv "CPATH") "")))
("glu" ,glu) #t))
("libjpeg" ,libjpeg-turbo) (add-after 'install 'unbundle-fonts
("libpng" ,libpng) ;; Unbundle DejaVuSans TTF files.
("libxdg-basedir" ,libxdg-basedir) (lambda* (#:key outputs inputs #:allow-other-keys)
("libxml2" ,libxml2) (let ((font-dir (string-append (assoc-ref inputs "font-dejavu")
("lua" ,lua-5.2) "/share/fonts/truetype/"))
("ode" ,ode) (target-dir (string-append (assoc-ref outputs "out")
("sdl" ,(sdl-union (list sdl sdl-mixer sdl-net sdl-ttf))) "/share/xmoto/Textures/Fonts/")))
("sqlite" ,sqlite) (for-each (lambda (f)
("zlib" ,zlib))) (let ((font (string-append font-dir f))
(home-page "https://xmoto.tuxfamily.org/") (target (string-append target-dir f)))
(synopsis "2D motocross platform game") (delete-file target)
(description "X-Moto is a challenging 2D motocross platform game, where (symlink font target)))
physics play an all important role in the gameplay. You need to control your '("DejaVuSans.ttf" "DejaVuSansMono.ttf"))
bike to its limit, if you want to have a chance finishing the more difficult #t))))))
challenges.") (native-inputs
(license (list license:gpl2+ ;whole project `(("gettext" ,gettext-minimal)
license:bsd-4 ;src/bzip ("pkg-config" ,pkg-config)))
license:bsd-3 ;src/md5sum (inputs
license:lgpl2.1+ ;src/iqsort.h `(("bzip2" ,bzip2)
license:expat)))) ("curl" ,curl)
("font-dejavu" ,font-dejavu)
("glu" ,glu)
("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libxdg-basedir" ,libxdg-basedir)
("libxml2" ,libxml2)
("lua" ,lua-5.1)
("sdl" ,(sdl-union (list sdl sdl-mixer sdl-net sdl-ttf)))
("sqlite" ,sqlite)
("zlib" ,zlib)))
(home-page "https://xmoto.tuxfamily.org/")
(synopsis "2D motocross platform game")
(description
"X-Moto is a challenging 2D motocross platform game, where
physics play an all important role in the gameplay. You need to
control your bike to its limit, if you want to have a chance finishing
the more difficult challenges.")
(license (list license:gpl2+ ;whole project
license:bsd-3 ;vendor/md5sum
license:lgpl2.1+
license:expat)))))
(define-public eboard (define-public eboard
(package (package

View file

@ -1,23 +0,0 @@
Description: Allow building without upstream-supplied glext.h
Author: Stephen Kitt <steve@sk2.org>
Bug: http://todo.xmoto.tuxfamily.org/index.php?do=details&task_id=803
--- xmoto-0.5.9+dfsg.orig/src/include/xm_OpenGL.h
+++ xmoto-0.5.9+dfsg/src/include/xm_OpenGL.h
@@ -1,7 +1,6 @@
#ifdef ENABLE_OPENGL
/* Pull in OpenGL headers */
/* following scissored from SDL_opengl.h */
-#define __glext_h_ /* Don't let gl.h include glext.h */
#ifdef HAVE_APPLE_OPENGL_FRAMEWORK
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
#include <OpenGL/glu.h> /* Header File For The GLU Library */
@@ -12,8 +11,5 @@
#include <GL/gl.h> /* Header File For The OpenGL Library */
#include <GL/glu.h> /* Header File For The GLU Library */
#endif
-#undef __glext_h_
-
-#include "../glext.h"
#endif

View file

@ -1,24 +0,0 @@
Description: Avoid __DATE__ and __TIME__ to build reproducibly
Author: Stephen Kitt <skitt@debian.org>
--- a/src/GameInit.cpp
+++ b/src/GameInit.cpp
@@ -248,7 +248,6 @@
Logger::setActiv(XMSession::instance()->noLog() == false); /* apply log activ mode */
LogInfo(std::string("X-Moto " + XMBuild::getVersionString(true)).c_str());
- LogInfo("compiled at "__DATE__" "__TIME__);
if(SwapEndian::bigendien) {
LogInfo("Systeme is bigendien");
} else {
--- a/src/states/StateOptions.cpp
+++ b/src/states/StateOptions.cpp
@@ -1233,8 +1233,6 @@
int p=25;
makeWindowOptions_infos_line(v_window, "Version", "X-Moto " + XMBuild::getVersionString(true), p);
p+=20;
- makeWindowOptions_infos_line(v_window, "Compilation date", __DATE__ " " __TIME__, p);
- p+=20;
makeWindowOptions_infos_line(v_window, "User data directory", XMFS::getUserDir(FDT_DATA), p);
p+=20;
makeWindowOptions_infos_line(v_window, "User config directory", XMFS::getUserDir(FDT_CONFIG), p);

View file

@ -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>