diff mbox series

[bug#56729,RFC,v2,20/29] gnu: Add tachyon.

Message ID b895c20277e3d07aa9f38e6179f69af5843054f6.1659973115.git.guix@ikherbers.com
State New
Headers show
Series Add sagemath. | expand

Checks

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

Commit Message

vicvbcun Aug. 8, 2022, 3:45 p.m. UTC
* gnu/packages/sagemath.scm (tachyon): New variable.
* gnu/packages/patches/tachyon-make-arch.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add here.
---
 gnu/local.mk                                 |  1 +
 gnu/packages/patches/tachyon-make-arch.patch | 13 ++++++
 gnu/packages/sagemath.scm                    | 48 ++++++++++++++++++++
 3 files changed, 62 insertions(+)
 create mode 100644 gnu/packages/patches/tachyon-make-arch.patch
diff mbox series

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3877d1aeb3..aa38f66066 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1832,6 +1832,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/t1lib-CVE-2011-0764.patch		\
   %D%/packages/patches/t1lib-CVE-2011-1552+.patch		\
   %D%/packages/patches/t4k-common-libpng16.patch		\
+  %D%/packages/patches/tachyon-make-arch.patch			\
   %D%/packages/patches/tao-add-missing-headers.patch		\
   %D%/packages/patches/tao-fix-parser-types.patch		\
   %D%/packages/patches/tar-remove-wholesparse-check.patch	\
diff --git a/gnu/packages/patches/tachyon-make-arch.patch b/gnu/packages/patches/tachyon-make-arch.patch
new file mode 100644
index 0000000000..4e721092a7
--- /dev/null
+++ b/gnu/packages/patches/tachyon-make-arch.patch
@@ -0,0 +1,13 @@ 
+--- a/unix/Make-arch	2022-08-07 22:05:30.738754355 +0200
++++ b/unix/Make-arch	2022-08-07 22:31:59.969229824 +0200
+@@ -1453,9 +1453,6 @@
+ # Linux x86 using gcc, with threads
+ linux-thr:
+ 	$(MAKE) all \
+-	"ARCH = linux-thr" \
+-	"CC = cc" \
+ 	"CFLAGS = -Wall -O3 -fomit-frame-pointer -ffast-math -DLinux $(THREADSFLAGS) -D_REENTRANT $(MISCFLAGS)" \
+-	"AR = ar" \
+ 	"ARFLAGS = r" \
+ 	"STRIP = strip" \
+ 	"RANLIB = ranlib" \
\ No newline at end of file
diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm
index b59c93f13a..4ffc3fb9ba 100644
--- a/gnu/packages/sagemath.scm
+++ b/gnu/packages/sagemath.scm
@@ -547,3 +547,51 @@  (define-public flintqs
 factorization")
     (description synopsis)
     (license license:gpl2)))
+
+(define-public tachyon
+  (package
+    (name "tachyon")
+    (version "0.99.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://jedi.ks.uiuc.edu/~johns/raytracer/files/" version
+                    "/tachyon-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1xd6h5d4v6dsnm6w46bdcr15fwkcz44p8dncymfry50i4c83q809"))
+              (patches (search-patches "tachyon-make-arch.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f ; no tests
+           #:make-flags #~(list "linux-thr"
+                                (string-append "CC=" #$(cc-for-target))
+                                (string-append "AR=" #$(ar-for-target)))
+           #:phases #~(modify-phases %standard-phases
+                        (delete 'configure)
+                        (add-after 'unpack 'cd-to-src
+                          (lambda _
+                            (chdir "unix")))
+                        (add-before 'build 'enable-png-jpeg-support
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* "Make-config"
+                              (("USEJPEG=") "USEJPEG = -DUSEJPEG")
+                              (("JPEGLIB=") "JPEGLIB = -ljpeg")
+                              (("USEPNG=") "USEPNG = -DUSEPNG")
+                              (("PNGLIB=") "PNGLIB = -lpng -lz"))))
+                        (add-before 'build 'fix-paths
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* "Make-config"
+                              (("SHELL=/bin/sh")
+                               (string-append "SHELL=" (search-input-file inputs "/bin/sh"))))))
+                        (replace 'install
+                          (lambda _
+                            (install-file "../compile/tachyon"
+                                          (string-append #$output "/bin"))
+                            (install-file "../compile/libtachyon.a"
+                                          (string-append #$output "/lib")))))))
+    (inputs (list libjpeg-turbo libpng))
+    (home-page "http://jedi.ks.uiuc.edu/~johns/raytracer/")
+    (synopsis "Multithreaded ray tracing software")
+    (description synopsis)
+    (license license:bsd-3)))