From patchwork Thu Oct 20 21:55:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: florhizome X-Patchwork-Id: 43749 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 4C2C127BBEA; Fri, 21 Oct 2022 08:15:44 +0100 (BST) 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 B10F327BBE9 for ; Fri, 21 Oct 2022 08:15:43 +0100 (BST) Received: from localhost ([::1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olmFq-0002ms-Jp for patchwork@mira.cbaines.net; Fri, 21 Oct 2022 03:15:42 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olmBW-0000Ig-Sa for patchwork@mira.cbaines.net; Fri, 21 Oct 2022 03:11:14 -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 1olmBP-0000Hi-3j for guix-patches@gnu.org; Fri, 21 Oct 2022 03:11:12 -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 1olmBK-0002ec-Bx for guix-patches@gnu.org; Fri, 21 Oct 2022 03:11:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olmBK-0005EK-6K for guix-patches@gnu.org; Fri, 21 Oct 2022 03:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58499] [PATCH v2] gnu: Add citra References: In-Reply-To: Resent-From: florhizome@posteo.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 21 Oct 2022 07:11: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.166633620719998 (code B ref 58499); Fri, 21 Oct 2022 07:11:02 +0000 Received: (at 58499) by debbugs.gnu.org; 21 Oct 2022 07:10:07 +0000 Received: from localhost ([127.0.0.1]:36773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olmAQ-0005CO-Ki for submit@debbugs.gnu.org; Fri, 21 Oct 2022 03:10:07 -0400 Received: from mout01.posteo.de ([185.67.36.65]:34467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oldaC-0007O8-M9 for 58499@debbugs.gnu.org; Thu, 20 Oct 2022 18:00:09 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D9C7A240031 for <58499@debbugs.gnu.org>; Fri, 21 Oct 2022 00:00:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666303202; bh=X+61twr2vuw5saZt6iSf9vGBGl0dB0cwb+B6jYyyrwM=; h=From:To:Cc:Subject:Date:From; b=TZx3o5Hrpv9G16w5yZF+9AUNLqmWWvCmpwiaTbT1BEpqeaGoVDr2zZducV6s7iidj OYxahQZxrHaJHcfW6d8xT/RDGTDU6Dto7Elv+W9UeZsVjFhA5WAM70ppwTwFAGhDWh Qm5nxZKTEztr4R9wGcR5dlw2bVvk2g64DfjHFeeB3vFLxt9EjHwDB4YFpUhVEsb52u Qj0Q4raPLnzwciukTq+3reTuWtdP8J7HT7ExXWsdYFnkn+K7BTAfc7OD8qpcAvfnRx Gh4sc6JWurJPW6G1BJSWATWm41t75kZzcs7spGZs205uexsYeS6nZlWl3TH5CGFiSG Q6ElIlaGmPIbw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MthNK6N3Cz9rxH; Fri, 21 Oct 2022 00:00:01 +0200 (CEST) From: florhizome@posteo.net Date: Thu, 20 Oct 2022 21:55:03 +0000 Message-Id: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 21 Oct 2022 03:09:55 -0400 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: florhizome * gnu: Add citra. --- gnu/packages/emulators.scm | 103 +++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) base-commit: 00ff6f7c399670a76efffb91276dea2633cc130c diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 4d7710f8ea..be4e10bb9c 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,109 @@ (define-public desmume "DeSmuME is an emulator for the Nintendo DS handheld gaming console.") (license license:gpl2))) +(define-public citra + (let ((version "0") + (revision "1785") + (commit "baecc18d8c5365af0dddb231bc8c0a9c03850bf6")) + (package + (name "citra") + (version (git-version version + (string-append "nightly-" 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" + "libyuv" + "libressl" + "getopt" + "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" + "-DCMAKE_BUILD_TYPE=Release" + "-DCITRA_ENABLE_COMPATIBILITY_REPORTING=OFF" + "-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" + "-DENABLE_QT_TRANSLATION=ON" + "-DENABLE_WEB_SERVICE=ON" + "-DENABLE_FFMPEG_AUDIO_DECODER=ON" + "-DUSE_DISCORD_PRESENCE=ON") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'delete-check + (lambda _ + (substitute* "CMakeLists.txt" + (("check_submodules_present\\(\\)")"")))) + (add-after 'qt-wrap 'wrap-other-dependencies + (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 pkg-config doxygen catch2)) + (inputs + (list qtbase-5 + qtmultimedia-5 + qttools-5 + qtwayland-5 + libpng + libxkbcommon + openssl + libfdk + ffmpeg + pulseaudio + curl + rapidjson + sdl2 + libusb + boost + gst-plugins-bad-minimal)) + ;;gstreamer-plugins-bad-minimal needed for camera support + (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"))