From f35ef15374c2b4ec9c78682f739aeeaeadf5538e Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 24 Oct 2024 13:34:45 +0100 Subject: [PATCH] meson: bump to 0.61, use install_symlink() Bump the meson requirement to 0.61 which allows us to remove our clunky shell script in favour of the native install_symlink(). In terms of OS support - according to repology, all distributions which have 0.60 (Fedora 36 + winget) also have 0.61 in their repositories. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/209 Signed-off-by: Lucas De Marchi --- Makefile.am | 3 +-- meson.build | 6 ++---- scripts/kmod-symlink.sh | 12 ------------ 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100755 scripts/kmod-symlink.sh diff --git a/Makefile.am b/Makefile.am index 3f4e132b..1a48756b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,8 +24,7 @@ EXTRA_DIST += \ testsuite/meson.build \ scripts/build-scdoc.sh \ scripts/sanitizer-env.sh \ - scripts/test-gtkdoc.sh \ - scripts/kmod-symlink.sh + scripts/test-gtkdoc.sh AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ diff --git a/meson.build b/meson.build index 17978338..1b862c96 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ project( 'c', version : '33', license : ['LGPLv2.1', 'GPL-2.0-or-later'], - meson_version : '>=0.60.0', + meson_version : '>=0.61.0', default_options : [ 'c_std=gnu11', 'b_pie=true', @@ -471,11 +471,9 @@ _tools = [ 'rmmod', ] -kmod_symlink = find_program('scripts/kmod-symlink.sh') foreach tool : _tools if get_option('tools') - symlink = bindir / tool - meson.add_install_script(kmod_symlink, symlink) + install_symlink(tool, pointing_to: 'kmod', install_dir: bindir) endif endforeach diff --git a/scripts/kmod-symlink.sh b/scripts/kmod-symlink.sh deleted file mode 100755 index f825eef8..00000000 --- a/scripts/kmod-symlink.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -# Dummy wrapper script, since that's the meson way. Aka, there is no access to -# DESTDIR from within meson nor any other way to check/fetch it. -# -# For context read through https://github.com/mesonbuild/meson/issues/9 - -DESTDIR=${DESTDIR:-/} - -ln -sf kmod "$DESTDIR/$1" -- 2.47.2