unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38623] [PATCH 0/3] Add FNA (Mojo/CSharp libs)
@ 2019-12-15 15:56 Pierre Neidhardt
  2019-12-15 16:01 ` [bug#38623] [PATCH 1/3] gnu: Add sdl2-cs Pierre Neidhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Neidhardt @ 2019-12-15 15:56 UTC (permalink / raw)
  To: 38623

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

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

* [bug#38623] [PATCH 1/3] gnu: Add sdl2-cs.
  2019-12-15 15:56 [bug#38623] [PATCH 0/3] Add FNA (Mojo/CSharp libs) Pierre Neidhardt
@ 2019-12-15 16:01 ` Pierre Neidhardt
  2019-12-15 16:01   ` [bug#38623] [PATCH 2/3] gnu: Add mojoshader-cs Pierre Neidhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Neidhardt @ 2019-12-15 16:01 UTC (permalink / raw)
  To: 38623

* gnu/packages/sdl.scm (sdl2-cs): New variable.
---
 gnu/packages/sdl.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

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

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

* [bug#38623] [PATCH 2/3] gnu: Add mojoshader-cs.
  2019-12-15 16:01 ` [bug#38623] [PATCH 1/3] gnu: Add sdl2-cs Pierre Neidhardt
@ 2019-12-15 16:01   ` Pierre Neidhardt
  0 siblings, 0 replies; 3+ messages in thread
From: Pierre Neidhardt @ 2019-12-15 16:01 UTC (permalink / raw)
  To: 38623

* gnu/packages/gl.scm (mojoshader-cs): New variable.
---
 gnu/packages/gl.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

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

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

end of thread, other threads:[~2019-12-15 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-15 15:56 [bug#38623] [PATCH 0/3] Add FNA (Mojo/CSharp libs) Pierre Neidhardt
2019-12-15 16:01 ` [bug#38623] [PATCH 1/3] gnu: Add sdl2-cs Pierre Neidhardt
2019-12-15 16:01   ` [bug#38623] [PATCH 2/3] gnu: Add mojoshader-cs 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).