unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Andreas Enge <andreas@enge.fr>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: tuxguitar: Update to 1.3.2.
Date: Thu, 04 Aug 2016 14:41:27 +0200	[thread overview]
Message-ID: <87zioshfk8.fsf@elephly.net> (raw)
In-Reply-To: <20160804084341.GA1715@solar>


Andreas Enge <andreas@enge.fr> 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	other threads:[~2016-08-04 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 16:45 [PATCH] gnu: tuxguitar: Update to 1.3.2 Ricardo Wurmus
2016-08-04  8:43 ` Andreas Enge
2016-08-04 12:41   ` Ricardo Wurmus [this message]
2016-08-04 12:45     ` Andreas Enge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zioshfk8.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=andreas@enge.fr \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).