From patchwork Tue Jan 22 21:42:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Goaziou X-Patchwork-Id: 787 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B37D916A8D; Tue, 22 Jan 2019 21:44:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id ECD4916A89 for ; Tue, 22 Jan 2019 21:44:11 +0000 (GMT) Received: from localhost ([127.0.0.1]:50655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm3q7-0001ob-GS for patchwork@mira.cbaines.net; Tue, 22 Jan 2019 16:44:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm3q4-0001n0-EN for guix-patches@gnu.org; Tue, 22 Jan 2019 16:44:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gm3py-0001Zv-NB for guix-patches@gnu.org; Tue, 22 Jan 2019 16:44:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42357) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gm3px-0001Yr-UB for guix-patches@gnu.org; Tue, 22 Jan 2019 16:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gm3px-0001zN-QX for guix-patches@gnu.org; Tue, 22 Jan 2019 16:44:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34086] [PATCH] Add StepMania Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Jan 2019 21:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34086 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo Famulari Received: via spool by 34086-submit@debbugs.gnu.org id=B34086.15481933877570 (code B ref 34086); Tue, 22 Jan 2019 21:44:01 +0000 Received: (at 34086) by debbugs.gnu.org; 22 Jan 2019 21:43:07 +0000 Received: from localhost ([127.0.0.1]:41638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gm3p4-0001y1-IC for submit@debbugs.gnu.org; Tue, 22 Jan 2019 16:43:07 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:60233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gm3p0-0001xX-5W for 34086@debbugs.gnu.org; Tue, 22 Jan 2019 16:43:04 -0500 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 01FFC100004; Tue, 22 Jan 2019 21:42:59 +0000 (UTC) From: Nicolas Goaziou References: <875zuprduu.fsf@nicolasgoaziou.fr> <87o98bnquh.fsf@gnu.org> <871s55gkhv.fsf@nicolasgoaziou.fr> <20190122192442.GE25842@jasmine.lan> Date: Tue, 22 Jan 2019 22:42:58 +0100 In-Reply-To: <20190122192442.GE25842@jasmine.lan> (Leo Famulari's message of "Tue, 22 Jan 2019 14:24:42 -0500") Message-ID: <87muns1i8t.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 34086@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello, Leo Famulari writes: > I believe you can use the 'hidden-package' procedure instead of > 'package' to address the use case of exported packages that should not > appear in the Guix UI (for example, `guix package --search`). I didn't know about `hidden-package'. I used that instead, and added an empty `input' field. New patch attached. Note that `hidden-package' doesn't seem to have the same indentation rule as `package'. Thank you. Regards, From 00196d57d6987ed4e93d5cd51af3a4c2d20cc7f3 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 (stepmania): * gnu/packages/video.scm (ffmpeg-for-stepmania): New variables. --- gnu/packages/games.scm | 113 +++++++++++++++++++++++++++++++++++++++++ gnu/packages/video.scm | 27 ++++++++++ 2 files changed, 140 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 317962bf6..b973641fe 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) @@ -6011,3 +6012,115 @@ civilized than your own.") license:cc-by-sa3.0 license:cc-by-sa4.0 license:public-domain)))) + +(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-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))) + diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index fb0da6ae6..8bf76177b 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -871,6 +871,33 @@ audio/video codec library.") (base32 "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l")))))) +(define-public ffmpeg-for-stepmania + (hidden-package + (inherit ffmpeg) + (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 "ffmpeg" version)))) + (arguments + (substitute-keyword-arguments (package-arguments ffmpeg) + ((#:configure-flags flags) + '(list "--disable-programs" + "--disable-doc" + "--disable-debug" + "--disable-avdevice" + "--disable-swresample" + "--disable-postproc" + "--disable-avfilter" + "--disable-shared" + "--enable-static")))) + (inputs '()))) + (define-public ffmpegthumbnailer (package (name "ffmpegthumbnailer") -- 2.20.1