guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38623] [PATCH 1/3] gnu: Add sdl2-cs.


From: Pierre Neidhardt
Subject: [bug#38623] [PATCH 1/3] gnu: Add sdl2-cs.
Date: Sun, 15 Dec 2019 17:01:18 +0100

* 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 <address@hidden>
 ;;; Copyright © 2019 Nicolas Goaziou <address@hidden>
 ;;; Copyright © 2019 Marius Bakke <address@hidden>
+;;; Copyright © 2019 Pierre Neidhardt <address@hidden>
 ;;;
 ;;; 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]