From nobody Fri Jun 7 01:23:08 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VwNk52QqCz5NR3P; Fri, 07 Jun 2024 01:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VwNk50fzlz4N60; Fri, 7 Jun 2024 01:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717723389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dyUlMmaN5pjMK4SHI6mNHlRZ+Lv0vSz3cKzHfv44USk=; b=h4cVPV2CgfoHOEW6oAknQ6/Avzn57Eiu/J42LuW+JOKtvCbmqwNlFchuBzv8j/kCRgug/X JyLr5svZHZL4CFM4k+ID834QoCnwT+h47xOXu3CVYUp2KuJF4pPyLjhgGijp+CbhbVY+Hs uN11Kp2Qfd5HKjStq9GcXMg5X3qmGKa9ABXOLOqJA+qadSZTg9JSPMSWJtT07S6FZg9vtS ZeKFuKTFOXfaAxT58PBrAQHt9edbMNUtdrDxnr4b1gkXQEB91hMgrPaaBXBwNAvorpo6mQ SQStQgPxi/QVdaub1LQxX4l0QTA8ayBEQYdfdlvvRIcGi/DWtsb3KqlEZTPWPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717723389; a=rsa-sha256; cv=none; b=F8cG72UpK0lmQstG5LnJgEDfpPcSYtIsctVIqwgR1tKAVnYufXavHaBdT/8MApXn8fY/m8 B1f6uthSiEGa/TXZpndkxVhrqBxC9zJbylloygJOBnPrWm6RWC8QlGt6N1myw8iAiBZqpw Qs+MPjLogF15DPaW/nx7m/ewpA3KfLPCQO7g5SMxkYu5Wxx1QSjHcuOHUmrfyOmlGXWNZ/ etKTrKbciZR6XjCnWOH5q/fRGeKKJRbS5dkpjSZvZDg0l9SY8oITuHfrIDHi9ANScTuptr 6VQnvKzoLG7Qdl5weMOnIn48hxxWHlcAvu7KTDGqKBJ7JUumJGuowcWKefRkYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717723389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dyUlMmaN5pjMK4SHI6mNHlRZ+Lv0vSz3cKzHfv44USk=; b=DtNZHwePe77mG2ULxXHZL9DSiLM1c60bJT5LItXTzE4H4x3zKheLKNu5KWHYNiPYjMDwxu GNSvdikUcwHyjxQdCRibgYzyZ2DVrDjhS8FQYqKWlYhKGJuDVOiAKWVBKOv0VSW4sEHwsj sspQp1u/35UetAo+1NCALXiSruh3uo02z63ONV6jrX6Pc5lzXGcKEtLRBrgVRFZYv+D3P+ rt+Kp5BAGDY9B8gLsHMVyckMU0iP3CUixqTsqTxLB6KYNpw06C2TmuHTu4xkFmlrDlRDTm NM5k8MwtDVZqycET+LdQIWcOlG3SBHV1kZLlkbt+ex7lNNzjstpIr1gLt6bbsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VwNk472lsz18Pv; Fri, 7 Jun 2024 01:23:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4571N8Zk019762; Fri, 7 Jun 2024 01:23:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4571N8CW019759; Fri, 7 Jun 2024 01:23:08 GMT (envelope-from git) Date: Fri, 7 Jun 2024 01:23:08 GMT Message-Id: <202406070123.4571N8CW019759@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason E. Hale" Subject: git: 7dd9ce8f770f - main - audio/easytag: Prepare for Taglib 2.x List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7dd9ce8f770fca5e970d3c2e968b054d4569f7e3 Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=7dd9ce8f770fca5e970d3c2e968b054d4569f7e3 commit 7dd9ce8f770fca5e970d3c2e968b054d4569f7e3 Author: Jason E. Hale AuthorDate: 2024-06-06 22:19:07 +0000 Commit: Jason E. Hale CommitDate: 2024-06-07 00:21:32 +0000 audio/easytag: Prepare for Taglib 2.x PR: 276677 Obtained from: Arch Linux (with some tweaks) --- audio/easytag/files/patch-src_tags_gio__wrapper.cc | 105 +++++++++++++++++++++ audio/easytag/files/patch-src_tags_gio__wrapper.h | 45 +++++++++ audio/easytag/files/patch-src_tags_mp4__header.cc | 13 +++ audio/easytag/files/patch-src_tags_mp4__tag.cc | 57 +++++++++++ 4 files changed, 220 insertions(+) diff --git a/audio/easytag/files/patch-src_tags_gio__wrapper.cc b/audio/easytag/files/patch-src_tags_gio__wrapper.cc new file mode 100644 index 000000000000..e1fa5d491485 --- /dev/null +++ b/audio/easytag/files/patch-src_tags_gio__wrapper.cc @@ -0,0 +1,105 @@ +Fix build with Taglib 2.x + +Based on patch from Arch Linux: +https://gitlab.archlinux.org/archlinux/packaging/packages/easytag/-/blob/main/taglib-2.patch?ref_type=heads + +--- src/tags/gio_wrapper.cc.orig 2016-06-24 14:57:32 UTC ++++ src/tags/gio_wrapper.cc +@@ -47,11 +47,11 @@ TagLib::ByteVector + } + + TagLib::ByteVector +-GIO_InputStream::readBlock (TagLib::ulong len) ++GIO_InputStream::readBlock (unsigned long len) + { + if (error) + { +- return TagLib::ByteVector::null; ++ return TagLib::ByteVector(); + } + + TagLib::ByteVector rv (len, 0); +@@ -70,14 +70,24 @@ GIO_InputStream::insert (TagLib::ByteVector const &dat + + void + GIO_InputStream::insert (TagLib::ByteVector const &data, +- TagLib::ulong start, +- TagLib::ulong replace) ++#if TAGLIB_MAJOR_VERSION >= 2 ++ TagLib::offset_t start, ++ size_t replace) ++#else ++ unsigned long start, ++ unsigned long replace) ++#endif ++ + { + g_warning ("%s", "Trying to write to read-only file!"); + } + + void +-GIO_InputStream::removeBlock (TagLib::ulong start, TagLib::ulong len) ++#if TAGLIB_MAJOR_VERSION >= 2 ++GIO_InputStream::removeBlock (TagLib::offset_t start, size_t len) ++#else ++GIO_InputStream::removeBlock (unsigned long start, unsigned long len) ++#endif + { + g_warning ("%s", "Trying to write to read-only file!"); + } +@@ -200,11 +210,11 @@ TagLib::ByteVector + } + + TagLib::ByteVector +-GIO_IOStream::readBlock (TagLib::ulong len) ++GIO_IOStream::readBlock (unsigned long len) + { + if (error) + { +- return TagLib::ByteVector::null; ++ return TagLib::ByteVector(); + } + + gsize bytes = 0; +@@ -239,8 +249,14 @@ GIO_IOStream::insert (TagLib::ByteVector const &data, + + void + GIO_IOStream::insert (TagLib::ByteVector const &data, +- TagLib::ulong start, +- TagLib::ulong replace) ++#if TAGLIB_MAJOR_VERSION >= 2 ++ TagLib::offset_t start, ++ size_t replace) ++#else ++ unsigned long start, ++ unsigned long replace) ++#endif ++ + { + if (error) + { +@@ -278,7 +294,7 @@ GIO_IOStream::insert (TagLib::ByteVector const &data, + seek (0); + + while (g_input_stream_read_all (istream, buffer, +- MIN (G_N_ELEMENTS (buffer), start), ++ MIN (G_N_ELEMENTS (buffer), (unsigned long)start), + &r, NULL, &error) && r > 0) + { + gsize w; +@@ -351,9 +367,13 @@ void + } + + void +-GIO_IOStream::removeBlock (TagLib::ulong start, TagLib::ulong len) ++#if TAGLIB_MAJOR_VERSION >= 2 ++GIO_IOStream::removeBlock (TagLib::offset_t start, size_t len) ++#else ++GIO_IOStream::removeBlock (unsigned long start, unsigned long len) ++#endif + { +- if (start + len >= (TagLib::ulong)length ()) ++ if (start + len >= (unsigned long)length ()) + { + truncate (start); + return; diff --git a/audio/easytag/files/patch-src_tags_gio__wrapper.h b/audio/easytag/files/patch-src_tags_gio__wrapper.h new file mode 100644 index 000000000000..fdb8c1f36362 --- /dev/null +++ b/audio/easytag/files/patch-src_tags_gio__wrapper.h @@ -0,0 +1,45 @@ +Fix build with Taglib 2.x + +Based on patch from Arch Linux: +https://gitlab.archlinux.org/archlinux/packaging/packages/easytag/-/blob/main/taglib-2.patch?ref_type=heads + +--- src/tags/gio_wrapper.h.orig 2016-06-24 14:57:32 UTC ++++ src/tags/gio_wrapper.h +@@ -33,10 +33,15 @@ class GIO_InputStream : public TagLib::IOStream (publi + GIO_InputStream (GFile *file_); + virtual ~GIO_InputStream (); + virtual TagLib::FileName name () const; +- virtual TagLib::ByteVector readBlock (TagLib::ulong length); ++ virtual TagLib::ByteVector readBlock (unsigned long 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); ++#if TAGLIB_MAJOR_VERSION >= 2 ++ 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); ++#else ++ virtual void insert (TagLib::ByteVector const &data, unsigned long start = 0, unsigned long replace = 0); ++ virtual void removeBlock (unsigned long start = 0, unsigned long length = 0); ++#endif + virtual bool readOnly () const; + virtual bool isOpen () const; + virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); +@@ -61,10 +66,15 @@ class GIO_IOStream : public TagLib::IOStream (public) + GIO_IOStream (GFile *file_); + virtual ~GIO_IOStream (); + virtual TagLib::FileName name () const; +- virtual TagLib::ByteVector readBlock (TagLib::ulong length); ++ virtual TagLib::ByteVector readBlock (unsigned long 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); ++#if TAGLIB_MAJOR_VERSION >= 2 ++ 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); ++#else ++ virtual void insert (TagLib::ByteVector const &data, unsigned long start = 0, unsigned long replace = 0); ++ virtual void removeBlock (unsigned long start = 0, unsigned long len = 0); ++#endif + virtual bool readOnly () const; + virtual bool isOpen () const; + virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning); diff --git a/audio/easytag/files/patch-src_tags_mp4__header.cc b/audio/easytag/files/patch-src_tags_mp4__header.cc new file mode 100644 index 000000000000..d76f15272656 --- /dev/null +++ b/audio/easytag/files/patch-src_tags_mp4__header.cc @@ -0,0 +1,13 @@ +TagLib::AudioProperties::length() is deprecated in Taglib 2.x. + +--- src/tags/mp4_header.cc.orig 2016-06-24 14:57:32 UTC ++++ src/tags/mp4_header.cc +@@ -105,7 +105,7 @@ et_mp4_header_read_file_info (GFile *file, + ETFileInfo->bitrate = properties->bitrate (); + ETFileInfo->samplerate = properties->sampleRate (); + ETFileInfo->mode = properties->channels (); +- ETFileInfo->duration = properties->length (); ++ ETFileInfo->duration = properties->lengthInSeconds (); + + return TRUE; + } diff --git a/audio/easytag/files/patch-src_tags_mp4__tag.cc b/audio/easytag/files/patch-src_tags_mp4__tag.cc new file mode 100644 index 000000000000..db859f696392 --- /dev/null +++ b/audio/easytag/files/patch-src_tags_mp4__tag.cc @@ -0,0 +1,57 @@ +Fix build with Taglib 2.x + +Obtained from Arch Linux: +https://gitlab.archlinux.org/archlinux/packaging/packages/easytag/-/blob/main/taglib-2.patch?ref_type=heads + +--- src/tags/mp4_tag.cc.orig 2016-06-24 14:57:32 UTC ++++ 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 *ETFile, + 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 *ETFile, + 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);