gnu: xmoto: Improve package style.
* gnu/packages/games.scm (xmoto)[snippet]: Remove trailing #T. [arguments]: Use G-expressions. Remove trailing #T in phases. [native-inputs]: Remove labels. [inputs]: Remove labels.master
parent
c68648a8a5
commit
b79187ab50
|
@ -10172,58 +10172,54 @@ can be downloaded from @url{https://zero.sjeng.org/best-network}.")
|
||||||
(cons* "." ".." keep))))
|
(cons* "." ".." keep))))
|
||||||
(substitute* "src/CMakeLists.txt"
|
(substitute* "src/CMakeLists.txt"
|
||||||
(("add_subdirectory\\(.*?/vendor/(.+?)\".*" line library)
|
(("add_subdirectory\\(.*?/vendor/(.+?)\".*" line library)
|
||||||
(if (member library keep) line ""))))
|
(if (member library keep) line ""))))))))
|
||||||
#t))))
|
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ;no test
|
(list
|
||||||
#:phases
|
#:tests? #f ;no tests
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(add-after 'unpack 'fix-hard-coded-directory
|
#~(modify-phases %standard-phases
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'unpack 'fix-hard-coded-directory
|
||||||
(substitute* "src/common/VFileIO.cpp"
|
(lambda _
|
||||||
(("/usr/share")
|
(substitute* "src/common/VFileIO.cpp"
|
||||||
(string-append (assoc-ref outputs "out") "/share")))
|
(("/usr/share") (string-append #$output "/share")))))
|
||||||
#t))
|
(add-before 'build 'set-SDL
|
||||||
(add-before 'build 'set-SDL
|
;; Set correct environment for SDL.
|
||||||
;; Set correct environment for SDL.
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(setenv "CPATH"
|
||||||
(setenv "CPATH"
|
(string-append
|
||||||
(string-append
|
(search-input-directory inputs "/include/SDL2")
|
||||||
(assoc-ref inputs "sdl") "/include/SDL2:"
|
":"
|
||||||
(or (getenv "CPATH") "")))
|
(or (getenv "CPATH") "")))))
|
||||||
#t))
|
(add-after 'install 'unbundle-fonts
|
||||||
(add-after 'install 'unbundle-fonts
|
;; Unbundle DejaVuSans TTF files.
|
||||||
;; Unbundle DejaVuSans TTF files.
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
(let ((font-dir (search-input-directory inputs
|
||||||
(let ((font-dir (string-append (assoc-ref inputs "font-dejavu")
|
"/share/fonts/truetype/"))
|
||||||
"/share/fonts/truetype/"))
|
(target-dir (string-append #$output
|
||||||
(target-dir (string-append (assoc-ref outputs "out")
|
"/share/xmoto/Textures/Fonts/")))
|
||||||
"/share/xmoto/Textures/Fonts/")))
|
(for-each (lambda (f)
|
||||||
(for-each (lambda (f)
|
(let ((font (string-append font-dir f))
|
||||||
(let ((font (string-append font-dir f))
|
(target (string-append target-dir f)))
|
||||||
(target (string-append target-dir f)))
|
(delete-file target)
|
||||||
(delete-file target)
|
(symlink font target)))
|
||||||
(symlink font target)))
|
'("DejaVuSans.ttf" "DejaVuSansMono.ttf"))))))))
|
||||||
'("DejaVuSans.ttf" "DejaVuSansMono.ttf"))
|
|
||||||
#t))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("gettext" ,gettext-minimal)
|
(list gettext-minimal pkg-config))
|
||||||
("pkg-config" ,pkg-config)))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("bzip2" ,bzip2)
|
(list bzip2
|
||||||
("curl" ,curl)
|
curl
|
||||||
("font-dejavu" ,font-dejavu)
|
font-dejavu
|
||||||
("glu" ,glu)
|
glu
|
||||||
("libjpeg" ,libjpeg-turbo)
|
libjpeg-turbo
|
||||||
("libpng" ,libpng)
|
libpng
|
||||||
("libxdg-basedir" ,libxdg-basedir)
|
libxdg-basedir
|
||||||
("libxml2" ,libxml2)
|
libxml2
|
||||||
("lua" ,lua)
|
lua
|
||||||
("ode" ,ode)
|
ode
|
||||||
("sdl" ,(sdl-union (list sdl2 sdl2-mixer sdl2-net sdl2-ttf)))
|
(sdl-union (list sdl2 sdl2-mixer sdl2-net sdl2-ttf))
|
||||||
("sqlite" ,sqlite)
|
sqlite
|
||||||
("zlib" ,zlib)))
|
zlib))
|
||||||
(home-page "https://xmoto.tuxfamily.org/")
|
(home-page "https://xmoto.tuxfamily.org/")
|
||||||
(synopsis "2D motocross platform game")
|
(synopsis "2D motocross platform game")
|
||||||
(description
|
(description
|
||||||
|
|
Reference in New Issue