1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{3_4,3_5,3_6} )
8 inherit cmake-utils gnome2-utils python-single-r1
10 if [[ ${PV} == *9999 ]]; then
12 EGIT_REPO_URI="https://github.com/obsproject/obs-studio.git"
15 SRC_URI="https://github.com/obsproject/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
16 KEYWORDS="~amd64 ~x86"
19 DESCRIPTION="Software for Recording and Streaming Live Video Content"
20 HOMEPAGE="https://obsproject.com"
24 IUSE="+alsa fdk imagemagick jack luajit nvenc pulseaudio python speex truetype v4l"
25 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
28 >=dev-libs/jansson-2.5
30 dev-qt/qtdeclarative:5
34 dev-qt/qtquickcontrols:5
39 media-video/ffmpeg:=[x264]
41 x11-libs/libXcomposite
44 alsa? ( media-libs/alsa-lib )
45 fdk? ( media-libs/fdk-aac:= )
46 imagemagick? ( media-gfx/imagemagick:= )
47 jack? ( virtual/jack )
48 luajit? ( dev-lang/luajit:2 )
49 nvenc? ( media-video/ffmpeg:=[nvenc(+),video_cards_nvidia(+)] )
50 pulseaudio? ( media-sound/pulseaudio )
51 python? ( ${PYTHON_DEPS} )
52 speex? ( media-libs/speexdsp )
57 v4l? ( media-libs/libv4l )
59 DEPEND="${COMMON_DEPEND}
60 luajit? ( dev-lang/swig )
61 python? ( dev-lang/swig )
63 RDEPEND="${COMMON_DEPEND}"
65 PATCHES="${FILESDIR}/${PN}-21.1.2-use-less-automagic.patch"
67 CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
70 local libdir=$(get_libdir)
72 -DDISABLE_ALSA=$(usex !alsa)
73 -DDISABLE_FREETYPE=$(usex !truetype)
74 -DDISABLE_JACK=$(usex !jack)
75 -DDISABLE_LIBFDK=$(usex !fdk)
76 -DDISABLE_PULSEAUDIO=$(usex !pulseaudio)
77 -DDISABLE_SPEEXDSP=$(usex !speex)
78 -DDISABLE_V4L2=$(usex !v4l)
79 -DLIBOBS_PREFER_IMAGEMAGICK=$(usex imagemagick)
80 -DOBS_MULTIARCH_SUFFIX=${libdir#lib}
84 if use luajit || use python; then
86 -DDISABLE_LUA=$(usex !luajit)
87 -DDISABLE_PYTHON=$(usex !python)
88 -DENABLE_SCRIPTING=yes
91 mycmakeargs+=( -DENABLE_SCRIPTING=no )
94 cmake-utils_src_configure
98 gnome2_icon_cache_update
100 if ! use alsa && ! use pulseaudio; then
102 elog "For the audio capture features to be available,"
103 elog "either the 'alsa' or the 'pulseaudio' USE-flag needs to"
108 if ! has_version "sys-apps/dbus"; then
110 elog "The 'sys-apps/dbus' package is not installed, but"
111 elog "could be used for disabling hibernating, screensaving,"
112 elog "and sleeping. Where it is not installed,"
113 elog "'xdg-screensaver reset' is used instead"
114 elog "(if 'x11-misc/xdg-utils' is installed)."
120 gnome2_icon_cache_update