unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Langlois <pierre.langlois@gmx.com>
To: 29624@debbugs.gnu.org
Subject: [bug#29624] EasyTAG
Date: Sat, 09 Dec 2017 13:43:44 +0000	[thread overview]
Message-ID: <cubefo4vwxb.fsf@gmx.com> (raw)

[-- 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


             reply	other threads:[~2017-12-09 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09 13:43 Pierre Langlois [this message]
2017-12-11 15:49 ` [bug#29624] EasyTAG 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cubefo4vwxb.fsf@gmx.com \
    --to=pierre.langlois@gmx.com \
    --cc=29624@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).