aboutsummaryrefslogtreecommitdiff
path: root/devel/efl/Makefile
blob: c21150df935edce0da825f9c3fa68fd47e89f7bc (plain) (blame)
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
PORTNAME=	efl
DISTVERSION=	1.26.2
PORTREVISION=	8
CATEGORIES=	devel enlightenment
MASTER_SITES=	http://download.enlightenment.org/rel/libs/${PORTNAME}/
DIST_SUBDIR=	enlightenment

MAINTAINER=	enlightenment@FreeBSD.org
COMMENT=	Enlightenment Foundation Libraries
WWW=		https://docs.enlightenment.org/efl/current/

LICENSE=	BSD2CLAUSE LGPL21
LICENSE_COMB=	multi

BUILD_DEPENDS=	checkmk:devel/check
LIB_DEPENDS=	libgif.so:graphics/giflib \
		libpng.so:graphics/png \
		libtiff.so:graphics/tiff \
		libfreetype.so:print/freetype2 \
		libfontconfig.so:x11-fonts/fontconfig \
		libdbus-1.so:devel/dbus \
		libcurl.so:ftp/curl \
		libsndfile.so:audio/libsndfile

# lib/libeio.so.1
CONFLICTS_INSTALL=	libeio

USES=		compiler:c++14-lang gettext-tools gnome iconv \
		jpeg libtool meson ninja ssl pathfix pkgconfig python:3.5+ shared-mime-info \
		shebangfix tar:xz xorg
SHEBANG_FILES=	src/tests/elementary/spec/generator.py \
		src/bin/exactness/exactness_play.in \
		src/bin/exactness/exactness_record.in
USE_XORG=	x11 xcb xcursor xcomposite xdamage xext xfixes xi xinerama \
		xrandr xrender xtst xscrnsaver
USE_LDCONFIG=	yes

MESON_ARGS=	-Dsystemd=false -Deeze=false -Dinput=false

CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

PLIST_SUB=	BRANCHVERSION=${PORTVERSION:R} PORTVERSION=${PORTVERSION}

OPTIONS_DEFINE=		AVAHI FRIBIDI HARFBUZZ NLS PHYSICS PULSEAUDIO SDL VNC EFLONE ELUA EXAMPLES DOXYGEN WAYLAND
OPTIONS_GROUP=		EMOTION INPUT LOADER BINDINGS
OPTIONS_GROUP_EMOTION=	GSTREAMER V4L
OPTIONS_GROUP_INPUT=	IBUS SCIM XIM
OPTIONS_GROUP_LOADER=	OPENJPEG PDF PS RAW SVG WEBP XCF AVIF HEIF
OPTIONS_GROUP_BINDINGS=	LUA CXX
OPTIONS_GROUP_WAYLAND=	WAYLAND
OPTIONS_SINGLE=		CRYPTO ENGINE LUAL
OPTIONS_SINGLE_CRYPTO=	OPENSSL GNUTLS
OPTIONS_SINGLE_ENGINE=	OPENGL OPENGLES NONE
OPTIONS_SINGLE_LUAL=	LUAJIT LUAJIT_OR LUALANG
OPTIONS_DEFAULT=	FRIBIDI HARFBUZZ PULSEAUDIO EXAMPLES GSTREAMER V4L SCIM XIM \
			OPENSSL OPENJPEG PDF PS RAW SVG WEBP XCF OPENGLES LUAJIT CXX
OPTIONS_DEFAULT_aarch64=	LUALANG
OPTIONS_DEFAULT_powerpc64=	LUAJIT_OR
OPTIONS_DEFAULT_powerpc64le=	LUAJIT_OR
OPTIONS_EXCLUDE_aarch64=	LUAJIT LUAJIT_OR
OPTIONS_EXCLUDE_powerpc64=	LUAJIT
OPTIONS_EXCLUDE_powerpc64le=	LUAJIT
OPTIONS_SUB=		yes

HARFBUZZ_DESC=		OpenType text shaping engine
PHYSICS_DESC=		Physics engine (bullet) - DEPRECATED UPSTREAM
EFLONE_DESC=		Create EFL-One library (single file library) - EXPERIMENTAL
ELUA_DESC=		Lua launcher binary support in efl
VNC_DESC=		VNC Server support
IBUS_DESC=		Intelligent Input Bus
SCIM_DESC=		Smart Common Input Method
XIM_DESC=		X Input Method
SVG_DESC=		Vector graphics support
XCF_DESC=		Gimp image format support
LUAL_DESC=		LUA
LUALANG_DESC=		Use Lua
LUAJIT_DESC=		Use Luajit
LUAJIT_OR_DESC=		Use Luajit from OpenResty fork (experimental)
OPENGLES_DESC=		2D/3D rendering support via OpenGL ES
NONE_DESC=		No acceleration, software only
LUA_DESC=		Lua Bindings
CXX_DESC=		C++ Bindings
EXAMPLES_DESC=		Build examples of using EFL

