Subject: bug#33671: closed (Re: [bug#33671] [PATCH 1/3] gnu: ardour: Add a phase to install Freedesktop files.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 24 Dec 2018 10:09:02 +0000

Your bug report

#33671: [PATCH 1/3] gnu: ardour: Add a phase to install Freedesktop files.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
33671: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33671
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#33671] [PATCH 1/3] gnu: ardour: Add a phase to install Freedesktop files.
From: Efraim Flashner <[email-masked]>
To: Brendan Tildesley <[email-masked]>
Cc: [email-masked]
Date: Mon, 24 Dec 2018 12:08:30 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Pushed with minor changes

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Subject: [PATCH 1/3] gnu: ardour: Add a phase to install Freedesktop files.
From: Brendan Tildesley <[email-masked]>
To: [email-masked]
Date: Sat, 8 Dec 2018 19:00:29 +1100
List-Id: <debbugs-submit.debbugs.gnu.org>

>From 8139a2013cdbb81c8b332ed7cd6e88212d6354d5 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <[email-masked]>
Date: Fri, 7 Dec 2018 22:00:14 +1100
Subject: [PATCH 1/3] gnu: ardour: Add a phase to install Freedesktop files.

* gnu/packages/audio.scm (ardour): [arguments]:
 - Correct comment about --freedesktop flag.
 - Adjust pretty printing for consistency.
 - Add 'install-free-desktop-files phase to actually install the files that
   were build. Fixes bug#33585 reported by baconicsynergy.
---
 gnu/packages/audio.scm | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index a65cfa238e..3d77987062 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -229,13 +229,28 @@ namespace ARDOUR { const char* revision = \"" version "\" ; }"))
     (arguments
      `(#:configure-flags '("--cxx11"          ; required by gtkmm
                            "--no-phone-home"  ; don't contact ardour.org
-                           "--freedesktop"    ; install .desktop file
+                           "--freedesktop"    ; build .desktop file
                            "--test")          ; build unit tests
        #:phases
        (modify-phases %standard-phases
-         (add-after
-          'unpack 'set-rpath-in-LDFLAGS
-          ,(ardour-rpath-phase (version-major version))))
+         (add-after 'unpack 'set-rpath-in-LDFLAGS
+          ,(ardour-rpath-phase (version-major version)))
+         (add-after 'install 'install-freedesktop-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (v ,(version-major version)))
+               (for-each
+                (lambda (s)
+                  (let ((d (string-append out "/share/icons/hicolor/" s "x" s "/apps")))
+                    (mkdir-p d)
+                    (copy-file
+                     (string-append "gtk2_ardour/resources/Ardour-icon_" s "px.png")
+                     (string-append  d "/ardour" v ".png"))))
+                '("16" "22" "32" "48" "256"))
+               (install-file (string-append "build/gtk2_ardour/ardour" v ".desktop")
+                             (string-append out "/share/applications/"))
+               (install-file (string-append "build/gtk2_ardour/ardour" v ".appdata.xml")
+                             (string-append out "/share/appdata/"))))))
        #:test-target "test"
        #:python ,python-2))
     (inputs
-- 
2.19.2