From patchwork Sun Mar 6 06:29:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allan McRae X-Patchwork-Id: 2040 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [95.216.189.61] by patchwork.archlinux.org with IMAP (fetchmail-6.4.27) for (single-drop); Sun, 06 Mar 2022 06:29:42 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id 3hh1ItVUJGKrHAUAK+/4rw (envelope-from ) for ; Sun, 06 Mar 2022 06:29:41 +0000 Received: from lists.archlinux.org (lists.archlinux.org [IPv6:2a01:4f9:c010:9eb4::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 75479DAAE8A; Sun, 6 Mar 2022 06:29:40 +0000 (UTC) Received: from lists.archlinux.org (localhost [IPv6:::1]) by lists.archlinux.org (Postfix) with ESMTP id 4484BDA59E0; Sun, 6 Mar 2022 06:29:40 +0000 (UTC) X-Original-To: pacman-dev@lists.archlinux.org Delivered-To: pacman-dev@lists.archlinux.org Received: from mail.archlinux.org (mail.archlinux.org [95.216.189.61]) by lists.archlinux.org (Postfix) with ESMTPS id B150DDA59D1 for ; Sun, 6 Mar 2022 06:29:38 +0000 (UTC) From: Allan McRae DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1646548178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=n+GFudmVYSIyjc4Xv49c4WIzk+OqTpDdFD1cgJFvS28=; b=hjbidn/SFo1E3WkwEL3QZKfs2lHXT7KK2OYylFi0JDgPJtWjo6pHT/K7XhhJH7n8j/iNgr lWN4rqABr1wED5pSNoAbL7LQSID+w7tKfrP0A5p1GNDxWZ9NyYX1r0QDfPhbp3k/MnGvvh +k35Rm+YSjs+lu7j2EEBprz8y96QizZ2JxIFAsX/2KWBnM38TdRuN8Drai9/YCmilS2cHC wmVoaja95jFDXH/YLJLD1vk67iOodCkyOcu6EusLFvJtMJwsDANVaiKy7XIoSmCJEx1bLf Sfs/oJuDoDxcQpIuEKwWdIytzf0xYoUo7WQ9f76ktwh593DK4VfLO3325h+V+c3gL+480N wzVl5n7jc+kZaGMUanHo5zhZRAfixvqHl+46sBBD0GpsEXzASSWllF3P/4wZSSCt77SfM8 qDez94k/FsYxljhHXwfxNiXG28hEd17avdd4ZhpkroHUldBtEq8TEBK6xBOQdiMvJTbS/3 zXYWZ75ZwpoxuuiLrz4dpu7sZxTief38nZwApX3gZTvcMncc5GYWWhf3UdNA6gOFTwOo0D ZwXJnbdvXdSxlucexUwHxuOi8+BBlQDcVry1prtIKQqadeapamgVX8QjYRN/oG2FbD88Nu wBpqxC54tIvIsXXO8G5J9rLzTPUOC5xtXvYGUujbZYf9NLQUePuoc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1646548178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=n+GFudmVYSIyjc4Xv49c4WIzk+OqTpDdFD1cgJFvS28=; b=0NlCgoMbY34hqKRpIjJIHZAVPcpNAbmSheeIOQRw8hOu3E4LXF8op/+W7Tc+dYphrtN3Uw HEkn+X3wbCp9nhBg== To: pacman-dev@lists.archlinux.org Subject: [PATCH v2] meson: do not use meson.source_root() and meson.build_root() Date: Sun, 6 Mar 2022 16:29:29 +1000 Message-Id: <20220306062929.804290-1-allan@archlinux.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-BeenThere: pacman-dev@lists.archlinux.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: pacman-dev-bounces@lists.archlinux.org Sender: "pacman-dev" X-Rspamd-Queue-Id: 75479DAAE8A Authentication-Results: mail.archlinux.org; dkim=pass header.d=archlinux.org header.s=dkim-rsa header.b="hjbidn/S"; dkim=pass header.d=archlinux.org header.s=dkim-ed25519 header.b=0NlCgoMb; dmarc=pass (policy=none) header.from=archlinux.org; spf=pass (mail.archlinux.org: domain of pacman-dev-bounces@lists.archlinux.org designates 2a01:4f9:c010:9eb4::1 as permitted sender) smtp.mailfrom=pacman-dev-bounces@lists.archlinux.org X-Spamd-Result: default: False [-2.61 / 15.00]; DWL_DNSWL_MED(-2.00)[archlinux.org:dkim]; MID_CONTAINS_FROM(1.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; DMARC_POLICY_ALLOW(-0.50)[archlinux.org,none]; R_MISSING_CHARSET(0.50)[]; RCVD_IN_DNSWL_MED(-0.40)[95.216.189.61:received,2a01:4f9:c010:9eb4::1:from]; R_DKIM_ALLOW(-0.20)[archlinux.org:s=dkim-rsa,archlinux.org:s=dkim-ed25519]; MAILLIST(-0.20)[mailman]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f9:c010:9eb4::1]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; MIME_TRACE(0.00)[0:+]; NEURAL_HAM(-0.00)[-1.000]; ASN(0.00)[asn:24940, ipnet:2a01:4f9::/32, country:DE]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; PREVIOUSLY_DELIVERED(0.00)[pacman-dev@lists.archlinux.org]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[archlinux.org:+]; TO_DN_NONE(0.00)[]; FROM_NEQ_ENVFROM(0.00)[allan@archlinux.org,pacman-dev-bounces@lists.archlinux.org]; RCPT_COUNT_ONE(0.00)[1]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org Using meson.source_root() and meson.build_root() are deprectated in meson-0.56. Using current_source_dir() or current_build_dir() (which have been available in all Meson versions) would require manually adding "../" in some places. Instead, use project_source_root() and project_build_root() and require meson-0.56. Signed-off-by: Allan McRae --- v2: fix testsuite running meson.build | 14 +++++++------- scripts/meson.build | 2 +- test/pacman/meson.build | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index b8e64127..b7cca865 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,7 @@ project('pacman', 'sysconfdir=/etc', 'localstatedir=/var', ], - meson_version : '>= 0.55') + meson_version : '>= 0.56') libalpm_version = '13.0.1' @@ -29,7 +29,7 @@ PKGDATADIR = join_paths(PREFIX, DATAROOTDIR, meson.project_name()) PYTHON = import('python').find_installation('python3') LDCONFIG = get_option('ldconfig') -MESON_MAKE_SYMLINK = join_paths(meson.source_root(), 'build-aux/meson-make-symlink.sh') +MESON_MAKE_SYMLINK = join_paths(meson.project_source_root(), 'build-aux/meson-make-symlink.sh') BASH = find_program('bash4', 'bash') if BASH.found() @@ -382,7 +382,7 @@ foreach wrapper : script_wrappers # directory. Use configure_file instead of a custom_target to ensure that # permissions on the input script wrapper are preserved. configure_file( - input : join_paths(meson.source_root(), 'build-aux', 'script-wrapper.sh.in'), + input : join_paths(meson.project_source_root(), 'build-aux', 'script-wrapper.sh.in'), output : wrapper[0], configuration : cdata) endforeach @@ -416,10 +416,10 @@ foreach path : [ endforeach TEST_ENV = environment() -TEST_ENV.set('PMTEST_SCRIPTLIB_DIR', join_paths(meson.source_root(), 'scripts/library/')) -TEST_ENV.set('PMTEST_LIBMAKEPKG_DIR', join_paths(meson.build_root(), 'scripts/libmakepkg/')) -TEST_ENV.set('PMTEST_UTIL_DIR', meson.build_root() + '/') -TEST_ENV.set('PMTEST_SCRIPT_DIR', join_paths(meson.build_root(), 'scripts/')) +TEST_ENV.set('PMTEST_SCRIPTLIB_DIR', join_paths(meson.project_source_root(), 'scripts/library/')) +TEST_ENV.set('PMTEST_LIBMAKEPKG_DIR', join_paths(meson.project_build_root(), 'scripts/libmakepkg/')) +TEST_ENV.set('PMTEST_UTIL_DIR', meson.project_build_root() + '/') +TEST_ENV.set('PMTEST_SCRIPT_DIR', join_paths(meson.project_build_root(), 'scripts/')) subdir('test/pacman') subdir('test/scripts') diff --git a/scripts/meson.build b/scripts/meson.build index d2466523..e5b9ff4a 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -10,7 +10,7 @@ scripts = [ ] SCRIPT_EDITOR = find_program(configure_file( - input : join_paths(meson.source_root(), 'build-aux/edit-script.sh.in'), + input : join_paths(meson.project_source_root(), 'build-aux/edit-script.sh.in'), output : 'edit-script.sh', configuration : substs)) diff --git a/test/pacman/meson.build b/test/pacman/meson.build index ecab75b2..7ebdd98e 100644 --- a/test/pacman/meson.build +++ b/test/pacman/meson.build @@ -354,7 +354,7 @@ foreach input : pacman_tests args = [ join_paths(meson.current_source_dir(), 'pactest.py'), '--scriptlet-shell', get_option('scriptlet-shell'), - '--bindir', meson.build_root(), + '--bindir', meson.project_build_root(), '--ldconfig', LDCONFIG, '--verbose', join_paths(meson.current_source_dir(), input)