summaryrefslogtreecommitdiff
blob: ea0561a195734b3f8696545d5d59205783e8e0f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit cmake-utils

LICENSE="MIT"
HOMEPAGE="https://github.com/i-rinat/freshplayerplugin"
DESCRIPTION="PPAPI-host NPAPI-plugin adapter for flashplayer in npapi based browsers"
SRC_URI="https://github.com/i-rinat/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SLOT=0
IUSE="gles2 jack libav libressl pulseaudio v4l vaapi vdpau"

KEYWORDS="amd64"

HWDEC_DEPEND="
	libav? ( media-video/libav:0=[vaapi?,vdpau?] )
	!libav? ( media-video/ffmpeg:0=[vaapi?,vdpau?] )
	x11-libs/libvdpau
"

COMMON_DEPEND="
	dev-libs/glib:2=
	dev-libs/icu:0=
	dev-libs/libevent:=[threads]
	media-libs/alsa-lib:=
	media-libs/freetype:2=
	media-libs/mesa:=[egl,gles2?]
	x11-libs/cairo:=[X]
	x11-libs/libXcursor:=
	x11-libs/libXrandr:=
	x11-libs/libXrender:=
	x11-libs/libdrm:=
	x11-libs/libva:=
	x11-libs/pango:=[X]
	jack? (
		media-sound/jack-audio-connection-kit
		media-libs/soxr
	)
	pulseaudio? ( media-sound/pulseaudio )
	libressl? ( dev-libs/libressl:0= )
	!libressl? ( dev-libs/openssl:0= )
	v4l? ( media-libs/libv4l:0= )
	vaapi? ( ${HWDEC_DEPEND} )
	vdpau? ( ${HWDEC_DEPEND} )
"

DEPEND="${COMMON_DEPEND}
	dev-util/ragel
	virtual/pkgconfig
	"
RDEPEND="${COMMON_DEPEND}
	www-plugins/adobe-flash:22[abi_x86_64,ppapi(+)]
	"

PATCHES=( "${FILESDIR}/0.3.5-cmake.patch" "${FILESDIR}/0.3.9-ioctl.patch" )
DOCS=( ChangeLog data/freshwrapper.conf.example README.md )

src_configure() {
	mycmakeargs=(
		-DWITH_JACK=$(usex jack)
		-DWITH_PULSEAUDIO=$(usex pulseaudio)
		-DWITH_GLES2=$(usex gles2)
		-DWITH_LIBV4L2=$(usex v4l)
		-DCMAKE_SKIP_RPATH=1
	)
	if use vaapi || use vdpau ; then
		mycmakeargs+=( -DWITH_HWDEC=1 )
	else
		mycmakeargs+=( -DWITH_HWDEC=0 )
	fi
	cmake-utils_src_configure
}