From nobody Fri Jun 07 01:23:01 2024 X-Original-To: dev-commits-ports-main@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 4VwNjx1dK8z5NQjr; Fri, 07 Jun 2024 01:23:01 +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 4VwNjx19KMz4Mrm; Fri, 7 Jun 2024 01:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717723381; 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=JXemxmyBh/ZuZf/ODYqKbQpFJ3YxENduUKRUEAX02kE=; b=ZSvJGK9z0zX2wO3fpQ2LJNjz/iKsul9T2WzFis7nXWyUJRbA8z41mDDdsWPK7c0OAW1RXx fD1o3PT+eVp1jDUtYH0hTDInJ93+jJLdtYaJbADAsYJ94D6jRTtZeALWgFBrSK1g+NdP6f U1vmjbwmXxDNryda2pIH7+baXcLVayW5A0Z2N6tNB2XGrfS4DadulaVToecD049kn28Lrk c8E8W0xQSlPKmnEk7J3yQJHHBQuRoV3SuIRSyOvc2d/iohNKnkjdPsAe99g8jXlZHMZquf SK2iseoEPOT7/M3RgUtd4icFMGerM6DH893JjXs3w2xaRFVi1p1xo6b41jMKHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717723381; a=rsa-sha256; cv=none; b=IFZRU2DFv/AycIqTxP+VEr1DlAIXGjqlNLCakOHRpDYpqStvDLDEjC34yj5dXhC72vF4hD VqbxI+0TY12Lg29/8YItPhdd2UM0iXUZ4qFetzDCWnRrNo4Cr48MrplOfYshBHRrsWVnyJ /QmkRvW5Gnl8vP5aqUEEo+7xj2Gl7xYz/gMwXQa5T1EepoufyMgx7woU+V3meRpBDnoEYN bdbbWvOPe/TJuaAnxAHbgS2NPtSqzqf20MmgKfdr9zBzN9yTxJ8t6Rh9JF4B91La49I4vU FPDJ4ohVlc71V+DvhCRrW1gPA2oM+BioPrCDeqBKq5vCx2FTQTpOwsCDXMO8cw== 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=1717723381; 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=JXemxmyBh/ZuZf/ODYqKbQpFJ3YxENduUKRUEAX02kE=; b=ax6eZjR7q8KIKyWnNBWRBQUUMIo/miFpQDxv9wGtaCERgX2rp2wkIvC0K+fzPDdWKkcwC1 J3SD4kDw7JdAiMRL0jv3ztW8GHf2lBZ/vfDXpLyJ39IZjnnqnWvrFAUiAjWx0qh47yKL+4 yxVx1uyYLV0LnkJ8Ybi71uoLkZMr03UhoOphzsTEhrm6S4TcIEWj5mI26chY+VxgIOnyuG p3PBP+680aAuvwmQOP4hniTf0miJxPfGbj3Jc9mcJ//L/DJsz9UN9/42gGz3eN7tAJ4Wm7 cqnnJtLU1ugEu3j5d2ekd1N1Y2+QPA0Io9FL+ydxbB0nmXjLvt6aT6cu4vwKcg== 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 4VwNjx0mDtz18VS; Fri, 7 Jun 2024 01:23:01 +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 4571N1tE019435; Fri, 7 Jun 2024 01:23:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4571N1bF019432; Fri, 7 Jun 2024 01:23:01 GMT (envelope-from git) Date: Fri, 7 Jun 2024 01:23:01 GMT Message-Id: <202406070123.4571N1bF019432@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: eda5553deae8 - main - multimedia/vlc: Prepare for Taglib 2.x List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@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: eda5553deae8571894acbd0775439b9a58df74e9 Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=eda5553deae8571894acbd0775439b9a58df74e9 commit eda5553deae8571894acbd0775439b9a58df74e9 Author: Jason E. Hale AuthorDate: 2024-06-04 21:16:26 +0000 Commit: Jason E. Hale CommitDate: 2024-06-06 22:54:12 +0000 multimedia/vlc: Prepare for Taglib 2.x Backport several upstream commits to fix the build with taglib 2.x. [1] Disable some compiler warnings that bloat the build log to the point where it is barely readable. Toggle the svgdec plugin in the LIBRSVG2 option to fix dependency issues on live systems if it is set to off and the required dependencies are auto-detected. PR: 276677 [1] --- multimedia/vlc/Makefile | 5 +- .../files/patch-modules_meta__engine_taglib.cpp | 159 +++++++++++++++++++++ 2 files changed, 162 insertions(+), 2 deletions(-) diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile index f43795983e73..f662ea31b99f 100644 --- a/multimedia/vlc/Makefile +++ b/multimedia/vlc/Makefile @@ -1,6 +1,6 @@ PORTNAME= vlc DISTVERSION= 3.0.20 -PORTREVISION= 7 +PORTREVISION= 9 PORTEPOCH= 4 CATEGORIES= multimedia audio net www MASTER_SITES= https://get.videolan.org/${PORTNAME}/${DISTVERSION:S/a$//}/ \ @@ -59,6 +59,7 @@ CONFIGURE_ARGS= --enable-avcodec --enable-avformat --enable-dvbpsi \ CONFIGURE_ARGS+=--enable-debug .endif INSTALL_TARGET= install-strip +CFLAGS+= -Wno-unreachable-code-generic-assoc CFLAGS_i386= -fomit-frame-pointer ELF_FEATURES= +noaslr:bin/.libs/vlc # See PR 270038 BINARY_ALIAS= sed=${LOCALBASE}/bin/gsed @@ -204,7 +205,7 @@ LIBPLACEBO_LIB_DEPENDS= libplacebo.so:graphics/libplacebo LIBPLACEBO_CONFIGURE_ENABLE= libplacebo LIBRSVG2_USE= GNOME=librsvg2,cairo -LIBRSVG2_CONFIGURE_ENABLE= svg +LIBRSVG2_CONFIGURE_ENABLE= svg svgdec LIBSSH2_LIB_DEPENDS= libssh2.so:security/libssh2 LIBSSH2_CONFIGURE_ENABLE= sftp diff --git a/multimedia/vlc/files/patch-modules_meta__engine_taglib.cpp b/multimedia/vlc/files/patch-modules_meta__engine_taglib.cpp new file mode 100644 index 000000000000..1c4cdf0b9ec3 --- /dev/null +++ b/multimedia/vlc/files/patch-modules_meta__engine_taglib.cpp @@ -0,0 +1,159 @@ +Backport upstream fixes for taglib 2.x support and remove usages of member +functions that were deprecated in taglib 1.x and removed in 2.x. + +Obtained from: +https://code.videolan.org/videolan/vlc/-/commit/d2663d6c3fe3af76bdefd58367b4a45c598b83e4 +https://code.videolan.org/videolan/vlc/-/commit/ac59d0ba59ba800c52c0a92ec1d9576d2653dbe2 +https://code.videolan.org/videolan/vlc/-/commit/c404fdb24183031a419667639846edddca3401f8 +https://code.videolan.org/videolan/vlc/-/commit/ec29dfca1e59530dd412d779e0b045079b72ffb6 + +--- modules/meta_engine/taglib.cpp.orig 2023-04-22 23:27:28 UTC ++++ modules/meta_engine/taglib.cpp +@@ -125,7 +125,11 @@ File *VLCTagLib::ExtResolver::createFile(FileName f + template + File *VLCTagLib::ExtResolver::createFile(FileName fileName, bool, AudioProperties::ReadStyle) const + { ++#if defined(_WIN32) && TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ std::string filename = fileName.toString().to8Bit(true); ++#else + std::string filename = std::string(fileName); ++#endif + std::size_t namesize = filename.size(); + + if (namesize > ext.length()) +@@ -180,12 +184,16 @@ class VlcIostream : public IOStream (public) + return m_stream->psz_location; + } + ++#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ ByteVector readBlock(size_t length) ++#else + ByteVector readBlock(ulong length) ++#endif + { + ByteVector res(length, 0); + ssize_t i_read = vlc_stream_Read( m_stream, res.data(), length); + if (i_read < 0) +- return ByteVector::null; ++ return {}; + else if ((size_t)i_read != length) + res.resize(i_read); + return res; +@@ -196,11 +204,19 @@ class VlcIostream : public IOStream (public) + // Let's stay Read-Only for now + } + ++#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ void insert(const ByteVector&, offset_t, size_t) ++#else + void insert(const ByteVector&, ulong, ulong) ++#endif + { + } + ++#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ void removeBlock(offset_t, size_t) ++#else + void removeBlock(ulong, ulong) ++#endif + { + } + +@@ -214,7 +230,11 @@ class VlcIostream : public IOStream (public) + return true; + } + ++#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ void seek(offset_t offset, Position p) ++#else + void seek(long offset, Position p) ++#endif + { + uint64_t pos = 0; + switch (p) +@@ -237,12 +257,20 @@ class VlcIostream : public IOStream (public) + return; + } + ++#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ offset_t tell() const ++#else + long tell() const ++#endif + { + return m_previousPos; + } + ++#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ offset_t length() ++#else + long length() ++#endif + { + uint64_t i_size; + if (vlc_stream_GetSize( m_stream, &i_size ) != VLC_SUCCESS) +@@ -250,7 +278,11 @@ class VlcIostream : public IOStream (public) + return i_size; + } + ++#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ void truncate(offset_t) ++#else + void truncate(long) ++#endif + { + } + +@@ -465,7 +497,7 @@ static void ReadMetaFromBasicTag(const Tag* tag, vlc_m + static void ReadMetaFromBasicTag(const Tag* tag, vlc_meta_t *dest) + { + #define SET( accessor, meta ) \ +- if( !tag->accessor().isNull() && !tag->accessor().isEmpty() ) \ ++ if( !tag->accessor().isEmpty() ) \ + vlc_meta_Set##meta( dest, tag->accessor().toCString(true) ) + #define SETINT( accessor, meta ) \ + if( tag->accessor() ) \ +@@ -806,15 +838,15 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta + { + MP4::Item list; + #define SET( keyName, metaName ) \ +- if( tag->itemListMap().contains(keyName) ) \ ++ if( tag->contains(keyName) ) \ + { \ +- list = tag->itemListMap()[keyName]; \ ++ list = tag->item(keyName); \ + vlc_meta_Set##metaName( p_meta, list.toStringList().front().toCString( true ) ); \ + } + #define SET_EXTRA( keyName, metaName ) \ +- if( tag->itemListMap().contains(keyName) ) \ ++ if( tag->contains(keyName) ) \ + { \ +- list = tag->itemListMap()[keyName]; \ ++ list = tag->item(keyName); \ + vlc_meta_AddExtra( p_meta, metaName, list.toStringList().front().toCString( true ) ); \ + } + +@@ -824,9 +856,9 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta + #undef SET + #undef SET_EXTRA + +- if( tag->itemListMap().contains("covr") ) ++ if( tag->contains("covr") ) + { +- MP4::CoverArtList list = tag->itemListMap()["covr"].toCoverArtList(); ++ MP4::CoverArtList list = tag->item("covr").toCoverArtList(); + const char *psz_format = list[0].format() == MP4::CoverArt::PNG ? "image/png" : "image/jpeg"; + + msg_Dbg( p_demux_meta, "Found embedded art (%s) is %i bytes", +@@ -1337,7 +1369,11 @@ static int WriteMeta( vlc_object_t *p_this ) + if( RIFF::AIFF::File* riff_aiff = dynamic_cast(f.file()) ) + WriteMetaToId3v2( riff_aiff->tag(), p_item ); + else if( RIFF::WAV::File* riff_wav = dynamic_cast(f.file()) ) ++#if TAGLIB_VERSION >= VERSION_INT(2, 0, 0) ++ WriteMetaToId3v2( riff_wav->ID3v2Tag(), p_item ); ++#else + WriteMetaToId3v2( riff_wav->tag(), p_item ); ++#endif + } + else if( TrueAudio::File* trueaudio = dynamic_cast(f.file()) ) + {