gnu: rust-percent-encoding-2: Update to 2.2.0.
[jackhill/guix/guix.git] / gnu / packages / java-graphics.scm
CommitLineData
1fb76dce
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
3;;;
4;;; This file is part of GNU Guix.
5;;;
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.
10;;;
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.
15;;;
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/>.
18
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)
47ec0138
RW
27 #:use-module (gnu packages xorg)
28 #:use-module (ice-9 match))
1fb76dce
RW
29
30(define-public java-piccolo2d-core
31 (package
32 (name "java-piccolo2d-core")
33 (version "3.0.1")
34 (source (origin
35 (method git-fetch)
36 (uri (git-reference
37 (url "https://github.com/piccolo2d/piccolo2d.java")
38 (commit (string-append "piccolo2d-complete-" version))))
39 (file-name (git-file-name name version))
40 (sha256
41 (base32
42 "1k6gw643k83516lcw04mgac2yi75phdrng44pz9xk6hz066ip21s"))))
43 (build-system ant-build-system)
44 (arguments
45 `(#:jar-name "piccolo2d-core.jar"
46 #:phases
47 (modify-phases %standard-phases
48 (add-after 'unpack 'chdir
49 (lambda _ (chdir "core") #t)))))
50 (inputs
8394619b 51 (list java-junit))
1fb76dce
RW
52 (home-page "http://piccolo2d.org")
53 (synopsis "Structured 2D graphics framework")
54 (description "Piccolo2D is a framework (in the Jazz ZUI tradition) to
55create robust, full-featured graphical applications in Java, with features
56such as zooming and multiple representation. This package provides the core
57libraries.")
58 (license license:bsd-3)))
719d8d5b
RW
59
60(define-public java-piccolo2d-extras
61 (package (inherit java-piccolo2d-core)
62 (name "java-piccolo2d-extras")
63 (arguments
64 `(#:jar-name "piccolo2d-extras.jar"
65 #:phases
66 (modify-phases %standard-phases
67 (add-after 'unpack 'chdir
68 (lambda _ (chdir "extras") #t))
69 (add-after 'chdir 'remove-failing-test
70 (lambda _
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")
74 #t))
75 (add-before 'check 'start-xorg-server
76 (lambda* (#:key inputs #:allow-other-keys)
77 ;; The test suite requires a running X server.
07e98fb9 78 (system "Xvfb :1 -screen 0 640x480x24 &")
719d8d5b
RW
79 (setenv "DISPLAY" ":1")
80 #t)))))
81 (inputs
8394619b 82 (list java-piccolo2d-core java-junit))
719d8d5b 83 (native-inputs
8394619b 84 (list xorg-server)) ; for tests
719d8d5b
RW
85 (description "Piccolo2D is a framework (in the Jazz ZUI tradition) to
86create robust, full-featured graphical applications in Java, with features
87such as zooming and multiple representation. This package provides additional
88features not found in the core libraries.")))
47ec0138
RW
89
90(define-public java-marlin-renderer
91 (package
92 (name "java-marlin-renderer")
93 (version "0.9.4.2")
94 (source (origin
95 (method git-fetch)
96 (uri (git-reference
b0e7b699 97 (url "https://github.com/bourgesl/marlin-renderer")
47ec0138
RW
98 (commit (string-append "v" (string-map (match-lambda
99 (#\. #\_)
100 (c c))
101 version)))))
102 (file-name (git-file-name name version))
103 (sha256
104 (base32
105 "12vb8fmxf1smnyv6w8i1khahy76v6r29j1qwabbykxff8i9ndxqv"))))
106 (build-system ant-build-system)
107 (arguments
108 `(#:jar-name "marlin.jar"
109 #:test-include (list "src/test/java/RunJUnitTest.java")))
110 (inputs
8394619b 111 (list java-hamcrest-core java-junit))
47ec0138
RW
112 (home-page "https://github.com/bourgesl/marlin-renderer/")
113 (synopsis "Rendering engine")
114 (description "Marlin is a Java2D @code{RenderingEngine} optimized for
115performance (improved memory usage and footprint, better multi-threading) and
116better visual quality based on OpenJDK's @code{pisces} implementation. It
117handles shape rendering (@code{Graphics2D} @code{draw(Shape)} /
118@code{fill(Shape)} with stroke and dash attributes.")
119 ;; With Classpath Exception
120 (license license:gpl2)))