1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages java-graphics)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix git-download)
23 #:use-module (guix utils)
24 #:use-module (guix build-system ant)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages java)
27 #:use-module (gnu packages xorg)
28 #:use-module (ice-9 match))
30 (define-public java-piccolo2d-core
32 (name "java-piccolo2d-core")
37 (url "https://github.com/piccolo2d/piccolo2d.java")
38 (commit (string-append "piccolo2d-complete-" version))))
39 (file-name (git-file-name name version))
42 "1k6gw643k83516lcw04mgac2yi75phdrng44pz9xk6hz066ip21s"))))
43 (build-system ant-build-system)
45 `(#:jar-name "piccolo2d-core.jar"
47 (modify-phases %standard-phases
48 (add-after 'unpack 'chdir
49 (lambda _ (chdir "core") #t)))))
51 `(("java-junit" ,java-junit)))
52 (home-page "http://piccolo2d.org")
53 (synopsis "Structured 2D graphics framework")
54 (description "Piccolo2D is a framework (in the Jazz ZUI tradition) to
55 create robust, full-featured graphical applications in Java, with features
56 such as zooming and multiple representation. This package provides the core
58 (license license:bsd-3)))
60 (define-public java-piccolo2d-extras
61 (package (inherit java-piccolo2d-core)
62 (name "java-piccolo2d-extras")
64 `(#:jar-name "piccolo2d-extras.jar"
66 (modify-phases %standard-phases
67 (add-after 'unpack 'chdir
68 (lambda _ (chdir "extras") #t))
69 (add-after 'chdir 'remove-failing-test
71 ;; TODO: These both fail with "Unable to convolve src image"
72 (delete-file "src/test/java/org/piccolo2d/extras/nodes/PShadowTest.java")
73 (delete-file "src/test/java/org/piccolo2d/extras/util/ShadowUtilsTest.java")
75 (add-before 'check 'start-xorg-server
76 (lambda* (#:key inputs #:allow-other-keys)
77 ;; The test suite requires a running X server.
78 (system (string-append (assoc-ref inputs "xorg-server")
79 "/bin/Xvfb :1 -screen 0 640x480x24 &"))
80 (setenv "DISPLAY" ":1")
83 `(("java-piccolo2d-core" ,java-piccolo2d-core)
84 ("java-junit" ,java-junit)))
86 `(("xorg-server" ,xorg-server))) ; for tests
87 (description "Piccolo2D is a framework (in the Jazz ZUI tradition) to
88 create robust, full-featured graphical applications in Java, with features
89 such as zooming and multiple representation. This package provides additional
90 features not found in the core libraries.")))
92 (define-public java-marlin-renderer
94 (name "java-marlin-renderer")
99 (url "https://github.com/bourgesl/marlin-renderer")
100 (commit (string-append "v" (string-map (match-lambda
104 (file-name (git-file-name name version))
107 "12vb8fmxf1smnyv6w8i1khahy76v6r29j1qwabbykxff8i9ndxqv"))))
108 (build-system ant-build-system)
110 `(#:jar-name "marlin.jar"
111 #:test-include (list "src/test/java/RunJUnitTest.java")))
113 `(("java-hamcrest-core" ,java-hamcrest-core)
114 ("java-junit" ,java-junit)))
115 (home-page "https://github.com/bourgesl/marlin-renderer/")
116 (synopsis "Rendering engine")
117 (description "Marlin is a Java2D @code{RenderingEngine} optimized for
118 performance (improved memory usage and footprint, better multi-threading) and
119 better visual quality based on OpenJDK's @code{pisces} implementation. It
120 handles shape rendering (@code{Graphics2D} @code{draw(Shape)} /
121 @code{fill(Shape)} with stroke and dash attributes.")
122 ;; With Classpath Exception
123 (license license:gpl2)))