644cbc1fdbcf6260aef5a3bb9ebfffae61d8a88b
[gentoo.git] / x11-misc / x11vnc / x11vnc-0.9.16-r3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools
7
8 DESCRIPTION="VNC server for real X displays"
9 HOMEPAGE="https://libvnc.github.io/"
10 SRC_URI="https://github.com/LibVNC/x11vnc/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="GPL-2+-with-openssl-exception"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
15 IUSE="crypt fbcon libressl ssl +xcomposite +xdamage +xfixes xinerama +xrandr zeroconf"
16
17 COMMON_DEPEND="
18         >=net-libs/libvncserver-0.9.8[ssl=]
19         x11-libs/libX11
20         x11-libs/libXcursor
21         x11-libs/libXext
22         >=x11-libs/libXtst-1.1.0
23         ssl? (
24                 !libressl? ( dev-libs/openssl:0= )
25                 libressl? ( dev-libs/libressl:= )
26         )
27         xcomposite? ( x11-libs/libXcomposite )
28         xdamage? ( x11-libs/libXdamage )
29         xfixes? ( x11-libs/libXfixes )
30         xinerama? ( x11-libs/libXinerama )
31         xrandr? ( x11-libs/libXrandr )
32         zeroconf? ( >=net-dns/avahi-0.6.4 )
33 "
34 DEPEND="${COMMON_DEPEND}
35         x11-base/xorg-proto
36         x11-libs/libXt
37 "
38 # https://bugzilla.redhat.com/show_bug.cgi?id=920554
39 RDEPEND="${COMMON_DEPEND}
40         dev-lang/tk:0
41 "
42
43 PATCHES=(
44         "${FILESDIR}"/${P}-crypto.patch # https://github.com/LibVNC/x11vnc/issues/86
45         "${FILESDIR}"/${P}-anonymous-ssl.patch # https://github.com/LibVNC/x11vnc/pull/85
46         "${FILESDIR}"/${P}-libressl.patch
47 )
48
49 src_prepare() {
50         default
51         eautoreconf
52 }
53
54 src_configure() {
55         # --without-v4l because of missing video4linux 2.x support wrt #389079
56         econf \
57                 --without-v4l \
58                 --without-xkeyboard \
59                 --without-fbpm \
60                 --without-dpms \
61                 $(use_with crypt) \
62                 $(use_with fbcon fbdev) \
63                 $(use_with ssl) \
64                 $(use_with ssl crypto) \
65                 $(use_with xcomposite) \
66                 $(use_with xdamage) \
67                 $(use_with xfixes) \
68                 $(use_with xinerama) \
69                 $(use_with xrandr) \
70                 $(use_with zeroconf avahi)
71 }
72
73 src_install() {
74         default
75         newinitd "${FILESDIR}/x11vnc.init.d" x11vnc
76         newconfd "${FILESDIR}/x11vnc.conf.d" x11vnc
77 }