summaryrefslogtreecommitdiff
blob: ca6bdd6c15412171b65bef858e3ecadd0bfe8ff6 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

if [[ ${PV} == "9999" ]] ; then
	EGIT_SUB_PROJECT="legacy"
	EGIT_URI_APPEND=${PN}
	EGIT_BRANCH=${PN}-1.7
else
	SRC_URI="https://download.enlightenment.org/releases/${P}.tar.bz2"
	EKEY_STATE="snap"
fi

# virtualx is required for tests, which are currently broken
#inherit virtualx
inherit enlightenment eutils

DESCRIPTION="Enlightenment's core event abstraction layer and OS abstraction layer"

LICENSE="BSD-2"
IUSE="ares curl directfb +evas examples fbcon gles glib gnutls +inotify ipv6 libressl opengl sdl ssl static-libs test +threads tslib wayland +X xcb xinerama xprint xscreensaver"

RDEPEND=">=dev-libs/eina-${PV}
	ares? ( net-dns/c-ares )
	glib? ( dev-libs/glib:2 )
	curl? ( net-misc/curl )
	gnutls? ( net-libs/gnutls )
	!gnutls? (
		ssl? (
			!libressl? ( dev-libs/openssl:0 )
			libressl? ( dev-libs/libressl )
		)
	)
	evas? (
		>=media-libs/evas-${PV}[directfb?,fbcon?,opengl?,X?,xcb?]
		opengl? ( virtual/opengl )
		wayland? (
			>=media-libs/evas-${PV}[directfb?,fbcon?,gles?,opengl?,wayland?,X?,xcb?]
		)
	)
	directfb? ( >=dev-libs/DirectFB-0.9.16 )
	tslib? ( x11-libs/tslib )
	sdl? ( media-libs/libsdl )
	wayland? ( dev-libs/wayland )
	X? (
		x11-libs/libX11
		x11-libs/libXcomposite
		x11-libs/libXcursor
		x11-libs/libXdamage
		x11-libs/libXext
		x11-libs/libXfixes
		x11-libs/libXi
		x11-libs/libXrender
		x11-libs/libXtst
		xinerama? ( x11-libs/libXinerama x11-libs/libXrandr )
		xprint? ( x11-libs/libXp )
		xscreensaver? ( x11-libs/libXScrnSaver )
	)
	!X? ( xcb? (
		x11-libs/pixman
		x11-libs/xcb-util
	) )"
DEPEND="${RDEPEND}"

# tests depend on temp data from eina WORKDIR.
RESTRICT="test"

src_configure() {
	local ssl_flags=() evas_flags=() x_flags=()

	if use gnutls && use ssl; then
		einfo "You have enabled both 'ssl' and 'gnutls', so we will use"
		einfo "gnutls and not openssl for ecore-con support."
	fi
	ssl_flags=(
		$(usex gnutls "--disable-openssl" "$(use_enable ssl openssl)")
		$(use_enable gnutls)
	)

	local x_or_xcb=$(usex X "X" "$(usev xcb)")

	if use evas; then
		if use opengl && [[ -z ${x_or_xcb} ]]; then
			ewarn "Ecore/Evas usage of OpenGL requires X11."
			ewarn "Compile dev-libs/ecore with USE=X or xcb."
			ewarn "Compiling without opengl support."
			evas_flags=(
				--disable-ecore-evas-software-x11
				--disable-ecore-evas-software-16-x11
			)
		else
			evas_flags=(
				--enable-ecore-evas-software-x11
				--enable-ecore-evas-software-16-x11
			)
		fi
		evas_flags+=(
			$(use_enable directfb ecore-evas-directfb)
			$(use_enable fbcon ecore-evas-fb)
			$(use_enable opengl ecore-evas-opengl-x11)
			$(use_enable wayland ecore-evas-wayland-shm)
			$(usex wayland "--disable-ecore-evas-wayland-egl" "$(use_enable gles ecore-evas-wayland-egl)")
		)
	else
		evas_flags=(
			--disable-ecore-evas-directfb
			--disable-ecore-evas-fb
			--disable-ecore-evas-software-x11
			--disable-ecore-evas-software-16-x11
			--disable-ecore-evas-opengl-x11
			--disable-ecore-evas-wayland-shm
			--disable-ecore-evas-wayland-egl
		)
		if use opengl; then
			ewarn "Ecore usage of OpenGL is dependent on media-libs/evas."
			ewarn "Compile dev-libs/ecore with USE=evas."
		fi
	fi

	if use X; then
		if use xcb; then
			ewarn "You have enabled both 'X' and 'xcb', so we will use"
			ewarn "X as it's considered the most stable for ecore-x."
		fi
		x_flags=(
			--enable-ecore-x
			--disable-ecore-x-xcb
		)
	elif use xcb; then
		x_flags=(
			--enable-ecore-x
			--enable-ecore-x-xcb
		)
	else
		x_flags=(
			--disable-ecore-x
			--disable-ecore-x-xcb
		)
	fi

	if [[ -n ${x_or_xcb} ]]; then
		x_flags+=(
			$(use_enable xinerama ecore-x-xinerama)
			$(use_enable xprint ecore-x-xprint)
			$(use_enable xscreensaver ecore-x-screensaver)
		)
	else
		x_flags+=(
			--disable-ecore-x-xinerama
			--disable-ecore-x-xprint
			--disable-ecore-x-screensaver
		)
	fi

	if use tslib && ! use fbcon; then
		ewarn "Ecore just uses tslib for framebuffer input."
		ewarn "Compile dev-libs/ecore with USE=fbcon."
	fi

	E_ECONF=(
		--enable-ecore-con
		--enable-ecore-ipc
		--enable-ecore-file
		--enable-ecore-imf
		--enable-ecore-input
		--disable-ecore-win32
		--disable-ecore-wince
		--disable-ecore-evas-software-gdi
		--disable-ecore-evas-software-ddraw
		--disable-ecore-evas-direct3d
		--disable-ecore-evas-opengl-glew
		--disable-ecore-evas-software-16-ddraw
		--disable-ecore-evas-software-16-wince
		--disable-ecore_imf_scim
		$(use_enable ares cares)
		$(use_enable curl)
		$(use_enable directfb ecore-directfb)
		$(use_enable doc)
		$(use_enable examples build-examples)
		$(use_enable examples install-examples)
		$(use_enable evas ecore-evas)
		$(use_enable evas ecore-input-evas)
		$(use_enable evas ecore-imf-evas)
		$(use_enable evas ecore-evas-software-buffer)
		$(use_enable fbcon ecore-fb)
		$(use_enable glib)
		$(use_enable inotify)
		$(use_enable ipv6)
		$(use_enable sdl ecore-sdl)
		$(use_enable test tests)
		$(use_enable threads posix-threads)
		$(use_enable tslib)
		$(use_enable wayland ecore-wayland)
		$(use_enable X xim)
		"${ssl_flags[@]}"
		"${evas_flags[@]}"
		"${x_flags[@]}"
	)
	enlightenment_src_configure
}

src_test() {
	Xemake check
}