1 |
commit: d071aba9e0ce3f910469fd95ba391456ae23235a |
2 |
Author: Jimi Huotari <chiitoo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 31 14:15:40 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 15:01:55 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d071aba9 |
7 |
|
8 |
media-video/obs-studio: add version 26.1.2 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/745996 |
11 |
Closes: https://bugs.gentoo.org/761939 |
12 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
13 |
Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org> |
14 |
Closes: https://github.com/gentoo/gentoo/pull/18883 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
media-video/obs-studio/Manifest | 1 + |
18 |
.../files/obs-studio-26.1.2-fix-alsa-crash.patch | 30 ++++ |
19 |
media-video/obs-studio/obs-studio-26.1.2.ebuild | 155 +++++++++++++++++++++ |
20 |
3 files changed, 186 insertions(+) |
21 |
|
22 |
diff --git a/media-video/obs-studio/Manifest b/media-video/obs-studio/Manifest |
23 |
index aa70deb5fcb..fb9bdc10f87 100644 |
24 |
--- a/media-video/obs-studio/Manifest |
25 |
+++ b/media-video/obs-studio/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST obs-studio-25.0.8.tar.gz 9531713 BLAKE2B 4775ca8305e1beee4d926eff728351b699ca4d52f66e53409dbcfe1f73699df0286fadc0c138cb76b8eb73e70a143719e46f030b6d15d43629bdcbf23bdb88af SHA512 a97c03dc218a4e03e48f6a7dc82b4a59ebeee2039f17be66bb847681ce9ff3d25e6e015be4af78fe44739f6fad5089b6e683d7657c2e4fde8e547df9a2594a08 |
28 |
+DIST obs-studio-26.1.2.tar.gz 16624899 BLAKE2B 655a6c71d3a0ae6ae1fc2d166a148002bb17d6eaec06d5633a10fdbfe7f42e073526ede83cd36ad21c440debe870b41b43724caa00633733f1e196d918304adc SHA512 cd95fbf587f7edfe415cae75299d65c1d771bb118649fb839ae43d77145d87725c23df3360aa7b8c35ab8b62e5ec7983a8b02f8b102caa78f768eb58b4263417 |
29 |
|
30 |
diff --git a/media-video/obs-studio/files/obs-studio-26.1.2-fix-alsa-crash.patch b/media-video/obs-studio/files/obs-studio-26.1.2-fix-alsa-crash.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..2e52926feba |
33 |
--- /dev/null |
34 |
+++ b/media-video/obs-studio/files/obs-studio-26.1.2-fix-alsa-crash.patch |
35 |
@@ -0,0 +1,30 @@ |
36 |
+From 41367bb2b4732507248f2b3c2e43e2aa46c5ef2a Mon Sep 17 00:00:00 2001 |
37 |
+From: Jimi Huotari <chiitoo@g.o> |
38 |
+Date: Wed, 30 Dec 2020 03:14:34 +0200 |
39 |
+Subject: [PATCH] UI: Fix crash when no audio backends are available |
40 |
+ |
41 |
+This commit prevents a crash in, for example, Linux configurations |
42 |
+where PulseAudio is disabled, which leads into 'mod' being 'null', |
43 |
+which in turn leads into a segmentation fault when an ALSA source |
44 |
+is selected. |
45 |
+ |
46 |
+Closes https://github.com/obsproject/obs-studio/issues/3485 |
47 |
+--- |
48 |
+ UI/context-bar-controls.cpp | 4 ++++ |
49 |
+ 1 file changed, 4 insertions(+) |
50 |
+ |
51 |
+diff --git a/UI/context-bar-controls.cpp b/UI/context-bar-controls.cpp |
52 |
+index 9dff8979a2..9ef850b6d1 100644 |
53 |
+--- a/UI/context-bar-controls.cpp |
54 |
++++ b/UI/context-bar-controls.cpp |
55 |
+@@ -179,6 +179,10 @@ void AudioCaptureToolbar::Init() |
56 |
+ |
57 |
+ obs_module_t *mod = |
58 |
+ get_os_module("win-wasapi", "mac-capture", "linux-pulseaudio"); |
59 |
++ if (!mod) { |
60 |
++ return; |
61 |
++ } |
62 |
++ |
63 |
+ const char *device_str = |
64 |
+ get_os_text(mod, "Device", "CoreAudio.Device", "Device"); |
65 |
+ ui->deviceLabel->setText(device_str); |
66 |
|
67 |
diff --git a/media-video/obs-studio/obs-studio-26.1.2.ebuild b/media-video/obs-studio/obs-studio-26.1.2.ebuild |
68 |
new file mode 100644 |
69 |
index 00000000000..9833f5fb6b6 |
70 |
--- /dev/null |
71 |
+++ b/media-video/obs-studio/obs-studio-26.1.2.ebuild |
72 |
@@ -0,0 +1,155 @@ |
73 |
+# Copyright 1999-2021 Gentoo Authors |
74 |
+# Distributed under the terms of the GNU General Public License v2 |
75 |
+ |
76 |
+EAPI=7 |
77 |
+ |
78 |
+CMAKE_REMOVE_MODULES_LIST=( FindFreetype ) |
79 |
+LUA_COMPAT=( luajit ) |
80 |
+# Does not work with 3.8+ https://bugs.gentoo.org/754006 |
81 |
+PYTHON_COMPAT=( python3_7 ) |
82 |
+ |
83 |
+inherit cmake lua-single python-single-r1 xdg-utils |
84 |
+ |
85 |
+if [[ ${PV} == *9999 ]]; then |
86 |
+ inherit git-r3 |
87 |
+ EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git" |
88 |
+ EGIT_SUBMODULES=() |
89 |
+else |
90 |
+ SRC_URI="https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
91 |
+ KEYWORDS="~amd64 ~ppc64 ~x86" |
92 |
+fi |
93 |
+ |
94 |
+DESCRIPTION="Software for Recording and Streaming Live Video Content" |
95 |
+HOMEPAGE="https://obsproject.com" |
96 |
+ |
97 |
+LICENSE="GPL-2" |
98 |
+SLOT="0" |
99 |
+IUSE="+alsa fdk imagemagick jack lua nvenc pulseaudio python speex +ssl truetype v4l vlc" |
100 |
+REQUIRED_USE=" |
101 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
102 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
103 |
+" |
104 |
+ |
105 |
+BDEPEND=" |
106 |
+ lua? ( dev-lang/swig ) |
107 |
+ python? ( dev-lang/swig ) |
108 |
+" |
109 |
+DEPEND=" |
110 |
+ >=dev-libs/jansson-2.5 |
111 |
+ dev-qt/qtcore:5 |
112 |
+ dev-qt/qtdeclarative:5 |
113 |
+ dev-qt/qtgui:5 |
114 |
+ dev-qt/qtmultimedia:5 |
115 |
+ dev-qt/qtnetwork:5 |
116 |
+ dev-qt/qtquickcontrols:5 |
117 |
+ dev-qt/qtsql:5 |
118 |
+ dev-qt/qtsvg:5 |
119 |
+ dev-qt/qtwidgets:5 |
120 |
+ dev-qt/qtx11extras:5 |
121 |
+ dev-qt/qtxml:5 |
122 |
+ media-libs/x264:= |
123 |
+ media-video/ffmpeg:=[x264] |
124 |
+ net-misc/curl |
125 |
+ sys-apps/dbus |
126 |
+ sys-libs/zlib |
127 |
+ virtual/udev |
128 |
+ x11-libs/libX11 |
129 |
+ x11-libs/libXcomposite |
130 |
+ x11-libs/libXfixes |
131 |
+ x11-libs/libXinerama |
132 |
+ x11-libs/libXrandr |
133 |
+ x11-libs/libxcb |
134 |
+ alsa? ( media-libs/alsa-lib ) |
135 |
+ fdk? ( media-libs/fdk-aac:= ) |
136 |
+ imagemagick? ( media-gfx/imagemagick:= ) |
137 |
+ jack? ( virtual/jack ) |
138 |
+ lua? ( ${LUA_DEPS} ) |
139 |
+ nvenc? ( >=media-video/ffmpeg-4[video_cards_nvidia] ) |
140 |
+ pulseaudio? ( media-sound/pulseaudio ) |
141 |
+ python? ( ${PYTHON_DEPS} ) |
142 |
+ speex? ( media-libs/speexdsp ) |
143 |
+ ssl? ( net-libs/mbedtls:= ) |
144 |
+ truetype? ( |
145 |
+ media-libs/fontconfig |
146 |
+ media-libs/freetype |
147 |
+ ) |
148 |
+ v4l? ( media-libs/libv4l ) |
149 |
+ vlc? ( media-video/vlc:= ) |
150 |
+" |
151 |
+RDEPEND="${DEPEND}" |
152 |
+ |
153 |
+PATCHES=( "${FILESDIR}/${PN}-26.1.2-fix-alsa-crash.patch" ) |
154 |
+ |
155 |
+pkg_setup() { |
156 |
+ use lua && lua-single_pkg_setup |
157 |
+ use python && python-single-r1_pkg_setup |
158 |
+} |
159 |
+ |
160 |
+src_configure() { |
161 |
+ local libdir=$(get_libdir) |
162 |
+ local mycmakeargs=( |
163 |
+ -DDISABLE_ALSA=$(usex !alsa) |
164 |
+ -DDISABLE_FREETYPE=$(usex !truetype) |
165 |
+ -DDISABLE_JACK=$(usex !jack) |
166 |
+ -DDISABLE_LIBFDK=$(usex !fdk) |
167 |
+ -DDISABLE_PULSEAUDIO=$(usex !pulseaudio) |
168 |
+ -DDISABLE_SPEEXDSP=$(usex !speex) |
169 |
+ -DDISABLE_V4L2=$(usex !v4l) |
170 |
+ -DDISABLE_VLC=$(usex !vlc) |
171 |
+ -DLIBOBS_PREFER_IMAGEMAGICK=$(usex imagemagick) |
172 |
+ -DOBS_MULTIARCH_SUFFIX=${libdir#lib} |
173 |
+ -DUNIX_STRUCTURE=1 |
174 |
+ -DWITH_RTMPS=$(usex ssl) |
175 |
+ ) |
176 |
+ |
177 |
+ if [[ ${PV} != *9999 ]]; then |
178 |
+ mycmakeargs+=( |
179 |
+ -DOBS_VERSION_OVERRIDE=${PV} |
180 |
+ ) |
181 |
+ fi |
182 |
+ |
183 |
+ if use lua || use python; then |
184 |
+ mycmakeargs+=( |
185 |
+ -DDISABLE_LUA=$(usex !lua) |
186 |
+ -DDISABLE_PYTHON=$(usex !python) |
187 |
+ -DENABLE_SCRIPTING=yes |
188 |
+ ) |
189 |
+ else |
190 |
+ mycmakeargs+=( -DENABLE_SCRIPTING=no ) |
191 |
+ fi |
192 |
+ |
193 |
+ cmake_src_configure |
194 |
+} |
195 |
+ |
196 |
+src_install() { |
197 |
+ cmake_src_install |
198 |
+ #external plugins may need some things not installed by default, install them here |
199 |
+ insinto /usr/include/obs/UI/obs-frontend-api |
200 |
+ doins UI/obs-frontend-api/obs-frontend-api.h |
201 |
+} |
202 |
+ |
203 |
+pkg_postinst() { |
204 |
+ xdg_icon_cache_update |
205 |
+ |
206 |
+ if ! use alsa && ! use pulseaudio; then |
207 |
+ elog |
208 |
+ elog "For the audio capture features to be available," |
209 |
+ elog "either the 'alsa' or the 'pulseaudio' USE-flag needs to" |
210 |
+ elog "be enabled." |
211 |
+ elog |
212 |
+ fi |
213 |
+ |
214 |
+ if ! has_version "sys-apps/dbus"; then |
215 |
+ elog |
216 |
+ elog "The 'sys-apps/dbus' package is not installed, but" |
217 |
+ elog "could be used for disabling hibernating, screensaving," |
218 |
+ elog "and sleeping. Where it is not installed," |
219 |
+ elog "'xdg-screensaver reset' is used instead" |
220 |
+ elog "(if 'x11-misc/xdg-utils' is installed)." |
221 |
+ elog |
222 |
+ fi |
223 |
+} |
224 |
+ |
225 |
+pkg_postrm() { |
226 |
+ xdg_icon_cache_update |
227 |
+} |