commit: 2c099098656881a2be2453fc25445965e0e145fc
parent 73ddcfa21a16846f96c39a421a33ccca9fa42861
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 19 Jun 2021 05:56:10 +0200
media-video/obs-studio: Synchronise with ::gentoo
Diffstat:
3 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/media-video/obs-studio/Manifest b/media-video/obs-studio/Manifest
@@ -1 +0,0 @@
-DIST obs-studio-25.0.8.tar.gz 9531713 BLAKE2B 4775ca8305e1beee4d926eff728351b699ca4d52f66e53409dbcfe1f73699df0286fadc0c138cb76b8eb73e70a143719e46f030b6d15d43629bdcbf23bdb88af SHA512 a97c03dc218a4e03e48f6a7dc82b4a59ebeee2039f17be66bb847681ce9ff3d25e6e015be4af78fe44739f6fad5089b6e683d7657c2e4fde8e547df9a2594a08
diff --git a/media-video/obs-studio/metadata.xml b/media-video/obs-studio/metadata.xml
@@ -12,10 +12,11 @@
     internally.
   </longdescription>
   <use>
+    <flag name="decklink">Build the Decklink plugin.</flag>
     <flag name="fdk">Enable libfdk support for AAC encoding.</flag>
     <flag name="imagemagick">Use ImageMagick for image loading instead of FFmpeg.</flag>
-    <flag name="luajit">Build support for scripting via Luajit.</flag>
     <flag name="nvenc">Enable NVENC encoding for nVidia video cards.</flag>
+    <flag name="pipewire">Build with PipeWire support.</flag>
     <flag name="python">Build support for scripting via Python 3.</flag>
     <flag name="speex">Enable noise suppression filter support via
       <pkg>media-libs/speexdsp</pkg>.</flag>
diff --git a/media-video/obs-studio/obs-studio-9999.ebuild b/media-video/obs-studio/obs-studio-9999.ebuild
@@ -1,12 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
 CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
-PYTHON_COMPAT=( python3_{6,7} )
+LUA_COMPAT=( luajit )
+PYTHON_COMPAT=( python3_{7..9} )
 
-inherit cmake-utils python-single-r1 xdg-utils
+inherit cmake lua-single python-single-r1 xdg-utils
 
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
@@ -20,11 +21,14 @@ HOMEPAGE="https://obsproject.com"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="+alsa fdk imagemagick jack luajit nvenc pulseaudio python speex +ssl truetype v4l vlc wayland X"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+IUSE="+alsa decklink fdk imagemagick jack lua nvenc pipewire pulseaudio python speex +ssl truetype v4l vlc wayland X"
+REQUIRED_USE="
+	lua? ( ${LUA_REQUIRED_USE} )
+	python? ( ${PYTHON_REQUIRED_USE} )
+"
 
 BDEPEND="
-	luajit? ( dev-lang/swig )
+	lua? ( dev-lang/swig )
 	python? ( dev-lang/swig )
 "
 DEPEND="
@@ -57,8 +61,9 @@ DEPEND="
 	fdk? ( media-libs/fdk-aac:= )
 	imagemagick? ( media-gfx/imagemagick:= )
 	jack? ( virtual/jack )
-	luajit? ( dev-lang/luajit:2 )
+	lua? ( ${LUA_DEPS} )
 	nvenc? ( >=media-video/ffmpeg-4[video_cards_nvidia] )
+	pipewire? ( media-video/pipewire )
 	pulseaudio? ( media-sound/pulseaudio )
 	python? ( ${PYTHON_DEPS} )
 	speex? ( media-libs/speexdsp )
@@ -73,16 +78,23 @@ DEPEND="
 RDEPEND="${DEPEND}"
 
 pkg_setup() {
+	use lua && lua-single_pkg_setup
 	use python && python-single-r1_pkg_setup
 }
 
 src_configure() {
 	local libdir=$(get_libdir)
 	local mycmakeargs=(
+		-DBUILD_BROWSER=no
+		-DBUILD_VST=no
+		-DENABLE_WAYLAND=$(usex wayland)
+		-DENABLE_X11=$(usex X)
 		-DDISABLE_ALSA=$(usex !alsa)
+		-DDISABLE_DECKLINK=$(usex !decklink)
 		-DDISABLE_FREETYPE=$(usex !truetype)
 		-DDISABLE_JACK=$(usex !jack)
 		-DDISABLE_LIBFDK=$(usex !fdk)
+		-DENABLE_PIPEWIRE=$(usex pipewire)
 		-DDISABLE_PULSEAUDIO=$(usex !pulseaudio)
 		-DDISABLE_SPEEXDSP=$(usex !speex)
 		-DDISABLE_V4L2=$(usex !v4l)
@@ -91,19 +103,17 @@ src_configure() {
 		-DOBS_MULTIARCH_SUFFIX=${libdir#lib}
 		-DUNIX_STRUCTURE=1
 		-DWITH_RTMPS=$(usex ssl)
-		-DENABLE_WAYLAND=$(usex wayland)
-		-DENABLE_X11=$(usex X)
 	)
 
-	if [ "${PV}" != "9999" ]; then
+	if [ ${PV} != *9999 ]; then
 		mycmakeargs+=(
 			-DOBS_VERSION_OVERRIDE=${PV}
 		)
 	fi
 
-	if use luajit || use python; then
+	if use lua || use python; then
 		mycmakeargs+=(
-			-DDISABLE_LUA=$(usex !luajit)
+			-DDISABLE_LUA=$(usex !lua)
 			-DDISABLE_PYTHON=$(usex !python)
 			-DENABLE_SCRIPTING=yes
 		)
@@ -111,11 +121,11 @@ src_configure() {
 		mycmakeargs+=( -DENABLE_SCRIPTING=no )
 	fi
 
-	cmake-utils_src_configure
+	cmake_src_configure
 }
 
 src_install() {
-	cmake-utils_src_install
+	cmake_src_install
 	#external plugins may need some things not installed by default, install them here
 	insinto /usr/include/obs/UI/obs-frontend-api
 	doins UI/obs-frontend-api/obs-frontend-api.h