| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 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)
|
| 27 | #:use-module (gnu packages xorg)
|
| 28 | #:use-module (ice-9 match))
|
| 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 | (list 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
|
| 57 | libraries.")
|
| 58 | (license license:bsd-3)))
|
| 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 | |
| 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 | |
| 78 | (system "Xvfb :1 -screen 0 640x480x24 &")
|
| 79 | (setenv "DISPLAY" ":1")
|
| 80 | #t)))))
|
| 81 | (inputs
|
| 82 | (list java-piccolo2d-core java-junit))
|
| 83 | (native-inputs
|
| 84 | (list xorg-server)) |
| 85 | (description "Piccolo2D is a framework (in the Jazz ZUI tradition) to
|
| 86 | create robust, full-featured graphical applications in Java, with features
|
| 87 | such as zooming and multiple representation. This package provides additional
|
| 88 | features not found in the core libraries.")))
|
| 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
|
| 97 | (url "https://github.com/bourgesl/marlin-renderer")
|
| 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
|
| 111 | (list java-hamcrest-core java-junit))
|
| 112 | (home-page "https://github.com/bourgesl/marlin-renderer/")
|
| 113 | (synopsis "Rendering engine")
|
| 114 | (description "Marlin is a Java2D @code{RenderingEngine} optimized for
|
| 115 | performance (improved memory usage and footprint, better multi-threading) and
|
| 116 | better visual quality based on OpenJDK's @code{pisces} implementation. It
|
| 117 | handles shape rendering (@code{Graphics2D} @code{draw(Shape)} /
|
| 118 | @code{fill(Shape)} with stroke and dash attributes.")
|
| 119 | |
| 120 | (license license:gpl2)))
|