gnu: xonotic: Use G-expressions.
* gnu/packages/games.scm (xonotic)[arguments]: Rewrite as G-expressions.
This commit is contained in:
parent
d21ddfc9d8
commit
3dc16fe0dc
1 changed files with 141 additions and 141 deletions
|
@ -7807,148 +7807,148 @@ quotation from a collection of quotes.")
|
||||||
(base32 "0pgahai0gk8bjmvkwx948bl50l9f9dhmjzwffl4vyldibajipa51"))))
|
(base32 "0pgahai0gk8bjmvkwx948bl50l9f9dhmjzwffl4vyldibajipa51"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags (list (string-append "--prefix="
|
(list #:configure-flags
|
||||||
(assoc-ref %outputs "out"))
|
#~(list (string-append "--prefix=" #$output)
|
||||||
"--disable-rijndael")
|
"--disable-rijndael")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before 'configure 'make-darkplaces
|
(add-before 'configure 'make-darkplaces
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(sharedir (string-append out "/share/xonotic/")))
|
(share (string-append out "/share/xonotic/")))
|
||||||
(invoke "make" "-C" "source/darkplaces"
|
(invoke "make" "-C" "source/darkplaces"
|
||||||
(string-append "DP_FS_BASEDIR="
|
(string-append "DP_FS_BASEDIR="
|
||||||
sharedir)
|
share)
|
||||||
"DP_LINK_TO_LIBJPEG=1"
|
"DP_LINK_TO_LIBJPEG=1"
|
||||||
"DP_SOUND_API=ALSA"
|
"DP_SOUND_API=ALSA"
|
||||||
"CC=gcc"
|
"CC=gcc"
|
||||||
"-f" "makefile"
|
"-f" "makefile"
|
||||||
"cl-release")
|
"cl-release")
|
||||||
(invoke "make" "-C" "source/darkplaces"
|
(invoke "make" "-C" "source/darkplaces"
|
||||||
(string-append "DP_FS_BASEDIR="
|
(string-append "DP_FS_BASEDIR="
|
||||||
sharedir)
|
share)
|
||||||
"DP_LINK_TO_LIBJPEG=1"
|
"DP_LINK_TO_LIBJPEG=1"
|
||||||
"DP_SOUND_API=ALSA"
|
"DP_SOUND_API=ALSA"
|
||||||
"CC=gcc"
|
"CC=gcc"
|
||||||
"-f" "makefile"
|
"-f" "makefile"
|
||||||
"sdl-release")
|
"sdl-release")
|
||||||
(invoke "make" "-C" "source/darkplaces"
|
(invoke "make" "-C" "source/darkplaces"
|
||||||
(string-append "DP_FS_BASEDIR="
|
(string-append "DP_FS_BASEDIR="
|
||||||
sharedir)
|
share)
|
||||||
"DP_LINK_TO_LIBJPEG=1"
|
"DP_LINK_TO_LIBJPEG=1"
|
||||||
"DP_SOUND_API=ALSA"
|
"DP_SOUND_API=ALSA"
|
||||||
"CC=gcc"
|
"CC=gcc"
|
||||||
"-f" "makefile"
|
"-f" "makefile"
|
||||||
"sv-release"))))
|
"sv-release"))))
|
||||||
(add-before 'configure 'bootstrap
|
(add-before 'configure 'bootstrap
|
||||||
(lambda _
|
|
||||||
(chdir "source/d0_blind_id")
|
|
||||||
(invoke "sh" "autogen.sh")))
|
|
||||||
(add-after 'build 'install-desktop-entry
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
;; Add .desktop files for the 2 variants and the symlink
|
|
||||||
(let* ((output (assoc-ref outputs "out"))
|
|
||||||
(apps (string-append output "/share/applications")))
|
|
||||||
(mkdir-p apps)
|
|
||||||
(with-output-to-file
|
|
||||||
(string-append apps "/xonotic-glx.desktop")
|
|
||||||
(lambda _
|
(lambda _
|
||||||
(format #t
|
(chdir "source/d0_blind_id")
|
||||||
"[Desktop Entry]~@
|
(invoke "sh" "autogen.sh")))
|
||||||
Name=xonotic-glx~@
|
(add-after 'install 'symlink-data
|
||||||
Comment=Xonotic glx~@
|
(lambda* (#:key outputs inputs #:allow-other-keys)
|
||||||
Exec=~a/bin/xonotic-glx~@
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
TryExec=~@*~a/bin/xonotic-glx~@
|
(data (assoc-ref inputs "xonotic-data")))
|
||||||
Icon=xonotic~@
|
(symlink (string-append data "/share/xonotic")
|
||||||
Categories=Game~@
|
(string-append out "/share/xonotic")))))
|
||||||
Type=Application~%"
|
(add-after 'install 'install-desktop-entry
|
||||||
output)))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(with-output-to-file
|
;; Add .desktop files for the 2 variants and the symlink.
|
||||||
(string-append apps "/xonotic-sdl.desktop")
|
(let* ((output (assoc-ref outputs "out"))
|
||||||
(lambda _
|
(apps (string-append output "/share/applications")))
|
||||||
(format #t
|
(mkdir-p apps)
|
||||||
"[Desktop Entry]~@
|
(with-output-to-file
|
||||||
Name=xonotic-sdl~@
|
(string-append apps "/xonotic-glx.desktop")
|
||||||
Comment=Xonotic sdl~@
|
(lambda _
|
||||||
Exec=~a/bin/xonotic-sdl~@
|
(format #t
|
||||||
TryExec=~@*~a/bin/xonotic-sdl~@
|
"[Desktop Entry]~@
|
||||||
Icon=xonotic~@
|
Name=xonotic-glx~@
|
||||||
Categories=Game~@
|
Comment=Xonotic glx~@
|
||||||
Type=Application~%"
|
Exec=~a/bin/xonotic-glx~@
|
||||||
output)))
|
TryExec=~@*~a/bin/xonotic-glx~@
|
||||||
(with-output-to-file
|
Icon=xonotic~@
|
||||||
(string-append apps "/xonotic.desktop")
|
Categories=Game~@
|
||||||
(lambda _
|
Type=Application~%"
|
||||||
(format #t
|
output)))
|
||||||
"[Desktop Entry]~@
|
(with-output-to-file
|
||||||
Name=xonotic~@
|
(string-append apps "/xonotic-sdl.desktop")
|
||||||
Comment=Xonotic~@
|
(lambda _
|
||||||
Exec=~a/bin/xonotic-glx~@
|
(format #t
|
||||||
TryExec=~@*~a/bin/xonotic~@
|
"[Desktop Entry]~@
|
||||||
Icon=xonotic~@
|
Name=xonotic-sdl~@
|
||||||
Categories=Game~@
|
Comment=Xonotic sdl~@
|
||||||
Type=Application~%"
|
Exec=~a/bin/xonotic-sdl~@
|
||||||
output))))))
|
TryExec=~@*~a/bin/xonotic-sdl~@
|
||||||
(add-after 'install-desktop-entry 'install-icons
|
Icon=xonotic~@
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
Categories=Game~@
|
||||||
(let ((out (assoc-ref outputs "out")))
|
Type=Application~%"
|
||||||
(with-directory-excursion "../../misc/logos/icons_png/"
|
output)))
|
||||||
(for-each
|
(with-output-to-file
|
||||||
(lambda (file)
|
(string-append apps "/xonotic.desktop")
|
||||||
(let* ((size (string-filter char-numeric? file))
|
(lambda _
|
||||||
(icons (string-append out "/share/icons/hicolor/"
|
(format #t
|
||||||
size "x" size "/apps")))
|
"[Desktop Entry]~@
|
||||||
(mkdir-p icons)
|
Name=xonotic~@
|
||||||
(copy-file file (string-append icons "/xonotic.png"))))
|
Comment=Xonotic~@
|
||||||
'("xonotic_16.png" "xonotic_22.png" "xonotic_24.png"
|
Exec=~a/bin/xonotic-glx~@
|
||||||
"xonotic_32.png" "xonotic_48.png" "xonotic_64.png"
|
TryExec=~@*~a/bin/xonotic~@
|
||||||
"xonotic_128.png" "xonotic_256.png" "xonotic_512.png"))))))
|
Icon=xonotic~@
|
||||||
(add-after 'install-icons 'install-binaries
|
Categories=Game~@
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
Type=Application~%"
|
||||||
(let ((out (assoc-ref outputs "out")))
|
output))))))
|
||||||
(define (install src dst)
|
(add-after 'install 'install-icons
|
||||||
(let ((dst (string-append out dst)))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(mkdir-p (dirname dst))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(copy-file src dst)))
|
(with-directory-excursion "../../misc/logos/icons_png/"
|
||||||
(mkdir-p (string-append out "/bin"))
|
(for-each
|
||||||
(install "../darkplaces/darkplaces-dedicated"
|
(lambda (file)
|
||||||
"/bin/xonotic-dedicated")
|
(let* ((size (string-filter char-numeric? file))
|
||||||
(install "../darkplaces/darkplaces-glx"
|
(icons (string-append out "/share/icons/hicolor/"
|
||||||
"/bin/xonotic-glx")
|
size "x" size "/apps")))
|
||||||
(install "../darkplaces/darkplaces-sdl"
|
(mkdir-p icons)
|
||||||
"/bin/xonotic-sdl")
|
(copy-file file (string-append icons "/xonotic.png"))))
|
||||||
;; Provide a default xonotic executable, defaulting to SDL.
|
'("xonotic_16.png" "xonotic_22.png" "xonotic_24.png"
|
||||||
(symlink (string-append out "/bin/xonotic-sdl")
|
"xonotic_32.png" "xonotic_48.png" "xonotic_64.png"
|
||||||
(string-append out "/bin/xonotic")))))
|
"xonotic_128.png" "xonotic_256.png" "xonotic_512.png"))))))
|
||||||
(add-after 'install-binaries 'install-data
|
(add-after 'install 'install-binaries
|
||||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(data (assoc-ref inputs "xonotic-data")))
|
(define (install src dst)
|
||||||
(symlink (string-append data "/share/xonotic")
|
(let ((dst (string-append out dst)))
|
||||||
(string-append out "/share/xonotic")))))
|
(mkdir-p (dirname dst))
|
||||||
(add-after 'install-binaries 'wrap-binaries
|
(copy-file src dst)))
|
||||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
(mkdir-p (string-append out "/bin"))
|
||||||
;; Curl and libvorbis need to be wrapped so that we get
|
(install "../darkplaces/darkplaces-dedicated"
|
||||||
;; sound and networking.
|
"/bin/xonotic-dedicated")
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(install "../darkplaces/darkplaces-glx"
|
||||||
(bin (string-append out "/bin/xonotic"))
|
"/bin/xonotic-glx")
|
||||||
(bin-sdl (string-append out "/bin/xonotic-sdl"))
|
(install "../darkplaces/darkplaces-sdl"
|
||||||
(bin-glx (string-append out "/bin/xonotic-glx"))
|
"/bin/xonotic-sdl")
|
||||||
(bin-dedicated (string-append out "/bin/xonotic-dedicated"))
|
;; Provide a default xonotic executable, defaulting to SDL.
|
||||||
(curl (assoc-ref inputs "curl"))
|
(symlink (string-append out "/bin/xonotic-sdl")
|
||||||
(vorbis (assoc-ref inputs "libvorbis")))
|
(string-append out "/bin/xonotic")))))
|
||||||
(wrap-program bin
|
(add-after 'install-binaries 'wrap
|
||||||
`("LD_LIBRARY_PATH" ":" prefix
|
(lambda* (#:key outputs inputs #:allow-other-keys)
|
||||||
(,(string-append curl "/lib:" vorbis "/lib"))))
|
;; Curl and libvorbis need to be wrapped so that we get
|
||||||
(wrap-program bin-sdl
|
;; sound and networking.
|
||||||
`("LD_LIBRARY_PATH" ":" prefix
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(,(string-append curl "/lib:" vorbis "/lib"))))
|
(bin (string-append out "/bin/xonotic"))
|
||||||
(wrap-program bin-glx
|
(bin-sdl (string-append out "/bin/xonotic-sdl"))
|
||||||
`("LD_LIBRARY_PATH" ":" prefix
|
(bin-glx (string-append out "/bin/xonotic-glx"))
|
||||||
(,(string-append curl "/lib:" vorbis "/lib"))))
|
(bin-dedicated (string-append out "/bin/xonotic-dedicated"))
|
||||||
(wrap-program bin-dedicated
|
(curl (assoc-ref inputs "curl"))
|
||||||
`("LD_LIBRARY_PATH" ":" prefix
|
(vorbis (assoc-ref inputs "libvorbis")))
|
||||||
(,(string-append curl "/lib:" vorbis "/lib"))))))))))
|
(wrap-program bin
|
||||||
|
`("LD_LIBRARY_PATH" ":" prefix
|
||||||
|
(,(string-append curl "/lib:" vorbis "/lib"))))
|
||||||
|
(wrap-program bin-sdl
|
||||||
|
`("LD_LIBRARY_PATH" ":" prefix
|
||||||
|
(,(string-append curl "/lib:" vorbis "/lib"))))
|
||||||
|
(wrap-program bin-glx
|
||||||
|
`("LD_LIBRARY_PATH" ":" prefix
|
||||||
|
(,(string-append curl "/lib:" vorbis "/lib"))))
|
||||||
|
(wrap-program bin-dedicated
|
||||||
|
`("LD_LIBRARY_PATH" ":" prefix
|
||||||
|
(,(string-append curl "/lib:" vorbis "/lib"))))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list autoconf
|
(list autoconf
|
||||||
automake
|
automake
|
||||||
|
|
Reference in a new issue