guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

15/15: gnu: tuxguitar: Update to 1.4.


From: Ricardo Wurmus
Subject: 15/15: gnu: tuxguitar: Update to 1.4.
Date: Sat, 1 Apr 2017 11:25:55 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 750e54ecbef027c78505f83240dfce20fc2c0255
Author: Ricardo Wurmus <address@hidden>
Date:   Sun Apr 2 17:23:16 2017 +0200

    gnu: tuxguitar: Update to 1.4.
    
    * gnu/packages/music.scm (tuxguitar): Update to 1.4.
    [arguments]: Replace build phase "build-editor-utils" with 
"build-libraries";
    install resources to the expected locations.
---
 gnu/packages/music.scm | 57 ++++++++++++++++++++++++++++++--------------------
 1 file changed, 34 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 6c5a9c8..2196a6a 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1268,7 +1268,7 @@ is subjective.")
 (define-public tuxguitar
   (package
     (name "tuxguitar")
-    (version "1.3.2")
+    (version "1.4")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1276,11 +1276,14 @@ is subjective.")
                     version "/tuxguitar-" version "-src.tar.gz"))
               (sha256
                (base32
-                "0ldml31zvywid1w28mfd65ramyiics55fdl0ch846vm7j7nwv58j"))
+                "041275vwfr82kass7wiq9g2y82w9qrbzfinzcvfij2f2q45njwmc"))
               (modules '((guix build utils)))
               (snippet
-               ;; Delete pre-built classes
-               '(delete-file-recursively "TuxGuitar-android/bin"))))
+               '(begin
+                  ;; Delete pre-built classes
+                  (delete-file-recursively "TuxGuitar-android-gdrive/bin")
+                  (delete-file-recursively "TuxGuitar-android-gdrive-gdaa/bin")
+                  #t))))
     (build-system ant-build-system)
     (arguments
      `(#:build-target "build"
@@ -1289,23 +1292,31 @@ is subjective.")
        (modify-phases %standard-phases
          (add-after 'unpack 'enter-dir
            (lambda _ (chdir "TuxGuitar-lib") #t))
-         (add-after 'build 'build-editor-utils
+         (add-after 'build 'build-libraries
            (lambda* (#:key inputs outputs #:allow-other-keys)
-             (chdir "..")
-             (let ((cwd (getcwd)))
-               (setenv "CLASSPATH"
-                       (string-append
-                        cwd "/TuxGuitar-lib/tuxguitar-lib.jar" ":"
-                        cwd 
"/TuxGuitar-editor-utils/build/jar/tuxguitar-editor-utils.jar" ":"
-                        (getenv "CLASSPATH"))))
-             (chdir "TuxGuitar-editor-utils")
-             ;; Generate default build.xml
-             ((@@ (guix build ant-build-system) default-build.xml)
-              "tuxguitar-editor-utils.jar"
-              (string-append (assoc-ref outputs "out")
-                             "/share/java"))
-             ((assoc-ref %standard-phases 'build))))
-         (add-after 'build-editor-utils 'build-application
+             (let* ((initial-classpath (getenv "CLASSPATH"))
+                    (build-dir (lambda (dir)
+                                 (chdir "..")
+                                 (setenv "CLASSPATH"
+                                         (string-join (cons initial-classpath
+                                                            (find-files 
(getcwd) "\\.jar$"))
+                                                      ":"))
+                                 (chdir dir)
+                                 (if (file-exists? "build.xml")
+                                     ((assoc-ref %standard-phases 'build)
+                                      #:build-target "build")
+                                     (begin
+                                       ;; Generate default build.xml
+                                       ((@@ (guix build ant-build-system) 
default-build.xml)
+                                        (string-append (string-downcase dir) 
".jar")
+                                        (string-append (assoc-ref outputs 
"out")
+                                                       "/share/java"))
+                                       ((assoc-ref %standard-phases 
'build)))))))
+               (map build-dir '("TuxGuitar-editor-utils"
+                                "TuxGuitar-ui-toolkit"
+                                "TuxGuitar-ui-toolkit-swt"
+                                "TuxGuitar-awt-graphics")))))
+         (add-after 'build-libraries 'build-application
            (lambda _
              (chdir "../TuxGuitar")
              ((assoc-ref %standard-phases 'build)
@@ -1322,10 +1333,10 @@ is subjective.")
                (for-each (lambda (file)
                            (install-file file lib))
                          (find-files ".." "\\.jar$"))
+
                ;; install all resources
-               (for-each (lambda (file)
-                           (install-file file share))
-                         (find-files "share" ".*"))
+               (copy-recursively "share" share)
+
                ;; create wrapper
                (call-with-output-file (string-append bin "/tuxguitar")
                  (lambda (port)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]