dev-libs/efl: Fix broken REQUIRED_USE constraint typo
[gentoo.git] / dev-libs / efl / efl-1.21.1-r3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit gnome2-utils pax-utils xdg-utils
7
8 DESCRIPTION="Enlightenment Foundation Libraries all-in-one package"
9 HOMEPAGE="https://www.enlightenment.org"
10 SRC_URI="https://download.enlightenment.org/rel/libs/${PN}/${P}.tar.xz"
11
12 LICENSE="BSD-2 GPL-2 LGPL-2.1 ZLIB"
13 SLOT="0"
14 KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
15 IUSE="+bmp dds connman debug drm +eet egl examples fbcon +fontconfig fribidi gif gles glib gnutls gstreamer harfbuzz hyphen +ico ibus jpeg2k libressl libuv luajit neon nls opengl ssl pdf physics postscript +ppm +psd pulseaudio raw scim sdl sound static-libs svg +system-lz4 systemd tga tiff tslib unwind v4l valgrind vlc vnc wayland webp X xcf xim xine xpm xpresent zeroconf"
16
17 REQUIRED_USE="
18         ?? ( opengl egl )
19         ?? ( opengl gles )
20         egl? ( gles )
21         fbcon? ( !tslib )
22         gles? (
23                 || ( X wayland )
24                 !sdl
25                 egl
26         )
27         ibus? ( glib )
28         opengl? ( X )
29         pulseaudio? ( sound )
30         sdl? ( opengl )
31         vnc? ( X fbcon )
32         wayland? ( egl gles !opengl )
33         xim? ( X )
34         xpresent? ( X )
35 "
36
37 RDEPEND="
38         net-misc/curl
39         media-libs/libpng:0=
40         sys-apps/dbus
41         sys-apps/util-linux
42         sys-libs/zlib:=
43         virtual/jpeg:0=
44         connman? ( net-misc/connman )
45         drm? (
46                 dev-libs/libinput
47                 media-libs/mesa[gbm]
48                 x11-libs/libdrm
49                 x11-libs/libxkbcommon
50         )
51         egl? ( media-libs/mesa[egl] )
52         fontconfig? ( media-libs/fontconfig )
53         fribidi? ( dev-libs/fribidi )
54         gif? ( media-libs/giflib:= )
55         gles? ( media-libs/mesa[gles2] )
56         glib? ( dev-libs/glib:2 )
57         gstreamer? (
58                 media-libs/gstreamer:1.0
59                 media-libs/gst-plugins-base:1.0
60         )
61         harfbuzz? ( media-libs/harfbuzz )
62         hyphen? ( dev-libs/hyphen )
63         ibus? ( app-i18n/ibus )
64         jpeg2k? ( media-libs/openjpeg:= )
65         libuv? ( dev-libs/libuv )
66         luajit? ( dev-lang/luajit:= )
67         !luajit? ( dev-lang/lua:* )
68         nls? ( sys-devel/gettext )
69         pdf? ( app-text/poppler:=[cxx] )
70         physics? ( sci-physics/bullet:= )
71         postscript? ( app-text/libspectre )
72         pulseaudio? ( media-sound/pulseaudio )
73         raw? ( media-libs/libraw:= )
74         scim? ( app-i18n/scim )
75         sdl? (
76                 media-libs/libsdl2
77                 virtual/opengl
78         )
79         sound? ( media-libs/libsndfile )
80         ssl? (
81                 gnutls? ( net-libs/gnutls:= )
82                 !gnutls? (
83                         !libressl? ( dev-libs/openssl:= )
84                         libressl? ( dev-libs/libressl:= )
85                 )
86         )
87         svg? (
88                 gnome-base/librsvg
89                 x11-libs/cairo
90         )
91         system-lz4? ( app-arch/lz4 )
92         systemd? ( sys-apps/systemd )
93         tiff? ( media-libs/tiff:0= )
94         tslib? ( x11-libs/tslib:= )
95         unwind? ( sys-libs/libunwind )
96         valgrind? ( dev-util/valgrind )
97         vlc? ( media-video/vlc )
98         vnc? ( net-libs/libvncserver )
99         wayland? (
100                 dev-libs/wayland
101                 media-libs/mesa[gles2,wayland]
102                 x11-libs/libxkbcommon
103         )
104         webp? ( media-libs/libwebp:= )
105         X? (
106                 media-libs/freetype
107                 x11-libs/libXcursor
108                 x11-libs/libX11
109                 x11-libs/libXcomposite
110                 x11-libs/libXdamage
111                 x11-libs/libXext
112                 x11-libs/libXfixes
113                 x11-libs/libXinerama
114                 x11-libs/libXrandr
115                 x11-libs/libXrender
116                 x11-libs/libXtst
117                 x11-libs/libXScrnSaver
118                 gles? (
119                         x11-libs/libX11
120                         x11-libs/libXrender
121                         virtual/opengl
122                 )
123                 opengl? (
124                         x11-libs/libX11
125                         x11-libs/libXrender
126                         virtual/opengl
127                 )
128         )
129         xine? ( media-libs/xine-lib )
130         xpm? ( x11-libs/libXpm )
131         xpresent? ( x11-libs/libXpresent )
132         zeroconf? ( net-dns/avahi )
133 "
134
135 DEPEND="
136         ${RDEPEND}
137         virtual/pkgconfig
138 "
139
140 PATCHES=(
141         "${FILESDIR}/${P}-fix_evas_preload_segfault.patch"
142 )
143
144 src_prepare() {
145         default
146
147         # Upstream still doesnt offer a configure flag. #611108
148         if ! use unwind ; then
149                 sed -i -e 's:libunwind libunwind-generic:xxxxxxxxxxxxxxxx:' \
150                 configure || die "Sedding configure file with unwind fix failed."
151         fi
152
153         xdg_environment_reset
154 }
155
156 src_configure() {
157         local myconf=(
158                 --enable-cserve
159                 --enable-image-loader-generic
160                 --enable-image-loader-jpeg
161                 --enable-image-loader-png
162                 --enable-libeeze
163                 --enable-libmount
164                 --enable-xinput22
165
166                 --disable-doc
167                 --disable-eglfs
168                 --disable-gesture
169                 --disable-gstreamer
170                 --disable-image-loader-tgv
171                 --disable-tizen
172                 --disable-wayland-ivi-shell
173
174                 $(use_enable bmp image-loader-bmp)
175                 $(use_enable bmp image-loader-wbmp)
176                 $(use_enable dds image-loader-dds)
177                 $(use_enable drm)
178                 $(use_enable drm elput)
179                 $(use_enable eet image-loader-eet)
180                 $(use_enable egl)
181                 $(use_enable examples always-build-examples)
182                 $(use_enable fbcon fb)
183                 $(use_enable fontconfig)
184                 $(use_enable fribidi)
185                 $(use_enable gif image-loader-gif)
186                 $(use_enable gstreamer gstreamer1)
187                 $(use_enable harfbuzz)
188                 $(use_enable hyphen)
189                 $(use_enable ico image-loader-ico)
190                 $(use_enable ibus)
191                 $(use_enable jpeg2k image-loader-jp2k)
192                 $(use_enable libuv)
193                 $(use_enable !luajit lua-old)
194                 $(use_enable neon)
195                 $(use_enable nls)
196                 $(use_enable pdf poppler)
197                 $(use_enable physics)
198                 $(use_enable postscript spectre)
199                 $(use_enable ppm image-loader-pmaps)
200                 $(use_enable psd image-loader-psd)
201                 $(use_enable pulseaudio)
202                 $(use_enable raw libraw)
203                 $(use_enable scim)
204                 $(use_enable sdl)
205                 $(use_enable sound audio)
206                 $(use_enable static-libs static)
207                 $(use_enable svg librsvg)
208                 $(use_enable system-lz4 liblz4)
209                 $(use_enable systemd)
210                 $(use_enable tga image-loader-tga)
211                 $(use_enable tiff image-loader-tiff)
212                 $(use_enable tslib)
213                 $(use_enable v4l v4l2)
214                 $(use_enable valgrind)
215                 $(use_enable vlc libvlc)
216                 $(use_enable vnc vnc-server)
217                 $(use_enable wayland)
218                 $(use_enable webp image-loader-webp)
219                 $(use_enable xcf)
220                 $(use_enable xim)
221                 $(use_enable xine)
222                 $(use_enable xpm image-loader-xpm)
223                 $(use_enable xpresent)
224                 $(use_enable zeroconf avahi)
225
226                 --with-crypto=$(usex gnutls gnutls $(usex ssl openssl none))
227                 --with-glib=$(usex glib)
228                 --with-js=none
229                 --with-net-control=$(usex connman connman none)
230                 --with-profile=$(usex debug debug release)
231                 --with-x11=$(usex X xlib none)
232
233                 $(use_with X x)
234         )
235
236         use drm && use wayland && myconf+=( --enable-gl-drm )
237
238         if use opengl ; then
239                 myconf+=( --with-opengl=full )
240         elif use egl ; then
241                 myconf+=( --with-opengl=es )
242         elif use drm && use wayland ; then
243                 myconf+=( --with-opengl=es )
244         else
245                 myconf+=( --with-opengl=none )
246         fi
247
248         econf "${myconf[@]}"
249 }
250
251 src_compile() {
252         if host-is-pax && use luajit ; then
253                 # We need to build the lua code first so we can pax-mark it. #547076
254                 local target='_e_built_sources_target_gogogo_'
255                 printf '%s: $(BUILT_SOURCES)\n' "${target}" >> src/Makefile || die
256                 emake -C src "${target}"
257                 emake -C src bin/elua/elua
258                 pax-mark m src/bin/elua/.libs/elua
259         fi
260
261         V=1 emake || die "Compiling EFL failed."
262 }
263
264 src_install() {
265         einstalldocs
266
267         V=1 emake install DESTDIR="${D}" || die "Installing EFL files failed."
268
269         find "${D}" -name '*.la' -delete || die
270 }
271
272 pkg_postinst() {
273         gnome2_icon_cache_update
274         xdg_mimeinfo_database_update
275 }
276
277 pkg_postrm() {
278         gnome2_icon_cache_update
279         xdg_mimeinfo_database_update
280 }