* [bug#37720] [PATCH 1/2] gnu: id3lib: Apply patch for UTF16 writing bug.
2019-10-12 21:25 [bug#37720] [PATCH 0/2] gnu: easytag: Fix mp3 support Pierre Langlois
@ 2019-10-12 21:29 ` Pierre Langlois
2019-10-12 21:30 ` [bug#37720] [PATCH 2/2] gnu: easytag: Fix mp3 support Pierre Langlois
2019-10-13 12:09 ` bug#37720: [PATCH 0/2] " Danny Milosavljevic
2 siblings, 0 replies; 4+ messages in thread
From: Pierre Langlois @ 2019-10-12 21:29 UTC (permalink / raw)
To: 37720; +Cc: Pierre Langlois
* gnu/packages/mp3.scm (id3lib)[patches]: Add
"id3lib-UTF16-writing-bug.patch".
* gnu/packages/patches/id3lib-UTF16-writing-bug.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/mp3.scm | 5 ++-
.../patches/id3lib-UTF16-writing-bug.patch | 39 +++++++++++++++++++
3 files changed, 43 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/id3lib-UTF16-writing-bug.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 0a4ee7c986..f99711e1ac 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -975,6 +975,7 @@ dist_patch_DATA = \
%D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch \
%D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \
%D%/packages/patches/id3lib-CVE-2007-4460.patch \
+ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \
%D%/packages/patches/ilmbase-fix-tests.patch \
%D%/packages/patches/ilmbase-openexr-pkg-config.patch \
%D%/packages/patches/inkscape-poppler-0.76.patch \
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index a218071edb..9a1cf60c2e 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2017 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2017, 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
@@ -123,7 +123,8 @@ versions of ID3v2.")
(modules '((guix build utils)))
;; Don't use bundled zlib
(snippet '(begin (delete-file-recursively "zlib") #t))
- (patches (search-patches "id3lib-CVE-2007-4460.patch"))))
+ (patches (search-patches "id3lib-CVE-2007-4460.patch"
+ "id3lib-UTF16-writing-bug.patch"))))
(build-system gnu-build-system)
(inputs `(("zlib" ,zlib)))
(arguments
diff --git a/gnu/packages/patches/id3lib-UTF16-writing-bug.patch b/gnu/packages/patches/id3lib-UTF16-writing-bug.patch
new file mode 100644
index 0000000000..b05d2cf298
--- /dev/null
+++ b/gnu/packages/patches/id3lib-UTF16-writing-bug.patch
@@ -0,0 +1,39 @@
+diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog
+--- id3lib-3.8.3.orig/ChangeLog 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/ChangeLog 2006-02-22 00:33:59.946214472 +0100
+@@ -1,3 +1,8 @@
++2006-02-17 Jerome Couderc
++
++ * Patch from Spoon to fix UTF-16 writing bug
++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++
+ 2003-03-02 Sunday 17:38 Thijmen Klok <thijmen@id3lib.org>
+
+ * THANKS (1.20): added more people
+diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp
+--- id3lib-3.8.3.orig/src/io_helpers.cpp 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/src/io_helpers.cpp 2006-02-22 00:35:02.926639992 +0100
+@@ -363,11 +363,22 @@
+ // Write the BOM: 0xFEFF
+ unicode_t BOM = 0xFEFF;
+ writer.writeChars((const unsigned char*) &BOM, 2);
++ // Patch from Spoon : 2004-08-25 14:17
++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++ // Wrong code
++ //for (size_t i = 0; i < size; i += 2)
++ //{
++ // unicode_t ch = (data[i] << 8) | data[i+1];
++ // writer.writeChars((const unsigned char*) &ch, 2);
++ //}
++ // Right code
++ unsigned char *pdata = (unsigned char *) data.c_str();
+ for (size_t i = 0; i < size; i += 2)
+ {
+- unicode_t ch = (data[i] << 8) | data[i+1];
++ unicode_t ch = (pdata[i] << 8) | pdata[i+1];
+ writer.writeChars((const unsigned char*) &ch, 2);
+ }
++ // End patch
+ }
+ return writer.getCur() - beg;
+ }
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#37720] [PATCH 2/2] gnu: easytag: Fix mp3 support.
2019-10-12 21:25 [bug#37720] [PATCH 0/2] gnu: easytag: Fix mp3 support Pierre Langlois
2019-10-12 21:29 ` [bug#37720] [PATCH 1/2] gnu: id3lib: Apply patch for UTF16 writing bug Pierre Langlois
@ 2019-10-12 21:30 ` Pierre Langlois
2019-10-13 12:09 ` bug#37720: [PATCH 0/2] " Danny Milosavljevic
2 siblings, 0 replies; 4+ messages in thread
From: Pierre Langlois @ 2019-10-12 21:30 UTC (permalink / raw)
To: 37720; +Cc: Pierre Langlois
* gnu/packages/music.scm (easytag)[arguments]: Add 'Name', 'Description' and
'Version' entries to temporary id3tag.pc pkg-config file. Terminate phases
with #t.
---
gnu/packages/music.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index ac4333168c..4c74ae5ffa 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -11,7 +11,7 @@
;;; Copyright © 2017 ng0 <ng0@n0.is>
;;; Copyright © 2017 Rodger Fox <thylakoid@openmailbox.org>
;;; Copyright © 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;;; Copyright © 2017, 2018 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2017, 2018, 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 nee <nee.git@hidamari.blue>
@@ -593,12 +593,17 @@ enable professional yet simple and intuitive pattern-based drum programming.")
"prefix=~@*~a~@
libdir=${prefix}/lib~@
includedir=${prefix}/include~@
+
+ Name: libid3tag~@
+ Description:~@
+ Version:~@
Libs: -L${libdir} -lid3tag -lz~@
Cflags: -I${includedir}~%"
libid3tag)))
(setenv "PKG_CONFIG_PATH"
(string-append (getenv "PKG_CONFIG_PATH")
- ":" (getcwd) "/pkgconfig")))))
+ ":" (getcwd) "/pkgconfig"))
+ #t)))
(add-after 'unpack 'patch-makefile
(lambda _
(substitute* "Makefile.in"
@@ -606,7 +611,8 @@ enable professional yet simple and intuitive pattern-based drum programming.")
;; script with /bin/sh hard-coded.
(("/bin/sh") (which "sh"))
;; Don't create 'icon-theme.cache'.
- (("gtk-update-icon-cache") "true")))))))
+ (("gtk-update-icon-cache") "true"))
+ #t)))))
(home-page "https://wiki.gnome.org/Apps/EasyTAG")
(synopsis "Simple application for viewing and editing tags in audio files")
(description
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#37720: [PATCH 0/2] gnu: easytag: Fix mp3 support.
2019-10-12 21:25 [bug#37720] [PATCH 0/2] gnu: easytag: Fix mp3 support Pierre Langlois
2019-10-12 21:29 ` [bug#37720] [PATCH 1/2] gnu: id3lib: Apply patch for UTF16 writing bug Pierre Langlois
2019-10-12 21:30 ` [bug#37720] [PATCH 2/2] gnu: easytag: Fix mp3 support Pierre Langlois
@ 2019-10-13 12:09 ` Danny Milosavljevic
2 siblings, 0 replies; 4+ messages in thread
From: Danny Milosavljevic @ 2019-10-13 12:09 UTC (permalink / raw)
To: Pierre Langlois; +Cc: 37720-done
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
Hi Pierre,
On Sat, 12 Oct 2019 22:25:31 +0100
Pierre Langlois <pierre.langlois@gmx.com> wrote:
> WDYT?
Looks good to me, so I pushed the patchset to guix master.
(It's unfortunately that char signedness is unspecified in the C standard.
That maybe made sense in 1980--not today. Sigh)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread