From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Hardcode =?utf-8?B?4oCcZ3PigJ0=?= path in Lilypond. Date: Mon, 12 Oct 2015 08:54:19 +0200 Message-ID: <87y4f8ziec.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlX0B-0004Xz-Nt for guix-devel@gnu.org; Mon, 12 Oct 2015 02:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlX08-0003SJ-DH for guix-devel@gnu.org; Mon, 12 Oct 2015 02:54:31 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:25982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlX08-0003SE-3P for guix-devel@gnu.org; Mon, 12 Oct 2015 02:54:28 -0400 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: "guix-devel@gnu.org" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Guix, the attached patch changes the result of ‘(search-gs)’ in the Lilypond backend, such that it returns the “gs” executable from the very same version of ghostscript that Lilypond was built with. Retaining a reference to ghostscript causes a closure increase from 309.9 to 351.2. “gs” is required at runtime in order to compile Lilypond files to PDF (the default output format). Without “gs” only the postscript file is generated and the compilation fails unless the output format is explicitly set to something other than PDF. ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-lilypond-Hardcode-path-to-gs-executable.patch >From c98b44ba82e45ebcb802bc1852128624f647b580 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 11 Oct 2015 11:24:20 +0200 Subject: [PATCH] gnu: lilypond: Hardcode path to "gs" executable. * gnu/packages/music.scm (lilypond)[arguments]: Add build phase "hardcode-path-to-gs". --- gnu/packages/music.scm | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 8263b60..cb8d58d 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -310,14 +310,22 @@ you to define complex tempo maps for entire songs or performances.") (assoc-ref %build-inputs "font-tex-gyre") "/share/fonts/opentype/")) #:phases - (alist-cons-before - 'configure 'prepare-configuration - (lambda _ - (substitute* "configure" - (("SHELL=/bin/sh") "SHELL=sh")) - (setenv "out" "") - #t) - %standard-phases))) + (modify-phases %standard-phases + (add-after 'unpack 'hardcode-path-to-gs + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "scm/backend-library.scm" + (("\\(search-executable '\\(\"gs\"\\)\\)") + (string-append "\"" + (assoc-ref inputs "ghostscript") + "/bin/gs" + "\"" ))) + #t)) + (add-before 'configure 'prepare-configuration + (lambda _ + (substitute* "configure" + (("SHELL=/bin/sh") "SHELL=sh")) + (setenv "out" "") + #t))))) (inputs `(("guile" ,guile-1.8) ("font-dejavu" ,font-dejavu) -- 2.5.0 --=-=-=--