diff mbox series

[bug#38546,v4] Update Julia 1.3.1: almost done

Message ID CAJ3okZ1SaicNCyXmreOWsByyirkuPD3JSvmAR_Vza=OiKTeRmw@mail.gmail.com
State Accepted
Headers show
Series [bug#38546,v4] Update Julia 1.3.1: almost done | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Simon Tournier Feb. 11, 2020, 5:58 p.m. UTC
Hi,

Please find attach the almost updated julia using 2 patches. The first
add a dependency and the second update and patch.

I hope that I do not screw up the indentation; sometimes my Emacs does
weird stuff. Anyway.

If it is fine with you, please ping Ludo or any committer. :-)


Cheers,
simon

Comments

Simon Tournier Feb. 24, 2020, 12:50 p.m. UTC | #1
Hi,

Friendly ping. :-)


On Tue, 11 Feb 2020 at 18:58, zimoun <zimon.toutoune@gmail.com> wrote:
>
> Hi,
>
> Please find attach the almost updated julia using 2 patches. The first
> add a dependency and the second update and patch.
>
> I hope that I do not screw up the indentation; sometimes my Emacs does
> weird stuff. Anyway.
>
> If it is fine with you, please ping Ludo or any committer. :-)
>
>
> Cheers,
> simon
diff mbox series

Patch

From c9fb979b67f15ff9f4744af21d1e91017037af17 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Sat, 28 Dec 2019 00:10:48 +0100
Subject: [PATCH v4 1/2] gnu: Add dsfmt.

* gnu/packages/maths.scm (dsfmt): New variable.
---
 gnu/packages/maths.scm | 65 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 8f4478b6bb..1f80cb3f3a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -33,6 +33,7 @@ 
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
 ;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net>
+;;; Copyright © 2019 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -372,6 +373,70 @@  semiconductors.")
     (license license:gpl3+)
     (home-page "https://www.gnu.org/software/dionysus/")))
 
+(define-public dsfmt
+  (package
+    (name "dsfmt")
+    (version "2.2.3")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42"))
+              ;; julia needs those (and is the only program depending on dsfmt now)
+              (patches
+               (list
+                (origin (method url-fetch)
+                        (uri
+                         "https://raw.githubusercontent.com/JuliaLang/julia/v1.3.0/deps/patches/dSFMT.c.patch")
+                        (sha256 (base32 "09mhv11bms8jsmkmdqvlcgljwhzw3b6n9nncpi2b6dla9798hw2y"))
+                        (file-name "dSFMT.c.patch"))
+                (origin (method url-fetch)
+                        (uri
+                         "https://raw.githubusercontent.com/JuliaLang/julia/v1.3.0/deps/patches/dSFMT.h.patch")
+                        (sha256 (base32 "1py5rd0yxic335lzka23f6x2dhncrpizpyrk57gi2f28c0p98y5n"))
+                        (file-name "dSFMT.h.patch"))))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ;no configure script
+         (replace 'build
+           ;; upstream Makefile does not build a shared library
+           (lambda _
+             (invoke
+              "gcc"
+              ;; flags copied from julia
+              ;; https://github.com/JuliaLang/julia/blob/v1.3.0/deps/dsfmt.mk
+              "-DNDEBUG" "-DDSFMT_MEXP=19937"
+              "-fPIC" "-DDSFMT_DO_NOT_USE_OLD_NAMES"
+              "-O3" "-finline-functions" "-fomit-frame-pointer"
+              "-fno-strict-aliasing" "--param" "max-inline-insns-single=1800"
+              "-Wmissing-prototypes" "-Wall" "-std=c99" "-shared" "dSFMT.c"
+              "-o" "libdSFMT.so")))
+         (replace 'install              ;no "install" target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((lib (string-append (assoc-ref outputs "out")
+                                       "/lib"))
+                   (inc (string-append (assoc-ref outputs "out")
+                                       "/include")))
+               (install-file "libdSFMT.so" lib)
+               (install-file "dSFMT.h" inc)
+               #t))))))
+    (synopsis "Double precision SIMD-oriented Fast Mersenne Twister")
+    (description
+     "The dSMFT package speeds up Fast Mersenne Twister generation by avoiding
+the expensive conversion of integer to double (floating point).  dSFMT directly
+generates double precision floating point pseudorandom numbers which have the
+IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985)
+format.  dSFMT is only available on the CPUs which use IEEE 754 format double
+precision floating point numbers.")
+    (home-page "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/")
+    (license license:bsd-3)))
+
 (define-public gsl
   (package
     (name "gsl")
-- 
2.23.0