[PATCH 0/3] Add FNA (Mojo/CSharp libs)

  • Done
  • quality assurance status badge
Details
One participant
  • Pierre Neidhardt
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 15 Dec 2019 16:56
(address . guix-patches@gnu.org)
20191215155621.23849-1-mail@ambrevar.xyz
This adds 3 CSharp libraries, mostly gaming related stuff.

I'm not completely sure about the requirements for CSharp libraries (e.g. do
we need the .config file?).

I'm also not sure where to put the .dll files. I've put them in lib/ for now.


Pierre Neidhardt (3):
gnu: Add sdl2-cs.
gnu: Add mojoshader-cs.
gnu: Add fna.

gnu/packages/game-development.scm | 53 +++++++++++++++++++++++++++++++
gnu/packages/gl.scm | 37 +++++++++++++++++++++
gnu/packages/sdl.scm | 46 +++++++++++++++++++++++++++
3 files changed, 136 insertions(+)

--
2.23.0
P
P
Pierre Neidhardt wrote on 15 Dec 2019 17:01
[PATCH 2/3] gnu: Add mojoshader-cs.
(address . 38623@debbugs.gnu.org)
20191215160120.25948-2-mail@ambrevar.xyz
* gnu/packages/gl.scm (mojoshader-cs): New variable.
---
gnu/packages/gl.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 63e12efe06..dc6b003c5d 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -42,6 +42,7 @@
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages mono)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
@@ -889,3 +890,39 @@ the shaders at runtime.")
(description "This is the last version of the mojoshader library with
the glProgramViewportFlip before it was replaced with glProgramViewportInfo.")
(license license:zlib))))
+
+(define-public mojoshader-cs
+ (let ((commit "10d0dba21ff1cfe332eb7de328a2adce01286bd7"))
+ (package
+ (name "mojoshader-cs")
+ (version (git-version "20191205" "1" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FNA-XNA/MojoShader")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "11mdhf3fmb9rsn2iv753gmb596j4dh5j2iipgw078vg0lj23rml7"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ; No tests.
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke "make" "-C" "csharp")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "csharp/bin/MojoShader-CS.dll" (string-append out "/lib"))
+ #t))))))
+ (native-inputs
+ `(("mono" ,mono)))
+ (home-page "https://github.com/FNA-XNA/MojoShader")
+ (synopsis "C# wrapper for MojoShader")
+ (description
+ "This is an hg->git mirror of MojoShader, with MojoShader# added for FNA.")
+ (license license:zlib))))
--
2.23.0
P
P
Pierre Neidhardt wrote on 15 Dec 2019 17:01
[PATCH 1/3] gnu: Add sdl2-cs.
(address . 38623@debbugs.gnu.org)
20191215160120.25948-1-mail@ambrevar.xyz
* gnu/packages/sdl.scm (sdl2-cs): New variable.
---
gnu/packages/sdl.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (77 lines)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 3974cc75ab..f7a34003d1 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,6 +35,7 @@
#:use-module ((guix licenses) #:hide (freetype))
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
@@ -46,6 +48,7 @@
#:use-module (gnu packages ibus)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages mono)
#:use-module (gnu packages mp3)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
@@ -570,3 +573,46 @@ sound and device input (keyboards, joysticks, mice, etc.).")
The bindings are written in pure Scheme using Guile's foreign function
interface.")
(license lgpl3+)))
+
+(define-public sdl2-cs
+ (let ((commit "1a3556441e1394eb0b5d46aeb514b8d1090b93f8"))
+ (package
+ (name "sdl2-cs")
+ (version (git-version "B1" "1" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/flibitijibibo/SDL2-CS")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "007mzkqr9nmvfrvvhs2r6cm36lzgsww24kwshsz9c4fd97f9qk58"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ; No tests.
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (invoke "make" "release")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "bin/Release/SDL2-CS.dll" (string-append out "/lib"))
+ #t))))))
+ (native-inputs
+ `(("mono" ,mono)))
+ (inputs
+ `(("sdl2" ,sdl2)
+ ("sdl2-image" ,sdl2-image)
+ ("sdl2-mixer" ,sdl2-mixer)
+ ("sdl2-ttf" ,sdl2-ttf)))
+ (home-page "https://dthompson.us/projects/guile-sdl2.html")
+ (synopsis "C# wrapper for SDL2")
+ (description
+ "SDL2-CS provides C# bindings for the SDL2 C shared library.
+The C# wrapper was written to be used for FNA's platform support. However, this
+is written in a way that can be used for any general C# application.")
+ (license zlib))))
--
2.23.0
P
P
Pierre Neidhardt wrote on 3 Jan 2020 18:31
control message for bug #38623
(address . control@debbugs.gnu.org)
87zhf4a1ku.fsf@ambrevar.xyz
close 38623
quit
--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl4PeoEACgkQm9z0l6S7
zH8oagf/VP/jy6eZJQ10RIlGVgiK55NmTB/M8dAo1Mgbn3G1a7pMYNrqthv7MSd0
nmI881fpZ3whPTtMzSFRMMDUEtZHZ0f1EgwRJr80auMmABRHKKRDXWxsIcjxZaEf
BT1cG93URQgMr91WUSJSyNljfTzpnSMfeZwefP6BbVndN7G5zPa185IqI28XUXY8
qF34i5+0kuQoOMX1FDO87FeG6WduXWJBv8oKOuD1n9plAqHNL1xeLAIDszTR51Mx
iWKvYo8kH38P6sUMPvgkl5aKYnlkfktVLoVoA6e6RmwfGFniL/DWyaDA9AvP52Vo
qhRdfhf7fWMnZWCpWWNkYKlan3cfSA==
=FIJc
-----END PGP SIGNATURE-----

?