Name libei
Description Emulated Input library
Version 1.4.1-r0
Package Base libei
Homepage https://gitlab.freedesktop.org/libinput/libei
Maintainers ['Simon Zeni <simon@bl4ckb0ne.ca>']
Contributors []
Distro-repo https://gitlab.alpinelinux.org/alpine/aports/-/tree/3.22-stable/community/libei
Sources ['https://gitlab.freedesktop.org/libinput/libei/-/archive/1.4.1-r0/libei-1.4.1-r0.tar.bz2', 'munit-$_munit.tar.gz::https://github.com/nemequ/munit/archive/$_munit.tar.gz']
Dependencies ['libc.musl-x86_64.so.1']
Optional-Dependencies []
Build-Dependencies ['basu-dev', 'libevdev-dev', 'libxkbcommon-dev', 'meson', 'py3-attrs', 'py3-jinja2']
Provides ['so:libei.so.1=1.4.1', 'so:libmunit.so=0']
Builddate 02-04-2025 15:13:36
Architecture x86_64
Distro-Version v3.22
Licenses ['MIT']
Hash Q1Zd2BB0Puds3SC6o2d1ymcIC/H/c=
# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
pkgname=libei
pkgver=1.4.1
pkgrel=0
_munit=fbbdf1467eb0d04a6ee465def2e529e4c87f2118
pkgdesc="Emulated Input library"
url="https://gitlab.freedesktop.org/libinput/libei"
arch="all"
license="MIT"
makedepends="
	basu-dev
	libevdev-dev
	libxkbcommon-dev
	meson
	py3-attrs
	py3-jinja2
	"
checkdepends="
	libxml2-utils
	py3-dbusmock
	py3-pytest
	py3-structlog
	py3-yaml
	"
subpackages="
	$pkgname-dev
	libeis
	liboeffis
	$pkgname-utils
	"
source="https://gitlab.freedesktop.org/libinput/libei/-/archive/$pkgver/libei-$pkgver.tar.bz2
	munit-$_munit.tar.gz::https://github.com/nemequ/munit/archive/$_munit.tar.gz
	"

prepare() {
	default_prepare

	ln -sfv "$srcdir"/munit-$_munit subprojects/munit
}

build() {
	abuild-meson \
		-Db_lto=true \
		-Dliboeffis=enabled \
		-Dsd-bus-provider=basu \
		-Dtests="$(want_check && echo enabled || echo disabled)" \
		. output
	meson compile -C output
}

check() {
	meson test -t 5 --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

libeis() {
	amove usr/lib/libeis.so.*
}

liboeffis() {
	amove usr/lib/liboeffis.so.*
}

utils() {
	amove usr/bin
}

sha512sums="
c95c48d78fd93fe304e4e3f88edf3cae1ad2110ada7ffa4d5cd6c49b41e88a76de6d6804d2957376cd8dda4f2bb57967ebf19b2dcf4a0409fa455dfdae43408d  libei-1.4.1.tar.bz2
26b5599fd12be627a692823ebf496fa446be7ed04a1233fb42e0667c05109b0f804f76646e289ac660fc815baf45f77ec8caf0ff2ea7fb0b4f87f0038a2b971c  munit-fbbdf1467eb0d04a6ee465def2e529e4c87f2118.tar.gz
"