Subject: [bug#32948] [PATCH 18/21] gnu: Add java-batik-bridge.

From: Danny Milosavljevic <[email-masked]>
Date: Fri, 5 Oct 2018 17:50:19 +0200

* gnu/packages/batik.scm (java-batik-bridge): New variable.
---
 gnu/packages/batik.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/batik.scm b/gnu/packages/batik.scm
index 71417ec50..e61d9bb67 100644
--- a/gnu/packages/batik.scm
+++ b/gnu/packages/batik.scm
@@ -392,3 +392,41 @@ from @code{batik}).")
                  (delete-file-recursively "batik-script/src/main/java/org/apache/batik/script/jpython")
                  (delete-file-recursively "batik-script/src/main/java/org/apache/batik/script/rhino")
                  #t)))))))))
+
+(define-public java-batik-bridge
+  (let ((base-package
+        (java-batik-package "batik-bridge"
+         `(("java-batik-anim" ,java-batik-anim)
+           ("java-batik-awt-util" ,java-batik-awt-util)
+           ("java-batik-constants" ,java-batik-constants)
+           ("java-batik-css" ,java-batik-css)
+           ("java-batik-dom" ,java-batik-dom)
+           ("java-batik-ext" ,java-batik-ext)
+           ("java-batik-gvt" ,java-batik-gvt)
+           ("java-batik-i18n" ,java-batik-i18n)
+           ("java-batik-parser" ,java-batik-parser)
+           ("java-batik-script" ,java-batik-script)
+           ("java-batik-svg-dom" ,java-batik-svg-dom)
+           ("java-batik-util" ,java-batik-util)
+           ("java-batik-xml" ,java-batik-xml)
+           ("java-w3c-smil" ,java-w3c-smil-3.0)
+           ("java-w3c-svg" ,java-w3c-svg-1.0)
+           ("java-xalan" ,java-xalan)
+           ("java-xmlgraphics-commons" ,java-xmlgraphics-commons)))))
+    (package
+      (inherit base-package)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-package)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'unpack 'remove-unsupported-features
+               (lambda _
+                 ;; TODO: Implement those.
+                 (delete-file "batik-bridge/src/main/java/org/apache/batik/bridge/RhinoInterpreter.java")
+                 (delete-file "batik-bridge/src/main/java/org/apache/batik/bridge/BatikWrapFactory.java")
+                 (delete-file "batik-bridge/src/main/java/org/apache/batik/bridge/EventTargetWrapper.java")
+                 (delete-file "batik-bridge/src/main/java/org/apache/batik/bridge/WindowWrapper.java")
+                 (delete-file "batik-bridge/src/main/java/org/apache/batik/bridge/GlobalWrapper.java")
+                 (delete-file "batik-bridge/src/main/java/org/apache/batik/bridge/SVG12RhinoInterpreter.java")
+                 (delete-file "batik-bridge/src/main/java/org/apache/batik/bridge/RhinoInterpreterFactory.java")
+                 #t)))))))))