From 0a1df50e9f9a62f4c2df6cf69d5f05f74816ceb7 Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Fri, 30 Jul 2021 15:02:45 +0200 Subject: gnu: Fix OpenSFX build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenSFX 1.0.1 uses a different build system from the old one, which causes weird errors. * gnu/packages/games.scm (openttd-opensfx)[native-inputs]: Add tar. [#:make-flags]: Drop INSTALL_DIR. Add DIR_NAME and TAR. [#:tests?]: New argument. [#:phases]: Add ‘prebuild’. Replace ‘install’ with a simple copy. --- gnu/packages/games.scm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index a6be36d628..1571208b05 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -4437,11 +4437,15 @@ OpenGFX provides you with... (build-system gnu-build-system) (native-inputs `(("catcodec" ,catcodec) - ("python" ,python-2))) + ("python" ,python-2) + ("tar" ,tar))) (arguments `(#:make-flags - (list (string-append "INSTALL_DIR=" %output - "/share/games/openttd/baseset/opensfx")) + (list (string-append "DIR_NAME=opensfx") + (string-append "TAR=" (assoc-ref %build-inputs "tar") + "/bin/tar")) + ;; The check phase only verifies md5sums, see openttd-opengfx. + #:tests? #f #:phases (modify-phases %standard-phases (add-after 'unpack 'make-reproducible @@ -4451,7 +4455,15 @@ OpenGFX provides you with... (substitute* "scripts/Makefile.def" (("-cf") " --mtime=@0 -cf")) #t)) - (delete 'configure)))) + (delete 'configure) + (add-before 'build 'prebuild + (lambda _ (invoke "make" "opensfx.cat"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (copy-recursively "opensfx" + (string-append (assoc-ref outputs "out") + "/share/games/openttd/baseset" + "/opensfx"))))))) (home-page "http://dev.openttdcoop.org/projects/opensfx") (synopsis "Base sounds for OpenTTD") (description "OpenSFX is a set of free base sounds for OpenTTD which make -- cgit v1.2.3