pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/easytag



Module Name:    pkgsrc
Committed By:   wiz
Date:           Thu Feb  1 09:46:00 UTC 2024

Modified Files:
        pkgsrc/audio/easytag: Makefile distinfo options.mk
Added Files:
        pkgsrc/audio/easytag/patches: patch-src_tags_gio__wrapper.cc
            patch-src_tags_gio__wrapper.h patch-src_tags_mp4__tag.cc

Log Message:
easytag: fix build with taglib 2 using arch patch

Some pkglint cleanup while here.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 pkgsrc/audio/easytag/Makefile
cvs rdiff -u -r1.46 -r1.47 pkgsrc/audio/easytag/distinfo
cvs rdiff -u -r1.11 -r1.12 pkgsrc/audio/easytag/options.mk
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/audio/easytag/patches/patch-src_tags_gio__wrapper.cc \
    pkgsrc/audio/easytag/patches/patch-src_tags_gio__wrapper.h \
    pkgsrc/audio/easytag/patches/patch-src_tags_mp4__tag.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/easytag/Makefile
diff -u pkgsrc/audio/easytag/Makefile:1.128 pkgsrc/audio/easytag/Makefile:1.129
--- pkgsrc/audio/easytag/Makefile:1.128 Sun Jan 28 13:24:33 2024
+++ pkgsrc/audio/easytag/Makefile       Thu Feb  1 09:45:59 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.128 2024/01/28 13:24:33 wiz Exp $
+# $NetBSD: Makefile,v 1.129 2024/02/01 09:45:59 wiz Exp $
 
 DISTNAME=      easytag-2.4.3
 PKGREVISION=   17
@@ -17,8 +17,6 @@ USE_PKGLOCALEDIR=     yes
 USE_TOOLS+=            gmake intltool pkg-config xgettext
 USE_TOOLS+=            itstool
 
-PLIST_VARS+=           man
-
 .include "options.mk"
 
 .include "../../audio/id3lib/buildlink3.mk"

Index: pkgsrc/audio/easytag/distinfo
diff -u pkgsrc/audio/easytag/distinfo:1.46 pkgsrc/audio/easytag/distinfo:1.47
--- pkgsrc/audio/easytag/distinfo:1.46  Tue Oct 26 09:58:52 2021
+++ pkgsrc/audio/easytag/distinfo       Thu Feb  1 09:45:59 2024
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.46 2021/10/26 09:58:52 nia Exp $
+$NetBSD: distinfo,v 1.47 2024/02/01 09:45:59 wiz Exp $
 
 BLAKE2s (easytag-2.4.3.tar.xz) = ef885de2248210938437c5ab9dbbb4232e6bcd388ec96a48b54f6b8c8b820552
 SHA512 (easytag-2.4.3.tar.xz) = ef596341772ce7da3b7feec2c82a20ca29d25c2496074c469be5b8dd75d2b2718e689310e0d61de53bc29a4f54ce9f853a336e1a35076046fd107afd28699087
 Size (easytag-2.4.3.tar.xz) = 1381084 bytes
+SHA1 (patch-src_tags_gio__wrapper.cc) = 4ffda6f8685b02994ab577c5678cc317e6b75ab3
+SHA1 (patch-src_tags_gio__wrapper.h) = 231003fcbf5740a8e1186926a470bf43ca9aca79
+SHA1 (patch-src_tags_mp4__tag.cc) = 2c1c47835c6b5d9a3919a7e4cf7678c3cdc9a433

Index: pkgsrc/audio/easytag/options.mk
diff -u pkgsrc/audio/easytag/options.mk:1.11 pkgsrc/audio/easytag/options.mk:1.12
--- pkgsrc/audio/easytag/options.mk:1.11        Tue Jun  6 12:40:16 2023
+++ pkgsrc/audio/easytag/options.mk     Thu Feb  1 09:45:59 2024
@@ -1,9 +1,11 @@
-# $NetBSD: options.mk,v 1.11 2023/06/06 12:40:16 riastradh Exp $
+# $NetBSD: options.mk,v 1.12 2024/02/01 09:45:59 wiz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.easytag
 PKG_SUPPORTED_OPTIONS= doc flac manual ogg opus speex wavpack
 PKG_SUGGESTED_OPTIONS= doc flac manual ogg opus speex wavpack
 
+PLIST_VARS+=           man
+
 .include "../../mk/bsd.options.mk"
 
 .if !empty(PKG_OPTIONS:Mdoc)

Added files:

