1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
7 PYTHON_COMPAT=( python3_{6,7} )
9 inherit cmake-utils python-single-r1 xdg-utils
11 if [[ ${PV} == *9999 ]]; then
13 EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git"
16 SRC_URI="https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
17 KEYWORDS="~amd64 ~x86"
20 DESCRIPTION="Software for Recording and Streaming Live Video Content"
21 HOMEPAGE="https://obsproject.com"
25 IUSE="+alsa fdk imagemagick jack luajit nvenc pulseaudio python speex +ssl truetype v4l vlc"
26 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
29 luajit? ( dev-lang/swig )
30 python? ( dev-lang/swig )
33 >=dev-libs/jansson-2.5
35 dev-qt/qtdeclarative:5
39 dev-qt/qtquickcontrols:5
44 media-video/ffmpeg:=[x264]
46 x11-libs/libXcomposite
49 alsa? ( media-libs/alsa-lib )
50 fdk? ( media-libs/fdk-aac:= )
51 imagemagick? ( media-gfx/imagemagick:= )
52 jack? ( virtual/jack )
53 luajit? ( dev-lang/luajit:2 )
56 <media-video/ffmpeg-4[nvenc]
57 >=media-video/ffmpeg-4[video_cards_nvidia]
60 pulseaudio? ( media-sound/pulseaudio )
61 python? ( ${PYTHON_DEPS} )
62 speex? ( media-libs/speexdsp )
63 ssl? ( net-libs/mbedtls )
68 v4l? ( media-libs/libv4l )
69 vlc? ( media-video/vlc:= )
74 use python && python-single-r1_pkg_setup
78 local libdir=$(get_libdir)
80 -DDISABLE_ALSA=$(usex !alsa)
81 -DDISABLE_FREETYPE=$(usex !truetype)
82 -DDISABLE_JACK=$(usex !jack)
83 -DDISABLE_LIBFDK=$(usex !fdk)
84 -DDISABLE_PULSEAUDIO=$(usex !pulseaudio)
85 -DDISABLE_SPEEXDSP=$(usex !speex)
86 -DDISABLE_V4L2=$(usex !v4l)
87 -DDISABLE_VLC=$(usex !vlc)
88 -DLIBOBS_PREFER_IMAGEMAGICK=$(usex imagemagick)
89 -DOBS_MULTIARCH_SUFFIX=${libdir#lib}
90 -DOBS_VERSION_OVERRIDE=${PV}
92 -DWITH_RTMPS=$(usex ssl)
95 if use luajit || use python; then
97 -DDISABLE_LUA=$(usex !luajit)
98 -DDISABLE_PYTHON=$(usex !python)
99 -DENABLE_SCRIPTING=yes
102 mycmakeargs+=( -DENABLE_SCRIPTING=no )
105 cmake-utils_src_configure
109 xdg_icon_cache_update
111 if ! use alsa && ! use pulseaudio; then
113 elog "For the audio capture features to be available,"
114 elog "either the 'alsa' or the 'pulseaudio' USE-flag needs to"
119 if ! has_version "sys-apps/dbus"; then
121 elog "The 'sys-apps/dbus' package is not installed, but"
122 elog "could be used for disabling hibernating, screensaving,"
123 elog "and sleeping. Where it is not installed,"
124 elog "'xdg-screensaver reset' is used instead"
125 elog "(if 'x11-misc/xdg-utils' is installed)."
131 xdg_icon_cache_update