unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#37793] [PATCH] gnu: Add gens-gs.
@ 2019-10-17 14:42 Pierre Neidhardt
  2019-10-17 15:38 ` Mathieu Othacehe
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Pierre Neidhardt @ 2019-10-17 14:42 UTC (permalink / raw)
  To: 37793

* gnu/packages/emulators.scm (gens-gs): New variable.
---
 gnu/packages/emulators.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index f6da7f2d25..c1d1d54052 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1366,3 +1366,37 @@ functions.  The source code to MAME serves as this documentation.")
     ;; However, over 90% of the files are under Expat license.  Also, artwork,
     ;; keymaps, languages and samples are under CC0.
     (license (list license:gpl2+ license:expat license:cc0))))
+
+(define-public gens-gs
+  (package
+    (name "gens-gs")
+    (version "7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://retrocdn.net/images/6/6d/Gens-gs-r"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:system "i686-linux"))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("nasm" ,nasm)))
+    (inputs
+     `(("sdl" ,sdl)
+       ("gtk" ,gtk+-2)
+       ;; TODO: Test if following deps are necessary.
+       ;; ("libpng" ,libpng)
+       ;; ("zlib" ,zlib)
+       ;; ("glu" ,glu)
+       ))
+    (home-page "https://segaretro.org/Gens/GS")
+    (synopsis "Emulator for Sega Genesis/Mega Drive systems")
+    (description
+     "Gens/GS is an emulator for the Sega Mega Drive (also known as Genesis),
+derived from Gens.  Project goals include clean source code, combined features
+from various forks of Gens, and improved platform portability.")
+    (license license:gpl2+)))
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#37793] [PATCH] gnu: Add gens-gs.
  2019-10-17 14:42 [bug#37793] [PATCH] gnu: Add gens-gs Pierre Neidhardt
@ 2019-10-17 15:38 ` Mathieu Othacehe
       [not found] ` <handler.37793.B.157132338326045.ack@debbugs.gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Mathieu Othacehe @ 2019-10-17 15:38 UTC (permalink / raw)
  To: 37793


Hey Pierre,

> +    (arguments
> +     `(#:system "i686-linux"))

Maybe you should add:

--8<---------------cut here---------------start------------->8---
    (supported-systems '("i686-linux" "x86_64-linux"))
--8<---------------cut here---------------end--------------->8---

then?

Mathieu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#37793] Acknowledgement ([PATCH] gnu: Add gens-gs.)
       [not found] ` <handler.37793.B.157132338326045.ack@debbugs.gnu.org>
@ 2019-10-18  8:35   ` Pierre Neidhardt
  0 siblings, 0 replies; 5+ messages in thread
From: Pierre Neidhardt @ 2019-10-18  8:35 UTC (permalink / raw)
  To: 37793

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

This package currently fails to build with the following error:

--8<---------------cut here---------------start------------->8---
ui/gtk/gens/gens_window_callbacks.cpp:157:15: error: ‘GdkDragContext {aka struct _GdkDragContext}’ has no member named ‘targets’
  if (context->targets)
               ^~~~~~~
--8<---------------cut here---------------end--------------->8---

Nix has nothing special in its definition: https://github.com/NixOS/nixpkgs/tree/master/pkgs/misc/emulators.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#37793] [PATCH] gnu: Add gens-gs.
  2019-10-17 14:42 [bug#37793] [PATCH] gnu: Add gens-gs Pierre Neidhardt
  2019-10-17 15:38 ` Mathieu Othacehe
       [not found] ` <handler.37793.B.157132338326045.ack@debbugs.gnu.org>
@ 2019-10-19 13:36 ` David Wilson
  2019-10-21 16:25 ` Pierre Neidhardt
  3 siblings, 0 replies; 5+ messages in thread
From: David Wilson @ 2019-10-19 13:36 UTC (permalink / raw)
  To: 37793

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

Hi all! I was able to get the gens-gs build working with the attached patch on top of Pierre's original. Tested the output by loading up a "Chakan: The Forever Man" ROM, seemed to work fine :)  The key was this line of the Nix package definition:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/emulators/gens-gs/default.nix#L16

Apparently gens-gs' code is so old that it's using some deprecated GTK APIs, so we have to remove the GTK_DISABLE_DEPRECATED define, etc, from GTK_CFLAGS so that the build will complete successfully.

David

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gens-fix.patch --]
[-- Type: text/x-patch; name="gens-fix.patch", Size: 1220 bytes --]

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index c1d1d54052..d616f7fd21 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -82,6 +82,7 @@
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages web)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu))
 
 (define-public desmume
@@ -1379,9 +1380,18 @@ functions.  The source code to MAME serves as this documentation.")
        (sha256
         (base32
          "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833"))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
+    (supported-systems '("i686-linux" "x86_64-linux"))
     (arguments
-     `(#:system "i686-linux"))
+     `(#:system "i686-linux"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-CFLAGS
+           (lambda* _
+             ;; Remove GTK API deprecation flags that cause build errors
+             (substitute* "configure"
+               (("GTK_CFLAGS=\"\\$GTK_CFLAGS .*\"") ""))
+             #t)))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("nasm" ,nasm)))

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#37793] [PATCH] gnu: Add gens-gs.
  2019-10-17 14:42 [bug#37793] [PATCH] gnu: Add gens-gs Pierre Neidhardt
                   ` (2 preceding siblings ...)
  2019-10-19 13:36 ` [bug#37793] [PATCH] gnu: Add gens-gs David Wilson
@ 2019-10-21 16:25 ` Pierre Neidhardt
  3 siblings, 0 replies; 5+ messages in thread
From: Pierre Neidhardt @ 2019-10-21 16:25 UTC (permalink / raw)
  To: 37793; +Cc: Mathieu Othacehe, David Wilson

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

Merged, thank you David and Mathieu!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-21 16:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 14:42 [bug#37793] [PATCH] gnu: Add gens-gs Pierre Neidhardt
2019-10-17 15:38 ` Mathieu Othacehe
     [not found] ` <handler.37793.B.157132338326045.ack@debbugs.gnu.org>
2019-10-18  8:35   ` [bug#37793] Acknowledgement ([PATCH] gnu: Add gens-gs.) Pierre Neidhardt
2019-10-19 13:36 ` [bug#37793] [PATCH] gnu: Add gens-gs David Wilson
2019-10-21 16:25 ` Pierre Neidhardt

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).