From a56fecb1021085f88769497ebee6644a14f61b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 21 Aug 2009 08:43:07 +0000 Subject: [PATCH] JDEE: Update. svn path=/nixpkgs/trunk/; revision=16797 --- .../emacs-modes/jdee/build-properties.patch | 12 +++++ .../editors/emacs-modes/jdee/default.nix | 14 +++--- .../emacs-modes/jdee/elib-avltree.patch | 16 +++++++ .../jdee/installation-layout.patch | 19 -------- .../jdee/jde-directory-files-recurs.patch | 25 ---------- .../emacs-modes/jdee/jde-help-docsets.patch | 31 ------------- .../jdee/jde-help-find-javadoc.patch | 46 ------------------- .../jde-wiz-update-implements-clause.patch | 14 ------ 8 files changed, 35 insertions(+), 142 deletions(-) create mode 100644 pkgs/applications/editors/emacs-modes/jdee/build-properties.patch delete mode 100644 pkgs/applications/editors/emacs-modes/jdee/installation-layout.patch delete mode 100644 pkgs/applications/editors/emacs-modes/jdee/jde-directory-files-recurs.patch delete mode 100644 pkgs/applications/editors/emacs-modes/jdee/jde-help-docsets.patch delete mode 100644 pkgs/applications/editors/emacs-modes/jdee/jde-help-find-javadoc.patch delete mode 100644 pkgs/applications/editors/emacs-modes/jdee/jde-wiz-update-implements-clause.patch diff --git a/pkgs/applications/editors/emacs-modes/jdee/build-properties.patch b/pkgs/applications/editors/emacs-modes/jdee/build-properties.patch new file mode 100644 index 00000000000..d0a733b912e --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/jdee/build-properties.patch @@ -0,0 +1,12 @@ +Make sure `build.properties' is honored. + +--- jde/build.xml ++++ jde/build.xml +@@ -14,6 +14,7 @@ + + + ++ + + + diff --git a/pkgs/applications/editors/emacs-modes/jdee/default.nix b/pkgs/applications/editors/emacs-modes/jdee/default.nix index 425be3dd51b..c80adcbfe96 100644 --- a/pkgs/applications/editors/emacs-modes/jdee/default.nix +++ b/pkgs/applications/editors/emacs-modes/jdee/default.nix @@ -1,7 +1,7 @@ { fetchsvn, stdenv, emacs, cedet, ant }: let - revision = "90"; + revision = "137"; in stdenv.mkDerivation rec { name = "jdee-svn${revision}"; @@ -12,14 +12,13 @@ in # Looks like they're not sure whether to put one or two `e'... url = "https://jdee.svn.sourceforge.net/svnroot/jdee/trunk/jde"; rev = revision; - sha256 = "06q1956yrs4r83a6sf3fk915jhsmg1q84wrrgjbdccfv5akid435"; + sha256 = "0pjkbr1srx2m428xkky1csf97fr5219prs4dif7njlydyrwp0gnn"; }; patches = [ - ./installation-layout.patch ./cedet-paths.patch ./elib-avltree.patch - ./java-directory.patch ./jde-directory-files-recurs.patch - ./jde-help-find-javadoc.patch ./jde-wiz-update-implements-clause.patch - ./jde-help-docsets.patch + ./build-properties.patch + ./cedet-paths.patch ./elib-avltree.patch + ./java-directory.patch ]; configurePhase = '' @@ -32,11 +31,12 @@ in dist.doc.dir dist/doc/${name} prefix.dir = $out cedet.dir = ${cedet}/share/emacs/site-lisp + elib.dir = /nowhere build.bin.emacs = ${emacs}/bin/emacs EOF # Substitute variables, à la Autoconf. - for i in lisp/*.el + for i in "lisp/"*.el do sed -i "$i" -e "s|@out@|$out|g ; s|@javadir@|$out/lib/java|g ; diff --git a/pkgs/applications/editors/emacs-modes/jdee/elib-avltree.patch b/pkgs/applications/editors/emacs-modes/jdee/elib-avltree.patch index a1000f046c3..db891b1655e 100644 --- a/pkgs/applications/editors/emacs-modes/jdee/elib-avltree.patch +++ b/pkgs/applications/editors/emacs-modes/jdee/elib-avltree.patch @@ -2,6 +2,22 @@ JDEE refers to the `avltree' module from GNU Elib, but GNU Elib no longer exists (see http://www.gnu.org/software/elib/). This patch updates the module names to what's current in Emacs. +--- jde/config/build.el ++++ jde/config/build.el +@@ -33,11 +33,10 @@ compile. + CEDET-DIR is the cedet lisp code base directory (see PATHS). + + PATHS are sub directories under CEDET-DIR we use to compile." +- (dolist (path (list dir lisp-src-dir elib-dir cedet-dir)) ++ (dolist (path (list dir lisp-src-dir cedet-dir)) + (if (not (file-directory-p path)) + (error "Doesn't exist or not a directory: %s" path))) + (let ((autoload-buf (jde-make-autoloads dir autoload-libname))) +- (add-to-list 'load-path elib-dir t) + (dolist (path paths) + (add-to-list 'load-path (expand-file-name path cedet-dir) t)) + (add-to-list 'load-path lisp-src-dir t) + --- jde/lisp/jde-parse.el (revision 90) +++ jde/lisp/jde-parse.el (working copy) @@ -24,7 +24,7 @@ diff --git a/pkgs/applications/editors/emacs-modes/jdee/installation-layout.patch b/pkgs/applications/editors/emacs-modes/jdee/installation-layout.patch deleted file mode 100644 index 810636ddcc6..00000000000 --- a/pkgs/applications/editors/emacs-modes/jdee/installation-layout.patch +++ /dev/null @@ -1,19 +0,0 @@ -The `build.xml' makes it impossible to override some settings. This -patch deletes their definition from here so we can use our value from -`build.properties'. - ---- jde/build.xml (revision 90) -+++ jde/build.xml (working copy) -@@ -30,12 +30,7 @@ - - - -- - -- -- -- -- - - - diff --git a/pkgs/applications/editors/emacs-modes/jdee/jde-directory-files-recurs.patch b/pkgs/applications/editors/emacs-modes/jdee/jde-directory-files-recurs.patch deleted file mode 100644 index 06a2ce4ea9d..00000000000 --- a/pkgs/applications/editors/emacs-modes/jdee/jde-directory-files-recurs.patch +++ /dev/null @@ -1,25 +0,0 @@ -This patch fixes a possible infinite recursion in `jde-directory-files-recurs'. -It could occur, e.g., when DIR contains multiple slashes: we end up recursing -on "DIR/." forever. - ---- jde/lisp/jde.el (revision 90) -+++ jde/lisp/jde.el (working copy) -@@ -1500,14 +1500,14 @@ SYMBOL is unnecessary." - "Get all the files in DIR, and any subdirectories of DIR, whose - names match INCLUDE-REGEXP." - (let (files) -- (loop for file in (directory-files dir t) do -- (if (not (or (string= (concat dir "/.") file) -- (string= (concat dir "/..") file))) -+ (loop for file in (directory-files dir) do -+ (if (not (member file '("." ".."))) -+ (let ((file (concat dir "/" file))) - (if (file-directory-p file) - (setq files (append files (jde-directory-files-recurs file include-regexp))) - (if (or (not include-regexp) - (string-match include-regexp file)) -- (setq files (append files (list file))))))) -+ (setq files (append files (list file)))))))) - files)) - - (defun jde-expand-directory (dir include-regexp exclude-regexps symbol) diff --git a/pkgs/applications/editors/emacs-modes/jdee/jde-help-docsets.patch b/pkgs/applications/editors/emacs-modes/jdee/jde-help-docsets.patch deleted file mode 100644 index a779541feff..00000000000 --- a/pkgs/applications/editors/emacs-modes/jdee/jde-help-docsets.patch +++ /dev/null @@ -1,31 +0,0 @@ -Provide a sensible default for `jde-help-docsets'. - ---- jde/lisp/jde-help.el (revision 90) -+++ jde/lisp/jde-help.el (working copy) -@@ -28,7 +28,25 @@ - (require 'jde-util) - - ;; (makunbound 'jde-help-docsets) --(defcustom jde-help-docsets (list (list "JDK API" "" nil)) -+(defcustom jde-help-docsets -+ (list (list "JDK API" -+ "http://java.sun.com/javase/6/docs/api" -+ nil) -+ ("User (javadoc)" -+ "http://static.springsource.org/spring/docs/3.0.x/javadoc-api/" -+ nil) -+ ("User (javadoc)" -+ "http://commons.apache.org/sandbox/functor/apidocs/" -+ nil) -+ ("User (javadoc)" -+ "https://www.hibernate.org/hib_docs/v3/api" -+ nil) -+ ("User (javadoc)" -+ "http://acegisecurity.org/acegi-security/apidocs" -+ nil) -+ ("User (javadoc)" -+ "http://wicket.apache.org/docs/1.4" -+ nil)) - "*Lists collections of HTML files documenting Java classes. - This list is used by the `jde-help-class' command to find help for - a class. You can specify the following information for each docset: diff --git a/pkgs/applications/editors/emacs-modes/jdee/jde-help-find-javadoc.patch b/pkgs/applications/editors/emacs-modes/jdee/jde-help-find-javadoc.patch deleted file mode 100644 index 8746a5687a7..00000000000 --- a/pkgs/applications/editors/emacs-modes/jdee/jde-help-find-javadoc.patch +++ /dev/null @@ -1,46 +0,0 @@ -Fix `jde-help-find-javadoc' so that it correctly infers whether -an HTML page exists. - -Previously it would consider that Wget succeeded if its output -contained the string "200". This doesn't work as Wget's output -starts with something like: - - --2009-07-10 16:15:37-- http://java.sun.com/javase/6/docs/api/foobar - -This patch makes it check the exit code of Wget instead, which is -more reliable. - ---- jde/lisp/jde-help.el (revision 90) -+++ jde/lisp/jde-help.el (working copy) -@@ -138,7 +138,7 @@ one of the the sites in `jde-help-docset - (const :tag "Disable timeout checking" :value 0) - (integer :tag "Timeout (seconds)" :value 900))) - --(defcustom jde-help-wget-command-line-options nil -+(defcustom jde-help-wget-command-line-options "--quiet" - "Specifies additional options (beyond --spider, --tries and - --timeout) to pass to wget, if wget is used for - `jde-help-remote-file-exists-function'." -@@ -208,18 +208,15 @@ to verify the existence of pages located - (error "Cannot find url-file-exists function")) - (if (executable-find - (if (eq system-type 'windows-nt) "wget.exe" "wget")) -- (if (not -- (string-match -- "200" -- (shell-command-to-string -- (concat "wget --spider " -+ (let ((cmd (concat "wget --spider " - (if jde-help-wget-tries - (concat "--tries=" jde-help-wget-tries)) - (if jde-help-wget-timeout - (concat "--timeout=" jde-help-wget-timeout)) - jde-help-wget-command-line-options -- " " url)))) -- (setq url nil)) -+ " " url))) -+ (unless (= 0 (shell-command cmd)) -+ (setq url nil))) - (error - (concat "Cannot find wget. This utility is needed " - "to access javadoc on remote systems."))))) diff --git a/pkgs/applications/editors/emacs-modes/jdee/jde-wiz-update-implements-clause.patch b/pkgs/applications/editors/emacs-modes/jdee/jde-wiz-update-implements-clause.patch deleted file mode 100644 index 614a0ce37f1..00000000000 --- a/pkgs/applications/editors/emacs-modes/jdee/jde-wiz-update-implements-clause.patch +++ /dev/null @@ -1,14 +0,0 @@ -This patch allows `C-c C-v e' (`jde-wiz-extend-abstract-class') to do the -right thing, even when invoked, say, on an empty file. - ---- jde/lisp/jde-wiz.el (revision 90) -+++ jde/lisp/jde-wiz.el (working copy) -@@ -99,7 +99,7 @@ extends clause is updated" - (save-excursion - (let* ((class-re "class[ \t]+\\([a-zA-z]+[a-zA-Z0-9._]*\\).*[ \n]*") - (open-brace-pos -- (scan-lists (point) -1 1)) -+ (ignore-errors (scan-lists (point) -1 1))) - (class-name-end-pos - (when open-brace-pos - (goto-char open-brace-pos)