GNU bug report logs -
#63088
[PATCH 0/3] Add Lc0
Previous Next
Reported by: zamfofex <zamfofex <at> twdb.moe>
Date: Wed, 26 Apr 2023 13:15:01 UTC
Severity: normal
Tags: patch
Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
---
gnu/packages/c.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index b2f16613dd..28438f56c8 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
;;; Copyright © 2022 Ekaitz Zarraga <ekaitz <at> elenq.tech>
;;; Copyright © 2022 ( <paren <at> disroot.org>
+;;; Copyright © 2023 zamfofex <zamfofex <at> twdb.moe>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,7 +58,9 @@ (define-module (gnu packages c)
#:use-module (gnu packages guile)
#:use-module (gnu packages llvm)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages m4)
#:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages ncurses)
#:use-module (gnu packages pcre)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
@@ -1375,3 +1378,63 @@ (define-public utest-h
(description
"This package provides a header-only unit testing library for C/C++.")
(license license:unlicense))))
+
+(define-public ispc
+ (package
+ (name "ispc")
+ (version "1.19.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ispc/ispc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0yhcgyzjlrgs920lm0l6kygj2skanfb6qkxbdgm69r8c2xkzkaa3"))))
+ (inputs (list ncurses))
+ (native-inputs (list bison clang flex m4 python))
+ (build-system cmake-build-system)
+ (supported-systems '("x86_64-linux" "i686-linux" "aarch64-linux" "armhf-linux"))
+ (arguments `(#:tests? #f
+ #:configure-flags
+ `(,,(string-append "-DCMAKE_C_COMPILER=" (cc-for-target))
+ ,,(string-append "-DCMAKE_CXX_COMPILER=" (cxx-for-target))
+ ,(string-append "-DCLANG_EXECUTABLE="
+ (assoc-ref %build-inputs "clang")
+ "/bin/clang")
+ ,(string-append "-DCLANGPP_EXECUTABLE="
+ (assoc-ref %build-inputs "clang")
+ "/bin/clang++"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-curses-requirement
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("\\bCURSES_CURSES_LIBRARY\\b")
+ "CURSES_LIBRARY"))))
+ ; Note: This works around the following issue:
+ ; <https://github.com/ispc/ispc/issues/1865>
+ ; Because GCC in Guix does not have multilib support.
+ (add-before 'configure 'patch-target-archs
+ (lambda _
+ (substitute* "cmake/GenerateBuiltins.cmake"
+ (("\\bforeach \\(bit 32 64\\)")
+ ,(if (target-64bit?)
+ "foreach (bit 64)"
+ "foreach (bit 32)"))
+ (("\\bforeach \\(arch .*?\\)")
+ ,(if (target-x86?)
+ "foreach (arch \"x86\")"
+ "foreach (arch \"arm\")"))
+ (("\\bforeach \\(os_name \"windows\" .*?\\)")
+ "foreach (os_name \"linux\")")))))))
+ (synopsis "Implicit SPMD Program Compiler")
+ (description
+ "ISPC is a compiler for a variant of the C programming language, with
+extensions for single program, multiple data programming. Under the SPMD
+model, the programmer writes a program that generally appears to be a regular
+serial program, though the execution model is actually that a number of program
+instances execute in parallel on the hardware.")
+ (home-page "https://github.com/ispc/ispc")
+ (license license:bsd-3)))
--
2.39.2
This bug report was last modified 85 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.