summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimi Huotari <chiitoo@gentoo.org>2022-11-02 07:19:03 +0200
committerJimi Huotari <chiitoo@gentoo.org>2022-11-08 18:16:54 +0200
commit3193b29379dcfa2a889a9ad600059df73e749e0d (patch)
treea764d327e92c4605000fdd3bc32556cef158cb92 /media-video
parentapp-office/libreoffice: remove unused patch (diff)
downloadgentoo-3193b29379dcfa2a889a9ad600059df73e749e0d.tar.gz
gentoo-3193b29379dcfa2a889a9ad600059df73e749e0d.tar.bz2
gentoo-3193b29379dcfa2a889a9ad600059df73e749e0d.zip
media-video/obs-studio: add USE="qt6 websocket" and python 3.11 + more
- Add support for qt6, websocket plugin, and python 3.11. - Update browser related hashes. - Adjust dependencies. - Remove dependency on 'qtx11extras' which was removed upstream a good while ago (thanks-to: マリウス <marius@xn--gckvb8fzb.com>). Also add an 'optfeature' and an elog message regarding the virtual camera feature, and enable 'VST' by default since it's no longer a submodule, and doesn't seem to increase the size of things much at all. Lastly, adjust some of the existing elog message wording. Bug: https://bugs.gentoo.org/876971 Thanks-to: Ionen Wolkens <ionen@gentoo.org> Signed-off-by: Jimi Huotari <chiitoo@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r--media-video/obs-studio/Manifest1
-rw-r--r--media-video/obs-studio/metadata.xml1
-rw-r--r--media-video/obs-studio/obs-studio-9999.ebuild111
3 files changed, 84 insertions, 29 deletions
diff --git a/media-video/obs-studio/Manifest b/media-video/obs-studio/Manifest
index 86c897e4d5f3..bb70ecac77a8 100644
--- a/media-video/obs-studio/Manifest
+++ b/media-video/obs-studio/Manifest
@@ -1,4 +1,5 @@
DIST cef_binary_4638_linux64.tar.bz2 104578246 BLAKE2B 13ee05d4a2fbf27290506297416b298c786954450c19183b493d13aa691db409c22b30870fbc55adf814ff30142a666eb8b172f16ccc48e6cf01135c72e5d6d6 SHA512 2eb01151e07adf332affce36a659c6e87da1fbc403c65db7e7c53472ff418df6cd04300a7c6ebc8789c094926429cc70d829e556e5de3127da230f8258fabe49
+DIST cef_binary_5060_linux64.tar.bz2 132839531 BLAKE2B f7d342cf12bf435aab3873b666a47c42c6583a88f140c28dabfd2dd860cd0d5c96cc51cc034703bffc6f1094a738bd77008c01839fa5ea53b848bc1c483a0ae4 SHA512 c99ce53858c57becd7822e39ff81d59b7296374fa61b29dfd4a572c2ed8f9ab155114ed179764ea05586e0edb2f1654f0b73c471f1cd9b233660e7f1c8b462c4
DIST obs-browser-915761778ec1eae99e740ad4bf63b40db3142ee2.tar.gz 100021 BLAKE2B d72df588aaeaf199c6ea5a7e419bb4792ef8b4c4237e700f75064d96caaec83ed2be2ea4ab34ba31e30a87ec6cbf1f267dd7b100c3a6cfec36e46b2eca8c4b2e SHA512 3ab6118a9509054ea4e8aed14dade7f374495ba25fcb5295a3ef7ed29e6e3305b0ae2f12ba2c0d27fcd6886822c98ab44a48fa9a4b66ae0507ab2bf1001157cb
DIST obs-studio-27.2.3.tar.gz 16383685 BLAKE2B 76802ba67dcebccabd9b2a1f09f505a4aea83887b445093c51a2c7a49fbaa064549b6212bd1b2f3200674a78349b2de4bfa54d14871c76be248cd62139d98a56 SHA512 c34e850e1a83e55aed952611257446a39d7ba4456b94f74d91c85d09d77361af2f76848f7d3f3d8ba7ae76c926129adad555e2f54d632658832596d0f2696a3c
DIST obs-studio-27.2.4.tar.gz 16385399 BLAKE2B 00c05ecd055d707b7132ca4b20e1c4946b682c0f79f1477167ae55aba3ec367c97b05aac190b07260f936e68f79f2d58e19dcc0602f70408f4c056eb733a6fdd SHA512 575341dd3d9240b21881517a16d01ca11f833e08b40ca7990f0360b4cd1076e8217a9bb8dddf174eca5429e6eadaadb6cfdbd61d24e0eb13ebeaa7f29cfad8bf
diff --git a/media-video/obs-studio/metadata.xml b/media-video/obs-studio/metadata.xml
index 0945dd8d23e2..187b2b842772 100644
--- a/media-video/obs-studio/metadata.xml
+++ b/media-video/obs-studio/metadata.xml
@@ -24,6 +24,7 @@
<flag name="speex">Build with Speex noise suppression filter support.</flag>
<flag name="ssl">Build with TLS/SSL support for RTMPS connections.</flag>
<flag name="vlc">Build with VLC media source support.</flag>
+ <flag name="websocket">Build with WebSocket API support.</flag>
</use>
<upstream>
<remote-id type="github">obsproject/obs-studio</remote-id>
diff --git a/media-video/obs-studio/obs-studio-9999.ebuild b/media-video/obs-studio/obs-studio-9999.ebuild
index ce91ef9b0728..dec59165b47e 100644
--- a/media-video/obs-studio/obs-studio-9999.ebuild
+++ b/media-video/obs-studio/obs-studio-9999.ebuild
@@ -5,20 +5,39 @@ EAPI=8
CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
LUA_COMPAT=( luajit )
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
-inherit cmake lua-single python-single-r1 xdg
+inherit cmake lua-single optfeature python-single-r1 xdg
-OBS_BROWSER_COMMIT="b798763ae75b538e405c2d7e2ab3a1edfe59ed0c"
-CEF_DIR="cef_binary_4638_linux64"
+CEF_DIR="cef_binary_5060_linux64"
+ASIO_COMMIT="b73dc1d2c0ecb9452a87c26544d7f71e24342df6"
+JSON_COMMIT="a34e011e24beece3b69397a03fdc650546f052c3"
+OBS_BROWSER_COMMIT="e2310b02df3e6c184fe6eb6608244a82e37f582e"
+OBS_WEBSOCKET_COMMIT="5716577019b1ccda01a12db2cba35a023082b7ad"
+QR_COMMIT="8518684c0f33d004fa93971be2c6a8eca3167d1e"
+WEBSOCKETPP_COMMIT="56123c87598f8b1dd471be83ca841ceae07f95ba"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git"
- EGIT_SUBMODULES=( plugins/obs-browser )
+ EGIT_SUBMODULES=(
+ plugins/obs-browser
+ plugins/obs-websocket
+ plugins/obs-websocket/deps/asio
+ plugins/obs-websocket/deps/json
+ plugins/obs-websocket/deps/qr
+ plugins/obs-websocket/deps/websocketpp
+ )
else
- SRC_URI="https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
- SRC_URI+=" browser? ( https://github.com/obsproject/obs-browser/archive/${OBS_BROWSER_COMMIT}.tar.gz -> obs-browser-${OBS_BROWSER_COMMIT}.tar.gz )"
+ SRC_URI="
+ https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/obsproject/obs-browser/archive/${OBS_BROWSER_COMMIT}.tar.gz -> obs-browser-${OBS_BROWSER_COMMIT}.tar.gz
+ https://github.com/chriskohlhoff/asio/archive/${ASIO_COMMIT}.tar.gz -> asio-${ASIO_COMMIT}.tar.gz
+ https://github.com/nayuki/QR-Code-generator/archive/${QR_COMMIT}.tar.gz -> qr-${QR_COMMIT}.tar.gz
+ https://github.com/nlohmann/json/archive/${JSON_COMMIT}.tar.gz -> json-${JSON_COMMIT}.tar.gz
+ https://github.com/obsproject/obs-websocket/archive/${OBS_WEBSOCKET_COMMIT}.tar.gz -> obs-websocket-${OBS_WEBSOCKET_COMMIT}.tar.gz
+ https://github.com/zaphoyd/websocketpp/archive/${WEBSOCKETPP_COMMIT}.tar.gz -> websocketpp-${WEBSOCKETPP_COMMIT}.tar.gz
+ "
KEYWORDS="~amd64 ~ppc64 ~x86"
fi
SRC_URI+=" browser? ( https://cdn-fastly.obsproject.com/downloads/${CEF_DIR}.tar.bz2 )"
@@ -26,11 +45,11 @@ SRC_URI+=" browser? ( https://cdn-fastly.obsproject.com/downloads/${CEF_DIR}.tar
DESCRIPTION="Software for Recording and Streaming Live Video Content"
HOMEPAGE="https://obsproject.com"
-LICENSE="GPL-2"
+LICENSE="Boost-1.0 GPL-2+ MIT Unlicense"
SLOT="0"
IUSE="
- +alsa browser decklink fdk jack lua nvenc pipewire
- pulseaudio python speex +ssl truetype v4l vlc wayland
+ +alsa browser decklink fdk jack lua nvenc pipewire pulseaudio
+ python qt6 speex +ssl truetype v4l vlc wayland websocket
"
REQUIRED_USE="
browser? ( || ( alsa pulseaudio ) )
@@ -45,13 +64,6 @@ BDEPEND="
DEPEND="
dev-libs/glib:2
dev-libs/jansson:=
- dev-qt/qtcore:5
- dev-qt/qtgui:5[wayland?]
- dev-qt/qtnetwork:5
- dev-qt/qtquickcontrols:5
- dev-qt/qtsvg:5
- dev-qt/qtwidgets:5
- dev-qt/qtxml:5
media-libs/libglvnd
media-libs/x264:=
media-video/ffmpeg:=[nvenc?,x264]
@@ -73,6 +85,7 @@ DEPEND="
dev-libs/glib
dev-libs/nspr
dev-libs/nss
+ dev-libs/wayland
media-libs/alsa-lib
media-libs/fontconfig
media-libs/mesa[gbm(+)]
@@ -95,8 +108,22 @@ DEPEND="
jack? ( virtual/jack )
lua? ( ${LUA_DEPS} )
pipewire? ( media-video/pipewire:= )
- pulseaudio? ( media-sound/pulseaudio )
+ pulseaudio? ( media-libs/libpulse )
python? ( ${PYTHON_DEPS} )
+ qt6? (
+ dev-qt/qtbase:6[network,widgets,xml(+)]
+ dev-qt/qtsvg:6
+ x11-libs/libxkbcommon
+ )
+ !qt6? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5[wayland?]
+ dev-qt/qtnetwork:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ )
speex? ( media-libs/speexdsp )
ssl? ( net-libs/mbedtls:= )
truetype? (
@@ -136,19 +163,25 @@ src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
- elif use browser; then
+ else
rm -d ${P}/plugins/obs-browser || die
mv obs-browser-${OBS_BROWSER_COMMIT} ${P}/plugins/obs-browser || die
- fi
-}
-src_prepare() {
- # We have not enabled VST before, but now it will be looked for unconditionally if
- # any plugins are enabled, so make the VST part a warning instead of fatal for now.
- sed -i 's/FATAL_ERROR "obs-vst submodule not available/WARNING "obs-vst submodule not available/' \
- plugins/CMakeLists.txt || die
+ rm -d ${P}/plugins/obs-websocket || die
+ mv obs-websocket-${OBS_WEBSOCKET_COMMIT} ${P}/plugins/obs-websocket || die
+
+ rm -d ${P}/plugins/obs-websocket/deps/asio || die
+ mv asio-${ASIO_COMMIT} ${P}/plugins/obs-websocket/deps/asio || die
+
+ rm -d ${P}/plugins/obs-websocket/deps/json || die
+ mv json-${JSON_COMMIT} ${P}/plugins/obs-websocket/deps/json || die
- cmake_src_prepare
+ rm -d ${P}/plugins/obs-websocket/deps/qr || die
+ mv QR-Code-generator-${QR_COMMIT} ${P}/plugins/obs-websocket/deps/qr || die
+
+ rm -d ${P}/plugins/obs-websocket/deps/websocketpp || die
+ mv websocketpp-${WEBSOCKETPP_COMMIT} ${P}/plugins/obs-websocket/deps/websocketpp || die
+ fi
}
src_configure() {
@@ -162,14 +195,18 @@ src_configure() {
-DENABLE_FREETYPE=$(usex truetype)
-DENABLE_JACK=$(usex jack)
-DENABLE_LIBFDK=$(usex fdk)
+ -DENABLE_NEW_MPEGTS_OUTPUT=OFF # Requires librist and libsrt.
-DENABLE_PIPEWIRE=$(usex pipewire)
-DENABLE_PULSEAUDIO=$(usex pulseaudio)
- -DENABLE_RTMPS=$(usex ssl ON OFF)
+ -DENABLE_RTMPS=$(usex ssl)
-DENABLE_SPEEXDSP=$(usex speex)
-DENABLE_V4L2=$(usex v4l)
-DENABLE_VLC=$(usex vlc)
+ -DENABLE_VST=ON
-DENABLE_WAYLAND=$(usex wayland)
+ -DENABLE_WEBSOCKET=$(usex websocket)
-DOBS_MULTIARCH_SUFFIX=${libdir#lib}
+ -DQT_VERSION=$(usex qt6 6 5)
-DUNIX_STRUCTURE=1
)
@@ -189,6 +226,12 @@ src_configure() {
mycmakeargs+=( -DENABLE_SCRIPTING=OFF )
fi
+ if use browser && use ssl; then
+ mycmakeargs+=( -DENABLE_WHATSNEW=ON )
+ else
+ mycmakeargs+=( -DENABLE_WHATSNEW=OFF )
+ fi
+
cmake_src_configure
}
@@ -206,8 +249,18 @@ pkg_postinst() {
if ! use alsa && ! use pulseaudio; then
elog
elog "For the audio capture features to be available,"
- elog "either the 'alsa' or the 'pulseaudio' USE-flag needs to"
+ elog "at least one of the 'alsa' or 'pulseaudio' USE-flags needs to"
elog "be enabled."
elog
fi
+
+ if use v4l && has_version media-video/v4l2loopback; then
+ elog
+ elog "Depending on system configuration, the v4l2loopback kernel module"
+ elog "may need to be loaded manually, and needs to be re-built after"
+ elog "kernel changes."
+ elog
+ fi
+
+ optfeature "virtual camera support" media-video/v4l2loopback
}