[PATCH] gnu: Add gens-gs.

  • Done
  • quality assurance status badge
Details
3 participants
  • David Wilson
  • Mathieu Othacehe
  • Pierre Neidhardt
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 17 Oct 2019 16:42
(address . guix-patches@gnu.org)
20191017144238.23959-1-mail@ambrevar.xyz
* gnu/packages/emulators.scm (gens-gs): New variable.
---
gnu/packages/emulators.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (44 lines)
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
M
M
Mathieu Othacehe wrote on 17 Oct 2019 17:38
(address . guix-patches@gnu.org)(address . 37793@debbugs.gnu.org)
871rvbgz5o.fsf@gmail.com
Hey Pierre,

Toggle quote (3 lines)
> + (arguments
> + `(#:system "i686-linux"))

Maybe you should add:

Toggle snippet (3 lines)
(supported-systems '("i686-linux" "x86_64-linux"))

then?

Mathieu
P
P
Pierre Neidhardt wrote on 18 Oct 2019 10:35
Re: bug#37793: Acknowledgement ([PATCH] gnu: Add gens-gs.)
(address . 37793@debbugs.gnu.org)
87r23alacz.fsf@ambrevar.xyz
This package currently fails to build with the following error:

Toggle snippet (5 lines)
ui/gtk/gens/gens_window_callbacks.cpp:157:15: error: ‘GdkDragContext {aka struct _GdkDragContext}’ has no member named ‘targets’
if (context->targets)
^~~~~~~


--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2peUwACgkQm9z0l6S7
zH+jQQf/bXY+Hl4ynVZKGgWZKX7fhjpN6qxWJY5WDQ9DQA9E5iTP8qo56Mo3rpZK
i1wtVoL4xLKMte5i6fl41c/+h2uUTcJAQQEJMxxxpRTOuXxsV2an24MeeoSt67Sl
bzUSQ8vbGDkObmXd/yfWBB4DTffiA7IyCJR47F6i8ixx2BSxQGBxKsNj+RGtgy+a
J0r6dSyFcEEyiaUjHLflA01joszaWQlV8QKvFBl1VIX0kM6PhEk2Ss0KzX/hLhC5
AUUnQ4JQmVgbLfz2V4M2GtxCMF80UBo+qVaa6Iroyi4LDuvTwUcCdYdRBUFg1Ph5
96AMZr22DY8oN2E4Z8kWtywrpurcyA==
=32nC
-----END PGP SIGNATURE-----

D
D
David Wilson wrote on 19 Oct 2019 15:36
[PATCH] gnu: Add gens-gs.
(address . 37793@debbugs.gnu.org)
e701b7b6-9c17-466b-b7d0-606c7837e968@www.fastmail.com
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:


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
Toggle diff (33 lines)
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)))
P
P
Pierre Neidhardt wrote on 21 Oct 2019 18:13
control message for bug #37793
(address . control@debbugs.gnu.org)
877e4y9iwj.fsf@ambrevar.xyz
close 37793
quit
P
P
Pierre Neidhardt wrote on 21 Oct 2019 18:25
Re: [bug#37793] [PATCH] gnu: Add gens-gs.
(address . 37793@debbugs.gnu.org)
8736fm9icc.fsf@ambrevar.xyz
Merged, thank you David and Mathieu!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2t2+MACgkQm9z0l6S7
zH/Bkgf+Mn2sMn+AG9dBMUTf60hvijTcsXw7UO9gR9tHUfXakCayusPqiqCR98er
qItkRWiQ6X4jitlrvt37Mxuc6Kpj2lc9C+Ppt73M8d0hBEswrielOWlW7EF3/uwR
6vQ4u/TUlJL1fqrlneduKSQDdmun3MqNE7KrycmDBm1P3umEPrT9RcgOF3iyq1WU
rHn6es/IyCw6ZyaJiWOOL6/RyLCPT2IF4vpVza/RoWPYHXwCyL4k73uOWXGiF+ex
uQUPkimnGCZoSxLeR/8fmrWmVMLbrU2QLCfmJJxzRFGR0M/i9VNkn7qhuuctO+OT
1UK9wqoEXZe2PGEqTGlBEqvR3yUM2g==
=z/+U
-----END PGP SIGNATURE-----

?