summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emacs/jde/files/jde-2.4.0.1-classpath-gentoo.patch')
-rw-r--r--app-emacs/jde/files/jde-2.4.0.1-classpath-gentoo.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/app-emacs/jde/files/jde-2.4.0.1-classpath-gentoo.patch b/app-emacs/jde/files/jde-2.4.0.1-classpath-gentoo.patch
new file mode 100644
index 000000000000..47fdd4e11e47
--- /dev/null
+++ b/app-emacs/jde/files/jde-2.4.0.1-classpath-gentoo.patch
@@ -0,0 +1,69 @@
+Initialise classpath for beanshell and checkstyle using java-config.
+Gentoo specific patch.
+
+--- jde-orig/lisp/beanshell.el
++++ jde/lisp/beanshell.el
+@@ -809,6 +809,14 @@
+ "BeanShell intended to be used independently of any other
+ Emacs package.")
+
++(defun bsh-get-gentoo-classpath ()
++ (or bsh-classpath
++ (with-temp-buffer
++ (call-process "java-config" nil t nil "-d" "-p" "bsh")
++ (skip-chars-backward "\n")
++ (setq bsh-classpath
++ (split-string (buffer-substring (point-min) (point)) ":+")))))
++
+ (defmethod initialize-instance ((this bsh-standalone-bsh) &rest fields)
+ "Constructor for the standard bsh BeanShell instance."
+ (call-next-method)
+@@ -845,7 +853,7 @@
+ bsh-vm)
+ (executable-find (if (eq system-type 'windows-nt) "javaw" "java"))))
+
+- (oset this cp bsh-classpath)
++ (oset this cp (bsh-get-gentoo-classpath))
+
+ (oset this startup-dir bsh-startup-directory))
+
+--- jde-orig/lisp/jde-bsh.el
++++ jde/lisp/jde-bsh.el
+@@ -187,7 +187,7 @@
+ (jde-get-tools-jar)
+ (if ant-home (expand-file-name "lib" ant-home)))
+ (jde-pi-get-bsh-classpath)
+- bsh-classpath
++ (bsh-get-gentoo-classpath)
+ (jde-expand-classpath (jde-get-global-classpath)))))))
+
+ ;; Create the BeanShell wrapper object.
+--- jde-orig/lisp/jde-checkstyle.el
++++ jde/lisp/jde-checkstyle.el
+@@ -305,6 +305,14 @@
+ (format "-D%s=%s" (car prop) (cdr prop)))
+ jde-checkstyle-expanded-properties))
+
++(defun jde-checkstyle-get-gentoo-classpath ()
++ (or jde-checkstyle-classpath
++ (with-temp-buffer
++ (call-process "java-config" nil t nil "-d" "-p" "checkstyle")
++ (skip-chars-backward "\n")
++ (setq jde-checkstyle-classpath
++ (split-string (buffer-substring (point-min) (point)) ":+")))))
++
+ (defmethod jde-checkstyle-exec ((this jde-checkstyle-checker))
+
+ (jde-checkstyle-create-checker-buffer this)
+@@ -327,9 +335,8 @@
+ (jde-checkstyle-get-property-args this))
+ (oref this :interactive-args)
+ (list "-classpath"
+- (if jde-checkstyle-classpath
+- (jde-build-classpath jde-checkstyle-classpath)
+- (jde-normalize-path jde-checkstyle-jar-file)))
++ (jde-build-classpath
++ (jde-checkstyle-get-gentoo-classpath)))
+ (list jde-checkstyle-class)
+ (list "-c"
+ (if jde-checkstyle-style