From 845a74db9335d4b6e86220a311329b42315bbdfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 8 Jul 2009 13:23:32 +0000 Subject: [PATCH] jdee: Fix path to the Java files. svn path=/nixpkgs/trunk/; revision=16249 --- .../editors/emacs-modes/jdee/default.nix | 6 ++ .../emacs-modes/jdee/java-directory.patch | 74 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 pkgs/applications/editors/emacs-modes/jdee/java-directory.patch diff --git a/pkgs/applications/editors/emacs-modes/jdee/default.nix b/pkgs/applications/editors/emacs-modes/jdee/default.nix index 074655e3ba6..78c17d30843 100644 --- a/pkgs/applications/editors/emacs-modes/jdee/default.nix +++ b/pkgs/applications/editors/emacs-modes/jdee/default.nix @@ -17,6 +17,7 @@ in patches = [ ./installation-layout.patch ./cedet-paths.patch ./elib-avltree.patch + ./java-directory.patch ]; configurePhase = '' @@ -31,6 +32,11 @@ in cedet.dir = ${cedet}/share/emacs/site-lisp build.bin.emacs = ${emacs}/bin/emacs EOF + + for i in lisp/*.el + do + sed -i "$i" -e"s|@out@|$out|g" + done ''; buildPhase = "ant dist"; diff --git a/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch b/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch new file mode 100644 index 00000000000..cd3318046cd --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch @@ -0,0 +1,74 @@ +Tell the elisp code about the right Java directory. + +--- jde/lisp/jde.el (revision 90) ++++ jde/lisp/jde.el (working copy) +@@ -2448,17 +2448,14 @@ environment variable." + (defmethod initialize-instance ((this jde-bsh) &rest fields) + "Constructor for the JDEE BeanShell instance." + (call-next-method) +- (let* ((jde-java-directory +- (concat +- (jde-find-jde-data-directory) +- "java/"))) ++ (let* ((jde-java-directory "@out@/lib/java")) + + (oset this bsh-cmd-dir (expand-file-name "bsh-commands" jde-java-directory)) +- (oset this checkstyle-jar (expand-file-name "lib/checkstyle-all.jar" jde-java-directory)) +- (oset this regexp-jar (expand-file-name "lib/jakarta-regexp.jar" jde-java-directory)) ++ (oset this checkstyle-jar (expand-file-name "checkstyle-all.jar" jde-java-directory)) ++ (oset this regexp-jar (expand-file-name "jakarta-regexp.jar" jde-java-directory)) + (oset this jde-classes-dir (expand-file-name "classes" jde-java-directory)) +- (oset this jde-jar (expand-file-name "lib/jde.jar" jde-java-directory)) +- (oset this jar (expand-file-name "lib/bsh.jar" jde-java-directory)) ++ (oset this jde-jar (expand-file-name "jde.jar" jde-java-directory)) ++ (oset this jar (expand-file-name "bsh.jar" jde-java-directory)) + (oset-default 'jde-bsh the-bsh this))) + + (defmethod bsh-create-buffer ((this jde-bsh)) + +--- jde/lisp/jde-checkstyle.el (revision 90) ++++ jde/lisp/jde-checkstyle.el (working copy) +@@ -316,10 +316,7 @@ string describing how the compilation fi + (vm-path (oref (jde-run-get-vm) :path)) + (source-file + (concat (file-name-nondirectory buffer-file-name))) +- (jde-java-directory +- (concat +- (jde-find-jde-data-directory) +- "java/")) ++ (jde-java-directory "@out@/lib/java") + (args (append + (unless jde-checkstyle-expanded-properties-file + (jde-checkstyle-get-property-args this)) +@@ -328,7 +325,7 @@ string describing how the compilation fi + (if jde-checkstyle-classpath + (jde-build-classpath jde-checkstyle-classpath) + (jde-normalize-path +- (expand-file-name "lib/checkstyle-all.jar" jde-java-directory)))) ++ (expand-file-name "checkstyle-all.jar" jde-java-directory)))) + (list jde-checkstyle-class) + (list "-c" + (if jde-checkstyle-style + +--- jde/lisp/jde-dbs.el (revision 90) ++++ jde/lisp/jde-dbs.el (working copy) +@@ -899,9 +899,7 @@ for the breakpoint." + (jde-normalize-path 'jde-run-working-directory) + source-directory)) + (vm (oref (jde-run-get-vm) :path)) +- (jde-java-directory +- (expand-file-name "java" +- (jde-find-jde-data-directory))) ++ (jde-java-directory "@out@/lib/java") + (vm-args + (let (args) + (setq args +@@ -912,7 +910,7 @@ for the breakpoint." + (jde-build-classpath + (list + (expand-file-name +- (if jde-bug-debug "classes" "lib/jde.jar") ++ (if jde-bug-debug "classes" "jde.jar") + jde-java-directory) + (if (jde-bug-vm-includes-jpda-p) + (jde-get-tools-jar)