AVAHI_LIB_DEPENDS=	libavahi-client.so:net/avahi-app
AVAHI_MESON_TRUE=	avahi

FRIBIDI_LIB_DEPENDS=	libfribidi.so:converters/fribidi
FRIBIDI_MESON_TRUE=	fribidi

HARFBUZZ_LIB_DEPENDS=	libharfbuzz.so:print/harfbuzz
HARFBUZZ_MESON_TRUE=	harfbuzz

NLS_USES=			gettext-runtime
NLS_MESON_TRUE=			nls

PHYSICS_LIB_DEPENDS=		libBulletDynamics.so:devel/bullet
PHYSICS_MESON_TRUE=		physics

PULSEAUDIO_LIB_DEPENDS=		libpulse.so:audio/pulseaudio
PULSEAUDIO_MESON_TRUE=		pulseaudio

EFLONE_BROKEN_i386=		EFLONE option is broken on i386 by the upstream bug: https://phab.enlightenment.org/T8870
EFLONE_MESON_TRUE=		efl-one

ELUA_MESON_TRUE=		elua

EXAMPLES_MESON_TRUE=		build-examples

DOXYGEN_BUILD_DEPENDS=		doxygen:devel/doxygen

VNC_MESON_TRUE=			vnc-server
VNC_LIB_DEPENDS=		libvncserver.so:net/libvncserver

LUA_IMPLIES=			ELUA

WAYLAND_BUILD_DEPENDS=		wayland-protocols>=1.7:graphics/wayland-protocols
WAYLAND_LIB_DEPENDS=		libepoll-shim.so:devel/libepoll-shim \
		libxkbcommon.so:x11/libxkbcommon \
		libwayland-client.so:graphics/wayland \
		libwayland-cursor.so:graphics/wayland
WAYLAND_CFLAGS=			-I${LOCALBASE}/include/libepoll-shim
WAYLAND_LDFLAGS=		-lepoll-shim
WAYLAND_MESON_TRUE=		wl
WAYLAND_BROKEN=			Wayland bits compile but don't yet work at runtime

GSTREAMER_USES=			gstreamer
GSTREAMER_USE=			GSTREAMER=core
GSTREAMER_MESON_TRUE=		gstreamer

V4L_BUILD_DEPENDS=		${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
V4L_MESON_TRUE=			v4l2

IBUS_LIB_DEPENDS=		libibus-1.0.so:textproc/ibus
IBUS_USES=			gnome
IBUS_USE=			GNOME=glib20
IBUS_MESON_TRUE=		glib
IBUS_VARS_OFF=			ibus_disabler=ibus

SCIM_LIB_DEPENDS=		libscim-1.0.so:textproc/scim
SCIM_VARS_OFF=			scim_disabler=scim

XIM_VARS_OFF=			xim_disabler=xim

OPENJPEG_LIB_DEPENDS=		libopenjp2.so:graphics/openjpeg

GNUTLS_LIB_DEPENDS=		libgcrypt.so:security/libgcrypt \
				libgnutls.so:security/gnutls
GNUTLS_MESON_ON=		-Dcrypto=gnutls
GNUTLS_MESON_OFF=		-Dcrypto=openssl
GNUTLS_CFLAGS=			-I${LOCALBASE}/include/gnutls/
GNUTLS_BROKEN=			GNUTLS option is broken by the upstream bug: https://phab.enlightenment.org/T8807

PDF_LIB_DEPENDS=		libpoppler.so:graphics/poppler

PS_LIB_DEPENDS=			libspectre.so:print/libspectre

RAW_LIB_DEPENDS=		libraw.so:graphics/libraw

SVG_USES=			gnome
SVG_USE=			GNOME=cairo GNOME=librsvg2

AVIF_LIB_DEPENDS=		libavif.so:graphics/libavif

HEIF_LIB_DEPENDS=		libheif.so:graphics/libheif

WEBP_LIB_DEPENDS=		libwebp.so:graphics/webp

LUAJIT_BUILD_DEPENDS=		luajit:lang/luajit
LUAJIT_RUN_DEPENDS=		luajit:lang/luajit
LUAJIT_MESON_ON=		-Dlua-interpreter=luajit
LUAJIT_PREVENTS=		LUALANG LUAJIT_OR

LUAJIT_OR_BUILD_DEPENDS=		luajit:lang/luajit-openresty
LUAJIT_OR_RUN_DEPENDS=		luajit:lang/luajit-openresty
LUAJIT_OR_MESON_ON=		-Dlua-interpreter=luajit
LUAJIT_OR_PREVENTS=		LUALANG LUAJIT

LUALANG_USES=			lua:51,build,run
LUALANG_MESON_ON=		-Dlua-interpreter=lua
LUALANG_PREVENTS=		LUAJIT LUAJIT_OR

OPENGL_USES=			gl
OPENGL_USE=			GL=gl
OPENGL_MESON_ON=		-Dopengl=full
OPENGL_PREVENTS=		OPENGLES NONE

OPENGLES_USES=			gl
OPENGLES_USE=			GL=glesv2
OPENGLES_MESON_ON=		-Dopengl=es-egl
OPENGLES_PREVENTS=		OPENGL NONE

NONE_MESON_ON=			-Dopengl=none
NONE_PREVENTS=			OPENGL OPENGLES

SDL_USES=			sdl
SDL_USE=			SDL=sdl2
SDL_MESON_TRUE=			sdl

.include <bsd.port.options.mk>

IMF_DISABLERS=	${IBUS_DISABLER} ${SCIM_DISABLER} ${XIM_DISABLER}

MESON_ARGS+=			-Decore-imf-loaders-disabler="${IMF_DISABLERS:ts,}"

EVAS-LOADERS-DISABLER-BASE=	-Devas-loaders-disabler=
EVAS-LOADERS-DISABLER:=		${EVAS-LOADERS-DISABLER-BASE}

EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}json"

