diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-06-21 00:45:08 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-06-21 00:45:08 +0200 |
commit | fb5296605e84a09764c7428e778c54af5033b722 (patch) | |
tree | b28dca7373c1fff585fd11a73d903a6d7a008db0 /gnu/packages/games.scm | |
parent | a70e2f0f0742f3af81e9dc9e00f3813290702bff (diff) | |
download | guix-fb5296605e84a09764c7428e778c54af5033b722.tar.gz |
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.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r-- | gnu/packages/games.scm | 187 |
1 files changed, 104 insertions, 83 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 39669ba1c9..d01d3fc8d9 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -10420,89 +10420,110 @@ This package is part of the KDE games module.") (license (list license:gpl2+ license:fdl1.2+)))) (define-public xmoto - (package - (name "xmoto") - (version "0.5.11") - (source - (origin - (method url-fetch) - (uri (string-append - "http://download.tuxfamily.org/xmoto/xmoto/" version "/" - "xmoto-" version "-src.tar.gz")) - (sha256 - (base32 "1ci6r8zd0l7z28cy92ddf9dmqbdqwinz2y1cny34c61b57wsd155")) - (patches - (search-patches - "xmoto-remove-glext.patch" ;fixes licensing issue - "xmoto-reproducible.patch" - "xmoto-utf8.patch")) - ;; Unbundle ODE. - (modules '((guix build utils))) - (snippet - `(begin - (delete-file-recursively "src/ode") - #t)))) - (build-system gnu-build-system) - (arguments - ;; XXX: First flag prevents a build error with GCC7+. The second - ;; flag works around missing text in game. Both are fixed - ;; upstream. Remove once xmoto 0.5.12+ is released. - `(#:make-flags '("CXXFLAGS=-fpermissive -D_GLIBCXX_USE_CXX11_ABI=0") - #:phases - (modify-phases %standard-phases - (add-after 'install 'install-desktop-file - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (apps (string-append out "/share/applications")) - (pixmaps (string-append out "/share/pixmaps"))) - (install-file "extra/xmoto.desktop" apps) - (install-file "extra/xmoto.xpm" pixmaps) - #t))) - (add-after 'install-desktop-file 'install-fonts - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((font-dir (string-append (assoc-ref inputs "font-dejavu") - "/share/fonts/truetype/")) - (target-dir (string-append (assoc-ref outputs "out") - "/share/xmoto/Textures/Fonts/"))) - (for-each (lambda (f) - (let ((font (string-append font-dir f)) - (target (string-append target-dir f))) - (delete-file target) - (symlink font target))) - '("DejaVuSans.ttf" "DejaVuSansMono.ttf")) - #t))) - (add-after 'install-fonts 'install-man-page - (lambda* (#:key outputs #:allow-other-keys) - (install-file "xmoto.6" - (string-append (assoc-ref outputs "out") - "/share/man/man6")) - #t))))) - (native-inputs - `(("gettext" ,gettext-minimal))) - (inputs - `(("curl" ,curl) - ("font-dejavu" ,font-dejavu) - ("glu" ,glu) - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libxdg-basedir" ,libxdg-basedir) - ("libxml2" ,libxml2) - ("lua" ,lua-5.2) - ("ode" ,ode) - ("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-4 ;src/bzip - license:bsd-3 ;src/md5sum - license:lgpl2.1+ ;src/iqsort.h - license:expat)))) + ;; The commit below includes a fix to a build error. + (let ((commit "f7ca787d02bd876c6eb989a28b180a05220621ee") + (revision "0")) + (package + (name "xmoto") + (version (git-version "0.6.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xmoto/xmoto.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1kiwqni58vjdqfb289d1dqcb758hdl2k970dawxq5vdaqrbnsxv4")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-1))) + ;; XXX: Remove some bundled libraries. Guix provides + ;; Chipmunk, but it appears to be incompatible with the + ;; (older) one bundled. Likewise, Guix provides ODE, but + ;; using it induces rendering issues. Eventually, libccd is + ;; required to compile built-in ODE. + (snippet + `(begin + (let ((keep '("chipmunk" "glad" "libccd" "md5sum" "ode"))) + (with-directory-excursion "vendor" + (for-each delete-file-recursively + (lset-difference string=? + (scandir ".") + (cons* "." ".." keep)))) + (substitute* "src/CMakeLists.txt" + (("add_subdirectory\\(.*?/vendor/(.+?)\".*" line library) + (if (member library keep) line "")))) + #t)))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ;no test + #:phases + (modify-phases %standard-phases + ;; Install phase ignores this man page. Install it early, + ;; because the process moves to another directory shortly + ;; after. + (add-after 'unpack 'install-man-page + (lambda* (#:key outputs #:allow-other-keys) + (install-file "xmoto.6" + (string-append (assoc-ref outputs "out") + "/share/man/man6")) + #t)) + (add-after 'unpack 'fix-hard-coded-directory + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "src/common/VFileIO.cpp" + (("/usr/share") + (string-append (assoc-ref outputs "out") "/share"))) + #t)) + (add-before 'build 'set-SDL + ;; Set correct environment for SDL. + (lambda* (#:key inputs #:allow-other-keys) + (setenv "CPATH" + (string-append + (assoc-ref inputs "sdl") "/include/SDL:" + (or (getenv "CPATH") ""))) + #t)) + (add-after 'install 'unbundle-fonts + ;; Unbundle DejaVuSans TTF files. + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((font-dir (string-append (assoc-ref inputs "font-dejavu") + "/share/fonts/truetype/")) + (target-dir (string-append (assoc-ref outputs "out") + "/share/xmoto/Textures/Fonts/"))) + (for-each (lambda (f) + (let ((font (string-append font-dir f)) + (target (string-append target-dir f))) + (delete-file target) + (symlink font target))) + '("DejaVuSans.ttf" "DejaVuSansMono.ttf")) + #t)))))) + (native-inputs + `(("gettext" ,gettext-minimal) + ("pkg-config" ,pkg-config))) + (inputs + `(("bzip2" ,bzip2) + ("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 (package |