public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/ffmpegsource/, media-libs/ffmpegsource/files/
@ 2017-01-12 14:06 Patrice Clement
  0 siblings, 0 replies; 2+ messages in thread
From: Patrice Clement @ 2017-01-12 14:06 UTC (permalink / raw
  To: gentoo-commits

commit:     980810e3f0147f4e7be57f8c786d1b2e185b9f9e
Author:     Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Tue Jan 10 15:40:31 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu Jan 12 14:06:06 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=980810e3

media-libs/ffmpegsource: remove old.

Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/3420

 media-libs/ffmpegsource/Manifest                   |  1 -
 media-libs/ffmpegsource/ffmpegsource-2.22.ebuild   | 39 ----------------------
 .../ffmpegsource-2.22-add-missing-extern-C.patch   | 27 ---------------
 .../ffmpegsource-2.22-fix-pixfmt-define.patch      | 31 -----------------
 .../ffmpegsource-2.22-include-missing-header.patch | 22 ------------
 5 files changed, 120 deletions(-)

diff --git a/media-libs/ffmpegsource/Manifest b/media-libs/ffmpegsource/Manifest
index 2c14a15..7827337 100644
--- a/media-libs/ffmpegsource/Manifest
+++ b/media-libs/ffmpegsource/Manifest
@@ -1,2 +1 @@
-DIST ffmpegsource-2.22.tar.gz 487244 SHA256 7c5202fa2e49186fb3bb815e5b12ca71f05ec09cb707ffd9465852e21a06fdad SHA512 af92766f19b5db15c2f0b08e4d894e26bb66f93360b12461d37f38983a4e1916656514d52bf86f8a5def83207e2433d04f58384b1cf8f617ab19aafd2f0d7d56 WHIRLPOOL 2fb1b189ba573fd2e1f65e61cfa365201a419a3bb066ef54e06c07c5f8eabcfb93dc3191c860a8816a797eb9e47a62929a35c1c786a43712ab80ac2df69ee811
 DIST ffmpegsource-2.23.tar.gz 488940 SHA256 b09b2aa2b1c6f87f94a0a0dd8284b3c791cbe77f0f3df57af99ddebcd15273ed SHA512 dbbc3c53062f9b66beeea57b57250abbc331807aad9300966ace4ddd3603273c6345e20d105b668cd852442b494e047ade8b8b1d8340c464ca748f6b11a5292c WHIRLPOOL 432967d5b4aae29102fe2e8d4473e06b457101a9e93db4def30e6d29a792698471dd55d65afca7febf9f18dc0fc3c35997e78e4ce6474803e446530e995218ba

diff --git a/media-libs/ffmpegsource/ffmpegsource-2.22.ebuild b/media-libs/ffmpegsource/ffmpegsource-2.22.ebuild
deleted file mode 100644
index 4103c1a..00000000
--- a/media-libs/ffmpegsource/ffmpegsource-2.22.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-AUTOTOOLS_AUTORECONF=1
-
-inherit autotools-utils flag-o-matic vcs-snapshot
-
-DESCRIPTION="A libav/ffmpeg based source library for easy frame accurate access"
-HOMEPAGE="https://github.com/FFMS/ffms2"
-SRC_URI="https://github.com/FFMS/ffms2/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0/4"
-KEYWORDS="amd64 x86"
-IUSE="libav static-libs"
-
-RDEPEND="
-	sys-libs/zlib
-	!libav? ( >=media-video/ffmpeg-2.4:0= )
-	libav? ( >=media-video/libav-9:0= )
-"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/${P}-fix-pixfmt-define.patch"
-	"${FILESDIR}/${P}-include-missing-header.patch"
-	"${FILESDIR}/${P}-add-missing-extern-C.patch"
-)
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11; then
-		die "Your compiler lacks C++11 support. Use GCC>=4.7.0 or Clang>=3.3."
-	fi
-}