.if empty(PORT_OPTIONS:MOPENJPEG)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},jp2k"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}jp2k"
.endif
.endif

.if empty(PORT_OPTIONS:MPDF)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},pdf"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}pdf"
.endif
.endif

.if empty(PORT_OPTIONS:MPS)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},ps"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}ps"
.endif
.endif

.if empty(PORT_OPTIONS:MRAW)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},raw"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}raw"
.endif
.endif

.if empty(PORT_OPTIONS:MSVG)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},rsvg"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}rsvg"
.endif
.endif

.if empty(PORT_OPTIONS:MWEBP)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},webp"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}webp"
.endif
.endif

.if empty(PORT_OPTIONS:MXCF)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},xcf"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}xcf"
.endif
.endif

.if empty(PORT_OPTIONS:MAVIF)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},avif"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}avif"
.endif
.endif

.if empty(PORT_OPTIONS:MHEIF)
.if ${EVAS-LOADERS-DISABLER} != ${EVAS-LOADERS-DISABLER-BASE}
EVAS-LOADERS-DISABLER-BASE:=	${EVAS-LOADERS-DISABLER}
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE},heif"
.else
EVAS-LOADERS-DISABLER:=		"${EVAS-LOADERS-DISABLER-BASE}heif"
.endif
.endif

MESON_ARGS+=			${EVAS-LOADERS-DISABLER}

# Work-around build failure, which is caused by subtle problem in lld and -as-needed flag
.if ${ARCH} == i386
MESON_ARGS+=	-Db_asneeded=false
.endif

.if ${ARCH:Marmv?}
BUILD_DEPENDS+=	as:devel/binutils
CFLAGS+=	-no-integrated-as
.endif

.if ${PORT_OPTIONS:MLUA} && ${PORT_OPTIONS:MCXX}
EFL_BINDINGS=	-Dbindings=lua,cxx
.else
.if ${PORT_OPTIONS:MLUA}
EFL_BINDINGS=	-Dbindings=lua
.else
.if ${PORT_OPTIONS:MCXX}
EFL_BINDINGS=	-Dbindings=cxx
.endif
.endif
.endif

MESON_ARGS+=			${EFL_BINDINGS}

.if ${PORT_OPTIONS:MOPENGLES} && ${PORT_OPTIONS:MWAYLAND}
LIB_DEPENDS+=		libwayland-egl.so:graphics/wayland
MESON_ARGS+=		-Degl=true
USE_GL=			egl
.endif

.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc64 || ${ARCH} == powerpc64le
LIB_DEPENDS+=	libunwind.so:devel/libunwind
.endif

post-install:
	#@${RM} -r ${STAGEDIR}${PREFIX}/share/gdb
	@for i in `${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/lib -type f`; do \
		if ${FILE} $$i | ${GREP} -q "not stripped"; then ${STRIP_CMD} $$i; fi; \
	done

post-stage:
	@${ECHO_CMD} "autogenerating plist";
	@cd ${STAGEDIR}${PREFIX} && ${FIND} * -type f -or -type l >> ${TMPPLIST}

.include <bsd.port.mk>