void-packages/srcpkgs/efl/template

128 lines
4.0 KiB
Bash

# Template file for 'efl'
pkgname=efl
version=1.26.2
revision=2
build_style=meson
configure_args="
-Dbuild-examples=false
-Dembedded-lz4=false
-Dcrypto=openssl
-Dnetwork-backend=none
-Decore-imf-loaders-disabler=$(vopt_if ibus '' ibus,)scim
-Devas-loaders-disabler=json
-Dopengl=$(vopt_if opengl $(vopt_if gles2 es-egl full) none)
$(vopt_bool elogind systemd)
$(vopt_bool x11 x11)
$(vopt_bool x11 xpresent)
$(vopt_bool x11 xinput2) $(vopt_bool x11 xinput22)
$(vopt_bool framebuffer fb)
$(vopt_bool wayland wl)
$(vopt_bool drm drm)
$(vopt_bool gstreamer gstreamer)
$(vopt_bool pulseaudio pulseaudio)
$(vopt_bool harfbuzz harfbuzz)
$(vopt_bool simd native-arch-optimization)
$(vopt_bool glib glib)"
hostmakedepends="pkg-config gettext"
makedepends="
gettext-devel openssl-devel liblz4-devel glib-devel ibus-devel
fontconfig-devel fribidi-devel $(vopt_if harfbuzz harfbuzz-devel)
libjpeg-turbo-devel libpng-devel giflib-devel tiff-devel libwebp-devel
avahi-libs-devel eudev-libudev-devel
libsndfile-devel libmount-devel LuaJIT-devel poppler-cpp-devel
librsvg-devel libspectre-devel libraw-devel libopenjpeg2-devel
libheif-devel libavif-devel
$(vopt_if drm 'libdrm-devel libinput-devel libxkbcommon-devel')
$(vopt_if elogind elogind-devel)
$(vopt_if gstreamer gst-plugins-base1-devel)
$(vopt_if opengl MesaLib-devel)
$(vopt_if wayland 'wayland-protocols wayland-devel')
$(vopt_if x11 'libXcomposite-devel libXcursor-devel libXp-devel
libXrandr-devel libXScrnSaver-devel libXdamage-devel
libXrender-devel libXi-devel libXinerama-devel libXpresent-devel
xcb-util-devel xcb-util-keysyms-devel xcb-util-image-devel
xcb-util-renderutil-devel xcb-util-wm-devel xorgproto')
$(vopt_if pulseaudio pulseaudio-devel)
$(vopt_if ibus ibus-devel)"
checkdepends="dbus xvfb-run"
short_desc="Enlightenment Foundation Libraries"
maintainer="q66 <daniel@octaforge.org>"
license="LGPL-2.1-only"
homepage="https://enlightenment.org"
changelog="https://git.enlightenment.org/core/efl.git/plain/NEWS"
distfiles="https://download.enlightenment.org/rel/libs/efl/efl-${version}.tar.xz"
checksum=2979cfbc728a1a1f72ad86c2467d861ed91e664d3f17ef03190fb5c5f405301c
make_check=extended
if [ "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -Dbuild-tests=true"
hostmakedepends+=" check-devel"
else
configure_args+=" -Dbuild-tests=false"
fi
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" gettext-devel efl-devel"
fi
case "$XBPS_TARGET_MACHINE" in
mips*) CFLAGS="-Os";;
esac
# TODO: add option for scim (don't have it packaged)
build_options="elogind harfbuzz pulseaudio gstreamer x11 wayland
opengl gles2 drm framebuffer simd glib ibus"
# wayland_egl and gl_drm need gles, so use that by default
build_options_default="elogind harfbuzz pulseaudio gstreamer x11 wayland
opengl gles2 drm glib ibus"
desc_option_simd="Enable support for SSE3/NEON/AltiVec"
desc_option_glib="Enable GLib integration"
desc_option_ibus="Enable IBus input method support (needs glib)"
# sanitize options
if [ -n "$build_option_wayland" -a -z "$build_option_drm" ]; then
broken="wayland requires drm"
fi
if [ -n "$build_option_ibus" -a -z "$build_option_glib" ]; then
broken="ibus requires glib integration"
fi
if [ -n "$build_option_gles2" -a -z "$build_option_opengl" ]; then
broken="gles2 needs opengl"
fi
# Architecture optimizations
case "$XBPS_TARGET_MACHINE" in
aarch64*|ppc64*)
# Enable NEON (ARM) or AltiVec (PowerPC)
build_options_default+=" simd"
;;
*)
# Do not enable on x86 because it requires SSE3
# Do not enable on 32-bit ARM by default either
;;
esac
do_check() {
# FIXME: tests fail in weird places
xvfb-run dbus-run-session ninja -C build test
}
post_install() {
# don't want service file junk
rm -rf ${DESTDIR}/usr/lib/systemd
# don't want systemd system module
rm -rf ${DESTDIR}/usr/lib/ecore/system/systemd
}
efl-devel_package() {
short_desc+=" - development files"
depends="${makedepends} efl>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
}
}