Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/obs-studio/files/, media-video/obs-studio/
Date: Thu, 01 Jul 2021 16:57:20
Message-Id: 1625158482.2c4e606350f81335053fc77a81bc9790379adcb9.ionen@gentoo
1 commit: 2c4e606350f81335053fc77a81bc9790379adcb9
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 1 04:56:24 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=2c4e6063
7
8 media-video/obs-studio: tidy with small fixes
9
10 Finishing the last few bits from previous PR.
11
12 - python3_10 compat
13 - migrate to xdg eclass
14 - drop USE=imagemagick, broken and upstream has deprecated it
15 - add missing cups for CEF, and alsa-lib if USE=-alsa
16 - merge duplicate pkg_postinst() that's been there for a long time
17 - scrubbed python patch, moved pull request ref to it
18
19 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
20
21 .../files/obs-studio-26.1.2-python-3.8.patch | 12 +---
22 media-video/obs-studio/obs-studio-27.0.1.ebuild | 80 +++++++++++-----------
23 2 files changed, 42 insertions(+), 50 deletions(-)
24
25 diff --git a/media-video/obs-studio/files/obs-studio-26.1.2-python-3.8.patch b/media-video/obs-studio/files/obs-studio-26.1.2-python-3.8.patch
26 index c4709c65468..d9e328ea4ef 100644
27 --- a/media-video/obs-studio/files/obs-studio-26.1.2-python-3.8.patch
28 +++ b/media-video/obs-studio/files/obs-studio-26.1.2-python-3.8.patch
29 @@ -1,15 +1,9 @@
30 -From 413fbe27ee68881f60265f0f2dd670ce42ca220e Mon Sep 17 00:00:00 2001
31 +https://bugs.gentoo.org/754006
32 +
33 +https://github.com/obsproject/obs-studio/pull/3335
34 From: Matt Gajownik <matt@××××××××××.com>
35 Date: Tue, 25 Aug 2020 19:28:26 +1000
36 Subject: [PATCH] libobs/util: Fix loading Python binary modules on *nix
37 -
38 -Fixes #2222
39 ----
40 - libobs/util/platform-nix.c | 3 ++-
41 - 1 file changed, 2 insertions(+), 1 deletion(-)
42 -
43 -diff --git a/libobs/util/platform-nix.c b/libobs/util/platform-nix.c
44 -index 26800d52f7c..997b62db1a3 100644
45 --- a/libobs/util/platform-nix.c
46 +++ b/libobs/util/platform-nix.c
47 @@ -71,7 +71,8 @@ void *os_dlopen(const char *path)
48
49 diff --git a/media-video/obs-studio/obs-studio-27.0.1.ebuild b/media-video/obs-studio/obs-studio-27.0.1.ebuild
50 index 3ce88e1927c..56839893506 100644
51 --- a/media-video/obs-studio/obs-studio-27.0.1.ebuild
52 +++ b/media-video/obs-studio/obs-studio-27.0.1.ebuild
53 @@ -5,17 +5,17 @@ EAPI=7
54
55 CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
56 LUA_COMPAT=( luajit )
57 -PYTHON_COMPAT=( python3_{7..9} )
58 +PYTHON_COMPAT=( python3_{8..10} )
59 +
60 +inherit xdg cmake lua-single python-single-r1
61
62 OBS_BROWSER_COMMIT="f1a61c5a2579e5673765c31a47c2053d4b502d4b"
63 CEF_DIR="cef_binary_4280_linux64"
64
65 -inherit cmake lua-single python-single-r1 xdg-utils
66 -
67 -if [[ ${PV} == *9999 ]]; then
68 +if [[ ${PV} == 9999 ]]; then
69 inherit git-r3
70 EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git"
71 - EGIT_SUBMODULES=( "plugins/obs-browser" )
72 + EGIT_SUBMODULES=( plugins/obs-browser )
73 else
74 SRC_URI="https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
75 SRC_URI+=" browser? ( https://github.com/obsproject/obs-browser/archive/${OBS_BROWSER_COMMIT}.tar.gz -> obs-browser-${OBS_BROWSER_COMMIT}.tar.gz )"
76 @@ -28,7 +28,10 @@ HOMEPAGE="https://obsproject.com"
77
78 LICENSE="GPL-2"
79 SLOT="0"
80 -IUSE="+alsa browser decklink fdk imagemagick jack lua nvenc pipewire pulseaudio python speex +ssl truetype v4l vlc wayland"
81 +IUSE="
82 + +alsa browser decklink fdk jack lua nvenc pipewire
83 + pulseaudio python speex +ssl truetype v4l vlc wayland
84 +"
85 REQUIRED_USE="
86 browser? ( || ( alsa pulseaudio ) )
87 lua? ( ${LUA_REQUIRED_USE} )
88 @@ -40,7 +43,7 @@ BDEPEND="
89 python? ( dev-lang/swig )
90 "
91 DEPEND="
92 - >=dev-libs/jansson-2.5
93 + dev-libs/jansson
94 dev-qt/qtcore:5
95 dev-qt/qtdeclarative:5
96 dev-qt/qtgui:5[wayland?]
97 @@ -56,14 +59,14 @@ DEPEND="
98 media-video/ffmpeg:=[x264]
99 net-misc/curl
100 sys-apps/dbus
101 - sys-libs/zlib
102 + sys-libs/zlib:=
103 virtual/udev
104 x11-libs/libX11
105 x11-libs/libXcomposite
106 x11-libs/libXfixes
107 x11-libs/libXinerama
108 x11-libs/libXrandr
109 - x11-libs/libxcb
110 + x11-libs/libxcb:=
111 alsa? ( media-libs/alsa-lib )
112 browser? (
113 app-accessibility/at-spi2-atk
114 @@ -72,21 +75,22 @@ DEPEND="
115 dev-libs/glib
116 dev-libs/nspr
117 dev-libs/nss
118 + media-libs/alsa-lib
119 media-libs/fontconfig
120 + net-print/cups
121 + x11-libs/libXScrnSaver
122 x11-libs/libXcursor
123 x11-libs/libXdamage
124 x11-libs/libXext
125 x11-libs/libXi
126 x11-libs/libXrender
127 - x11-libs/libXScrnSaver
128 x11-libs/libXtst
129 )
130 fdk? ( media-libs/fdk-aac:= )
131 - imagemagick? ( media-gfx/imagemagick:= )
132 jack? ( virtual/jack )
133 lua? ( ${LUA_DEPS} )
134 nvenc? ( >=media-video/ffmpeg-4[video_cards_nvidia] )
135 - pipewire? ( media-video/pipewire )
136 + pipewire? ( media-video/pipewire:= )
137 pulseaudio? ( media-sound/pulseaudio )
138 python? ( ${PYTHON_DEPS} )
139 speex? ( media-libs/speexdsp )
140 @@ -102,15 +106,17 @@ DEPEND="
141 RDEPEND="${DEPEND}"
142
143 QA_PREBUILT="
144 - /usr/lib*/obs-plugins/chrome-sandbox
145 - /usr/lib*/obs-plugins/libcef.so
146 - /usr/lib*/obs-plugins/libEGL.so
147 - /usr/lib*/obs-plugins/libGLESv2.so
148 - /usr/lib*/obs-plugins/swiftshader/libEGL.so
149 - /usr/lib*/obs-plugins/swiftshader/libGLESv2.so
150 + usr/lib*/obs-plugins/chrome-sandbox
151 + usr/lib*/obs-plugins/libEGL.so
152 + usr/lib*/obs-plugins/libGLESv2.so
153 + usr/lib*/obs-plugins/libcef.so
154 + usr/lib*/obs-plugins/swiftshader/libEGL.so
155 + usr/lib*/obs-plugins/swiftshader/libGLESv2.so
156 "
157
158 -PATCHES=( "${FILESDIR}/${PN}-26.1.2-python-3.8.patch" ) # https://github.com/obsproject/obs-studio/pull/3335
159 +PATCHES=(
160 + "${FILESDIR}/${PN}-26.1.2-python-3.8.patch"
161 +)
162
163 pkg_setup() {
164 use lua && lua-single_pkg_setup
165 @@ -119,19 +125,19 @@ pkg_setup() {
166
167 src_unpack() {
168 default
169 - if [[ ${PV} != *9999 ]]; then
170 - if use browser; then
171 - rm -d "${P}/plugins/obs-browser" || die
172 - mv "obs-browser-${OBS_BROWSER_COMMIT}" "${P}/plugins/obs-browser" || die
173 - fi
174 - else
175 +
176 + if [[ ${PV} == 9999 ]]; then
177 git-r3_src_unpack
178 + elif use browser; then
179 + rm -d ${P}/plugins/obs-browser || die
180 + mv obs-browser-${OBS_BROWSER_COMMIT} ${P}/plugins/obs-browser || die
181 fi
182 }
183
184 src_configure() {
185 local libdir=$(get_libdir)
186 local mycmakeargs=(
187 + $(usex browser -DCEF_ROOT_DIR=../${CEF_DIR} '')
188 -DBUILD_BROWSER=$(usex browser)
189 -DBUILD_VST=no
190 -DENABLE_WAYLAND=$(usex wayland)
191 @@ -145,24 +151,21 @@ src_configure() {
192 -DDISABLE_SPEEXDSP=$(usex !speex)
193 -DDISABLE_V4L2=$(usex !v4l)
194 -DDISABLE_VLC=$(usex !vlc)
195 - -DLIBOBS_PREFER_IMAGEMAGICK=$(usex imagemagick)
196 -DOBS_MULTIARCH_SUFFIX=${libdir#lib}
197 -DUNIX_STRUCTURE=1
198 -DWITH_RTMPS=$(usex ssl)
199 +
200 + # deprecated and currently cause issues
201 + # https://github.com/obsproject/obs-studio/pull/4560#issuecomment-826345608
202 + -DLIBOBS_PREFER_IMAGEMAGICK=no
203 )
204
205 - if [[ ${PV} != *9999 ]]; then
206 + if [[ ${PV} != 9999 ]]; then
207 mycmakeargs+=(
208 -DOBS_VERSION_OVERRIDE=${PV}
209 )
210 fi
211
212 - if use browser; then
213 - mycmakeargs+=(
214 - -DCEF_ROOT_DIR="../${CEF_DIR}"
215 - )
216 - fi
217 -
218 if use lua || use python; then
219 mycmakeargs+=(
220 -DDISABLE_LUA=$(usex !lua)
221 @@ -178,13 +181,14 @@ src_configure() {
222
223 src_install() {
224 cmake_src_install
225 - #external plugins may need some things not installed by default, install them here
226 +
227 + # external plugins may need some things not installed by default, install them here
228 insinto /usr/include/obs/UI/obs-frontend-api
229 doins UI/obs-frontend-api/obs-frontend-api.h
230 }
231
232 pkg_postinst() {
233 - xdg_icon_cache_update
234 + xdg_pkg_postinst
235
236 if ! use alsa && ! use pulseaudio; then
237 elog
238 @@ -203,9 +207,7 @@ pkg_postinst() {
239 elog "(if 'x11-misc/xdg-utils' is installed)."
240 elog
241 fi
242 -}
243
244 -pkg_postinst() {
245 if use python; then
246 ewarn "This ebuild applies a patch that is not yet accepted upstream,"
247 ewarn "and while it fixes Python support at least to some extent, it"
248 @@ -214,7 +216,3 @@ pkg_postinst() {
249 ewarn "Please report any such issues to the Gentoo maintainer."
250 fi
251 }
252 -
253 -pkg_postrm() {
254 - xdg_icon_cache_update
255 -}