From 82c5ea7bc6f15164dca0ca36f3ae32b6c2ddfec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 16 Jul 2009 15:21:15 +0000 Subject: [PATCH] JDEE: Install bsh commands. svn path=/nixpkgs/trunk/; revision=16402 --- .../editors/emacs-modes/jdee/default.nix | 13 +++++++++++-- .../editors/emacs-modes/jdee/java-directory.patch | 8 +++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/emacs-modes/jdee/default.nix b/pkgs/applications/editors/emacs-modes/jdee/default.nix index 3b8cce053e51..5b7f009eacdf 100644 --- a/pkgs/applications/editors/emacs-modes/jdee/default.nix +++ b/pkgs/applications/editors/emacs-modes/jdee/default.nix @@ -34,14 +34,23 @@ in build.bin.emacs = ${emacs}/bin/emacs EOF + # Substitute variables, à la Autoconf. for i in lisp/*.el do - sed -i "$i" -e"s|@out@|$out|g" + sed -i "$i" -e "s|@out@|$out|g ; + s|@javadir@|$out/lib/java|g ; + s|@datadir@|$out/share/${name}|g" done ''; buildPhase = "ant dist"; - installPhase = "ant install"; + + installPhase = '' + ant install + + ensureDir "$out/share/${name}" + cp -rv java/bsh-commands "$out/share/${name}" + ''; buildInputs = [ emacs ant ]; propagatedBuildInputs = [ cedet ]; diff --git a/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch b/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch index 93dc845d2641..3b07246edcc8 100644 --- a/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch +++ b/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch @@ -10,11 +10,13 @@ Tell the elisp code about the right 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 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)) ++ (let ((jde-java-directory "@out@/lib/java")) ++ ++ (oset this bsh-cmd-dir "@datadir@/bsh-commands") + (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))