diff options
author | Alexis Ballier <aballier@gentoo.org> | 2022-02-21 18:04:12 +0100 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2022-02-21 18:04:37 +0100 |
commit | 8a72dd9e2e22ec412a5ae79d4b0ccefad8442784 (patch) | |
tree | 944d0a4fa936e187f228b3434cc945976908690a /media-video | |
parent | sci-libs/ignition-common: fix build with ffmpeg5 (diff) | |
download | gentoo-8a72dd9e2e22ec412a5ae79d4b0ccefad8442784.tar.gz gentoo-8a72dd9e2e22ec412a5ae79d4b0ccefad8442784.tar.bz2 gentoo-8a72dd9e2e22ec412a5ae79d4b0ccefad8442784.zip |
media-video/guvcview: bump to 2.0.7
also fix build with ffmpeg5
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/guvcview/Manifest | 1 | ||||
-rw-r--r-- | media-video/guvcview/files/ffmpeg5.patch | 47 | ||||
-rw-r--r-- | media-video/guvcview/guvcview-2.0.7.ebuild | 78 |
3 files changed, 126 insertions, 0 deletions
diff --git a/media-video/guvcview/Manifest b/media-video/guvcview/Manifest index 5b2772755ce6..d1aa2eedf8c0 100644 --- a/media-video/guvcview/Manifest +++ b/media-video/guvcview/Manifest @@ -1 +1,2 @@ DIST guvcview-src-2.0.6.tar.gz 1131013 BLAKE2B ec8d7a82344e26890fe184d0edf77d0e415aa708bdf3cf55f96c555aaef479b1b7441a0425db035d10a6dc31f90282c169afff2d13684599ab1c005a5ea50ab1 SHA512 f73ba0a013f5afadb45c9bf60f723058ee31e99e204c951c49335a8ef9902a2caa752d6d51f6dd20ae960217cc25155e70efe4c49299a95e6780aaf8034078ec +DIST guvcview-src-2.0.7.tar.bz2 449392 BLAKE2B 94140845dbe1209802a7109a3f30d3f7aa391ff4f1b67396481138c65ae3a3cc27499c8dc239bf5e17b730c06e1ebe361872f2a1976f0c2802b8e84fb54a3548 SHA512 a3dcabf3fcb90171969fea76c1a05b4e47b640ba886370b048f5736e2f064f8682967c785db44a9461bdd3761b2bf264e8ce579691d37c8b9efa1a1393162ad8 diff --git a/media-video/guvcview/files/ffmpeg5.patch b/media-video/guvcview/files/ffmpeg5.patch new file mode 100644 index 000000000000..7e8c71b2bc6f --- /dev/null +++ b/media-video/guvcview/files/ffmpeg5.patch @@ -0,0 +1,47 @@ +Index: work/gview_encoder/encoder.c +=================================================================== +--- work.orig/gview_encoder/encoder.c ++++ work/gview_encoder/encoder.c +@@ -446,10 +446,6 @@ static encoder_video_context_t *encoder_ + + video_codec_data->codec_context = avcodec_alloc_context3(video_codec_data->codec); + +- avcodec_get_context_defaults3 ( +- video_codec_data->codec_context, +- video_codec_data->codec); +- + if(video_codec_data->codec_context == NULL) + { + fprintf(stderr, "ENCODER: FATAL memory allocation failure (encoder_video_init): %s\n", strerror(errno)); +@@ -712,7 +708,6 @@ static encoder_audio_context_t *encoder_ + } + + audio_codec_data->codec_context = avcodec_alloc_context3(audio_codec_data->codec); +- avcodec_get_context_defaults3 (audio_codec_data->codec_context, audio_codec_data->codec); + + if(audio_codec_data->codec_context == NULL) + { +Index: work/gview_v4l2core/jpeg_decoder.c +=================================================================== +--- work.orig/gview_v4l2core/jpeg_decoder.c ++++ work/gview_v4l2core/jpeg_decoder.c +@@ -1409,7 +1409,6 @@ int jpeg_init_decoder(int width, int hei + + #if LIBAVCODEC_VER_AT_LEAST(53,6) + codec_data->context = avcodec_alloc_context3(codec_data->codec); +- avcodec_get_context_defaults3 (codec_data->context, codec_data->codec); + #else + codec_data->context = avcodec_alloc_context(); + avcodec_get_context_defaults(codec_data->context); +Index: work/gview_v4l2core/uvc_h264.c +=================================================================== +--- work.orig/gview_v4l2core/uvc_h264.c ++++ work/gview_v4l2core/uvc_h264.c +@@ -1004,7 +1004,6 @@ int h264_init_decoder(int width, int hei + + #if LIBAVCODEC_VER_AT_LEAST(53,6) + h264_ctx->context = avcodec_alloc_context3(h264_ctx->codec); +- avcodec_get_context_defaults3 (h264_ctx->context, h264_ctx->codec); + #else + h264_ctx->context = avcodec_alloc_context(); + avcodec_get_context_defaults(h264_ctx->context); diff --git a/media-video/guvcview/guvcview-2.0.7.ebuild b/media-video/guvcview/guvcview-2.0.7.ebuild new file mode 100644 index 000000000000..7cb8017438fb --- /dev/null +++ b/media-video/guvcview/guvcview-2.0.7.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P=${PN}-src-${PV} +inherit autotools qmake-utils toolchain-funcs + +DESCRIPTION="Simple Qt5 or GTK+3 interface for capturing and viewing video from v4l2 devices" +HOMEPAGE="http://guvcview.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gsl pulseaudio qt5" + +BDEPEND=" + dev-util/intltool + sys-devel/autoconf-archive + sys-devel/gettext + virtual/pkgconfig +" +RDEPEND=" + >=dev-libs/glib-2.10 + media-libs/libpng:0= + media-libs/libsdl2 + media-libs/libv4l + >=media-libs/portaudio-19_pre + >=media-video/ffmpeg-2.8:0= + virtual/libusb:1 + virtual/udev + gsl? ( >=sci-libs/gsl-1.15:= ) + pulseaudio? ( >=media-sound/pulseaudio-0.9.15 ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) + !qt5? ( >=x11-libs/gtk+-3.6:3 ) +" +# linux-headers: bug 448260 +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-3.4-r2 + virtual/os-headers +" + +S="${WORKDIR}" +PATCHES=( "${FILESDIR}/ffmpeg5.patch" ) + +src_prepare() { + default + sed -i '/^docdir/,/^$/d' Makefile.am || die + echo "guvcview/gui_qt5_audioctrls.cpp" >> po/POTFILES.skip || die # bug 630984 + eautoreconf +} + +src_configure() { + export MOC="$(qt5_get_bindir)/moc" + + # 599030 + tc-export CC CXX + + local myeconfargs=( + --disable-debian-menu + --disable-static + $(use_enable gsl) + $(use_enable pulseaudio pulse) + $(use_enable qt5) + $(use_enable !qt5 gtk3) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${D}" -name '*.la' -type f -delete || die +} |