* [bug#29624] EasyTAG
@ 2017-12-09 13:43 Pierre Langlois
2017-12-11 15:49 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Pierre Langlois @ 2017-12-09 13:43 UTC (permalink / raw)
To: 29624
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
Hello Guix!
Here are a couple of patches adding the EasyTAG gnome package
https://wiki.gnome.org/Apps/EasyTAG.
EasyTAG depends on the libid3tag library and tries to find it using
pkg-config. I thought it'd be a good idea for the library to provide a
.pc file instead of manually telling EasyTAG where it is. It allows
cleaning up dependent packages a little, namely audacity and gmtp, what
do you think?
Thanks!
Pierre
[-- Attachment #2: 0001-gnu-libid3tag-Create-a-pkg-config-file.patch --]
[-- Type: text/x-patch, Size: 5165 bytes --]
From 8cd2b22517e04030970bb33abd980577c15c3f01 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Sat, 9 Dec 2017 13:05:21 +0000
Subject: [PATCH 1/2] gnu: libid3tag: Create a pkg-config file.
Cleanup packages depending on libid3tag by allowing pkg-config to find it
automatically.
* gnu/package/mp3.scm (libid3tag)[arguments]: Add a create-pkg-config-file
phase.
* gnu/package/audio.scm (audacity)[arguments]: Do not ID3TAG_CFLAGS and
ID3TAG_LIBS environment variables.
* gnu/package/libusb.scm (gmtp)[arguments]: Remove.
---
gnu/packages/audio.scm | 10 ++++------
gnu/packages/libusb.scm | 8 +-------
gnu/packages/mp3.scm | 22 ++++++++++++++++++++++
3 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 4f6e4a409..2273f4606 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois@gmx.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -345,8 +346,7 @@ engineers, musicians, soundtrack editors and composers.")
("which" ,which)))
(arguments
`(#:configure-flags
- (let ((libid3tag (assoc-ref %build-inputs "libid3tag"))
- (libmad (assoc-ref %build-inputs "libmad"))
+ (let ((libmad (assoc-ref %build-inputs "libmad"))
(portmidi (assoc-ref %build-inputs "portmidi")))
(list
;; Loading FFmpeg dynamically is problematic.
@@ -357,10 +357,8 @@ engineers, musicians, soundtrack editors and composers.")
'("x64_64" "i686"))
'()
'("--enable-sse=no"))
- ;; portmidi, libid3tag and libmad provide no .pc files, so
- ;; pkg-config fails to find them. Force their inclusion.
- (string-append "ID3TAG_CFLAGS=-I" libid3tag "/include")
- (string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz")
+ ;; portmidi and libmad provide no .pc files, so pkg-config fails to
+ ;; find them. Force their inclusion.
(string-append "LIBMAD_CFLAGS=-I" libmad "/include")
(string-append "LIBMAD_LIBS=-L" libmad "/lib -lmad")
(string-append "PORTMIDI_CFLAGS=-I" portmidi "/include")
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 31c7dfa44..94c611b2f 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2017 Pierre Langlois <pierre.langlois@gmx.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -295,13 +296,6 @@ proposed for standardization.")
(base32
"0fyi3pdl2g57vr0p46ip2wwzyap3l0by7iqaqygv0yxfcs79l6xj"))))
(build-system glib-or-gtk-build-system)
- (arguments
- '(#:configure-flags
- (let ((libid3tag (assoc-ref %build-inputs "libid3tag")))
- (list
- ;; libid3tag provides no .pc file, so pkg-config fails to find them.
- (string-append "ID3TAG_CFLAGS=-I" libid3tag "/include")
- (string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz")))))
(inputs
`(("gtk+" ,gtk+)
("flac" ,flac)
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index fbb924ba5..dd40fc59f 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -99,6 +99,28 @@ This package contains the library.")
"0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
(build-system gnu-build-system)
(inputs `(("zlib" ,zlib)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'create-pkg-config-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (pkgconfig-path (string-append out "/lib/pkgconfig")))
+ (mkdir-p pkgconfig-path)
+ (with-output-to-file
+ (string-append pkgconfig-path "/id3tag.pc")
+ (lambda _
+ (format #t
+ "prefix=~@*~a~@
+ exec_prefix=${prefix}/bin~@
+ libdir=${prefix}/lib~@
+ includedir=${prefix}/include~@
+ Name: ID3TAG~@
+ Description: libid3tag - ID3 tag manipulation library~@
+ Version: ~1@*~a~@
+ Libs: -L${libdir} -lid3tag -lz~@
+ Cflags: -I${includedir}~%"
+ out ,version)))))))))
(synopsis "Library for reading ID3 tags")
(description
"Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
--
2.15.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-Easytag.patch --]
[-- Type: text/x-patch, Size: 2839 bytes --]
From bcabaa9b2c8d30d2fe1d8148068452667cd9e4c0 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Sat, 9 Dec 2017 13:05:28 +0000
Subject: [PATCH 2/2] gnu: Add Easytag.
* gnu/packages/music.scm (easytag): New variable.
---
gnu/packages/music.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 1aabe814b..d30c9b5de 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -40,6 +40,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (guix build-system scons)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system waf)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
@@ -469,6 +470,55 @@ background while you work.")
enable professional yet simple and intuitive pattern-based drum programming.")
(license license:gpl2+)))
+(define-public easytag
+ (package
+ (name "easytag")
+ (version "2.4.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/easytag/2.4/easytag-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1mbxnqrw1fwcgraa1bgik25vdzvf97vma5pzknbwbqq5ly9fwlgw"))))
+ (build-system glib-or-gtk-build-system)
+ (native-inputs
+ `(("desktop-file-utils" ,desktop-file-utils)
+ ("glib" ,glib "bin")
+ ("intltool" ,intltool)
+ ("itstool" ,itstool)
+ ("pkg-config" ,pkg-config)
+ ("xmllint" ,libxml2)))
+ (inputs
+ `(("flac" ,flac)
+ ("gtk+" ,gtk+)
+ ("id3lib" ,id3lib)
+ ("libid3tag" ,libid3tag)
+ ("libvorbis" ,libvorbis)
+ ("opusfile" ,opusfile)
+ ("speex" ,speex)
+ ("taglib" ,taglib)
+ ("wavpack" ,wavpack)
+ ("yelp" ,yelp)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-makefile
+ (lambda _
+ (substitute* "Makefile.in"
+ ;; The Makefile generates a test-desktop-file-validate.sh
+ ;; script with /bin/sh hard-coded.
+ (("/bin/sh") (which "sh"))
+ ;; Don't create 'icon-theme.cache'.
+ (("gtk-update-icon-cache") "true")))))))
+ (home-page "https://wiki.gnome.org/Apps/EasyTAG")
+ (synopsis "Simple application for viewing and editing tags in audio files")
+ (description
+ "EasyTAG is an application for viewing and editing tags in audio files.
+It supports MP3, MP2, MP4/AAC, FLAC, Ogg Opus, Ogg Speex, Ogg Vorbis,
+MusePack, Monkey's Audio, and WavPack files.")
+ (license license:gpl2+)))
+
(define-public extempore
(package
(name "extempore")
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#29624] EasyTAG
2017-12-09 13:43 [bug#29624] EasyTAG Pierre Langlois
@ 2017-12-11 15:49 ` Ludovic Courtès
2017-12-14 22:37 ` Pierre Langlois
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2017-12-11 15:49 UTC (permalink / raw)
To: Pierre Langlois; +Cc: 29624
Hello Pierre,
Pierre Langlois <pierre.langlois@gmx.com> skribis:
> EasyTAG depends on the libid3tag library and tries to find it using
> pkg-config. I thought it'd be a good idea for the library to provide a
> .pc file instead of manually telling EasyTAG where it is. It allows
> cleaning up dependent packages a little, namely audacity and gmtp, what
> do you think?
I think it’s a good patch for upstream, but not for distros. As I see
it, the risk is that people hacking on Guix would come to rely on the
availability of a .pc file, and that code will break on other distros.
Likewise, the build process of other packages is subtly affected.
So I’m reluctant to making such changes in Guix proper, but I do agree
that it’s a good idea for upstream to adopt.
WDYT?
Does the EasyTag patch need to be adjusted? (I wanted to test but
there’s currently no webkit-gtk substitute so…)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#29624] EasyTAG
2017-12-11 15:49 ` Ludovic Courtès
@ 2017-12-14 22:37 ` Pierre Langlois
2017-12-14 22:42 ` Pierre Langlois
0 siblings, 1 reply; 5+ messages in thread
From: Pierre Langlois @ 2017-12-14 22:37 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 29624
[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]
Hi Ludovic,
Thanks for taking a look!
Ludovic Courtès writes:
> Hello Pierre,
>
> Pierre Langlois <pierre.langlois@gmx.com> skribis:
>
>> EasyTAG depends on the libid3tag library and tries to find it using
>> pkg-config. I thought it'd be a good idea for the library to provide a
>> .pc file instead of manually telling EasyTAG where it is. It allows
>> cleaning up dependent packages a little, namely audacity and gmtp, what
>> do you think?
>
> I think it’s a good patch for upstream, but not for distros. As I see
> it, the risk is that people hacking on Guix would come to rely on the
> availability of a .pc file, and that code will break on other distros.
> Likewise, the build process of other packages is subtly affected.
>
> So I’m reluctant to making such changes in Guix proper, but I do agree
> that it’s a good idea for upstream to adopt.
>
> WDYT?
Sure, sounds reasonable! I'm unsure I'll have time to chase upstream
however. In the meantime, see the attached patch to get around the issue
with libid3tag.
I'm afraid I couldn't find a way to make the configure script work
without pkg-config. I got as far as patching it to think libid3tag was
found, but then I couldn't find how to set CFLAGS and LDFLAGS to include
libid3tag. It appears using pkg-config for some dependencies but not
others is tricky here.
So in the end, I settled with creating a temporary local .pc file. It
feels like a bit of a hack but I thought it would be the most
future-proof option, WDYT?
>
> Does the EasyTag patch need to be adjusted? (I wanted to test but
> there’s currently no webkit-gtk substitute so…)
>
> Thanks,
> Ludo’.
Thanks,
Pierre
[-- Attachment #2: /home/pierre/code/guix/0001-gnu-Add-Easytag.patch --]
[-- Type: message/external-body, Size: 101 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#29624] EasyTAG
2017-12-14 22:37 ` Pierre Langlois
@ 2017-12-14 22:42 ` Pierre Langlois
2017-12-15 10:32 ` bug#29624: EasyTAG Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Pierre Langlois @ 2017-12-14 22:42 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 29624
[-- Attachment #1: Type: text/plain, Size: 28 bytes --]
Aaaaand here's the patch!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-Easytag.patch --]
[-- Type: text/x-patch, Size: 3849 bytes --]
From fbe4e6d3cd25806a8acd350caf19778f20dedf2b Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Sat, 9 Dec 2017 13:05:28 +0000
Subject: [PATCH] gnu: Add Easytag.
* gnu/packages/music.scm (easytag): New variable.
---
gnu/packages/music.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 1aabe814b..fc6026d79 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -40,6 +40,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (guix build-system scons)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system waf)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
@@ -469,6 +470,75 @@ background while you work.")
enable professional yet simple and intuitive pattern-based drum programming.")
(license license:gpl2+)))
+(define-public easytag
+ (package
+ (name "easytag")
+ (version "2.4.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/easytag/2.4/easytag-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1mbxnqrw1fwcgraa1bgik25vdzvf97vma5pzknbwbqq5ly9fwlgw"))))
+ (build-system glib-or-gtk-build-system)
+ (native-inputs
+ `(("desktop-file-utils" ,desktop-file-utils)
+ ("glib" ,glib "bin")
+ ("intltool" ,intltool)
+ ("itstool" ,itstool)
+ ("pkg-config" ,pkg-config)
+ ("xmllint" ,libxml2)))
+ (inputs
+ `(("flac" ,flac)
+ ("gtk+" ,gtk+)
+ ("id3lib" ,id3lib)
+ ("libid3tag" ,libid3tag)
+ ("libvorbis" ,libvorbis)
+ ("opusfile" ,opusfile)
+ ("speex" ,speex)
+ ("taglib" ,taglib)
+ ("wavpack" ,wavpack)
+ ("yelp" ,yelp)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'configure-libid3tag
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; libid3tag does not provide a .pc file and EasyTAG's configure
+ ;; script healivy relies on pkg-config. Providing a temporary
+ ;; local .pc file is easier than patching the configure script.
+ (let* ((libid3tag (assoc-ref inputs "libid3tag")))
+ (mkdir-p "pkgconfig")
+ (with-output-to-file
+ "pkgconfig/id3tag.pc"
+ (lambda _
+ (format #t
+ "prefix=~@*~a~@
+ libdir=${prefix}/lib~@
+ includedir=${prefix}/include~@
+ Libs: -L${libdir} -lid3tag -lz~@
+ Cflags: -I${includedir}~%"
+ libid3tag)))
+ (setenv "PKG_CONFIG_PATH"
+ (string-append (getenv "PKG_CONFIG_PATH")
+ ":" (getcwd) "/pkgconfig")))))
+ (add-after 'unpack 'patch-makefile
+ (lambda _
+ (substitute* "Makefile.in"
+ ;; The Makefile generates a test-desktop-file-validate.sh
+ ;; script with /bin/sh hard-coded.
+ (("/bin/sh") (which "sh"))
+ ;; Don't create 'icon-theme.cache'.
+ (("gtk-update-icon-cache") "true")))))))
+ (home-page "https://wiki.gnome.org/Apps/EasyTAG")
+ (synopsis "Simple application for viewing and editing tags in audio files")
+ (description
+ "EasyTAG is an application for viewing and editing tags in audio files.
+It supports MP3, MP2, MP4/AAC, FLAC, Ogg Opus, Ogg Speex, Ogg Vorbis,
+MusePack, Monkey's Audio, and WavPack files.")
+ (license license:gpl2+)))
+
(define-public extempore
(package
(name "extempore")
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#29624: EasyTAG
2017-12-14 22:42 ` Pierre Langlois
@ 2017-12-15 10:32 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2017-12-15 10:32 UTC (permalink / raw)
To: Pierre Langlois; +Cc: 29624-done
Pierre Langlois <pierre.langlois@gmx.com> skribis:
> From fbe4e6d3cd25806a8acd350caf19778f20dedf2b Mon Sep 17 00:00:00 2001
> From: Pierre Langlois <pierre.langlois@gmx.com>
> Date: Sat, 9 Dec 2017 13:05:28 +0000
> Subject: [PATCH] gnu: Add Easytag.
>
> * gnu/packages/music.scm (easytag): New variable.
Perfect. Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-15 10:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-09 13:43 [bug#29624] EasyTAG Pierre Langlois
2017-12-11 15:49 ` Ludovic Courtès
2017-12-14 22:37 ` Pierre Langlois
2017-12-14 22:42 ` Pierre Langlois
2017-12-15 10:32 ` bug#29624: EasyTAG Ludovic Courtès
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).