dev-libs/weston: Update 9999 line with 3.0.0
[gentoo.git] / dev-libs / weston / weston-3.0.0.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 if [[ ${PV} = 9999* ]]; then
7         EGIT_REPO_URI="https://anongit.freedesktop.org/git/wayland/weston.git"
8         GIT_ECLASS="git-r3"
9         EXPERIMENTAL="true"
10 fi
11
12 inherit autotools readme.gentoo-r1 toolchain-funcs $GIT_ECLASS
13
14 DESCRIPTION="Wayland reference compositor"
15 HOMEPAGE="https://wayland.freedesktop.org/"
16
17 if [[ $PV = 9999* ]]; then
18         SRC_URI="${SRC_PATCHES}"
19         KEYWORDS=""
20 else
21         SRC_URI="https://wayland.freedesktop.org/releases/${P}.tar.xz"
22         KEYWORDS="~amd64 ~arm ~x86 ~arm-linux"
23 fi
24
25 LICENSE="MIT CC-BY-SA-3.0"
26 SLOT="0"
27
28 IUSE="colord dbus +drm editor examples fbdev +gles2 headless ivi jpeg +launch lcms rdp +resize-optimization screen-sharing static-libs +suid systemd test unwind wayland-compositor webp +X xwayland"
29
30 REQUIRED_USE="
31         drm? ( gles2 )
32         screen-sharing? ( rdp )
33         systemd? ( dbus )
34         test? ( headless xwayland )
35         wayland-compositor? ( gles2 )
36 "
37
38 RDEPEND="
39         >=dev-libs/libinput-0.8.0
40         >=dev-libs/wayland-1.12.0
41         >=dev-libs/wayland-protocols-1.8
42         lcms? ( media-libs/lcms:2 )
43         media-libs/libpng:0=
44         webp? ( media-libs/libwebp:0= )
45         jpeg? ( virtual/jpeg:0= )
46         >=x11-libs/cairo-1.11.3
47         >=x11-libs/libdrm-2.4.30
48         >=x11-libs/libxkbcommon-0.5.0
49         >=x11-libs/pixman-0.25.2
50         x11-misc/xkeyboard-config
51         fbdev? (
52                 >=sys-libs/mtdev-1.1.0
53                 >=virtual/udev-136
54         )
55         colord? ( >=x11-misc/colord-0.1.27 )
56         dbus? ( >=sys-apps/dbus-1.6 )
57         drm? (
58                 media-libs/mesa[gbm]
59                 >=sys-libs/mtdev-1.1.0
60                 >=virtual/udev-136
61         )
62         editor? ( x11-libs/pango )
63         gles2? (
64                 media-libs/mesa[gles2,wayland]
65         )
66         rdp? ( >=net-misc/freerdp-1.1.0_beta1_p20130710 )
67         systemd? (
68                 sys-auth/pambase[systemd]
69                 >=sys-apps/systemd-209[pam]
70         )
71         launch? ( sys-auth/pambase )
72         unwind? ( sys-libs/libunwind )
73         X? (
74                 >=x11-libs/libxcb-1.9
75                 x11-libs/libX11
76         )
77         xwayland? (
78                 x11-base/xorg-server[wayland]
79                 x11-libs/cairo[xcb]
80                 >=x11-libs/libxcb-1.9
81                 x11-libs/libXcursor
82         )
83 "
84 DEPEND="${RDEPEND}
85         virtual/pkgconfig
86 "
87
88 src_prepare() {
89         default
90         if [[ ${PV} = 9999* ]]; then
91                 eautoreconf
92         else
93                 elibtoolize
94         fi
95 }
96
97 src_configure() {
98         local myconf
99         if use examples || use test; then
100                 myconf="--enable-simple-clients"
101         else
102                 myconf="--disable-simple-clients"
103         fi
104
105         econf \
106                 $(use_enable examples demo-clients-install) \
107                 $(use_enable fbdev fbdev-compositor) \
108                 $(use_enable dbus) \
109                 $(use_enable drm drm-compositor) \
110                 $(use_enable headless headless-compositor) \
111                 $(use_enable ivi ivi-shell) \
112                 $(use_enable lcms) \
113                 $(use_enable rdp rdp-compositor) \
114                 $(use_enable wayland-compositor) \
115                 $(use_enable X x11-compositor) \
116                 $(use_enable launch weston-launch) \
117                 $(use_enable colord) \
118                 $(use_enable gles2 egl) \
119                 $(use_enable unwind libunwind) \
120                 $(use_enable resize-optimization) \
121                 $(use_enable screen-sharing) \
122                 $(use_enable suid setuid-install) \
123                 $(use_enable systemd systemd-login) \
124                 $(use_enable systemd systemd-notify) \
125                 $(use_enable xwayland) \
126                 $(use_enable xwayland xwayland-test) \
127                 $(use_with jpeg) \
128                 $(use_with webp) \
129                 --with-cairo=image \
130                 --disable-junit-xml \
131                 --disable-simple-dmabuf-drm-client \
132                 --disable-simple-dmabuf-v4l-client \
133                 --disable-simple-egl-clients \
134                 --disable-vaapi-recorder \
135                 ${myconf}
136 }
137
138 src_test() {
139         export XDG_RUNTIME_DIR="${T}/runtime-dir"
140         mkdir "${XDG_RUNTIME_DIR}" || die
141         chmod 0700 "${XDG_RUNTIME_DIR}" || die
142
143         cd "${BUILD_DIR}" || die
144         emake check
145 }
146
147 src_install() {
148         default
149
150         readme.gentoo_create_doc
151 }