Subject: [PATCH 1/2] gnu: Add emacs-jdee.

From: Kei Kebreau <[email-masked]>
Date: Tue, 2 Oct 2018 14:08:28 -0400

* gnu/packages/emacs.scm (emacs-jdee): New variable.
---
 gnu/packages/emacs.scm | 50 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 8da5add88..1ee979983 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -77,6 +77,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages java)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages python)
   #:use-module (gnu packages tex)
@@ -1505,6 +1506,55 @@ files using the dot syntax, and use Graphviz to convert these files to
 diagrams.")
       (license license:gpl2+))))
 
+(define-public emacs-jdee
+  (let ((commit "8451b811b11d8cb428bafab31752e93180a3c724")
+        (revision "1"))
+    (package
+      (name "emacs-jdee")
+      (version (git-version "2.4.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/jdee-emacs/jdee.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "08rjr1lr1hq47bpc6iy1ib24vky9zlpj9q5gdvb6cd4zzvlm2qw7"))))
+      (build-system emacs-build-system)
+      (arguments
+       `(#:exclude (delete "^[^/]*tests?\\.el$" %default-exclude)
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-duplicate-optional
+             (lambda _
+               (substitute* "jdee-stat.el"
+                 (("&optional total-files") "total-files"))
+               (substitute* "jdee-wiz.el"
+                 (("\\(defun jdee-wiz-get-get-method.*")
+                  (string-append "(defun jdee-wiz-get-get-method (type name "
+                                 "&optional staticp class-name)")))
+               #t)))
+         #:tests? #t
+         #:test-command '("ert-runner" "-L" "." "--debug")))
+      (native-inputs
+       `(("emacs-ert-runner" ,emacs-ert-runner)
+         ("jdk" ,icedtea "jdk")))
+      (propagated-inputs
+       `(("emacs-dash" ,emacs-dash)
+         ("emacs-el-mock" ,emacs-el-mock)
+         ("emacs-flycheck" ,emacs-flycheck)
+         ("emacs-memoize" ,emacs-memoize)
+         ("emacs-s" ,emacs-s)))
+      (home-page "https://github.com/jdee-emacs/jdee")
+      (synopsis "Java Development Environment for Emacs")
+      (description
+       "The Java Development Environment for Emacs assists in the development of
+software in the Java Programming Language.  JDEE provides many Emacs commands
+that help with the editing, compiling, running, debugging, and browsing large
+Java programs.")
+      (license license:gpl2+))))
+
 (define-public emacs-mmm-mode
   (package
     (name "emacs-mmm-mode")
-- 
2.19.0