summaryrefslogtreecommitdiff
path: root/gnu/packages/mono.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/mono.scm')
-rw-r--r--gnu/packages/mono.scm81
1 files changed, 63 insertions, 18 deletions
diff --git a/gnu/packages/mono.scm b/gnu/packages/mono.scm
index 5447dd2300..e663140d5c 100644
--- a/gnu/packages/mono.scm
+++ b/gnu/packages/mono.scm
@@ -19,6 +19,9 @@
(define-module (gnu packages mono)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
@@ -29,6 +32,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages xml)
+ #:use-module (gnu packages xorg)
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (guix download)
@@ -38,32 +42,60 @@
(define-public mono
(package
(name "mono")
- (version "4.4.1.0")
+ (version "6.8.0.105")
(source (origin
(method url-fetch)
(uri (string-append
- "http://download.mono-project.com/sources/mono/"
- name "-" version
- ".tar.bz2"))
+ "https://download.mono-project.com/sources/mono/"
+ name "-" version ".tar.xz"))
(sha256
(base32
- "0jibyvyv2jy8dq5ij0j00iq3v74r0y90dcjc3dkspcfbnn37cphn"))
- (patches (search-patches "mono-mdoc-timestamping.patch"))))
+ "0y11c7w6r96laqckfxnk1ya42hx2c1nfqvdgbpmsk1iw9k29k1sp"))
+ (patches (search-patches "mono-pkgconfig-before-gac.patch"
+ ;; TODO: Update this patch.
+ ;; "mono-mdoc-timestamping.patch"
+ ))))
(build-system gnu-build-system)
(native-inputs
`(("gettext" ,gettext-minimal)
("glib" ,glib)
("libxslt" ,libxslt)
("perl" ,perl)
- ("python" ,python-2)))
+ ("python" ,python-2)
+ ("cmake" ,cmake)
+ ("which" ,which)
+ ("libgdiplus" ,libgdiplus)
+ ("libx11" ,libx11)
+ ;; TODO: Test if these 2 are necessary.
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-reproducible
(lambda _
(substitute* "mono/mini/Makefile.in"
- (("build_date = [^;]*;")
- "build_date = (void*) 0;"))
+ (("build_date = [^;]*;")
+ "build_date = (void*) 0;"))
+ #t))
+ (add-after 'unpack 'fix-tests
+ (lambda _
+ (substitute* "mono/eglib/test/path.c"
+ (("const gchar \\*newdir = \"/bin\";")
+ (string-append "const gchar *newdir = \"/tmp\";")))
+ #t))
+ ;; TODO: Update Mono certs. We need a certificate bundle, which nss-certs does not have.
+ ;; (add-after 'install 'update-mono-key-store
+ ;; (lambda* (#:key outputs inputs #:allow-other-keys)
+ ;; (let* ((out (assoc-ref outputs "out"))
+ ;; (ca (assoc-ref inputs "nss-certs"))
+ ;; (cert-sync (string-append out "/bin/cert-sync"))))
+ ;; (invoke cert-sync (string-append ca "/etc/ssl/certs/ca-bundle.crt")
+ (add-after 'install 'install-gmcs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (symlink (string-append out "/bin/mcs")
+ (string-append out "/bin/gmcs")))
#t))
(add-after 'unpack 'set-env
(lambda _ ;;* (#:key inputs #:allow-other-keys)
@@ -72,13 +104,15 @@
;; ZIP files have "DOS time" which starts in Jan 1980.
(setenv "SOURCE_DATE_EPOCH" "315532800")
#t))
- (add-after 'unpack 'fix-includes
- (lambda _
- ;; makedev is in <sys/sysmacros.h> now. Include it.
- (substitute* "mono/io-layer/processes.c"
- (("#ifdef HAVE_SYS_MKDEV_H") "#if 1")
- (("sys/mkdev.h") "sys/sysmacros.h"))
- #t))
+ ;; TODO: This fix seems obsolete in Mono 6.
+ ;; (add-after 'unpack 'fix-includes
+ ;; (lambda _
+ ;; ;; makedev is in <sys/sysmacros.h> now. Include it.
+ ;; (substitute* "mono/io-layer/processes.c"
+ ;; (("#ifdef HAVE_SYS_MKDEV_H") "#if 1")
+ ;; (("sys/mkdev.h") "sys/sysmacros.h"))
+ ;; #t))
+ ;; TODO: Those patches don't seem to be useful anymore.
(add-after 'unpack 'patch-tests
(lambda _ ;;* (#:key inputs #:allow-other-keys)
(substitute* "mono/tests/Makefile.in"
@@ -116,19 +150,30 @@
"NO_TEST:=true\n"
all
"\nrun-test-lib:\n\t@echo skipping test\n"))))))
- ;; these 4 tests fail
+ ;; TODO: Do these 4 tests still fail?
#:make-flags `(,(string-append "PLATFORM_DISABLED_TESTS="
" appdomain-unload.exe"
" delegate2.exe"
" finally_guard.exe"
" remoting4.exe"))
- ;; running tests in parallel fails
+ #:configure-flags (list
+ (string-append "--x-includes="
+ (assoc-ref %build-inputs "libx11")
+ "/include")
+ (string-append "--x-libraries="
+ (assoc-ref %build-inputs "libx11")
+ "/lib")
+ (string-append "--with-libgdiplus="
+ (assoc-ref %build-inputs "libgdiplus")
+ "/lib/libgdiplus.so"))
+ ;; TODO: Does running tests in parallel fail?
#:parallel-tests? #f))
(synopsis "Compiler and libraries for the C# programming language")
(description "Mono is a compiler, vm, debugger and set of libraries for
C#, a C-style programming language from Microsoft that is very similar to
Java.")
(home-page "https://www.mono-project.com/")
+ ;; TODO: Still x11?
(license license:x11)))
(define-public libgdiplus