dev-libs/weston: amd64 stable wrt bug #559062
[gentoo.git] / dev-libs / weston / weston-1.6.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 if [[ ${PV} = 9999* ]]; then
8         EGIT_REPO_URI="git://anongit.freedesktop.org/git/wayland/${PN}"
9         GIT_ECLASS="git-r3"
10         EXPERIMENTAL="true"
11 fi
12 VIRTUALX_REQUIRED="test"
13 RESTRICT="test"
14
15 inherit autotools readme.gentoo toolchain-funcs virtualx $GIT_ECLASS
16
17 DESCRIPTION="Wayland reference compositor"
18 HOMEPAGE="http://wayland.freedesktop.org/"
19
20 if [[ $PV = 9999* ]]; then
21         SRC_URI="${SRC_PATCHES}"
22 else
23         SRC_URI="http://wayland.freedesktop.org/releases/${P}.tar.xz"
24 fi
25
26 LICENSE="MIT CC-BY-SA-3.0"
27 SLOT="0"
28 KEYWORDS="amd64 arm x86 ~arm-linux"
29 IUSE="colord dbus +drm +egl editor examples fbdev gles2 headless +opengl rdp +resize-optimization rpi +launch screen-sharing static-libs +suid systemd test unwind wayland-compositor +X xwayland"
30
31 REQUIRED_USE="
32         drm? ( egl )
33         egl? ( || ( gles2 opengl ) )
34         gles2? ( !opengl )
35         screen-sharing? ( rdp )
36         test? ( X )
37         wayland-compositor? ( egl )
38 "
39
40 RDEPEND="
41         >=dev-libs/wayland-1.6.0
42         media-libs/lcms:2
43         media-libs/libpng:0=
44         media-libs/libwebp:0=
45         virtual/jpeg
46         >=x11-libs/cairo-1.11.3[gles2(-)?,opengl?]
47         >=x11-libs/libdrm-2.4.30
48         x11-libs/libxkbcommon
49         x11-libs/pixman
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 )
57         drm? (
58                 media-libs/mesa[gbm]
59                 >=sys-libs/mtdev-1.1.0
60                 >=virtual/udev-136
61         )
62         egl? (
63                 media-libs/glu
64                 media-libs/mesa[gles2,wayland]
65         )
66         editor? ( x11-libs/pango )
67         gles2? (
68                 media-libs/mesa[wayland]
69         )
70         opengl? (
71                 media-libs/mesa[wayland]
72         )
73         rdp? ( >=net-misc/freerdp-1.1.0_beta1_p20130710 )
74         rpi? (
75                 >=sys-libs/mtdev-1.1.0
76                 >=virtual/udev-136
77         )
78         systemd? (
79                 sys-auth/pambase[systemd]
80                 sys-apps/systemd[pam]
81         )
82         launch? ( sys-auth/pambase )
83         unwind? ( sys-libs/libunwind )
84         X? (
85                 x11-libs/libxcb
86                 x11-libs/libX11
87         )
88         xwayland? (
89                 x11-base/xorg-server[wayland]
90                 x11-libs/cairo[xcb]
91                 x11-libs/libxcb
92                 x11-libs/libXcursor
93         )
94 "
95 DEPEND="${RDEPEND}
96         virtual/pkgconfig
97 "
98
99 src_prepare() {
100         if [[ ${PV} = 9999* ]]; then
101                 eautoreconf
102         fi
103 }
104
105 src_configure() {
106         local myconf
107         if use examples || use gles2 || use test; then
108                 myconf="--enable-simple-clients
109                         $(use_enable egl simple-egl-clients)"
110         else
111                 myconf="--disable-simple-clients
112                         --disable-simple-egl-clients"
113         fi
114
115         if use gles2; then
116                 myconf+=" --with-cairo=glesv2"
117         elif use opengl; then
118                 myconf+=" --with-cairo=gl"
119         else
120                 myconf+=" --with-cairo=image"
121         fi
122
123         econf \
124                 $(use_enable examples demo-clients-install) \
125                 $(use_enable fbdev fbdev-compositor) \
126                 $(use_enable dbus) \
127                 $(use_enable drm drm-compositor) \
128                 $(use_enable headless headless-compositor) \
129                 $(use_enable rdp rdp-compositor) \
130                 $(use_enable rpi rpi-compositor) \
131                 $(use_enable wayland-compositor) \
132                 $(use_enable X x11-compositor) \
133                 $(use_enable launch weston-launch) \
134                 $(use_enable colord) \
135                 $(use_enable egl) \
136                 $(use_enable unwind libunwind) \
137                 $(use_enable resize-optimization) \
138                 $(use_enable screen-sharing) \
139                 $(use_enable suid setuid-install) \
140                 $(use_enable xwayland) \
141                 $(use_enable xwayland xwayland-test) \
142                 --disable-libinput-backend \
143                 ${myconf}
144 }
145
146 src_test() {
147         export XDG_RUNTIME_DIR="${T}/runtime-dir"
148         mkdir "${XDG_RUNTIME_DIR}" || die
149         chmod 0700 "${XDG_RUNTIME_DIR}" || die
150
151         cd "${BUILD_DIR}" || die
152         Xemake check
153 }
154
155 src_install() {
156         default
157
158         readme.gentoo_src_install
159 }