diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index c57d90f5ac..feb9868d5f 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -59,6 +59,7 @@ #:use-module (gnu packages imagemagick) #:use-module (gnu packages jemalloc) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages networking) #:use-module (gnu packages pdf) #:use-module (gnu packages perl) #:use-module (gnu packages photo) @@ -1067,6 +1068,63 @@ performance subdivision surface (subdiv) evaluation on massively parallel CPU and GPU architectures.") (license license:asl2.0))) +(define-public gr + (package + (name "gr") + (version "0.41.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url (string-append + "https://github.com/jheinen/" name)) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1r3f0vqw85i9g3awzfh20zzjcc71h8r7nld2qv4rmqf3gigck2kr")) + (modules '((guix build utils))))) + (build-system gnu-build-system) + (arguments + '(#:parallel-build? #f ; fails when parallel + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (delete 'validate-runpath) + (add-before 'build 'fix-zeromq + (lambda _ + ;; remove prerequisites from targets (we already have zmq) + (substitute* "lib/gks/Makefile" + (("targets: prerequisites libGKS.a") "targets: libGKS.a")) + #t)) + (add-before 'build 'fix-gks-install + (lambda _ + ;; fonts and header has already been copied, override is needed + (substitute* "lib/gks/Makefile" + (("cp -a fonts") "cp -af fonts")) + (substitute* "lib/gks/Makefile" + (("cp -p gks.h") "cp -pf gks.h")) + #t))) + #:make-flags + (list "CC=gcc" + (string-append "GRDIR=" (assoc-ref %outputs "out"))))) + (inputs + `(("qt" ,qtbase) + ("zmq" ,zeromq) + ("czmq" ,czmq) + ("cairo" ,cairo) + ("glfw" ,glfw) + ("libtiff" ,libtiff) + ("x11" ,libx11) + ("xt" ,libxt))) + (home-page "https://gr-framework.org") + (synopsis "Universal framework for cross-platform visualization +applications") + (description "Offers developers a compact, portable and consistent +graphics library for their programs. Applications range from publication +quality 2D graphs to the representation of complex 3D scenes.") + (license license:expat))) + (define-public opencsg (let ((dot-to-dash (lambda (c) (if (char=? c #\.) #\- c)))) (package