From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:48454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjTC1-0002S6-4p for guix-patches@gnu.org; Tue, 15 Jan 2019 13:12:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjTBy-0001PU-G0 for guix-patches@gnu.org; Tue, 15 Jan 2019 13:12:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:32829) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjTBy-0001OU-8z for guix-patches@gnu.org; Tue, 15 Jan 2019 13:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gjTBx-0001Zz-Vc for guix-patches@gnu.org; Tue, 15 Jan 2019 13:12:02 -0500 Subject: [bug#34086] [PATCH] Add StepMania Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:47700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjTAi-0001iH-BA for guix-patches@gnu.org; Tue, 15 Jan 2019 13:10:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjTAf-0000c4-HW for guix-patches@gnu.org; Tue, 15 Jan 2019 13:10:44 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:36209) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjTAe-0000VB-Ve for guix-patches@gnu.org; Tue, 15 Jan 2019 13:10:41 -0500 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 3E3C060005 for ; Tue, 15 Jan 2019 18:10:33 +0000 (UTC) From: Nicolas Goaziou Date: Tue, 15 Jan 2019 19:10:33 +0100 Message-ID: <875zuprduu.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 34086@debbugs.gnu.org --=-=-= Content-Type: text/plain Hello, This patch adds StepMania. Note that I had to remove all bundled songs due to a non-commercial clause, so it's not really usable right out of the box. I also had to package a dedicated FFmpeg package, since StepMania is very picky about it. Feedback welcome. Regards, -- Nicolas Goaziou --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-Add-stepmania.patch Content-Description: Add StepMania >From bfefd4b4217d67f9628682cb76ce2b9015285612 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 11 Nov 2018 00:43:34 +0100 Subject: [PATCH] gnu: Add stepmania. * gnu/packages/games.scm (ffmpeg-for-stepmania): (stepmania): New variables. --- gnu/packages/games.scm | 167 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 33dbccf87..c5f855b8f 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -70,6 +70,7 @@ #:use-module (gnu packages admin) #:use-module (gnu packages audio) #:use-module (gnu packages avahi) + #:use-module (gnu packages assembly) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) @@ -5946,3 +5947,169 @@ order. You rotate the blocks and move them across the screen to drop them in complete lines. You score by dropping blocks fast and completing lines. As your score gets higher, you level up and the blocks fall faster.") (license license:gpl2+))) + +(define ffmpeg-for-stepmania + (package + (name "ffmpeg-for-stepmania") + (version "2.1.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stepmania/ffmpeg.git") + (commit "eda6effcabcf9c238e4635eb058d72371336e09b"))) + (sha256 + (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:configure-flags + '("--disable-programs" + "--disable-doc" + "--disable-debug" + "--disable-avdevice" + "--disable-swresample" + "--disable-postproc" + "--disable-avfilter" + "--disable-shared" + "--enable-static") + #:phases + (modify-phases %standard-phases + (replace 'configure + ;; configure does not work followed by "SHELL=..." and + ;; "CONFIG_SHELL=..."; set environment variables instead + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "configure" + (("#! /bin/sh") (string-append "#!" (which "sh")))) + (setenv "SHELL" (which "bash")) + (setenv "CONFIG_SHELL" (which "bash")) + (apply invoke + "./configure" + (string-append "--prefix=" out) + ;; Add $libdir to the RUNPATH of all the binaries. + (string-append "--extra-ldflags=-Wl,-rpath=" + out "/lib") + configure-flags))))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("yasm" ,yasm))) + (home-page "https://www.ffmpeg.org/") + (synopsis "Audio and video framework") + (description "FFmpeg is a complete, cross-platform solution to record, +convert and stream audio and video. It includes the libavcodec +audio/video codec library.") + (license license:gpl2+))) + +(define-public stepmania + (package + (name "stepmania") + (version "5.1.0-b2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stepmania/stepmania.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0a7y9l7xm510vgnpmj1is7p9m6d6yd0fcaxrjcickz295k5w3rdn")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove song files, which are licensed under a non-commercial + ;; clause, and a course pointing to them. + (for-each delete-file-recursively + '("Songs/StepMania 5/Goin' Under" + "Songs/StepMania 5/MechaTribe Assault" + "Songs/StepMania 5/Springtime")) + (for-each delete-file '("Courses/Default/Jupiter.crs" + "Courses/Default/Jupiter.png")) + ;; Unbundle libpng. + (substitute* "extern/CMakeLists.txt" + (("include\\(CMakeProject-png.cmake\\)") "")) + (delete-file-recursively "extern/libpng") + #t)))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ;FIXME: couldn't find how to run tests + #:build-type "Release" + #:out-of-source? #f ;for the 'install-desktop' phase + #:configure-flags + (list "-DWITH_SYSTEM_FFMPEG=1" + ;; Configuration cannot find GTK2 without the two following + ;; flags. + (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR=" + (assoc-ref %build-inputs "gtk+") + "/lib/gtk-2.0/include") + (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR=" + (assoc-ref %build-inputs "glib") + "/lib/glib-2.0/include")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-install-subdir + ;; Installation would be done in "%out/stepmania-X.Y", but we + ;; prefer the more common layout "%out/share/stepmania". + (lambda _ + (substitute* "src/CMakeLists.txt" + (("\"stepmania-.*?\"") "\"share/stepmania\"")) + #t)) + (add-after 'unpack 'unbundle-libpng + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/CMakeLists.txt" + (("\\$\\{SM_EXTERN_DIR\\}/libpng/include") + (string-append (assoc-ref inputs "libpng") "/include"))))) + (add-after 'install 'install-executable + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (exe (string-append out "/share/stepmania/stepmania"))) + (mkdir-p bin) + (symlink exe (string-append bin "/stepmania")) + #t))) + (add-after 'install-executable 'install-desktop + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share")) + (applications (string-append share "/applications")) + (icons (string-append share "/icons"))) + (install-file "stepmania.desktop" applications) + (mkdir-p icons) + (copy-recursively "icons" icons) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("yasm" ,yasm))) + (inputs + `(("alsa-lib" ,alsa-lib) + ;; ("ffmpeg" ,ffmpeg-2.8) ;ffmpeg 3+ unsupported + ("ffmpeg" ,ffmpeg-for-stepmania) + ("glib" ,glib) + ("glew" ,glew) + ("gtk+" ,gtk+-2) + ("jsoncpp" ,jsoncpp) + ("libpng" ,libpng) + ("libjpeg" ,libjpeg-8) + ("libmad" ,libmad) + ("libogg" ,libogg) + ("libva" ,libva) + ("libvorbis" ,libvorbis) + ("libxinerama" ,libxinerama) + ("libxrandr" ,libxrandr) + ("mesa" ,mesa) + ("pcre" ,pcre) + ("pulseaudio" ,pulseaudio) + ("sdl" ,sdl2) + ("udev" ,eudev) + ("zlib" ,zlib))) + (synopsis "Advanced rhythm game designed for both home and arcade use") + (description "StepMania is a dance and rhythm game. It features 3D +graphics, keyboard and dance pad support, and an editor for creating your own +steps. + +This package provides the core application, but no song is shipped. You need +to download and install them in @file{$HOME/.stepmania-X.Y/Songs} directory.") + (home-page "https://www.stepmania.com") + (license license:expat))) -- 2.20.1 --=-=-=--