Index: pkgsrc/audio/easytag/patches/patch-src_tags_gio__wrapper.cc
diff -u /dev/null pkgsrc/audio/easytag/patches/patch-src_tags_gio__wrapper.cc:1.1
--- /dev/null   Thu Feb  1 09:46:00 2024
+++ pkgsrc/audio/easytag/patches/patch-src_tags_gio__wrapper.cc Thu Feb  1 09:45:59 2024
@@ -0,0 +1,77 @@
+$NetBSD: patch-src_tags_gio__wrapper.cc,v 1.1 2024/02/01 09:45:59 wiz Exp $
+
+Fix build with taglib2
+https://gitlab.archlinux.org/archlinux/packaging/packages/easytag/-/blob/main/taglib-2.patch?ref_type=heads
+https://gitlab.gnome.org/GNOME/easytag/-/issues/92
+
+--- src/tags/gio_wrapper.cc.orig       2016-06-24 14:57:32.000000000 +0000
++++ src/tags/gio_wrapper.cc
+@@ -47,11 +47,11 @@ GIO_InputStream::name () const
+ }
+ 
+ TagLib::ByteVector
+-GIO_InputStream::readBlock (TagLib::ulong len)
++GIO_InputStream::readBlock (ulong len)
+ {
+     if (error)
+     {
+-        return TagLib::ByteVector::null;
++        return TagLib::ByteVector();
+     }
+ 
+     TagLib::ByteVector rv (len, 0);
+@@ -70,14 +70,14 @@ GIO_InputStream::writeBlock (TagLib::Byt
+ 
+ void
+ GIO_InputStream::insert (TagLib::ByteVector const &data,
+-                         TagLib::ulong start,
+-                         TagLib::ulong replace)
++                         TagLib::offset_t start,
++                         size_t replace)
+ {
+     g_warning ("%s", "Trying to write to read-only file!");
+ }
+ 
+ void
+-GIO_InputStream::removeBlock (TagLib::ulong start, TagLib::ulong len)
++GIO_InputStream::removeBlock (TagLib::offset_t start, size_t len)
+ {
+     g_warning ("%s", "Trying to write to read-only file!");
+ }
+@@ -200,11 +200,11 @@ GIO_IOStream::name () const
+ }
+ 
+ TagLib::ByteVector
+-GIO_IOStream::readBlock (TagLib::ulong len)
++GIO_IOStream::readBlock (ulong len)
+ {
+     if (error)
+     {
+-        return TagLib::ByteVector::null;
++        return TagLib::ByteVector();
+     }
+ 
+     gsize bytes = 0;
+@@ -239,8 +239,8 @@ GIO_IOStream::writeBlock (TagLib::ByteVe
+ 
+ void
+ GIO_IOStream::insert (TagLib::ByteVector const &data,
+-                      TagLib::ulong start,
+-                      TagLib::ulong replace)
++                      TagLib::offset_t start,
++                      size_t replace)
+ {
+     if (error)
+     {
+@@ -351,9 +351,9 @@ GIO_IOStream::insert (TagLib::ByteVector
+ }
+ 
+ void
+-GIO_IOStream::removeBlock (TagLib::ulong start, TagLib::ulong len)
++GIO_IOStream::removeBlock (TagLib::offset_t start, size_t len)
+ {
+-    if (start + len >= (TagLib::ulong)length ())
++    if (start + len >= (ulong)length ())
+     {
+         truncate (start);
+         return;
Index: pkgsrc/audio/easytag/patches/patch-src_tags_gio__wrapper.h
diff -u /dev/null pkgsrc/audio/easytag/patches/patch-src_tags_gio__wrapper.h:1.1
--- /dev/null   Thu Feb  1 09:46:00 2024
+++ pkgsrc/audio/easytag/patches/patch-src_tags_gio__wrapper.h  Thu Feb  1 09:45:59 2024
@@ -0,0 +1,36 @@
+$NetBSD: patch-src_tags_gio__wrapper.h,v 1.1 2024/02/01 09:45:59 wiz Exp $
+
+Fix build with taglib2
+https://gitlab.archlinux.org/archlinux/packaging/packages/easytag/-/blob/main/taglib-2.patch?ref_type=heads
+https://gitlab.gnome.org/GNOME/easytag/-/issues/92
+
+--- src/tags/gio_wrapper.h.orig        2016-06-24 14:57:32.000000000 +0000
++++ src/tags/gio_wrapper.h
+@@ -33,10 +33,10 @@ public:
+     GIO_InputStream (GFile *file_);
+     virtual ~GIO_InputStream ();
+     virtual TagLib::FileName name () const;
+-    virtual TagLib::ByteVector readBlock (TagLib::ulong length);
++    virtual TagLib::ByteVector readBlock (ulong length);
+     virtual void writeBlock (TagLib::ByteVector const &data);
+-    virtual void insert (TagLib::ByteVector const &data, TagLib::ulong start = 0, TagLib::ulong replace = 0);
+-    virtual void removeBlock (TagLib::ulong start = 0, TagLib::ulong length = 0);
++    virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0);
++    virtual void removeBlock (TagLib::offset_t start = 0, size_t length = 0);
+     virtual bool readOnly () const;
+     virtual bool isOpen () const;
+     virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning);
+@@ -61,10 +61,10 @@ public:
+     GIO_IOStream (GFile *file_);
+     virtual ~GIO_IOStream ();
+     virtual TagLib::FileName name () const;
+-    virtual TagLib::ByteVector readBlock (TagLib::ulong length);
++    virtual TagLib::ByteVector readBlock (ulong length);
+     virtual void writeBlock (TagLib::ByteVector const &data);
+-    virtual void insert (TagLib::ByteVector const &data, TagLib::ulong start = 0, TagLib::ulong replace = 0);
+-    virtual void removeBlock (TagLib::ulong start = 0, TagLib::ulong len = 0);
++    virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0);
++    virtual void removeBlock (TagLib::offset_t start = 0, size_t len = 0);
+     virtual bool readOnly () const;
+     virtual bool isOpen () const;
+     virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning);
Index: pkgsrc/audio/easytag/patches/patch-src_tags_mp4__tag.cc
diff -u /dev/null pkgsrc/audio/easytag/patches/patch-src_tags_mp4__tag.cc:1.1
--- /dev/null   Thu Feb  1 09:46:00 2024
+++ pkgsrc/audio/easytag/patches/patch-src_tags_mp4__tag.cc     Thu Feb  1 09:45:59 2024
@@ -0,0 +1,58 @@
+$NetBSD: patch-src_tags_mp4__tag.cc,v 1.1 2024/02/01 09:45:59 wiz Exp $
+
+Fix build with taglib2
+https://gitlab.archlinux.org/archlinux/packaging/packages/easytag/-/blob/main/taglib-2.patch?ref_type=heads
+https://gitlab.gnome.org/GNOME/easytag/-/issues/92
+
+--- src/tags/mp4_tag.cc.orig   2016-06-24 14:57:32.000000000 +0000
++++ src/tags/mp4_tag.cc
+@@ -222,7 +222,7 @@ mp4tag_read_file_tag (GFile *file,
+         FileTag->encoded_by = g_strdup (encodedbys.front ().toCString (true));
+     }
+ 
+-    const TagLib::MP4::ItemListMap &extra_items = tag->itemListMap ();
++    const TagLib::MP4::ItemMap &extra_items = tag->itemMap ();
+ 
+     /* Album Artist */
+ #if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 10)
+@@ -437,25 +437,12 @@ mp4tag_write_file_tag (const ET_File *ET
+         fields.insert ("ENCODEDBY", string);
+     }
+ 
+-    TagLib::MP4::ItemListMap &extra_items = tag->itemListMap ();
+-
+     /* Album artist. */
+     if (!et_str_empty (FileTag->album_artist))
+     {
+         TagLib::String string (FileTag->album_artist, TagLib::String::UTF8);
+-#if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 10)
+-        /* No "ALBUMARTIST" support in TagLib until 1.10; use atom directly. */
+-        extra_items.insert ("aART", TagLib::MP4::Item (string));
+-#else
+         fields.insert ("ALBUMARTIST", string);
+-#endif
+     }
+-#if (TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION < 10)
+-    else
+-    {
+-        extra_items.erase ("aART");
+-    }
+-#endif
+ 
+     /***********
+      * Picture *
+@@ -491,12 +478,12 @@ mp4tag_write_file_tag (const ET_File *ET
+         TagLib::MP4::CoverArt art (f, TagLib::ByteVector((char *)data,
+                                                          data_size));
+ 
+-        extra_items.insert ("covr",
++        tag->setItem("covr",
+                             TagLib::MP4::Item (TagLib::MP4::CoverArtList ().append (art)));
+     }
+     else
+     {
+-        extra_items.erase ("covr");
++        tag->removeItem("covr");
+     }
+ 
+     tag->setProperties (fields);



Home | Main Index | Thread Index | Old Index