public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/rtkit/files/, sys-auth/rtkit/
Date: Fri, 10 Apr 2020 21:48:49 +0000 (UTC)	[thread overview]
Message-ID: <1586555273.78468709f8de7414bb71a419074a3d53110cdbc0.marecki@gentoo> (raw)

commit:     78468709f8de7414bb71a419074a3d53110cdbc0
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 10 21:39:36 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Apr 10 21:47:53 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78468709

sys-auth/rtkit: fix 0.13 meson build scripts

One, they installed rtkitctl into bin rather than, like autotools, into
sbin. Already fixed upstream.

Two, they aborted if the program 'xxd' couldn't be found without
even trying to use a pre-generated header file. I have just submitted a
pull request to fix this upstream as well.

Will stick with Meson though, in order to revert to autotools someone
would have to make it possible not to install tests and I really do not
want to hack at this particular build system any more than I absolutely
have to.

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/rtkit-0.13_meson_rtkitctl_dir.patch      | 25 +++++++++
 .../files/rtkit-0.13_meson_xxd_optional.patch      | 59 ++++++++++++++++++++++
 sys-auth/rtkit/rtkit-0.13.ebuild                   |  5 ++
 3 files changed, 89 insertions(+)

diff --git a/sys-auth/rtkit/files/rtkit-0.13_meson_rtkitctl_dir.patch b/sys-auth/rtkit/files/rtkit-0.13_meson_rtkitctl_dir.patch
new file mode 100644
index 00000000000..6d48004e6dc
--- /dev/null
+++ b/sys-auth/rtkit/files/rtkit-0.13_meson_rtkitctl_dir.patch
@@ -0,0 +1,25 @@
+From c295fa849f52b487be6433e69e08b46251950399 Mon Sep 17 00:00:00 2001
+From: Felipe Sateler <fsateler@users.noreply.github.com>
+Date: Sun, 5 Apr 2020 12:16:01 -0400
+Subject: [PATCH 1/2] meson: Install rtkitctl to sbin
+
+That is the path previously used in the autotools system
+---
+ meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/meson.build b/meson.build
+index 50e137c..02e6c73 100644
+--- a/meson.build
++++ b/meson.build
+@@ -115,6 +115,7 @@ executable(
+         'rtkitctl',
+         'rtkitctl.c', 'rtkit.h', config_h,
+         install: true,
++        install_dir: get_option('sbindir'),
+         dependencies: [dbus_dep],
+ )
+ 
+-- 
+2.24.1
+

diff --git a/sys-auth/rtkit/files/rtkit-0.13_meson_xxd_optional.patch b/sys-auth/rtkit/files/rtkit-0.13_meson_xxd_optional.patch
new file mode 100644
index 00000000000..17320543b9e
--- /dev/null
+++ b/sys-auth/rtkit/files/rtkit-0.13_meson_xxd_optional.patch
@@ -0,0 +1,59 @@
+From ac157ef9c7b90d995436d999f15f41f04bff6052 Mon Sep 17 00:00:00 2001
+From: Marek Szuba <Marek.Szuba@cern.ch>
+Date: Fri, 10 Apr 2020 22:08:00 +0100
+Subject: [PATCH 2/2] Actually let meson use pre-generated introspection file
+
+Unlike autoconf, meson scripts actually aborted if the program 'xxd' was
+absent regardless of whether the pre-generated introspection file was
+found or not. Make xxd optional, and if it is not found print a warning
+and make the dependency object xml_introspection_h point at the relevant
+file in the source directory instead of generating a new one in the build
+directory. If that file does not exist either, abort.
+---
+ meson.build | 23 ++++++++++++++---------
+ 1 file changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 02e6c73..68fa23c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -13,7 +13,7 @@ add_project_arguments(
+ 
+ cc = meson.get_compiler('c')
+ sh = find_program('sh')
+-xxd = find_program('xxd')
++xxd = find_program('xxd', required: false)
+ 
+ dbus_dep = dependency('dbus-1')
+ libcap_dep = dependency('libcap')
+@@ -80,14 +80,19 @@ config_h = configure_file(
+         configuration: config,
+ )
+ 
+-xml_introspection_h = configure_file(
+-        input: 'org.freedesktop.RealtimeKit1.xml',
+-        output: 'xml-introspection.h',
+-        command: [
+-                sh, '-c', '"$1" -i < "$2" > "$3"', sh,
+-                xxd, '@INPUT@', '@OUTPUT@'
+-        ],
+-)
++if xxd.found()
++        xml_introspection_h = configure_file(
++                input: 'org.freedesktop.RealtimeKit1.xml',
++                output: 'xml-introspection.h',
++                command: [
++                        sh, '-c', '"$1" -i < "$2" > "$3"', sh,
++                        xxd, '@INPUT@', '@OUTPUT@'
++                ],
++        )
++else
++        warning('xxd not found, cannot compile introspection XML. Looking for existing one...')
++        xml_introspection_h = files('xml-introspection.h')
++endif
+ 
+ executable(
+         'rtkit-daemon',
+-- 
+2.24.1
+

diff --git a/sys-auth/rtkit/rtkit-0.13.ebuild b/sys-auth/rtkit/rtkit-0.13.ebuild
index c5a7b3105f0..61c97841c75 100644
--- a/sys-auth/rtkit/rtkit-0.13.ebuild
+++ b/sys-auth/rtkit/rtkit-0.13.ebuild
@@ -23,6 +23,11 @@ DEPEND="acct-group/rtkit
 	systemd? ( sys-apps/systemd )"
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.13_meson_rtkitctl_dir.patch
+	"${FILESDIR}"/${PN}-0.13_meson_xxd_optional.patch
+)
+
 pkg_pretend() {
 	if use kernel_linux; then
 		CONFIG_CHECK="~!RT_GROUP_SCHED"


             reply	other threads:[~2020-04-10 21:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-10 21:48 Marek Szuba [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-06-29 10:22 [gentoo-commits] repo/gentoo:master commit in: sys-auth/rtkit/files/, sys-auth/rtkit/ Marek Szuba
2021-03-23 11:38 Marek Szuba
2020-03-29 21:45 Marek Szuba
2020-03-13 13:31 Marek Szuba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1586555273.78468709f8de7414bb71a419074a3d53110cdbc0.marecki@gentoo \
    --to=marecki@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox