summary refs log tree commit diff
path: root/gnu/packages/parallel.scm
diff options
context:
space:
mode:
authorAntero Mejr <antero@mailbox.org>2023-04-07 01:06:20 +0000
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-04-21 10:50:55 +0200
commit2662f074a0d939cd08737b17a8ef0a671c028dec (patch)
treef837d41479320600dd3bf5a8f778e0059b6a18b5 /gnu/packages/parallel.scm
parent9d7ba42dbf376ff8e971103bd92b8db1b0116e9c (diff)
downloadguix-2662f074a0d939cd08737b17a8ef0a671c028dec.tar.gz
gnu: Add clog.
* gnu/packages/parallel.scm (clog): New variable.
* gnu/packages/patches/clog-fix-shared-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/parallel.scm')
-rw-r--r--gnu/packages/parallel.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 60bf8409ee..bc3edf9122 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -500,6 +500,35 @@ obtain information about the CPU being used: supported instruction set,
 processor name, cache information, and topology information.")
       (license license:bsd-2))))
 
+(define-public clog
+  (package
+    (inherit cpuinfo) ;distributed with cpuinfo but not built by it
+    (name "clog")
+    (source (origin
+              (inherit (package-source cpuinfo))
+              (patches (search-patches "clog-fix-shared-build.patch"))))
+    (arguments
+     (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON")
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'chdir
+                          (lambda _
+                            (chdir "deps/clog"))))))
+    (native-inputs (list googletest))
+    (inputs '())
+    (synopsis "C-style logging library based on printf")
+    (description
+     "This package provides a C-style library for logging errors,
+warnings, information notes, and debug information.  Its features are:
+@itemize
+@item printf-style interface for formatting variadic parameters.
+@item Separate functions for logging errors, warnings, information notes, and
+debug information.
+@item Independent logging settings for different modules.
+@item Logging to logcat on Android and stderr/stdout on other platforms.
+@item Compatible with C99 and C++.
+@item Covered with unit tests.
+@end itemize")))
+
 (define-public psimd
   ;; There is currently no tag in this repo.
   (let ((commit "072586a71b55b7f8c584153d223e95687148a900")