media-video/obs-studio: Version bump to 18.0.2.
[gentoo.git] / media-video / obs-studio / obs-studio-9999.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit cmake-utils gnome2-utils
7
8 if [[ ${PV} == *9999 ]]; then
9         inherit git-r3
10         EGIT_REPO_URI="https://github.com/jp9000/obs-studio.git"
11         EGIT_SUBMODULES=()
12 else
13         SRC_URI="https://github.com/jp9000/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14         KEYWORDS="~amd64 ~x86"
15 fi
16
17 DESCRIPTION="Software for Recording and Streaming Live Video Content"
18 HOMEPAGE="https://obsproject.com"
19
20 LICENSE="GPL-2"
21 SLOT="0"
22 IUSE="+alsa fdk imagemagick jack pulseaudio truetype v4l"
23
24 DEPEND="
25         >=dev-libs/jansson-2.5
26         dev-qt/qtcore:5
27         dev-qt/qtdeclarative:5
28         dev-qt/qtgui:5
29         dev-qt/qtmultimedia:5
30         dev-qt/qtnetwork:5
31         dev-qt/qtquickcontrols:5
32         dev-qt/qtsql:5
33         dev-qt/qttest:5
34         dev-qt/qtwidgets:5
35         dev-qt/qtx11extras:5
36         media-video/ffmpeg:=[x264]
37         net-misc/curl
38         x11-libs/libXcomposite
39         x11-libs/libXinerama
40         x11-libs/libXrandr
41         alsa? ( media-libs/alsa-lib )
42         fdk? ( media-libs/fdk-aac:= )
43         imagemagick? ( media-gfx/imagemagick:= )
44         jack? ( virtual/jack )
45         pulseaudio? ( media-sound/pulseaudio )
46         truetype? (
47                 media-libs/fontconfig
48                 media-libs/freetype
49         )
50         v4l? ( media-libs/libv4l )
51 "
52 RDEPEND="${DEPEND}"
53
54 CMAKE_REMOVE_MODULES_LIST=( FindFreetype )
55
56 src_configure() {
57         local libdir=$(get_libdir)
58         local mycmakeargs=(
59                 -DDISABLE_ALSA=$(usex !alsa)
60                 -DDISABLE_FREETYPE=$(usex !truetype)
61                 -DDISABLE_JACK=$(usex !jack)
62                 -DDISABLE_LIBFDK=$(usex !fdk)
63                 -DDISABLE_PULSEAUDIO=$(usex !pulseaudio)
64                 -DDISABLE_V4L2=$(usex !v4l)
65                 -DLIBOBS_PREFER_IMAGEMAGICK=$(usex imagemagick)
66                 -DOBS_MULTIARCH_SUFFIX=${libdir#lib}
67                 -DUNIX_STRUCTURE=1
68         )
69         cmake-utils_src_configure
70 }
71
72 pkg_postinst() {
73         gnome2_icon_cache_update
74
75         if ! use alsa && ! use pulseaudio; then
76                 elog
77                 elog "For the audio capture features to be available,"
78                 elog "either the 'alsa' or the 'pulseaudio' USE-flag needs to"
79                 elog "be enabled."
80                 elog
81         fi
82
83         if ! has_version "sys-apps/dbus"; then
84                 elog
85                 elog "The 'sys-apps/dbus' package is not installed, but"
86                 elog "could be used for disabling hibernating, screensaving,"
87                 elog "and sleeping.  Where it is not installed,"
88                 elog "'xdg-screensaver reset' is used instead"
89                 elog "(if 'x11-misc/xdg-utils' is installed)."
90                 elog
91         fi
92
93         if ! has_version "media-libs/speex"; then
94                 elog
95                 elog "For the speexdsp-based noise suppression filter"
96                 elog "to be available, the 'media-libs/speex' package needs"
97                 elog "to be installed."
98                 elog
99         fi
100 }
101
102 pkg_postrm() {
103         gnome2_icon_cache_update
104 }