dev-libs/libgudev: Add from Gentoo

It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
This commit is contained in:
Krish Jain 2023-07-16 04:26:14 +05:30 committed by Krish Jain
parent b5809e6234
commit c90986199b
4 changed files with 97 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST libgudev-237.tar.xz 29060 BLAKE2B 5d39d4d26d8c8b3fa877319c294036294dbda96b340d2d04d7a35449d91b58de876b96b5e3d9423cdf3e1d3e2a94f5a861b1ac1e74a610637e0fc66248c68309 SHA512 2d68981e3ba5c58ee080b6ed5cd5152c1c352b2bdb3ecb5eaf2b91f6800d3369121222a7fe4f82630aabd164069ee7276c52082b2fc2ff5f318481b85b25abc6

View File

@ -0,0 +1,30 @@
From 6f0503b1930a0776ef45fa7bc87a87e9dc69dacf Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Sat, 21 Aug 2021 15:09:58 -0400
Subject: [PATCH] Skip test-double if the fr_FR.UTF-8 locale is not available
Bug: https://bugs.gentoo.org/809359
---
tests/test-double.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/test-double.c b/tests/test-double.c
index 0092d8b..7ba3abe 100644
--- a/tests/test-double.c
+++ b/tests/test-double.c
@@ -54,7 +54,11 @@ test_double (void)
int main(int argc, char **argv)
{
setlocale (LC_ALL, NULL);
- setlocale (LC_NUMERIC, "fr_FR.UTF-8");
+ if (!setlocale (LC_NUMERIC, "fr_FR.UTF-8"))
+ /* Skip the test if fr_FR.UTF-8 is not available */
+ /* https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors */
+ return 77;
+
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/gudev/double", test_double);
--
2.33.0

View File

@ -0,0 +1,52 @@
# Copyright 2015-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit meson-multilib
DESCRIPTION="GObject bindings for libudev"
HOMEPAGE="https://wiki.gnome.org/Projects/libgudev"
SRC_URI="https://download.gnome.org/sources/libgudev/${PV}/${P}.tar.xz"
LICENSE="LGPL-2.1+"
SLOT="0/0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="introspection test"
RESTRICT="!test? ( test )"
RDEPEND="
>=dev-libs/glib-2.38.0:2[${MULTILIB_USEDEP}]
>=virtual/libudev-199:=[${MULTILIB_USEDEP}]
introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
"
DEPEND="${RDEPEND}
test? ( dev-util/umockdev[${MULTILIB_USEDEP}] )
"
BDEPEND="
dev-util/glib-utils
virtual/pkgconfig
"
PATCHES=(
# https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/19
"${FILESDIR}/libgudev-test-double.patch"
)
multilib_src_configure() {
local emesonargs=(
$(meson_native_use_feature introspection)
-Dgtk_doc=false
$(meson_feature test tests)
-Dvapi=disabled
)
meson_src_configure
}
src_test() {
# libsandbox interferes somehow.
# There are no access violations, but tests fail.
# https://bugs.gentoo.org/805449
local -x SANDBOX_ON=0
meson-multilib_src_test
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<maintainer type="project">
<email>systemd@gentoo.org</email>
</maintainer>
<upstream>
<remote-id type="gnome-gitlab">GNOME/libgudev</remote-id>
</upstream>
</pkgmetadata>