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/
Date: Fri, 01 Apr 2022 19:43:52
Message-Id: 1648842171.372fc496595364f1192b37587826a3da04458705.ionen@gentoo
1 commit: 372fc496595364f1192b37587826a3da04458705
2 Author: Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 1 18:15:27 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 1 19:42:51 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=372fc496
7
8 media-video/obs-studio: add version 27.2.4
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>
12 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
13
14 media-video/obs-studio/Manifest | 1 +
15 media-video/obs-studio/obs-studio-27.2.4.ebuild | 204 ++++++++++++++++++++++++
16 2 files changed, 205 insertions(+)
17
18 diff --git a/media-video/obs-studio/Manifest b/media-video/obs-studio/Manifest
19 index 70347bbe0455..e6d41f708a76 100644
20 --- a/media-video/obs-studio/Manifest
21 +++ b/media-video/obs-studio/Manifest
22 @@ -4,3 +4,4 @@ DIST obs-browser-915761778ec1eae99e740ad4bf63b40db3142ee2.tar.gz 100021 BLAKE2B
23 DIST obs-browser-aee43000bd994022cd73e32dc50938ab777d4a06.tar.gz 89603 BLAKE2B a51b92f829ecb7055dcf969d6d5bdc4632b51288f0bc7e2ab66fda087da608869ddffccda83aa925f049c79e745a6f67e70ec72303184b970f5009fe37b34054 SHA512 8159ca02b5c30d2733ce8e566f21d6b77d6b7beabd0a5898049ee83b0b4d720b967fc55fcf876cd772fdaa12ca08163a0f8cabf249a9b3b6eb56b7666d1192c7
24 DIST obs-studio-27.1.3.tar.gz 15994678 BLAKE2B 5544a1ecdb04dca7f6422936ea5499a206b4beb8e5332605c18cd72a91ce73aa74ff06c49a106931822c1c413ee94d383942f173a71f2b21168a00495b4e301f SHA512 04c11c79e3b091aa9ea8fc6674c9fbcaa1c924fe049f68e9be63f63724c31305d6e4fb33aecdd4d0095d20013e2ee188983f6938b175257368d2260681c2fb39
25 DIST obs-studio-27.2.3.tar.gz 16383685 BLAKE2B 76802ba67dcebccabd9b2a1f09f505a4aea83887b445093c51a2c7a49fbaa064549b6212bd1b2f3200674a78349b2de4bfa54d14871c76be248cd62139d98a56 SHA512 c34e850e1a83e55aed952611257446a39d7ba4456b94f74d91c85d09d77361af2f76848f7d3f3d8ba7ae76c926129adad555e2f54d632658832596d0f2696a3c
26 +DIST obs-studio-27.2.4.tar.gz 16385399 BLAKE2B 00c05ecd055d707b7132ca4b20e1c4946b682c0f79f1477167ae55aba3ec367c97b05aac190b07260f936e68f79f2d58e19dcc0602f70408f4c056eb733a6fdd SHA512 575341dd3d9240b21881517a16d01ca11f833e08b40ca7990f0360b4cd1076e8217a9bb8dddf174eca5429e6eadaadb6cfdbd61d24e0eb13ebeaa7f29cfad8bf
27
28 diff --git a/media-video/obs-studio/obs-studio-27.2.4.ebuild b/media-video/obs-studio/obs-studio-27.2.4.ebuild
29 new file mode 100644
30 index 000000000000..b9550e6de3df
31 --- /dev/null
32 +++ b/media-video/obs-studio/obs-studio-27.2.4.ebuild
33 @@ -0,0 +1,204 @@
34 +# Copyright 1999-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +
39 +CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
40 +LUA_COMPAT=( luajit )
41 +PYTHON_COMPAT=( python3_{8..10} )
42 +
43 +inherit cmake lua-single python-single-r1 xdg
44 +
45 +OBS_BROWSER_COMMIT="915761778ec1eae99e740ad4bf63b40db3142ee2"
46 +CEF_DIR="cef_binary_4638_linux64"
47 +
48 +if [[ ${PV} == 9999 ]]; then
49 + inherit git-r3
50 + EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git"
51 + EGIT_SUBMODULES=( plugins/obs-browser )
52 +else
53 + SRC_URI="https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
54 + SRC_URI+=" browser? ( https://github.com/obsproject/obs-browser/archive/${OBS_BROWSER_COMMIT}.tar.gz -> obs-browser-${OBS_BROWSER_COMMIT}.tar.gz )"
55 + KEYWORDS="~amd64 ~ppc64 ~x86"
56 +fi
57 +SRC_URI+=" browser? ( https://cdn-fastly.obsproject.com/downloads/${CEF_DIR}.tar.bz2 )"
58 +
59 +DESCRIPTION="Software for Recording and Streaming Live Video Content"
60 +HOMEPAGE="https://obsproject.com"
61 +
62 +LICENSE="GPL-2"
63 +SLOT="0"
64 +IUSE="
65 + +alsa browser decklink fdk jack lua nvenc pipewire
66 + pulseaudio python speex +ssl truetype v4l vlc wayland
67 +"
68 +REQUIRED_USE="
69 + browser? ( || ( alsa pulseaudio ) )
70 + lua? ( ${LUA_REQUIRED_USE} )
71 + python? ( ${PYTHON_REQUIRED_USE} )
72 +"
73 +
74 +BDEPEND="
75 + lua? ( dev-lang/swig )
76 + python? ( dev-lang/swig )
77 +"
78 +DEPEND="
79 + dev-libs/glib:2
80 + dev-libs/jansson:=
81 + dev-qt/qtcore:5
82 + dev-qt/qtdeclarative:5
83 + dev-qt/qtgui:5[wayland?]
84 + dev-qt/qtmultimedia:5
85 + dev-qt/qtnetwork:5
86 + dev-qt/qtquickcontrols:5
87 + dev-qt/qtsql:5
88 + dev-qt/qtsvg:5
89 + dev-qt/qtwidgets:5
90 + dev-qt/qtx11extras:5
91 + dev-qt/qtxml:5
92 + media-libs/libglvnd
93 + media-libs/x264:=
94 + media-video/ffmpeg:=[nvenc?,x264]
95 + net-misc/curl
96 + sys-apps/dbus
97 + sys-apps/pciutils
98 + sys-libs/zlib:=
99 + virtual/udev
100 + x11-libs/libX11
101 + x11-libs/libXcomposite
102 + x11-libs/libXfixes
103 + x11-libs/libXinerama
104 + x11-libs/libXrandr
105 + x11-libs/libxcb:=
106 + alsa? ( media-libs/alsa-lib )
107 + browser? (
108 + app-accessibility/at-spi2-atk
109 + app-accessibility/at-spi2-core:2
110 + dev-libs/atk
111 + dev-libs/expat
112 + dev-libs/glib
113 + dev-libs/nspr
114 + dev-libs/nss
115 + media-libs/alsa-lib
116 + media-libs/fontconfig
117 + media-libs/mesa[gbm(+)]
118 + net-print/cups
119 + x11-libs/cairo
120 + x11-libs/libdrm
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/libXtst
128 + )
129 + fdk? ( media-libs/fdk-aac:= )
130 + jack? ( virtual/jack )
131 + lua? ( ${LUA_DEPS} )
132 + pipewire? ( media-video/pipewire:= )
133 + pulseaudio? ( media-sound/pulseaudio )
134 + python? ( ${PYTHON_DEPS} )
135 + speex? ( media-libs/speexdsp )
136 + ssl? ( net-libs/mbedtls:= )
137 + truetype? (
138 + media-libs/fontconfig
139 + media-libs/freetype
140 + )
141 + v4l? ( media-libs/libv4l )
142 + vlc? ( media-video/vlc:= )
143 + wayland? ( dev-libs/wayland )
144 +"
145 +RDEPEND="${DEPEND}"
146 +
147 +QA_PREBUILT="
148 + usr/lib*/obs-plugins/chrome-sandbox
149 + usr/lib*/obs-plugins/libcef.so
150 + usr/lib*/obs-plugins/libEGL.so
151 + usr/lib*/obs-plugins/libGLESv2.so
152 + usr/lib*/obs-plugins/libvk_swiftshader.so
153 + usr/lib*/obs-plugins/libvulkan.so.1
154 + usr/lib*/obs-plugins/swiftshader/libEGL.so
155 + usr/lib*/obs-plugins/swiftshader/libGLESv2.so
156 +"
157 +
158 +pkg_setup() {
159 + use lua && lua-single_pkg_setup
160 + use python && python-single-r1_pkg_setup
161 +}
162 +
163 +src_unpack() {
164 + default
165 +
166 + if [[ ${PV} == 9999 ]]; then
167 + git-r3_src_unpack
168 + elif use browser; then
169 + rm -d ${P}/plugins/obs-browser || die
170 + mv obs-browser-${OBS_BROWSER_COMMIT} ${P}/plugins/obs-browser || die
171 + fi
172 +}
173 +
174 +src_configure() {
175 + local libdir=$(get_libdir)
176 + local mycmakeargs=(
177 + $(usev browser -DCEF_ROOT_DIR=../${CEF_DIR})
178 + -DBUILD_BROWSER=$(usex browser)
179 + -DBUILD_VST=no
180 + -DENABLE_WAYLAND=$(usex wayland)
181 + -DDISABLE_ALSA=$(usex !alsa)
182 + -DDISABLE_DECKLINK=$(usex !decklink)
183 + -DDISABLE_FREETYPE=$(usex !truetype)
184 + -DDISABLE_JACK=$(usex !jack)
185 + -DDISABLE_LIBFDK=$(usex !fdk)
186 + -DENABLE_PIPEWIRE=$(usex pipewire)
187 + -DDISABLE_PULSEAUDIO=$(usex !pulseaudio)
188 + -DDISABLE_SPEEXDSP=$(usex !speex)
189 + -DDISABLE_V4L2=$(usex !v4l)
190 + -DDISABLE_VLC=$(usex !vlc)
191 + -DOBS_MULTIARCH_SUFFIX=${libdir#lib}
192 + -DUNIX_STRUCTURE=1
193 + -DWITH_RTMPS=$(usex ssl)
194 +
195 + # deprecated and currently cause issues
196 + # https://github.com/obsproject/obs-studio/pull/4560#issuecomment-826345608
197 + -DLIBOBS_PREFER_IMAGEMAGICK=no
198 + )
199 +
200 + if [[ ${PV} != 9999 ]]; then
201 + mycmakeargs+=(
202 + -DOBS_VERSION_OVERRIDE=${PV}
203 + )
204 + fi
205 +
206 + if use lua || use python; then
207 + mycmakeargs+=(
208 + -DDISABLE_LUA=$(usex !lua)
209 + -DDISABLE_PYTHON=$(usex !python)
210 + -DENABLE_SCRIPTING=yes
211 + )
212 + else
213 + mycmakeargs+=( -DENABLE_SCRIPTING=no )
214 + fi
215 +
216 + cmake_src_configure
217 +}
218 +
219 +src_install() {
220 + cmake_src_install
221 +
222 + # external plugins may need some things not installed by default, install them here
223 + insinto /usr/include/obs/UI/obs-frontend-api
224 + doins UI/obs-frontend-api/obs-frontend-api.h
225 +}
226 +
227 +pkg_postinst() {
228 + xdg_pkg_postinst
229 +
230 + if ! use alsa && ! use pulseaudio; then
231 + elog
232 + elog "For the audio capture features to be available,"
233 + elog "either the 'alsa' or the 'pulseaudio' USE-flag needs to"
234 + elog "be enabled."
235 + elog
236 + fi
237 +}