gnu: cvs-fast-export: Update to 1.56.
[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
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
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.
78 (system (string-append (assoc-ref inputs "xorg-server")
79 "/bin/Xvfb :1 -screen 0 640x480x24 &"))
80 (setenv "DISPLAY" ":1")
81 #t)))))
82 (inputs
83 `(("java-piccolo2d-core" ,java-piccolo2d-core)
84 ("java-junit" ,java-junit)))
85 (native-inputs
86 `(("xorg-server" ,xorg-server))) ; for tests
87 (description "Piccolo2D is a framework (in the Jazz ZUI tradition) to
88create robust, full-featured graphical applications in Java, with features
89such as zooming and multiple representation. This package provides additional
90features not found in the core libraries.")))
47ec0138
RW
91
92(define-public java-marlin-renderer
93 (package
94 (name "java-marlin-renderer")
95 (version "0.9.4.2")
96 (source (origin
97 (method git-fetch)
98 (uri (git-reference
b0e7b699 99 (url "https://github.com/bourgesl/marlin-renderer")
47ec0138
RW
100 (commit (string-append "v" (string-map (match-lambda
101 (#\. #\_)
102 (c c))
103 version)))))
104 (file-name (git-file-name name version))
105 (sha256
106 (base32
107 "12vb8fmxf1smnyv6w8i1khahy76v6r29j1qwabbykxff8i9ndxqv"))))
108 (build-system ant-build-system)
109 (arguments
110 `(#:jar-name "marlin.jar"
111 #:test-include (list "src/test/java/RunJUnitTest.java")))
112 (inputs
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
118performance (improved memory usage and footprint, better multi-threading) and
119better visual quality based on OpenJDK's @code{pisces} implementation. It
120handles shape rendering (@code{Graphics2D} @code{draw(Shape)} /
121@code{fill(Shape)} with stroke and dash attributes.")
122 ;; With Classpath Exception
123 (license license:gpl2)))