diff --git a/media-libs/ffmpegsource/files/ffmpegsource-2.22-add-missing-extern-C.patch b/media-libs/ffmpegsource/files/ffmpegsource-2.22-add-missing-extern-C.patch
deleted file mode 100644
index 9ef42d7..00000000
--- a/media-libs/ffmpegsource/files/ffmpegsource-2.22-add-missing-extern-C.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-commit 1dc922cdd0798d5522331f1c98657f494d18c6b9
-Author: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-Date:   Sun Dec 27 18:37:59 2015 -0500
-
-    track: Wrap C headers in extern "C" properly
-    
-    This fixes av_rescale being undefiend during linking with some
-    GCC versions (e.g. 4.8.4 on Ubuntu 14.04).
-    
-    Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
-diff --git a/src/core/track.cpp b/src/core/track.cpp
-index 136bc21..23e57ad 100644
---- a/src/core/track.cpp
-+++ b/src/core/track.cpp
-@@ -25,9 +25,11 @@
- 
- #include <algorithm>
- 
-+extern "C" {
- #include <libavutil/avutil.h>
- #include <libavutil/common.h>
- #include <libavutil/mathematics.h>
-+}
- 
- namespace {
- FrameInfo ReadFrame(ZipFile &stream, FrameInfo const& prev, const FFMS_TrackType TT) {

diff --git a/media-libs/ffmpegsource/files/ffmpegsource-2.22-fix-pixfmt-define.patch b/media-libs/ffmpegsource/files/ffmpegsource-2.22-fix-pixfmt-define.patch
deleted file mode 100644
index 9815edc..00000000
--- a/media-libs/ffmpegsource/files/ffmpegsource-2.22-fix-pixfmt-define.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit d4cf0fcdb355319e2f868d4e474a6b78b36848fd
-Author: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-Date:   Sun Dec 27 18:36:27 2015 -0500
-
-    ffmscompat: Use a separate version check for pixfmt flags
-    
-    These changed during a separate version bump from the pixfmts themselves.
-    
-    What a mess.
-    
-    Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
-diff --git a/include/ffmscompat.h b/include/ffmscompat.h
-index be99db8..eea9029 100644
---- a/include/ffmscompat.h
-+++ b/include/ffmscompat.h
-@@ -88,9 +88,13 @@ static void av_frame_free(AVFrame **frame) { av_freep(frame); }
- #	if VERSION_CHECK(LIBAVUTIL_VERSION_INT, <, 51, 42, 0, 51, 74, 100)
- #		define AVPixelFormat PixelFormat
- #		define FFMS_PIX_FMT(x) PIX_FMT_##x
--#		define FFMS_PIX_FMT_FLAG(x) PIX_FMT_##x
- #	else
- #		define FFMS_PIX_FMT(x) AV_PIX_FMT_##x
-+#	endif
-+
-+#	if VERSION_CHECK(LIBAVUTIL_VERSION_INT, <, 52, 11, 0, 52, 32, 100)
-+#		define FFMS_PIX_FMT_FLAG(x) PIX_FMT_##x
-+#	else
- #		define FFMS_PIX_FMT_FLAG(x) AV_PIX_FMT_FLAG_##x
- #	endif
- 

diff --git a/media-libs/ffmpegsource/files/ffmpegsource-2.22-include-missing-header.patch b/media-libs/ffmpegsource/files/ffmpegsource-2.22-include-missing-header.patch
deleted file mode 100644
index bae86ec..00000000
--- a/media-libs/ffmpegsource/files/ffmpegsource-2.22-include-missing-header.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-commit 848f7656e1e912352345f84b9499ab4483902d3b
-Author: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-Date:   Sun Dec 27 18:37:28 2015 -0500
-
-    track: Include missing header
-    
-    This is requried for av_rescale.
-    
-    Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-
-diff --git a/src/core/track.cpp b/src/core/track.cpp
-index 3300094..136bc21 100644
---- a/src/core/track.cpp
-+++ b/src/core/track.cpp
-@@ -27,6 +27,7 @@
- 
- #include <libavutil/avutil.h>
- #include <libavutil/common.h>
-+#include <libavutil/mathematics.h>
- 
- namespace {
- FrameInfo ReadFrame(ZipFile &stream, FrameInfo const& prev, const FFMS_TrackType TT) {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/ffmpegsource/, media-libs/ffmpegsource/files/
@ 2023-05-31 23:48 Nick Sarnie
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Sarnie @ 2023-05-31 23:48 UTC (permalink / raw
  To: gentoo-commits

commit:     d1b13d1f73246abe7be23ab4f2560ea18d5bffb2
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Wed May 31 23:45:27 2023 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Wed May 31 23:47:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1b13d1f

media-libs/ffmpegsource: Fix build with ffmpeg 5

Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org>

 .../ffmpegsource/ffmpegsource-2.40-r1.ebuild       |  45 +++++++++
 ...ffmpegsource-2.40-Fix-build-with-ffmpeg-5.patch | 106 +++++++++++++++++++++
 2 files changed, 151 insertions(+)

diff --git a/media-libs/ffmpegsource/ffmpegsource-2.40-r1.ebuild b/media-libs/ffmpegsource/ffmpegsource-2.40-r1.ebuild
new file mode 100644
index 000000000000..5b1170bad347
--- /dev/null
+++ b/media-libs/ffmpegsource/ffmpegsource-2.40-r1.ebuild
@@ -0,0 +1,45 @@
+# 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_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");


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-31 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31 23:48 [gentoo-commits] repo/gentoo:master commit in: media-libs/ffmpegsource/, media-libs/ffmpegsource/files/ Nick Sarnie
  -- strict thread matches above, loose matches on Subject: below --
2017-01-12 14:06 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox