From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] gnu: tuxguitar: Update to 1.3.2. Date: Thu, 04 Aug 2016 14:41:27 +0200 Message-ID: <87zioshfk8.fsf@elephly.net> References: <20160803164503.10103-1-rekado@elephly.net> <20160804084341.GA1715@solar> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVHy1-000255-Hm for guix-devel@gnu.org; Thu, 04 Aug 2016 08:41:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVHxy-0001to-2l for guix-devel@gnu.org; Thu, 04 Aug 2016 08:41:41 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:24739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVHxx-0001tP-Q7 for guix-devel@gnu.org; Thu, 04 Aug 2016 08:41:38 -0400 In-reply-to: <20160804084341.GA1715@solar> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Andreas Enge Cc: guix-devel@gnu.org Andreas Enge 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