summaryrefslogtreecommitdiff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-08-07 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2022-08-07 02:00:01 +0200
commit22f865b7e643ec2b1fc4f0238127cc881ef41e49 (patch)
tree32c80e89f0118d3c32dbb2dc59a6ddac3a5799fa /gnu/packages/games.scm
parent3dc16fe0dca3bb88d97a2190be9809ea4e6222c8 (diff)
downloadguix-patches-22f865b7e643ec2b1fc4f0238127cc881ef41e49.tar
guix-patches-22f865b7e643ec2b1fc4f0238127cc881ef41e49.tar.gz
gnu: xonotic: Normalise building Darkplaces.
* gnu/packages/games.scm (xonotic)[arguments]: Build Darkplaces in a single pass. Honour MAKE-FLAGS, PARALLEL-BUILD?, and CC-FOR-TARGET.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm43
1 files changed, 17 insertions, 26 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 487f6571a6..6b5ab89dcd 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7812,34 +7812,25 @@ quotation from a collection of quotes.")
"--disable-rijndael")
#:phases
#~(modify-phases %standard-phases
- (add-before 'configure 'make-darkplaces
- (lambda* (#:key outputs #:allow-other-keys)
+ (add-before 'configure 'build-darkplaces
+ (lambda* (#:key make-flags parallel-build? outputs
+ #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(share (string-append out "/share/xonotic/")))
- (invoke "make" "-C" "source/darkplaces"
- (string-append "DP_FS_BASEDIR="
- share)
- "DP_LINK_TO_LIBJPEG=1"
- "DP_SOUND_API=ALSA"
- "CC=gcc"
- "-f" "makefile"
- "cl-release")
- (invoke "make" "-C" "source/darkplaces"
- (string-append "DP_FS_BASEDIR="
- share)
- "DP_LINK_TO_LIBJPEG=1"
- "DP_SOUND_API=ALSA"
- "CC=gcc"
- "-f" "makefile"
- "sdl-release")
- (invoke "make" "-C" "source/darkplaces"
- (string-append "DP_FS_BASEDIR="
- share)
- "DP_LINK_TO_LIBJPEG=1"
- "DP_SOUND_API=ALSA"
- "CC=gcc"
- "-f" "makefile"
- "sv-release"))))
+ (apply invoke "make"
+ "-C" "source/darkplaces"
+ "-f" "makefile"
+ "-j" (if parallel-build?
+ (number->string (parallel-job-count))
+ "1")
+ (string-append "CC=" #$(cc-for-target))
+ (string-append "DP_FS_BASEDIR=" share)
+ "DP_LINK_TO_LIBJPEG=1"
+ "DP_SOUND_API=ALSA"
+ "cl-release"
+ "sdl-release"
+ "sv-release"
+ make-flags))))
(add-before 'configure 'bootstrap
(lambda _
(chdir "source/d0_blind_id")