unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: florhizome@posteo.net
To: 58499@debbugs.gnu.org
Cc: florhizome <florhizome@posteo.net>
Subject: [bug#58499] [PATCH v3] gnu: Add citra
Date: Tue,  1 Nov 2022 17:58:56 +0000	[thread overview]
Message-ID: <b9344989ac3a6b9b2660c4d5a6f9a975c5e7759e.1667325314.git.florhizome@posteo.net> (raw)
In-Reply-To: <a0c965b31ab5fa2735b02ed3102dde5c72165d5f.1665673001.git.florhizome@posteo.net>

From: florhizome <florhizome@posteo.net>

* 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"))
-- 
2.38.0





  parent reply	other threads:[~2022-11-01 18:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 14:59 [bug#58499] [PATCH] gnu: add citra (stable version) florhizome
2022-10-17  8:37 ` Liliana Marie Prikler
2022-10-20 21:49   ` florhizome
2022-10-21  6:30     ` Liliana Marie Prikler
2022-10-20 21:55 ` [bug#58499] [PATCH v2] gnu: Add citra florhizome
2022-10-22 17:29   ` Liliana Marie Prikler
2022-11-01 15:56     ` Florian
2022-11-01 17:58 ` florhizome [this message]
2022-11-02  8:04   ` [bug#58499] [PATCH v3] " Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9344989ac3a6b9b2660c4d5a6f9a975c5e7759e.1667325314.git.florhizome@posteo.net \
    --to=florhizome@posteo.net \
    --cc=58499@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).