1 |
commit: 8a72dd9e2e22ec412a5ae79d4b0ccefad8442784 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 21 17:04:12 2022 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 21 17:04:37 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a72dd9e |
7 |
|
8 |
media-video/guvcview: bump to 2.0.7 |
9 |
|
10 |
also fix build with ffmpeg5 |
11 |
|
12 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
13 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
14 |
|
15 |
media-video/guvcview/Manifest | 1 + |
16 |
media-video/guvcview/files/ffmpeg5.patch | 47 ++++++++++++++++++ |
17 |
media-video/guvcview/guvcview-2.0.7.ebuild | 78 ++++++++++++++++++++++++++++++ |
18 |
3 files changed, 126 insertions(+) |
19 |
|
20 |
diff --git a/media-video/guvcview/Manifest b/media-video/guvcview/Manifest |
21 |
index 5b2772755ce6..d1aa2eedf8c0 100644 |
22 |
--- a/media-video/guvcview/Manifest |
23 |
+++ b/media-video/guvcview/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST guvcview-src-2.0.6.tar.gz 1131013 BLAKE2B ec8d7a82344e26890fe184d0edf77d0e415aa708bdf3cf55f96c555aaef479b1b7441a0425db035d10a6dc31f90282c169afff2d13684599ab1c005a5ea50ab1 SHA512 f73ba0a013f5afadb45c9bf60f723058ee31e99e204c951c49335a8ef9902a2caa752d6d51f6dd20ae960217cc25155e70efe4c49299a95e6780aaf8034078ec |
26 |
+DIST guvcview-src-2.0.7.tar.bz2 449392 BLAKE2B 94140845dbe1209802a7109a3f30d3f7aa391ff4f1b67396481138c65ae3a3cc27499c8dc239bf5e17b730c06e1ebe361872f2a1976f0c2802b8e84fb54a3548 SHA512 a3dcabf3fcb90171969fea76c1a05b4e47b640ba886370b048f5736e2f064f8682967c785db44a9461bdd3761b2bf264e8ce579691d37c8b9efa1a1393162ad8 |
27 |
|
28 |
diff --git a/media-video/guvcview/files/ffmpeg5.patch b/media-video/guvcview/files/ffmpeg5.patch |
29 |
new file mode 100644 |
30 |
index 000000000000..7e8c71b2bc6f |
31 |
--- /dev/null |
32 |
+++ b/media-video/guvcview/files/ffmpeg5.patch |
33 |
@@ -0,0 +1,47 @@ |
34 |
+Index: work/gview_encoder/encoder.c |
35 |
+=================================================================== |
36 |
+--- work.orig/gview_encoder/encoder.c |
37 |
++++ work/gview_encoder/encoder.c |
38 |
+@@ -446,10 +446,6 @@ static encoder_video_context_t *encoder_ |
39 |
+ |
40 |
+ video_codec_data->codec_context = avcodec_alloc_context3(video_codec_data->codec); |
41 |
+ |
42 |
+- avcodec_get_context_defaults3 ( |
43 |
+- video_codec_data->codec_context, |
44 |
+- video_codec_data->codec); |
45 |
+- |
46 |
+ if(video_codec_data->codec_context == NULL) |
47 |
+ { |
48 |
+ fprintf(stderr, "ENCODER: FATAL memory allocation failure (encoder_video_init): %s\n", strerror(errno)); |
49 |
+@@ -712,7 +708,6 @@ static encoder_audio_context_t *encoder_ |
50 |
+ } |
51 |
+ |
52 |
+ audio_codec_data->codec_context = avcodec_alloc_context3(audio_codec_data->codec); |
53 |
+- avcodec_get_context_defaults3 (audio_codec_data->codec_context, audio_codec_data->codec); |
54 |
+ |
55 |
+ if(audio_codec_data->codec_context == NULL) |
56 |
+ { |
57 |
+Index: work/gview_v4l2core/jpeg_decoder.c |
58 |
+=================================================================== |
59 |
+--- work.orig/gview_v4l2core/jpeg_decoder.c |
60 |
++++ work/gview_v4l2core/jpeg_decoder.c |
61 |
+@@ -1409,7 +1409,6 @@ int jpeg_init_decoder(int width, int hei |
62 |
+ |
63 |
+ #if LIBAVCODEC_VER_AT_LEAST(53,6) |
64 |
+ codec_data->context = avcodec_alloc_context3(codec_data->codec); |
65 |
+- avcodec_get_context_defaults3 (codec_data->context, codec_data->codec); |
66 |
+ #else |
67 |
+ codec_data->context = avcodec_alloc_context(); |
68 |
+ avcodec_get_context_defaults(codec_data->context); |
69 |
+Index: work/gview_v4l2core/uvc_h264.c |
70 |
+=================================================================== |
71 |
+--- work.orig/gview_v4l2core/uvc_h264.c |
72 |
++++ work/gview_v4l2core/uvc_h264.c |
73 |
+@@ -1004,7 +1004,6 @@ int h264_init_decoder(int width, int hei |
74 |
+ |
75 |
+ #if LIBAVCODEC_VER_AT_LEAST(53,6) |
76 |
+ h264_ctx->context = avcodec_alloc_context3(h264_ctx->codec); |
77 |
+- avcodec_get_context_defaults3 (h264_ctx->context, h264_ctx->codec); |
78 |
+ #else |
79 |
+ h264_ctx->context = avcodec_alloc_context(); |
80 |
+ avcodec_get_context_defaults(h264_ctx->context); |
81 |
|
82 |
diff --git a/media-video/guvcview/guvcview-2.0.7.ebuild b/media-video/guvcview/guvcview-2.0.7.ebuild |
83 |
new file mode 100644 |
84 |
index 000000000000..7cb8017438fb |
85 |
--- /dev/null |
86 |
+++ b/media-video/guvcview/guvcview-2.0.7.ebuild |
87 |
@@ -0,0 +1,78 @@ |
88 |
+# Copyright 1999-2022 Gentoo Authors |
89 |
+# Distributed under the terms of the GNU General Public License v2 |
90 |
+ |
91 |
+EAPI=8 |
92 |
+ |
93 |
+MY_P=${PN}-src-${PV} |
94 |
+inherit autotools qmake-utils toolchain-funcs |
95 |
+ |
96 |
+DESCRIPTION="Simple Qt5 or GTK+3 interface for capturing and viewing video from v4l2 devices" |
97 |
+HOMEPAGE="http://guvcview.sourceforge.net/" |
98 |
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" |
99 |
+ |
100 |
+LICENSE="GPL-3" |
101 |
+SLOT="0" |
102 |
+KEYWORDS="~amd64 ~x86" |
103 |
+IUSE="gsl pulseaudio qt5" |
104 |
+ |
105 |
+BDEPEND=" |
106 |
+ dev-util/intltool |
107 |
+ sys-devel/autoconf-archive |
108 |
+ sys-devel/gettext |
109 |
+ virtual/pkgconfig |
110 |
+" |
111 |
+RDEPEND=" |
112 |
+ >=dev-libs/glib-2.10 |
113 |
+ media-libs/libpng:0= |
114 |
+ media-libs/libsdl2 |
115 |
+ media-libs/libv4l |
116 |
+ >=media-libs/portaudio-19_pre |
117 |
+ >=media-video/ffmpeg-2.8:0= |
118 |
+ virtual/libusb:1 |
119 |
+ virtual/udev |
120 |
+ gsl? ( >=sci-libs/gsl-1.15:= ) |
121 |
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.15 ) |
122 |
+ qt5? ( |
123 |
+ dev-qt/qtcore:5 |
124 |
+ dev-qt/qtgui:5 |
125 |
+ dev-qt/qtwidgets:5 |
126 |
+ ) |
127 |
+ !qt5? ( >=x11-libs/gtk+-3.6:3 ) |
128 |
+" |
129 |
+# linux-headers: bug 448260 |
130 |
+DEPEND="${RDEPEND} |
131 |
+ >=sys-kernel/linux-headers-3.4-r2 |
132 |
+ virtual/os-headers |
133 |
+" |
134 |
+ |
135 |
+S="${WORKDIR}" |
136 |
+PATCHES=( "${FILESDIR}/ffmpeg5.patch" ) |
137 |
+ |
138 |
+src_prepare() { |
139 |
+ default |
140 |
+ sed -i '/^docdir/,/^$/d' Makefile.am || die |
141 |
+ echo "guvcview/gui_qt5_audioctrls.cpp" >> po/POTFILES.skip || die # bug 630984 |
142 |
+ eautoreconf |
143 |
+} |
144 |
+ |
145 |
+src_configure() { |
146 |
+ export MOC="$(qt5_get_bindir)/moc" |
147 |
+ |
148 |
+ # 599030 |
149 |
+ tc-export CC CXX |
150 |
+ |
151 |
+ local myeconfargs=( |
152 |
+ --disable-debian-menu |
153 |
+ --disable-static |
154 |
+ $(use_enable gsl) |
155 |
+ $(use_enable pulseaudio pulse) |
156 |
+ $(use_enable qt5) |
157 |
+ $(use_enable !qt5 gtk3) |
158 |
+ ) |
159 |
+ econf "${myeconfargs[@]}" |
160 |
+} |
161 |
+ |
162 |
+src_install() { |
163 |
+ default |
164 |
+ find "${D}" -name '*.la' -type f -delete || die |
165 |
+} |