Subject: [bug#53908] [PATCH] Cleanups for the ditaa pkg

From: Frank Pursel <[email-masked]>
Date: Thu, 10 Feb 2022 08:02:39 -0800

Hi,

After sleeping on my earlier submission I see things that I should've
seen before.  I love what guix style does, but not always: converting
#o755 to decimal in a chmod seems counterproductive.  I also removed
some unhelpful comments and a pointless recursive copy that can only
create needless questions.  No practical change but it's a bit cleaner.  

Regards,
Frank

Please, too.  Let me know if this is formatted optimally.  This is
an emacs production of "C-u, Esc ! cd ~/src/guix; git format-patch
<since-git-hash>" appended to my waiting emacs message buffer.
In this case I think it suffices but if a git merge were to be needed it
might not be so.

Hey! -- guix is genius.  Thank you for making it so. 

>From 9e1050ef106e004c71d7b3c69e661e64ab0eaf03 Mon Sep 17 00:00:00 2001
Message-Id: <9e10[email-masked]>
From: Frank Pursel <[email-masked]>
Date: Thu, 10 Feb 2022 07:28:20 -0800
Subject: [PATCH] Removed some unneeded comments and commands.  Tweaked
 formatting.

---
 gnu/packages/graph.scm | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 45dd83edb8..a763f02da8 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -658,8 +658,8 @@ (define-public python-graph-tool
     (license license:lgpl3+)))
 
 (define-public ditaa
-  (let* ((ver "0.11.0") (hash
-                         "1y3g17wp1wvb05m56pp25avww2njpgh0gk0jsbsf25scj7hyyj26"))
+  (let* ((ver "0.11.0")
+         (hash "1y3g17wp1wvb05m56pp25avww2njpgh0gk0jsbsf25scj7hyyj26"))
     (package
       (name "ditaa")
       (version ver)
@@ -693,9 +693,6 @@ (define-public ditaa
                  (mkdir-p "lib")
                  (copy-file batik-jar "./lib/batik.jar")
                  (copy-file commons-cli-jar "./lib/commons-cli.jar"))
-               (copy-recursively "service/web/lib" "lib"
-                                 #:log
-                                 (current-output-port))
                (with-directory-excursion "build"
                                          (substitute* "release.xml"
                                            (("source=\"1.6\"") "source=\"7\"")
@@ -704,16 +701,13 @@ (define-public ditaa
                                              "<file name=\"commons-cli.jar\"/>"
                                              "
 " "<file name=\"batik.jar\"/>")))
-                                         ;; (invoke "ant" "clean")
                                          ) #t))
            (replace 'build
              (lambda* _
-               ;; (invoke "ant" "-f" "release.xml" "release-jar")
                (setenv "ANT_OPTS"
                        (string-append "-Dversion.string="
                                       ,version))
                (with-directory-excursion "build"
-                                         ;; (invoke "ant" "compile")
                                          (invoke "ant" "-f" "release.xml"
                                                  "release-jar")) #t))
            (replace 'check
@@ -758,7 +752,8 @@ (define-public ditaa
                                              "/lib/"
                                              jar-name
                                              " $@"))))
-                 (chmod ditaa 493)) #t))
+                 (chmod ditaa #o755))
+               #t))
            (add-after 'install 'install-docs
              (lambda* (#:key outputs #:allow-other-keys)
                (let ((doc (string-append (assoc-ref outputs "out")
-- 
2.34.0