From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 85A52158094 for ; Mon, 18 Jul 2022 00:26:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 633E0E0DC8; Mon, 18 Jul 2022 00:26:32 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 405DBE0DC8 for ; Mon, 18 Jul 2022 00:26:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 28CEA340CC9 for ; Mon, 18 Jul 2022 00:26:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2604F545 for ; Mon, 18 Jul 2022 00:26:28 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1658103972.d7fe66b67489c54ae8244dbbe7d801aed073952f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libratbag/files/, dev-libs/libratbag/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libratbag/files/libratbag-0.16-musl-error.h.patch dev-libs/libratbag/libratbag-0.16.ebuild X-VCS-Directories: dev-libs/libratbag/ dev-libs/libratbag/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d7fe66b67489c54ae8244dbbe7d801aed073952f X-VCS-Branch: master Date: Mon, 18 Jul 2022 00:26:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d87b291f-3bb0-4566-90f8-609c4ca0baf7 X-Archives-Hash: 16bf32d7c3f157b0809771c4a42447ef commit: d7fe66b67489c54ae8244dbbe7d801aed073952f Author: brahmajit das gmail com> AuthorDate: Sat Jul 16 07:42:27 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jul 18 00:26:12 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7fe66b6 dev-libs/libratbag-: Fix missing error.h error on musl Since musl doesn't provide error.h we need to check before adding it. If error.h is present in system only then we include it else we use err.h. Already there exists a bug report for this upstream [1]. The devs are open to a custom implementation of error but for now this patch for do it. [1]: https://github.com/libratbag/libratbag/issues/1253 Closes: https://bugs.gentoo.org/830557 Signed-off-by: brahmajit das gmail.com> Closes: https://github.com/gentoo/gentoo/pull/26437 Signed-off-by: Sam James gentoo.org> .../files/libratbag-0.16-musl-error.h.patch | 69 ++++++++++++++++++++++ dev-libs/libratbag/libratbag-0.16.ebuild | 4 ++ 2 files changed, 73 insertions(+) diff --git a/dev-libs/libratbag/files/libratbag-0.16-musl-error.h.patch b/dev-libs/libratbag/files/libratbag-0.16-musl-error.h.patch new file mode 100644 index 000000000000..a3b0b187c154 --- /dev/null +++ b/dev-libs/libratbag/files/libratbag-0.16-musl-error.h.patch @@ -0,0 +1,69 @@ +# Since musl doesn't provide error.h we need to check before adding it. If +# error.h is present in system only then we include it else we use err.h. +# Already there exists a bug report for this upstream [1]. The devs are open to +# a custom implementation of error but for now this patch for do it. +# +# [1]: https://github.com/libratbag/libratbag/issues/1253 +# +# Closes: https://bugs.gentoo.org/830557 +--- a/meson.build ++++ b/meson.build +@@ -74,8 +74,13 @@ dep_libevdev = dependency('libevdev') + dep_glib = dependency('glib-2.0') + dep_json_glib = dependency('json-glib-1.0') + dep_lm = cc.find_library('m') ++error_exists = cc.has_header('error.h') + dep_unistring = cc.find_library('unistring') + ++if error_exists ++ add_global_arguments('-DHAVE_ERROR_H', language : 'c') ++endif ++ + if get_option('logind-provider') == 'elogind' + dep_logind = dependency('libelogind', version : '>=227') + else +--- a/tools/hidpp10-dump-page.c ++++ b/tools/hidpp10-dump-page.c +@@ -23,7 +23,12 @@ + + #include + #include ++#ifdef HAVE_ERROR_H + #include ++#else ++#include ++#define error(status, errno, ...) err(status, __VA_ARGS__) ++#endif + #include + + #include +--- a/tools/hidpp20-dump-page.c ++++ b/tools/hidpp20-dump-page.c +@@ -23,7 +23,12 @@ + + #include + #include ++#ifdef HAVE_ERROR_H + #include ++#else ++#include ++#define error(status, errno, ...) err(status, __VA_ARGS__) ++#endif + #include + + #include +--- a/tools/hidpp20-reset.c ++++ b/tools/hidpp20-reset.c +@@ -23,7 +23,12 @@ + + #include + #include ++#ifdef HAVE_ERROR_H + #include ++#else ++#include ++#define error(status, errno, ...) err(status, __VA_ARGS__) ++#endif + #include + + #include diff --git a/dev-libs/libratbag/libratbag-0.16.ebuild b/dev-libs/libratbag/libratbag-0.16.ebuild index 9b8dda025eb3..2a174abe96e8 100644 --- a/dev-libs/libratbag/libratbag-0.16.ebuild +++ b/dev-libs/libratbag/libratbag-0.16.ebuild @@ -61,6 +61,10 @@ DEPEND=" dev-libs/gobject-introspection " +PATCHES=( + "${FILESDIR}"/${PN}-0.16-musl-error.h.patch +) + src_prepare() { default