guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: tuxguitar: Update to 1.3.2.


From: Ricardo Wurmus
Subject: Re: [PATCH] gnu: tuxguitar: Update to 1.3.2.
Date: Thu, 04 Aug 2016 14:41:27 +0200
User-agent: mu4e 0.9.16; emacs 25.1.1

Andreas Enge <address@hidden> writes:

> Hello,
>
> On Wed, Aug 03, 2016 at 06:45:03PM +0200, Ricardo Wurmus wrote:
>> * gnu/packages/music.scm (tuxguitar): Update to 1.3.2.
>> [arguments]: Use ant-build-system and rearrange build phases.
>> [native-inputs]: Remove field.
>
> looks good!
>
>> +         (add-after 'unpack 'enter-dir-and-set-flags
>> +           (lambda _ (chdir "TuxGuitar-lib") #t))
>
> The name of the phase seems to be inherited from a previous edition where
> flags were set.

Ah, I’ll change this.

>> +               ;; create wrapper
>> +               (call-with-output-file (string-append bin "/tuxguitar")
>> +                 (lambda (port)
>> +                   (let ((classpath (string-join (append (find-files lib 
>> "\\.jar$")
>> +                                                         (find-files swt 
>> "\\.jar$"))
>> +                                                 ":")))
>> +                     (format
>> +                      port
>> +                      (string-append "#!/bin/sh\n"
>> +                                     (which "java")
>> +                                     " -cp " classpath
>> +                                     " -Dtuxguitar.home.path=" out
>> +                                     " -Dtuxguitar.share.path=" out "/share"
>> +                                     " -Dswt.library.path=" swt "/lib"
>> +                                     " 
>> org.herac.tuxguitar.app.TGMainSingleton"
>> +                                     " \"$1\" \"$2\"")))))
>> +               (chmod (string-append bin "/tuxguitar") #o555)
>> +               #t))))))
>
> This one I do not fully understand; my first impression was that it used
> the file names from the build directory for the classpath variable. But this
> is working since they are relative file names? And the "-D" parameters make
> that they are searched for in the correct directories? Should these be
> replaced by absolute file names (which might end up being too long)?

The classpath consists of only absolute paths to jar files.  This is the
install phase and right before the snippet you quoted the jar files were
installed to their target directories.

The “-D” arguments are needed to define resource variables.  They are
unrelated to the classpath.  “swt.library.path” is used to find the
native library component of SWT.

I’ll push this to master tonight.

~~ Ricardo





reply via email to

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