diff options
| author | Danny Milosavljevic <dannym@scratchpost.org> | 2018-10-07 14:15:21 +0200 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@scratchpost.org> | 2018-10-07 14:15:21 +0200 |
| commit | da99c46f63d13cd42b871f3e180be830061cc8b3 (patch) | |
| tree | b7786a62f431dc6e81fb40e1e0aab48510f0e494 /gnu | |
| parent | 2c4be1add077bf30f949282edcc2ea507ba44497 (diff) | |
gnu: Add java-w3c-svg.
* gnu/packages/batik.scm (java-w3c-svg-1.0, java-w3c-svg): New variables.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/batik.scm | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gnu/packages/batik.scm b/gnu/packages/batik.scm index 91eb8f01d5f..b3361d90927 100644 --- a/gnu/packages/batik.scm +++ b/gnu/packages/batik.scm | |||
| @@ -88,3 +88,71 @@ public interface TimeEvent extends Event { | |||
| 88 | (description "This package provides a SAC interface by the W3C. | 88 | (description "This package provides a SAC interface by the W3C. |
| 89 | SAC is an interface for CSS parsers.") | 89 | SAC is an interface for CSS parsers.") |
| 90 | (license license:w3c))) | 90 | (license license:w3c))) |
| 91 | |||
| 92 | (define-public java-w3c-svg-1.0 | ||
| 93 | (package | ||
| 94 | (name "java-w3c-svg") | ||
| 95 | (version "20010904") | ||
| 96 | (source | ||
| 97 | (origin | ||
| 98 | (method url-fetch) | ||
| 99 | (uri (string-append "http://www.w3.org/TR/2001/REC-SVG-" version | ||
| 100 | "/java-binding.zip")) | ||
| 101 | (sha256 | ||
| 102 | (base32 | ||
| 103 | "0gnxvx51bg6ijplf6l2q0i1m07101f7fickawshfygnsdjqfdnbp")))) | ||
| 104 | (build-system ant-build-system) | ||
| 105 | (arguments | ||
| 106 | `(#:jar-name "w3c-svg.jar" | ||
| 107 | #:source-dir "." | ||
| 108 | #:tests? #f ; No tests exist. | ||
| 109 | #:phases | ||
| 110 | (modify-phases %standard-phases | ||
| 111 | (replace 'unpack | ||
| 112 | (lambda* (#:key source #:allow-other-keys) | ||
| 113 | (invoke "unzip" source))) | ||
| 114 | (add-after 'unpack 'patch-interface | ||
| 115 | (lambda _ | ||
| 116 | ;; Make it compatible with batik. | ||
| 117 | ;; This is equivalent to usingxml commons externals' | ||
| 118 | ;; "externals" part from https://xerces.apache.org/mirrors.cgi | ||
| 119 | (substitute* "SVGFEConvolveMatrixElement.java" | ||
| 120 | (("public SVGAnimatedLength[ ]*getKernelUnitLength") | ||
| 121 | "public SVGAnimatedNumber getKernelUnitLength")) | ||
| 122 | (substitute* "SVGFEMorphologyElement.java" | ||
| 123 | (("public SVGAnimatedLength[ ]*getRadius") | ||
| 124 | "public SVGAnimatedNumber getRadius")) | ||
| 125 | (call-with-output-file "EventListenerInitializer.java" | ||
| 126 | (lambda (port) | ||
| 127 | (format port " | ||
| 128 | // License: http://www.apache.org/licenses/LICENSE-2.0 | ||
| 129 | package org.w3c.dom.svg; | ||
| 130 | public interface EventListenerInitializer { | ||
| 131 | public void initializeEventListeners(SVGDocument doc); | ||
| 132 | } | ||
| 133 | |||
| 134 | "))) | ||
| 135 | #t))))) | ||
| 136 | (propagated-inputs | ||
| 137 | `(("java-w3c-smil" ,java-w3c-smil-3.0))) | ||
| 138 | (native-inputs | ||
| 139 | `(("unzip" ,unzip))) | ||
| 140 | (home-page "https://www.w3.org/Style/CSS/SAC/") | ||
| 141 | (synopsis "W3C SVG interface") | ||
| 142 | (description "This package provides a SVG interface.") | ||
| 143 | (license license:w3c))) | ||
| 144 | |||
| 145 | (define-public java-w3c-svg | ||
| 146 | (package | ||
| 147 | (inherit java-w3c-svg-1.0) | ||
| 148 | (version "20110816") | ||
| 149 | (source | ||
| 150 | (origin | ||
| 151 | (method url-fetch) | ||
| 152 | (uri (string-append "http://www.w3.org/TR/2011/REC-SVG11-" version | ||
| 153 | "/java-binding.zip")) | ||
| 154 | (sha256 | ||
| 155 | (base32 | ||
| 156 | "0jicqcrxav8ggs37amgvvwgc2f0qp1c5wns4rb2i3si83s2m09ns")))) | ||
| 157 | (propagated-inputs | ||
| 158 | `()))) | ||
