diff options
author | Marius Bakke <marius@gnu.org> | 2020-10-19 00:17:48 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-10-19 00:17:48 +0200 |
commit | 1a8f7a0f584e5dd6e8f1a379b92f689b71902295 (patch) | |
tree | 8586450fc3068b217e60a7e942fa4c7d89ad74e7 /gnu/packages/c.scm | |
parent | 19d42e0e23a7f90ac2dcc1c279bd23a967ff0314 (diff) | |
parent | 2a4f3c1711fdb947e615b5a89e285421b3bf0925 (diff) | |
download | guix-1a8f7a0f584e5dd6e8f1a379b92f689b71902295.tar.gz guix-1a8f7a0f584e5dd6e8f1a379b92f689b71902295.zip |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/c.scm')
-rw-r--r-- | gnu/packages/c.scm | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index c1ae98ddd3..493d99387c 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -40,6 +40,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages texinfo) #:use-module (gnu packages guile) + #:use-module (gnu packages lua) #:use-module (gnu packages multiprecision) #:use-module (gnu packages pcre) #:use-module (gnu packages python) @@ -257,6 +258,64 @@ string formatting and autoresizing, option and config file parsing, type checking casts and more.") (license license:lgpl2.1+))) +(define-public libwuya + ;; This commit is the one before "wuy_pool.h" was removed from libwuya, + ;; which libleak currently requires. + (let ((revision "1") + (commit "883502041044f4616cfbf75c8f2bb60059f704a9")) + (package + (name "libwuya") + (version (git-version "0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/WuBingzheng/libwuya") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1xrsqbgr13g2v0ag165ryp7xrwzv41xfygzk2a3445ca98c1qpdc")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no test suite + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-lua-includes + (lambda _ + (substitute* '("wuy_cflua.h" "wuy_cflua.c") + (("<lua5\\.1/") "<")) + #t)) + (add-after 'unpack 'add--fPIC-to-CFLAGS + (lambda _ + (substitute* "Makefile" + (("CFLAGS[^\n]*" all) + (string-append all " -fPIC"))) + #t)) + (add-before 'build 'set-CC + (lambda _ + (setenv "CC" "gcc") + #t)) + (delete 'configure) ;no configure script + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (include-dir (string-append out "/include")) + (headers (find-files "." "\\.h$"))) + (for-each (lambda (h) + (install-file h include-dir)) + headers) + (install-file "libwuya.a" (string-append out "/lib")) + #t)))))) + (inputs `(("lua" ,lua))) + (home-page "https://github.com/WuBingzheng/libwuya/") + (synopsis "C library implementing various data structures") + (description "The @code{libwuya} library implements data structures such +as dictionaries, skip lists, and memory pools.") + ;; There is no clear information as to what license this is distributed + ;; under, but it is included (bundled) with libleak from the same author + ;; under the GNU GPL v2 or later license, so use this here until it is + ;; clarified (see: https://github.com/WuBingzheng/libwuya/issues/2). + (license license:gpl2+)))) + (define-public packcc (package (name "packcc") |