1 |
commit: e2fee93fb7bebb6e7bbd43fb724154267d44ab2c |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 1 16:38:11 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 1 16:54:42 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2fee93f |
7 |
|
8 |
media-video/obs-studio: sync live |
9 |
|
10 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
11 |
|
12 |
media-video/obs-studio/obs-studio-9999.ebuild | 91 ++++++++++++++++++++------- |
13 |
1 file changed, 69 insertions(+), 22 deletions(-) |
14 |
|
15 |
diff --git a/media-video/obs-studio/obs-studio-9999.ebuild b/media-video/obs-studio/obs-studio-9999.ebuild |
16 |
index f1b911e3391..56839893506 100644 |
17 |
--- a/media-video/obs-studio/obs-studio-9999.ebuild |
18 |
+++ b/media-video/obs-studio/obs-studio-9999.ebuild |
19 |
@@ -5,26 +5,35 @@ EAPI=7 |
20 |
|
21 |
CMAKE_REMOVE_MODULES_LIST=( FindFreetype ) |
22 |
LUA_COMPAT=( luajit ) |
23 |
-PYTHON_COMPAT=( python3_{7..9} ) |
24 |
+PYTHON_COMPAT=( python3_{8..10} ) |
25 |
|
26 |
-inherit cmake lua-single python-single-r1 xdg-utils |
27 |
+inherit xdg cmake lua-single python-single-r1 |
28 |
|
29 |
-if [[ ${PV} == *9999 ]]; then |
30 |
+OBS_BROWSER_COMMIT="f1a61c5a2579e5673765c31a47c2053d4b502d4b" |
31 |
+CEF_DIR="cef_binary_4280_linux64" |
32 |
+ |
33 |
+if [[ ${PV} == 9999 ]]; then |
34 |
inherit git-r3 |
35 |
EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git" |
36 |
- EGIT_SUBMODULES=() |
37 |
+ EGIT_SUBMODULES=( plugins/obs-browser ) |
38 |
else |
39 |
SRC_URI="https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
40 |
+ SRC_URI+=" browser? ( https://github.com/obsproject/obs-browser/archive/${OBS_BROWSER_COMMIT}.tar.gz -> obs-browser-${OBS_BROWSER_COMMIT}.tar.gz )" |
41 |
KEYWORDS="~amd64 ~ppc64 ~x86" |
42 |
fi |
43 |
+SRC_URI+=" browser? ( https://cdn-fastly.obsproject.com/downloads/${CEF_DIR}.tar.bz2 )" |
44 |
|
45 |
DESCRIPTION="Software for Recording and Streaming Live Video Content" |
46 |
HOMEPAGE="https://obsproject.com" |
47 |
|
48 |
LICENSE="GPL-2" |
49 |
SLOT="0" |
50 |
-IUSE="+alsa decklink fdk imagemagick jack lua nvenc pipewire pulseaudio python speex +ssl truetype v4l vlc wayland" |
51 |
+IUSE=" |
52 |
+ +alsa browser decklink fdk jack lua nvenc pipewire |
53 |
+ pulseaudio python speex +ssl truetype v4l vlc wayland |
54 |
+" |
55 |
REQUIRED_USE=" |
56 |
+ browser? ( || ( alsa pulseaudio ) ) |
57 |
lua? ( ${LUA_REQUIRED_USE} ) |
58 |
python? ( ${PYTHON_REQUIRED_USE} ) |
59 |
" |
60 |
@@ -34,7 +43,7 @@ BDEPEND=" |
61 |
python? ( dev-lang/swig ) |
62 |
" |
63 |
DEPEND=" |
64 |
- >=dev-libs/jansson-2.5 |
65 |
+ dev-libs/jansson |
66 |
dev-qt/qtcore:5 |
67 |
dev-qt/qtdeclarative:5 |
68 |
dev-qt/qtgui:5[wayland?] |
69 |
@@ -50,21 +59,38 @@ DEPEND=" |
70 |
media-video/ffmpeg:=[x264] |
71 |
net-misc/curl |
72 |
sys-apps/dbus |
73 |
- sys-libs/zlib |
74 |
+ sys-libs/zlib:= |
75 |
virtual/udev |
76 |
x11-libs/libX11 |
77 |
x11-libs/libXcomposite |
78 |
x11-libs/libXfixes |
79 |
x11-libs/libXinerama |
80 |
x11-libs/libXrandr |
81 |
- x11-libs/libxcb |
82 |
+ x11-libs/libxcb:= |
83 |
alsa? ( media-libs/alsa-lib ) |
84 |
+ browser? ( |
85 |
+ app-accessibility/at-spi2-atk |
86 |
+ dev-libs/atk |
87 |
+ dev-libs/expat |
88 |
+ dev-libs/glib |
89 |
+ dev-libs/nspr |
90 |
+ dev-libs/nss |
91 |
+ media-libs/alsa-lib |
92 |
+ media-libs/fontconfig |
93 |
+ net-print/cups |
94 |
+ x11-libs/libXScrnSaver |
95 |
+ x11-libs/libXcursor |
96 |
+ x11-libs/libXdamage |
97 |
+ x11-libs/libXext |
98 |
+ x11-libs/libXi |
99 |
+ x11-libs/libXrender |
100 |
+ x11-libs/libXtst |
101 |
+ ) |
102 |
fdk? ( media-libs/fdk-aac:= ) |
103 |
- imagemagick? ( media-gfx/imagemagick:= ) |
104 |
jack? ( virtual/jack ) |
105 |
lua? ( ${LUA_DEPS} ) |
106 |
nvenc? ( >=media-video/ffmpeg-4[video_cards_nvidia] ) |
107 |
- pipewire? ( media-video/pipewire ) |
108 |
+ pipewire? ( media-video/pipewire:= ) |
109 |
pulseaudio? ( media-sound/pulseaudio ) |
110 |
python? ( ${PYTHON_DEPS} ) |
111 |
speex? ( media-libs/speexdsp ) |
112 |
@@ -79,17 +105,40 @@ DEPEND=" |
113 |
" |
114 |
RDEPEND="${DEPEND}" |
115 |
|
116 |
-PATCHES=( "${FILESDIR}/${PN}-26.1.2-python-3.8.patch" ) # https://github.com/obsproject/obs-studio/pull/3335 |
117 |
+QA_PREBUILT=" |
118 |
+ usr/lib*/obs-plugins/chrome-sandbox |
119 |
+ usr/lib*/obs-plugins/libEGL.so |
120 |
+ usr/lib*/obs-plugins/libGLESv2.so |
121 |
+ usr/lib*/obs-plugins/libcef.so |
122 |
+ usr/lib*/obs-plugins/swiftshader/libEGL.so |
123 |
+ usr/lib*/obs-plugins/swiftshader/libGLESv2.so |
124 |
+" |
125 |
+ |
126 |
+PATCHES=( |
127 |
+ "${FILESDIR}/${PN}-26.1.2-python-3.8.patch" |
128 |
+) |
129 |
|
130 |
pkg_setup() { |
131 |
use lua && lua-single_pkg_setup |
132 |
use python && python-single-r1_pkg_setup |
133 |
} |
134 |
|
135 |
+src_unpack() { |
136 |
+ default |
137 |
+ |
138 |
+ if [[ ${PV} == 9999 ]]; then |
139 |
+ git-r3_src_unpack |
140 |
+ elif use browser; then |
141 |
+ rm -d ${P}/plugins/obs-browser || die |
142 |
+ mv obs-browser-${OBS_BROWSER_COMMIT} ${P}/plugins/obs-browser || die |
143 |
+ fi |
144 |
+} |
145 |
+ |
146 |
src_configure() { |
147 |
local libdir=$(get_libdir) |
148 |
local mycmakeargs=( |
149 |
- -DBUILD_BROWSER=no |
150 |
+ $(usex browser -DCEF_ROOT_DIR=../${CEF_DIR} '') |
151 |
+ -DBUILD_BROWSER=$(usex browser) |
152 |
-DBUILD_VST=no |
153 |
-DENABLE_WAYLAND=$(usex wayland) |
154 |
-DDISABLE_ALSA=$(usex !alsa) |
155 |
@@ -102,13 +151,16 @@ src_configure() { |
156 |
-DDISABLE_SPEEXDSP=$(usex !speex) |
157 |
-DDISABLE_V4L2=$(usex !v4l) |
158 |
-DDISABLE_VLC=$(usex !vlc) |
159 |
- -DLIBOBS_PREFER_IMAGEMAGICK=$(usex imagemagick) |
160 |
-DOBS_MULTIARCH_SUFFIX=${libdir#lib} |
161 |
-DUNIX_STRUCTURE=1 |
162 |
-DWITH_RTMPS=$(usex ssl) |
163 |
+ |
164 |
+ # deprecated and currently cause issues |
165 |
+ # https://github.com/obsproject/obs-studio/pull/4560#issuecomment-826345608 |
166 |
+ -DLIBOBS_PREFER_IMAGEMAGICK=no |
167 |
) |
168 |
|
169 |
- if [[ ${PV} != *9999 ]]; then |
170 |
+ if [[ ${PV} != 9999 ]]; then |
171 |
mycmakeargs+=( |
172 |
-DOBS_VERSION_OVERRIDE=${PV} |
173 |
) |
174 |
@@ -129,13 +181,14 @@ src_configure() { |
175 |
|
176 |
src_install() { |
177 |
cmake_src_install |
178 |
- #external plugins may need some things not installed by default, install them here |
179 |
+ |
180 |
+ # external plugins may need some things not installed by default, install them here |
181 |
insinto /usr/include/obs/UI/obs-frontend-api |
182 |
doins UI/obs-frontend-api/obs-frontend-api.h |
183 |
} |
184 |
|
185 |
pkg_postinst() { |
186 |
- xdg_icon_cache_update |
187 |
+ xdg_pkg_postinst |
188 |
|
189 |
if ! use alsa && ! use pulseaudio; then |
190 |
elog |
191 |
@@ -154,9 +207,7 @@ pkg_postinst() { |
192 |
elog "(if 'x11-misc/xdg-utils' is installed)." |
193 |
elog |
194 |
fi |
195 |
-} |
196 |
|
197 |
-pkg_postinst() { |
198 |
if use python; then |
199 |
ewarn "This ebuild applies a patch that is not yet accepted upstream," |
200 |
ewarn "and while it fixes Python support at least to some extent, it" |
201 |
@@ -165,7 +216,3 @@ pkg_postinst() { |
202 |
ewarn "Please report any such issues to the Gentoo maintainer." |
203 |
fi |
204 |
} |
205 |
- |
206 |
-pkg_postrm() { |
207 |
- xdg_icon_cache_update |
208 |
-} |