Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / emulators.scm
index 0ab6ee7..f805c8b 100644 (file)
@@ -7,10 +7,11 @@
 ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 David Wilson <david@daviwil.com>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -457,6 +458,52 @@ and Game Boy Color games.")
     ;; BSD-3.
     (license (list license:mpl2.0 license:lgpl2.1+ license:bsd-3))))
 
+(define-public sameboy
+  (package
+    (name "sameboy")
+    (version "0.12.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/LIJI32/SameBoy.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0m5rv2x8qck1kr43xq186pp4kaiay7gd1x775n9qrljcd7z4x6fs"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("rgbds" ,rgbds)
+       ("gcc" ,gcc-9)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("sdl2" ,sdl2)))
+    (arguments
+     `(#:tests? #f                      ; There are no tests
+       #:make-flags `("CC=gcc" "CONF=release"
+                      ,(string-append "DATA_DIR="
+                                      (assoc-ref %outputs "out")
+                                      "/share/sameboy/"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (data (string-append out "/share/sameboy/")))
+               (with-directory-excursion "build/bin/SDL"
+                 (install-file "sameboy" bin)
+                 (delete-file "sameboy")
+                 (copy-recursively "." data))))))))
+    (home-page "https://sameboy.github.io/")
+    (synopsis "Accurate Game Boy, Game Boy Color and Super Game Boy emulator")
+    (description "SameBoy is a user friendly Game Boy, Game Boy Color
+and Super Game Boy emulator.  SameBoy is accurate and includes a wide
+range of debugging features.  It has all the features one would expect
+from an emulator---from save states to scaling filters.")
+    (license license:expat)))
+
 (define-public mupen64plus-core
   (package
     (name "mupen64plus-core")
@@ -1147,21 +1194,34 @@ multi-system game/emulator system.")
 (define-public scummvm
   (package
     (name "scummvm")
-    (version "2.1.0")
+    (version "2.1.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "http://www.scummvm.org/frs/scummvm/" version
                            "/scummvm-" version ".tar.xz"))
        (sha256
-        (base32
-         "09zp2mxmida6sz5vrr5bzyv8c3yjvq2xqmpmcllbadhmd9cwcl3b"))))
+        (base32 "1a6waf1ybp91nwva8g650cljlfb1di4l0jv13vg6yfgkas9pclsp"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                                 ;require "git"
        #:configure-flags (list "--enable-release") ;for optimizations
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-build
+           ;; XXX: The following works around a build failure introduced when
+           ;; Fluidsynth was updated to version 2.1.  It has been applied
+           ;; upstream as 68758a879e0c8ecc0d40962516d4e808aa4e15e5 and can be
+           ;; removed once this commit makes it into a release.
+           (lambda _
+             (substitute* "audio/softsynth/fluidsynth.cpp"
+               (("#include <fluidsynth.h>") "")
+               (("#include \"common/scummsys.h\"") "#include \"config.h\"")
+               (("#include \"common/config-manager.h\"" line)
+                (string-append "#include <fluidsynth.h>\n"
+                               "#include \"common/scummsys.h\"\n"
+                               line)))
+             #t))
          (replace 'configure
            ;; configure does not work followed by both "SHELL=..." and
            ;; "CONFIG_SHELL=..."; set environment variables instead
@@ -1204,7 +1264,7 @@ play them on systems for which they were never designed!")
 (define-public mame
   (package
     (name "mame")
-    (version "0.216")
+    (version "0.217")
     (source
      (origin
        (method git-fetch)
@@ -1214,7 +1274,7 @@ play them on systems for which they were never designed!")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1q3mrlinkg3hxry7ssl5713lclz3k243q30933flxh99fnzgajwc"))
+         "03h4d0d8lh6djjff3zqhjm14klc9n129yzwygdqppz0f43w97cmw"))
        (modules '((guix build utils)))
        (snippet
         ;; Remove bundled libraries.
@@ -1364,7 +1424,7 @@ play them on systems for which they were never designed!")
        ("flac" ,flac)
        ("fontconfig" ,fontconfig)
        ("glm" ,glm)
-       ("libjpeg" ,libjpeg-8)    ;jpeg_read_header argument error in libjpeg-9
+       ("libjpeg" ,libjpeg-turbo)
        ("libxi" ,libxi)
        ("libxinerama" ,libxinerama)
        ("lua" ,lua)