summaryrefslogtreecommitdiff
path: root/dev-libs/libei
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-13 02:01:50 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-13 02:01:50 +0000
commit2a3e0d61b3d88306b6fae46756f9ba7d230222ae (patch)
treea0d3259dd259861a49a2d3e6e9220beaa8ec39c2 /dev-libs/libei
parent39c32f4d5dca9f6293fccb69e9d50baf494c8de4 (diff)
gentoo auto-resync : 13:12:2024 - 02:01:50
Diffstat (limited to 'dev-libs/libei')
-rw-r--r--dev-libs/libei/Manifest2
-rw-r--r--dev-libs/libei/files/1.3.0-scanner-switch-to-using-dataclasses.patch417
-rw-r--r--dev-libs/libei/libei-1.3.0-r1.ebuild101
3 files changed, 520 insertions, 0 deletions
diff --git a/dev-libs/libei/Manifest b/dev-libs/libei/Manifest
index 38a99e847c36..95682d5dc526 100644
--- a/dev-libs/libei/Manifest
+++ b/dev-libs/libei/Manifest
@@ -1,7 +1,9 @@
+AUX 1.3.0-scanner-switch-to-using-dataclasses.patch 14276 BLAKE2B f187335730f31476cc42850741c36ab81f41df6298d370cdcc727a5ec4c2afcd3fb1f448cef7bcf5e369a88ace61bbf8e71f66acd933a0d4b43ece1e1baf8b18 SHA512 92c3710e38b06e0c40f01d8a1a46181f8ea500b61a69fd6105cd992ad6b33cd5fec1259b660dd1bb3befa96cfb905d1e701b8fbeedce02c2222f1fc37e400c56
AUX 1.3.0-skip-protocol-test.patch 675 BLAKE2B 1519b464a2322ab7c46ab449ccc0fb3f1e962b86f97151cefa56d43af2e0727768d58b730486ea2272e76c0d2cbbf2c02152bcf2b6ae615060900458a8df81bb SHA512 62086e3bb62538616eebba7e9e356df79f8c148280b0338557a8fd52a9134257c6d74a6ee11a3788b4da0c44242a65473559fb0d8a8ab3fae8cba8222896ef13
DIST libei-1.2.1.tar.bz2 174636 BLAKE2B b718d2287e83adb43a8dee9ae06499d780b2a50231e9ce452b6e7bfa9e89e9599058628614fb4325d0cef842d6b29ca68eb38b3e547790cd5a7a0ac14728f250 SHA512 ac8e32a381b9555a6b9becab9217a323d79aeba4b3f11e1dbba9f876d566f232f41d0f299f8cb8e5de6707d0dd91e93872edd81532c971e35d1cf33f9f9063b4
DIST libei-1.3.0.tar.bz2 175492 BLAKE2B cc5b0ae228a7282e0b5890280cab15cbb4c9179aa40140d6d01dc0d650bc1a646efd3d07dc6db0b501c3d203480d2df2bf3107e8b07e13b49eef8dcea59dd011 SHA512 a63b52c7251660404b307dba82ee24e31b64aaff7140acb174a33aeb60a07e59391522e2a5c56cd7bbdc45ab5e4a0e6111e214f2f1b79834b152e6ebc3e5e0c1
DIST munit-fbbdf1467eb0d04a6ee465def2e529e4c87f2118.tar.gz 27724 BLAKE2B 9670c9b7a0b5d9ee6ec8df2dea9e241b043964ecf1fa3f6060ad1d16c40ab6afe47f53c6d4a791003e101a0b363263b858e6e4e445f868292753dd1ee7f7e3ce SHA512 26b5599fd12be627a692823ebf496fa446be7ed04a1233fb42e0667c05109b0f804f76646e289ac660fc815baf45f77ec8caf0ff2ea7fb0b4f87f0038a2b971c
EBUILD libei-1.2.1.ebuild 2484 BLAKE2B d06aac096ab846da7261b296fedfc4f31a897fc9728867bd5a4ee63abbb6ea49709ed5a3b9a3ae6509895979bb87d56ee774c455ab7b55baf592962e45e29007 SHA512 4cf8dd5c9919e05f433a0948cb6978447e245657db57b567022d22215eaa4fdcaa063676f4eb10065dfcadaff42248346bcb71f76ab64bafd9fc89a3e5fa1fec
+EBUILD libei-1.3.0-r1.ebuild 2444 BLAKE2B fa68c1f360424ab5ec0152f22068c1215071ce4f350873761a972eaac8f55bedb316fb96c0a612557aca94b3af6da2ce034345f7dc581ad5d022ba276e948c7b SHA512 7eb1bb5220661835d0fd45dcb1cbe1126d75e3a88ba3550aa282ad83097dac706bdd8a64d47bb947e3a689db6f7cbe03233d177ab733297329f9402070d5a9d7
EBUILD libei-1.3.0.ebuild 2456 BLAKE2B 7bfee8c1bb831bfa11606499bdd8e49f148692bafeb3a92834b69cf12b445879da7374c0b34ee2213e979935da6f2c13762b27ffe7c2bd69f7b23c4244e02967 SHA512 e6de088163cfb64567343b626aa7f67ebcf82ac8d31d6621b9643040fe01803962da7292e5e5817d2ae6d927def2137be1ab3c5963b887e5130a78ae3fb63997
MISC metadata.xml 336 BLAKE2B 2fd4200876fa044f3563b0eea2096214af92fed1a8db009cf4885a7cf32f303b0a6911dba18cc8fac942348dbe2668ea2d50fabedd235e33be0793076ab0e5be SHA512 a26feb7d41edc6f728bfbaf805cfefa6bba4c5161e70785e7de5f389492f405f7cd6f2c55cce1d2c6bdf9af3aba17e1e51254d9e4421c4fab2e61f2c563c8f3f
diff --git a/dev-libs/libei/files/1.3.0-scanner-switch-to-using-dataclasses.patch b/dev-libs/libei/files/1.3.0-scanner-switch-to-using-dataclasses.patch
new file mode 100644
index 000000000000..08d192f52a5d
--- /dev/null
+++ b/dev-libs/libei/files/1.3.0-scanner-switch-to-using-dataclasses.patch
@@ -0,0 +1,417 @@
+From dbc06510a115241fcfd07de49c0b991cad633721 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 11 Sep 2024 10:50:26 +1000
+Subject: [PATCH] scanner: switch to using dataclasses
+
+This drops one dependency that we're not fully using anyway. Except for
+the per-attribute validators that can be done in __post_init() we're not
+using attrs for anything that dataclasses cannot do.
+---
+ .gitlab-ci.yml | 9 ++-
+ .gitlab-ci/ci.template | 1 +
+ .gitlab-ci/config.yml | 4 +-
+ proto/ei-scanner | 164 ++++++++++++++++++++---------------------
+ proto/meson.build | 2 +-
+ 5 files changed, 90 insertions(+), 90 deletions(-)
+
+diff --git ./.gitlab-ci.yml ./.gitlab-ci.yml
+index 1e5d956..caeedfa 100644
+--- ./.gitlab-ci.yml
++++ ./.gitlab-ci.yml
+@@ -40,9 +40,9 @@ variables:
+ # See the documentation here: #
+ # https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
+ ###############################################################################
+- FEDORA_PACKAGES: 'git diffutils gcc gcc-c++ pkgconf-pkg-config systemd-devel libxkbcommon-devel libxml2 doxygen python3-attrs python3-pytest python3-dbusmock python3-jinja2 python3-pip python3-pyyaml golang libabigail '
++ FEDORA_PACKAGES: 'git diffutils gcc gcc-c++ pkgconf-pkg-config systemd-devel libxkbcommon-devel libxml2 doxygen python3-pytest python3-dbusmock python3-jinja2 python3-pip python3-pyyaml golang libabigail '
+ FEDORA_PIP_PACKAGES: 'meson ninja structlog strenum '
+- DEBIAN_PACKAGES: 'git gcc g++ pkg-config libsystemd-dev libxkbcommon-dev libxml2 doxygen python3-attr python3-pytest python3-dbusmock python3-jinja2 python3-pip python3-yaml '
++ DEBIAN_PACKAGES: 'git gcc g++ pkg-config libsystemd-dev libxkbcommon-dev libxml2 doxygen python3-pytest python3-dbusmock python3-jinja2 python3-pip python3-yaml '
+ DEBIAN_PIP_PACKAGES: 'meson ninja structlog strenum '
+ ############################ end of package lists #############################
+
+@@ -50,8 +50,8 @@ variables:
+ # changing these will force rebuilding the associated image
+ # Note: these tags have no meaning and are not tied to a particular
+ # libinput version
+- FEDORA_TAG: '2024-07-24.3'
+- DEBIAN_TAG: '2024-07-24.3'
++ FEDORA_TAG: '2024-09-11.0'
++ DEBIAN_TAG: '2024-09-11.0'
+
+ FDO_UPSTREAM_REPO: libinput/libei
+
+@@ -285,6 +285,7 @@ abicheck@fedora:40:
+ meson compile -C _build
+ meson install -C _build
+ popd
++ - pip install attrs
+ script:
+ - git remote add upstream$CI_JOB_ID https://gitlab.freedesktop.org/$FDO_UPSTREAM_REPO
+ - git fetch --tags upstream$CI_JOB_ID
+diff --git ./.gitlab-ci/ci.template ./.gitlab-ci/ci.template
+index 0c8aeb2..7e7cad5 100644
+--- ./.gitlab-ci/ci.template
++++ ./.gitlab-ci/ci.template
+@@ -285,6 +285,7 @@ abicheck@{{distro.name}}:{{version}}:
+ meson compile -C _build
+ meson install -C _build
+ popd
++ - pip install attrs
+ script:
+ - git remote add upstream$CI_JOB_ID https://gitlab.freedesktop.org/$FDO_UPSTREAM_REPO
+ - git fetch --tags upstream$CI_JOB_ID
+diff --git ./.gitlab-ci/config.yml ./.gitlab-ci/config.yml
+index d89d0fd..42db0bc 100644
+--- ./.gitlab-ci/config.yml
++++ ./.gitlab-ci/config.yml
+@@ -3,7 +3,7 @@
+ #
+
+ # We're happy to rebuild all containers when one changes.
+-.default_tag: &default_tag '2024-07-24.3'
++.default_tag: &default_tag '2024-09-11.0'
+
+ last_abi_break: abe85e051e7029bfd2e7913ab980a9e0042b6d0d
+ minimum_meson_version: 0.57.0
+@@ -24,7 +24,6 @@ distributions:
+ - libxkbcommon-devel
+ - libxml2
+ - doxygen
+- - python3-attrs
+ - python3-pytest
+ - python3-dbusmock
+ - python3-jinja2
+@@ -51,7 +50,6 @@ distributions:
+ - libxkbcommon-dev
+ - libxml2
+ - doxygen
+- - python3-attr
+ - python3-pytest
+ - python3-dbusmock
+ - python3-jinja2
+diff --git ./proto/ei-scanner ./proto/ei-scanner
+index 11edb85..d23fea7 100755
+--- ./proto/ei-scanner
++++ ./proto/ei-scanner
+@@ -20,9 +20,9 @@ appear in the XML file.
+ from typing import Any, Dict, List, Optional, Tuple, Union
+ from pathlib import Path
+ from textwrap import dedent
++from dataclasses import dataclass, field
+
+ import argparse
+-import attr
+ import jinja2
+ import jinja2.environment
+ import os
+@@ -55,48 +55,54 @@ def snake2camel(s: str) -> str:
+ return s.replace("_", " ").title().replace(" ", "")
+
+
+-@attr.s
++@dataclass
+ class Description:
+- summary: str = attr.ib(default="")
+- text: str = attr.ib(default="")
++ summary: str = ""
++ text: str = ""
+
+
+-@attr.s
++@dataclass
+ class Argument:
+ """
+ Argument to a request or a reply
+ """
+
+- name: str = attr.ib()
+- protocol_type: str = attr.ib()
+- summary: str = attr.ib()
+- enum: Optional["Enum"] = attr.ib()
+- interface: Optional["Interface"] = attr.ib()
+- interface_arg: Optional["Argument"] = attr.ib(default=None)
++ name: str
++ protocol_type: str
++ summary: str
++ enum: Optional["Enum"]
++ interface: Optional["Interface"]
++ interface_arg: Optional["Argument"] = None
+ """
+ For an argument with "interface_arg", this field points to the argument that
+ contains the interface name.
+ """
+- interface_arg_for: Optional["Argument"] = attr.ib(default=None)
++ interface_arg_for: Optional["Argument"] = None
+ """
+ For an argument referenced by another argument through "interface_name", this field
+ points to the other argument that references this argument.
+ """
+- version_arg: Optional["Argument"] = attr.ib(default=None)
++ version_arg: Optional["Argument"] = None
+ """
+ For an argument with type "new_id", this field points to the argument that
+ contains the version for this new object.
+ """
+- version_arg_for: Optional["Argument"] = attr.ib(default=None)
++ version_arg_for: Optional["Argument"] = None
+ """
+ For an argument referenced by another argument of type "new_id", this field
+ points to the other argument that references this argument.
+ """
+- allow_null: bool = attr.ib(default=False)
++ allow_null: bool = False
+ """
+ For an argument of type string, specify if the argument may be NULL.
+ """
+
++ def __post_init(self):
++ if self.protocol_type is None or self.protocol_type not in PROTOCOL_TYPES:
++ raise ValueError(f"Failed to parse protocol_type {self.protocol_type}")
++ if self.interface is not None and self.signature not in ["n", "o"]:
++ raise ValueError("Interface may only be set for object types")
++
+ @property
+ def signature(self) -> str:
+ """
+@@ -104,11 +110,6 @@ class Argument:
+ """
+ return PROTOCOL_TYPES[self.protocol_type]
+
+- @interface.validator # type: ignore
+- def _validate_interface(self, attribute, value):
+- if value is not None and self.signature not in ["n", "o"]:
+- raise ValueError("Interface may only be set for object types")
+-
+ @property
+ def as_c_arg(self) -> str:
+ return f"{self.c_type} {self.name}"
+@@ -127,12 +128,6 @@ class Argument:
+ "new_id": "new_id_t",
+ }[self.protocol_type]
+
+- @protocol_type.validator # type: ignore
+- def _validate_protocol_type(self, attribute, value):
+- assert (
+- value is not None and value in PROTOCOL_TYPES
+- ), f"Failed to parse protocol_type {value}"
+-
+ @classmethod
+ def create(
+ cls,
+@@ -153,26 +148,25 @@ class Argument:
+ )
+
+
+-@attr.s
++@dataclass
+ class Message:
+ """
+ Parent class for a wire message (Request or Event).
+ """
+
+- name: str = attr.ib()
+- since: int = attr.ib()
+- opcode: int = attr.ib()
+- interface: "Interface" = attr.ib()
+- description: Optional[Description] = attr.ib(default=None)
+- is_destructor: bool = attr.ib(default=False)
+- context_type: Optional[str] = attr.ib(default=None)
++ name: str
++ since: int
++ opcode: int
++ interface: "Interface"
++ description: Optional[Description] = None
++ is_destructor: bool = False
++ context_type: Optional[str] = None
+
+- arguments: List[Argument] = attr.ib(init=False, factory=list)
++ arguments: List[Argument] = field(init=False, default_factory=list)
+
+- @context_type.validator # type: ignore
+- def _context_type_validate(self, attr, value):
+- if value not in [None, "sender", "receiver"]:
+- raise ValueError(f"Invalid context type {value}")
++ def __post_init(self):
++ if self.context_type not in [None, "sender", "receiver"]:
++ raise ValueError(f"Invalid context type {self.context_type}")
+
+ def add_argument(self, arg: Argument) -> None:
+ if arg.name in [a.name for a in self.arguments]:
+@@ -198,7 +192,7 @@ class Message:
+ return None
+
+
+-@attr.s
++@dataclass
+ class Request(Message):
+ @classmethod
+ def create(
+@@ -225,7 +219,7 @@ class Request(Message):
+ return f"{self.interface.name}_request_{self.name}"
+
+
+-@attr.s
++@dataclass
+ class Event(Message):
+ @classmethod
+ def create(
+@@ -252,17 +246,17 @@ class Event(Message):
+ return f"{self.interface.name}_event_{self.name}"
+
+
+-@attr.s
++@dataclass
+ class Entry:
+ """
+ An enum entry
+ """
+
+- name: str = attr.ib()
+- value: int = attr.ib()
+- enum: "Enum" = attr.ib()
+- summary: str = attr.ib()
+- since: int = attr.ib()
++ name: str
++ value: int
++ enum: "Enum"
++ summary: str
++ since: int
+
+ @classmethod
+ def create(
+@@ -278,15 +272,15 @@ class Entry:
+ return f"{self.enum.fqdn}_{self.name}"
+
+
+-@attr.s
++@dataclass
+ class Enum:
+- name: str = attr.ib()
+- since: int = attr.ib()
+- interface: "Interface" = attr.ib()
+- is_bitfield: bool = attr.ib(default=False)
+- description: Optional[Description] = attr.ib(default=None)
++ name: str
++ since: int
++ interface: "Interface"
++ is_bitfield: bool = False
++ description: Optional[Description] = None
+
+- entries: List[Entry] = attr.ib(init=False, factory=list)
++ entries: List[Entry] = field(init=False, default_factory=list)
+
+ @classmethod
+ def create(
+@@ -329,16 +323,20 @@ class Enum:
+ return snake2camel(self.name)
+
+
+-@attr.s
++@dataclass
+ class Interface:
+- protocol_name: str = attr.ib() # name as in the XML, e.g. ei_pointer
+- version: int = attr.ib()
+- requests: List[Request] = attr.ib(init=False, factory=list)
+- events: List[Event] = attr.ib(init=False, factory=list)
+- enums: List[Enum] = attr.ib(init=False, factory=list)
++ protocol_name: str # name as in the XML, e.g. ei_pointer
++ version: int
++ requests: List[Request] = field(init=False, default_factory=list)
++ events: List[Event] = field(init=False, default_factory=list)
++ enums: List[Enum] = field(init=False, default_factory=list)
++
++ mode: str
++ description: Optional[Description] = None
+
+- mode: str = attr.ib(validator=attr.validators.in_(["ei", "eis", "brei"]))
+- description: Optional[Description] = attr.ib(default=None)
++ def __post_init(self):
++ if self.mode not in ["ei", "eis", "brei"]:
++ raise ValueError(f"Invalid mode {self.mode}")
+
+ @property
+ def name(self) -> str:
+@@ -444,11 +442,11 @@ class Interface:
+ return cls(protocol_name=protocol_name, version=version, mode=mode)
+
+
+-@attr.s
++@dataclass
+ class XmlError(Exception):
+- line: int = attr.ib()
+- column: int = attr.ib()
+- message: str = attr.ib()
++ line: int
++ column: int
++ message: str
+
+ def __str__(self) -> str:
+ return f"line {self.line}:{self.column}: {self.message}"
+@@ -458,32 +456,34 @@ class XmlError(Exception):
+ return cls(line=location[0], column=location[1], message=message)
+
+
+-@attr.s
++@dataclass
+ class Copyright:
+- text: str = attr.ib(default="")
+- is_complete: bool = attr.ib(init=False, default=False)
++ text: str = ""
++ is_complete: bool = field(init=False, default=False)
+
+
+-@attr.s
++@dataclass
+ class Protocol:
+- copyright: Optional[str] = attr.ib(default=None)
+- interfaces: List[Interface] = attr.ib(factory=list)
++ copyright: Optional[str] = None
++ interfaces: List[Interface] = field(default_factory=list)
+
+
+-@attr.s
++@dataclass
+ class ProtocolParser(xml.sax.handler.ContentHandler):
+- component: str = attr.ib()
+- interfaces: List[Interface] = attr.ib(factory=list)
+- copyright: Optional[Copyright] = attr.ib(init=False, default=None)
++ component: str
++ interfaces: List[Interface] = field(default_factory=list)
++ copyright: Optional[Copyright] = field(init=False, default=None)
+
+- current_interface: Optional[Interface] = attr.ib(init=False, default=None)
+- current_message: Optional[Union[Message, Enum]] = attr.ib(init=False, default=None)
+- current_description: Optional[Description] = attr.ib(init=False, default=None)
++ current_interface: Optional[Interface] = field(init=False, default=None)
++ current_message: Optional[Union[Message, Enum]] = field(init=False, default=None)
++ current_description: Optional[Description] = field(init=False, default=None)
+ # A dict of arg name to interface_arg name mappings
+- current_interface_arg_names: Dict[str, str] = attr.ib(init=False, default=attr.Factory(dict)) # type: ignore
+- current_new_id_arg: Optional[Argument] = attr.ib(init=False, default=None)
++ current_interface_arg_names: Dict[str, str] = field(
++ init=False, default_factory=dict
++ )
++ current_new_id_arg: Optional[Argument] = field(init=False, default=None)
+
+- _run_counter: int = attr.ib(init=False, default=0, repr=False)
++ _run_counter: int = field(init=False, default=0, repr=False)
+
+ @property
+ def location(self) -> Tuple[int, int]:
+diff --git ./proto/meson.build ./proto/meson.build
+index 95e9d07..db01a8b 100644
+--- ./proto/meson.build
++++ ./proto/meson.build
+@@ -13,7 +13,7 @@ if xmllint.found()
+ endif
+
+ pymod = import('python')
+-required_python_modules = ['attr', 'jinja2']
++required_python_modules = ['jinja2']
+ python = pymod.find_installation('python3', modules: required_python_modules)
+ if python.language_version().version_compare('<3.9')
+ error('Python 3.9 or later required')
+--
+2.45.2
+
diff --git a/dev-libs/libei/libei-1.3.0-r1.ebuild b/dev-libs/libei/libei-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..3c5bc8f5dcf1
--- /dev/null
+++ b/dev-libs/libei/libei-1.3.0-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit meson python-any-r1
+
+DESCRIPTION="Library for Emulated Input, primarily aimed at the Wayland stack"
+HOMEPAGE="https://gitlab.freedesktop.org/libinput/libei"
+SRC_URI="https://gitlab.freedesktop.org/libinput/${PN}/-/archive/${PV}/${P}.tar.bz2"
+MUNIT_COMMIT="fbbdf1467eb0d04a6ee465def2e529e4c87f2118"
+SRC_URI+=" https://github.com/nemequ/munit/archive/${MUNIT_COMMIT}.tar.gz -> munit-${MUNIT_COMMIT}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="elogind systemd test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-libs/libevdev-1.9.902
+ || (
+ systemd? ( >=sys-apps/systemd-237 )
+ elogind? ( >=sys-auth/elogind-237 )
+ sys-libs/basu
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ $(python_gen_any_dep '
+ dev-python/jinja2[${PYTHON_USEDEP}]
+ ')
+ test? (
+ $(python_gen_any_dep '
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/python-dbusmock[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/structlog[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/1.3.0-skip-protocol-test.patch
+ "${FILESDIR}"/1.3.0-scanner-switch-to-using-dataclasses.patch
+)
+
+python_check_deps() {
+ if use test; then
+ python_has_version \
+ "dev-python/pytest[${PYTHON_USEDEP}]" \
+ "dev-python/python-dbusmock[${PYTHON_USEDEP}]" \
+ "dev-python/pyyaml[${PYTHON_USEDEP}]" \
+ "dev-python/structlog[${PYTHON_USEDEP}]" \
+ || return 1
+ fi
+ python_has_version \
+ "dev-python/jinja2[${PYTHON_USEDEP}]" \
+ || return 1
+}
+
+src_unpack() {
+ if [[ -n ${A} ]]; then
+ unpack ${A}
+ mv "${WORKDIR}"/munit-${MUNIT_COMMIT} "${WORKDIR}"/${P}/subprojects/munit || die
+ rm "${WORKDIR}"/${P}/subprojects/munit.wrap || die
+ fi
+}
+
+src_prepare() {
+ default
+
+ sed -i -e 's:^valgrind = .*:valgrind = disabler():g' test/meson.build || die
+}
+
+src_configure() {
+ local emesonargs=(
+ -Ddocumentation=""
+ -Dliboeffis=enabled
+ $(meson_feature test tests)
+ )
+ if use systemd; then
+ emesonargs+=(-Dsd-bus-provider=libsystemd)
+ elif use elogind; then
+ emesonargs+=(-Dsd-bus-provider=libelogind)
+ else
+ emesonargs+=(-Dsd-bus-provider=basu)
+ fi
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ # munit subproject is installed but not wanted
+ if use test; then
+ rm "${ED}"/usr/lib*/libmunit.so || die
+ fi
+}