From patchwork Tue Nov 1 17:58:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: florhizome X-Patchwork-Id: 44237 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 E338827BBEA; Tue, 1 Nov 2022 18:00:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BE8D127BBE9 for ; Tue, 1 Nov 2022 18:00:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opvYT-0000tZ-7S; Tue, 01 Nov 2022 14:00:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opvYR-0000t6-6x for guix-patches@gnu.org; Tue, 01 Nov 2022 14:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opvYQ-00029X-Sm for guix-patches@gnu.org; Tue, 01 Nov 2022 14:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opvYQ-0005KP-Ka for guix-patches@gnu.org; Tue, 01 Nov 2022 14:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58499] [PATCH v3] gnu: Add citra References: In-Reply-To: Resent-From: florhizome@posteo.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Nov 2022 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58499 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58499@debbugs.gnu.org Cc: florhizome Received: via spool by 58499-submit@debbugs.gnu.org id=B58499.166732555720396 (code B ref 58499); Tue, 01 Nov 2022 18:00:02 +0000 Received: (at 58499) by debbugs.gnu.org; 1 Nov 2022 17:59:17 +0000 Received: from localhost ([127.0.0.1]:44207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opvXg-0005Iu-MI for submit@debbugs.gnu.org; Tue, 01 Nov 2022 13:59:17 -0400 Received: from mout02.posteo.de ([185.67.36.66]:49077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opvXe-0005Ig-HV for 58499@debbugs.gnu.org; Tue, 01 Nov 2022 13:59:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0766824010F for <58499@debbugs.gnu.org>; Tue, 1 Nov 2022 18:59:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667325549; bh=i5C6jtxNwhiyDEhfXU4F9arp5i1toBQjYQJ4Z6wuuqA=; h=From:To:Cc:Subject:Date:From; b=E2GPcM6CcQ1QNHwaysMpsc8oPvXWuDUcGnLcGbzwiLFEL0UKEqfUFRFpkPqeQdg57 GByAv13G/+TVVCo7vvEyP4CNrtaV2UKOzqAnkHggKZIPW1e3LltwV2iiB01Swg4oHq toFCjQwWSHVw6gSu0H8j6Ohb75SvgQGOrWa9nEAkG6HZUeSViNCsV67vXwlVSn45t4 3cdwuyldO5q4csPRUBtmK/qNzAO2XDBw9mYNu71Lr+ilFiXOB9/R75oGQy7mRqHDLz siiQTAzGURGflUTty2NKGsp/7KPfU3FBD8jT0gE8hnGLctgA+c70AtCAOhX7zr4XYy Y1465gOrSy5GQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N1ySr43VKz9rxL; Tue, 1 Nov 2022 18:59:08 +0100 (CET) From: florhizome@posteo.net Date: Tue, 1 Nov 2022 17:58:56 +0000 Message-Id: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: florhizome * gnu/packages/emulators.scm (citra): New variable. --- gnu/packages/emulators.scm | 100 +++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 4d7710f8ea..3ea3bfe327 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -61,6 +61,7 @@ (define-module (gnu packages emulators) #:use-module (gnu packages cross-base) #:use-module (gnu packages curl) #:use-module (gnu packages digest) + #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages flex) #:use-module (gnu packages fltk) @@ -74,6 +75,7 @@ (define-module (gnu packages emulators) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages libedit) @@ -105,6 +107,7 @@ (define-module (gnu packages emulators) #:use-module (gnu packages xorg) #:use-module (gnu packages web) #:use-module (guix build-system cmake) + #:use-module (guix build-system qt) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) @@ -245,9 +248,106 @@ (define-public desmume "DeSmuME is an emulator for the Nintendo DS handheld gaming console.") (license license:gpl2))) +(define-public citra + ;; we use the 'nightly' revision, picking stable features + (let ((revision "1785") + (commit "baecc18d8c5365af0dddb231bc8c0a9c03850bf6")) + (package + (name "citra") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/citra-emu/citra-nightly") + (commit + (string-append "nightly-" revision)) + ;;some submodules can't be avoided + ;;TODO devendor the rest + (recursive? #t))) + (sha256 + (base32 + "1grkrrxs1497i51spgnwmgfkqgkm7gplylhcrk67agaklx65d5s9")) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove as much external stuff as we can + ;; f.e. some files in boost are still needed + (for-each (lambda (dir) + (delete-file-recursively + (string-append "externals/" dir))) + '("android-ifaddrs" + "catch" + "discord-rpc" + "getopt" + "libyuv" + "libressl" + "libusb")) + ;; Clean up source. + (for-each delete-file + (find-files "." ".*\\.(bin|dsy|exe|jar|rar)$")) + #t)))) + (build-system qt-build-system) + (arguments + (list + #:configure-flags + #~(list + "-DUSE_SYSTEM_BOOST=ON" + "-DCITRA_USE_BUNDLED_FFMPEG=OFF" + "-DCITRA_USE_BUNDLED_QT=OFF" + "-DCITRA_USE_BUNDLED_SDL2=OFF" + "-DCITRA_ENABLE_COMPATIBILITY_REPORTING=OFF" + "-DCMAKE_BUILD_TYPE=Release" + "-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" + "-DENABLE_FFMPEG_AUDIO_DECODER=ON" + "-DENABLE_QT_TRANSLATION=ON" + "-DENABLE_WEB_SERVICE=ON") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'delete-check + (lambda _ + (substitute* "CMakeLists.txt" + (("check_submodules_present\\(\\)")"")))) + (add-after 'qt-wrap 'wrap-gst-plugins + (lambda* (#:key outputs #:allow-other-keys) + (for-each + (lambda (bin) + (wrap-program bin) + `("GST_PLUGIN_SYSTEM_PATH" prefix + (,(getenv "GST_PLUGIN_SYSTEM_PATH")))) + `(,(search-input-file outputs "bin/citra") + ,(search-input-file outputs "bin/citra-qt")))))))) + (native-inputs + (list catch2 doxygen pkg-config)) + (inputs + (list boost + curl + ffmpeg + gst-plugins-bad-minimal ;camera-support + libfdk + libpng + libusb + libxkbcommon + openssl + pulseaudio + qtbase-5 + qtmultimedia-5 + qttools-5 + qtwayland-5 + sdl2)) + (propagated-inputs (list xdg-utils shared-mime-info)) + (home-page "https://citra-emu.org") + (synopsis "Nintendo 3DS Emulator") + (description "Citra is an experimental emulator/debugger for the Nintendo 3DS + written in C++. It emulates a subset of the Nintendo 3DS' hardware.") + (license license:gpl2+)))) + + ;; Building from recent Git because the official 5.0 release no longer builds. ;; Following commits and revision numbers of beta versions listed at ;; https://dolphin-emu.org/download/. + (define-public dolphin-emu (let ((commit "a34823df61df65168aa40ef5e82e44defd4a0138") (revision "13178"))