diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-06-01 03:24:53 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-06-01 03:24:53 +0100 |
commit | 51f111b675c30c05f05128be7836616634098bae (patch) | |
tree | b7f220c25531de5f5c9de03553548b7d3bf3178f /media-libs/ffmpegsource | |
parent | 6e479260831a77b38f58e3f572ead93d8327cf18 (diff) |
gentoo auto-resync : 01:06:2023 - 03:24:53
Diffstat (limited to 'media-libs/ffmpegsource')
-rw-r--r-- | media-libs/ffmpegsource/Manifest | 4 | ||||
-rw-r--r-- | media-libs/ffmpegsource/ffmpegsource-2.40-r2.ebuild | 52 | ||||
-rw-r--r-- | media-libs/ffmpegsource/files/ffmpegsource-2.40-Fix-build-with-ffmpeg-5.patch | 106 | ||||
-rw-r--r-- | media-libs/ffmpegsource/metadata.xml | 5 |
4 files changed, 165 insertions, 2 deletions
diff --git a/media-libs/ffmpegsource/Manifest b/media-libs/ffmpegsource/Manifest index 584b54183d03..38868709bef2 100644 --- a/media-libs/ffmpegsource/Manifest +++ b/media-libs/ffmpegsource/Manifest @@ -1,4 +1,6 @@ +AUX ffmpegsource-2.40-Fix-build-with-ffmpeg-5.patch 4617 BLAKE2B 00aa70d32804dd496337c0099aa689ac28201513632cdaa0064c2045bf03c9392759a88a92ed8427aada2991d0d3c20a80912d46f3ac2ccf82305d2c8719a4f8 SHA512 51852e715f080c16fad7461173ad8c2b20d9231da5fa99b1a849e92b6ed328d2b874384fb070ff0aad2b61f6e40facb36ab6646aae412d15f91c4d8d217bd5cc DIST ffmpegsource-2.40.tar.gz 140356 BLAKE2B 57fbc3d979f31108b257b6720045f4e157fca6714bf0f8601e8123c0026a14bb55d343549ff6b246b55a44b4f69c541c58f4b19f1051e338f1f97b2b7557b6de SHA512 407c4b0871f5046b9d364c2946eae88c46eec381b5748530d82918742fd4a36849de590024f8235af2785bd631c0299e591499dc43ae157ff2c6a6f2dab78b67 +EBUILD ffmpegsource-2.40-r2.ebuild 981 BLAKE2B 9120c48af594f6f1931f885abcecf8d485cf2f85207ba73d3f455f8ccdc131aad6bedfe703fd978784a1a4b8d76d85bdf2628d44fc7639a0fd8dcc78fe6f246d SHA512 e64d6642029e10793d8648496c445219397af7997f945d12d3f84882581e47388eb0962d0a5248723939ed175bf1f22aef088dc17952643ed8c78b2ffe618da0 EBUILD ffmpegsource-2.40.ebuild 822 BLAKE2B dde5f2a6b754db83248b3475e57e56422305227d99578ec15c8e7602b8e79ac1fe8d677a0743cc68194a096be00016b4b3ca8029855180c37d005b05dcef0e15 SHA512 48465ee0bf07625a81c43efaa667bd270535db3c31005f68257ab305693242b373fcff0ece6de7b854cd0af2bb9eaaa61af7213e46ce2331334dbb3a1c059ec3 EBUILD ffmpegsource-9999.ebuild 824 BLAKE2B 01f59dfb928ad0fe748e9042de2ae6020f753f94cd9c979c9a57adbccdad5de712936d8cd9c28b9b68a1481b99d4c4f06554ba7f2b5a68957d421dce114433fb SHA512 f7170484b5166eb6f5fa88f028499d92d049fc48394481e45f5037f71e8e5858d6ddfa3f3881ab40e455547f966174423cce78825c705e6f9a94c77170668d5a -MISC metadata.xml 309 BLAKE2B e5aabf12d7ca299430ffa834802b671bd6462fd9b0ecbf2fad095f34bedc11514558fecdd2546f627165574bbde8c8e595c08de6bb7eab0aec9d6fa4ade3e10e SHA512 5a8b3d4291d5cd988162c1819c5febf3bfdd1be55b6ec7fba6608fe66ce503bb8c1d243dbdc33dcd94b7ade36bdf80590c4dc1adab895c34950757f9d487a699 +MISC metadata.xml 386 BLAKE2B dcd024b2aa66310859e17e79bda7c29461ced044f7f73c3e2f8479016aeb4601bf1ecff4631f9b8e6363c41ee9d641fcde46fb45c4bc00dcee4e5afc1a6a566e SHA512 f82032d1fbee492f553c858f3cf8de64b1d0c6c2112800ba102812eb5c896eba8da5354fa69848637a2962cbf0d4b5d585c8ef9d26b2e2606cdcec67dedba2ae diff --git a/media-libs/ffmpegsource/ffmpegsource-2.40-r2.ebuild b/media-libs/ffmpegsource/ffmpegsource-2.40-r2.ebuild new file mode 100644 index 000000000000..94c2a48dac27 --- /dev/null +++ b/media-libs/ffmpegsource/ffmpegsource-2.40-r2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +QA_PKGCONFIG_VERSION=$(ver_cut 1-2) +inherit autotools + +DESCRIPTION="A libav/ffmpeg based source library for easy frame accurate access" +HOMEPAGE="https://github.com/FFMS/ffms2" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/FFMS/ffms2.git" + inherit git-r3 +else + SRC_URI="https://github.com/FFMS/ffms2/archive/${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/ffms2-${PV} + + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0/4" + +RDEPEND=" + >=media-video/ffmpeg-2.4:= + sys-libs/zlib +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES="${FILESDIR}/${P}-Fix-build-with-ffmpeg-5.patch" + +src_prepare() { + default + + # Cheesy hack from autogen.sh + mkdir src/config || die + eautoreconf +} + +src_configure() { + default + + sed -i -e "s|@FFMS_VERSION@|${PV}|g" \ + "${S}"/ffms2.pc.in || die +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/media-libs/ffmpegsource/files/ffmpegsource-2.40-Fix-build-with-ffmpeg-5.patch b/media-libs/ffmpegsource/files/ffmpegsource-2.40-Fix-build-with-ffmpeg-5.patch new file mode 100644 index 000000000000..2a2cd0f0a5e1 --- /dev/null +++ b/media-libs/ffmpegsource/files/ffmpegsource-2.40-Fix-build-with-ffmpeg-5.patch @@ -0,0 +1,106 @@ +From 586d87de3f896d0c4ff01b21f572375e11f9c3f1 Mon Sep 17 00:00:00 2001 +From: Derek Buitenhuis <derek.buitenhuis@gmail.com> +Date: Tue, 4 May 2021 14:20:47 +0100 +Subject: [PATCH] configure: Remove deprecated API use + +Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b35ef80bcd..d19714d0f6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -102,10 +102,10 @@ CFLAGS="$_CFLAGS $FFMPEG_CFLAGS" + + AC_DEFUN([TEST_FFMPEG], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +- #include <libavcodec/avcodec.h> ++ #include <libavformat/avformat.h> + #include <libswscale/swscale.h> + ]],[[ +- avcodec_register_all(); ++ avformat_network_init(); + swscale_version(); + ]])], [eval $1=yes], [eval $1=no]) + ]) +From 45673149e9a2f5586855ad472e3059084eaa36b1 Mon Sep 17 00:00:00 2001 +From: Derek Buitenhuis <derek.buitenhuis@gmail.com> +Date: Tue, 4 May 2021 14:41:21 +0100 +Subject: [PATCH] Use auto for AVCodec + +The geniuses over at FFmpeg decided to constify this API, so old +versions of the library will return AVCodec *, while new versions +of the libary will return const AVCodec *, which, in C++, are not +OK to convert between. + +Rather than use some macro hell in ffmscompat.h, we can work around +this by using auto. + +Gross. + +Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> +--- + src/core/audiosource.cpp | 2 +- + src/core/indexing.cpp | 6 +++--- + src/core/videosource.cpp | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/core/audiosource.cpp b/src/core/audiosource.cpp +index e4ce97cdb..ac0966636 100644 +--- a/src/core/audiosource.cpp ++++ b/src/core/audiosource.cpp +@@ -469,7 +469,7 @@ void FFMS_AudioSource::OpenFile() { + + LAVFOpenFile(SourceFile.c_str(), FormatContext, TrackNumber); + +- AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id); ++ auto *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id); + if (Codec == nullptr) + throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC, + "Audio codec not found"); +diff --git a/src/core/indexing.cpp b/src/core/indexing.cpp +index e547c5abf..59fb4e8ea 100644 +--- a/src/core/indexing.cpp ++++ b/src/core/indexing.cpp +@@ -384,7 +384,7 @@ FFMS_TrackType FFMS_Indexer::GetTrackType(int Track) { + } + + const char *FFMS_Indexer::GetTrackCodec(int Track) { +- AVCodec *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id); ++ auto *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id); + return codec ? codec->name : nullptr; + } + +@@ -402,7 +402,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { + UseDTS); + + if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { +- AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); ++ auto *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); + if (!VideoCodec) { + FormatContext->streams[i]->discard = AVDISCARD_ALL; + IndexMask.erase(i); +@@ -433,7 +433,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() { + IndexMask.insert(i); + } + } else if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { +- AVCodec *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); ++ auto *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id); + if (AudioCodec == nullptr) + throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED, + "Audio codec not found"); +diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp +index b889970e2..8956c2256 100644 +--- a/src/core/videosource.cpp ++++ b/src/core/videosource.cpp +@@ -171,7 +171,7 @@ FFMS_VideoSource::FFMS_VideoSource(const char *SourceFile, FFMS_Index &Index, in + + LAVFOpenFile(SourceFile, FormatContext, VideoTrack); + +- AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id); ++ auto *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id); + if (Codec == nullptr) + throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC, + "Video codec not found"); diff --git a/media-libs/ffmpegsource/metadata.xml b/media-libs/ffmpegsource/metadata.xml index dd8b7e80d1de..30fc814c34b3 100644 --- a/media-libs/ffmpegsource/metadata.xml +++ b/media-libs/ffmpegsource/metadata.xml @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person"> + <email>sarnex@gentoo.org</email> + <name>Nick Sarnie</name> + </maintainer> <slots> <subslots>libffms2 soname version</subslots> </slots> |