(address . guix-patches@gnu.org)
From 8139a2013cdbb81c8b332ed7cd6e88212d6354d5 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildesley@openmailbox.org>
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(-)
Toggle diff (39 lines)
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