From patchwork Sun Mar 6 06:19:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allan McRae X-Patchwork-Id: 2039 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:19:19 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id sCzvEGdSJGJ8GwUAK+/4rw (envelope-from ) for ; Sun, 06 Mar 2022 06:19:19 +0000 Received: from lists.archlinux.org (lists.archlinux.org [95.217.236.249]) (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 3505FDAADBE; Sun, 6 Mar 2022 06:19:18 +0000 (UTC) Received: from lists.archlinux.org (localhost [IPv6:::1]) by lists.archlinux.org (Postfix) with ESMTP id 04460DA595B; Sun, 6 Mar 2022 06:19:18 +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 [IPv6:2a01:4f9:c010:3052::1]) by lists.archlinux.org (Postfix) with ESMTPS id 03AE6DA594C for ; Sun, 6 Mar 2022 06:19:16 +0000 (UTC) From: Allan McRae DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1646547555; 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=WbHPdKRTEgZMeO3Rg40jtPlxaBXExXaXQqLwxoPDuOg=; b=ZLkm3W9blEK74Gs/hgHyhxaxdDepbAEwMMWOvJ0l0TzEKq6qHDlYLsFB1tget1SxhA6qfp t8XFMpRx116uQvC/MoKcea4AZYKCC+TZx2DR/n+CWZ4F/7L5JmcCrTZNTUArdylErN5g1z /j8p5f3RfIUy1KwG+BDfRv3/JEI4YCArN2bo33Y8MvlqDa8o24m8RcFnId03PBVDee9h66 3hSmxOqHA/g1Jzf81qj3AzvUEyE0Y1zzj9W7/q05BR8lYWGpUtOtpkME+5G6ErjGkjDEip r5EKHIaUimegn+fHzofm4kELQpDUO6MlVv57x8jkB5Y0TOLgKqyRfCHsfoSpddcccK9lSs vQfUoDsx/W3d2PtCKLIgopZJD7IELBXQdvPz6UmdFccZ1XTyDawgxg/ObxahO2JR6/zgee ba3lyOQZ9yTnwr1VmkazE/vLMH2fbEl3bynqRSLli6Nd7dCPO6XcZHvjUgp3YWhxuY4AO9 +zoCPm9JTUPtqXAbGqpSvXTEKXHPOq+PHVWfGm4a1fjUcA3fsZ7n91cKgZFCqPLakA8gJX 3dKUwKO+q7V7U7XRCXHwRw0W8JWCYU6VJP8Ys2Cc891i9pu8r/DhUxR5isO/gtyV/bUOHV TNJO4thFg+D8id4EnZWZiBMlX64qGWr1qVV1v1Vx9MgFIUxRAteN8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1646547555; 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=WbHPdKRTEgZMeO3Rg40jtPlxaBXExXaXQqLwxoPDuOg=; b=3iYjMJxY65xoah34CDyCQ9OSpAhGJ5EVtlGyYrRRnwT9P4KlgDY0R8kG9jpiYbly4NSX+y EV0lmOSE0yW5qMCQ== To: pacman-dev@lists.archlinux.org Subject: [PATCH] meson: do not use meson.source_root() and meson.build_root() Date: Sun, 6 Mar 2022 16:19:06 +1000 Message-Id: <20220306061906.789045-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: 3505FDAADBE Authentication-Results: mail.archlinux.org; dkim=pass header.d=archlinux.org header.s=dkim-rsa header.b=ZLkm3W9b; dkim=pass header.d=archlinux.org header.s=dkim-ed25519 header.b=3iYjMJxY; dmarc=pass (policy=none) header.from=archlinux.org; spf=pass (mail.archlinux.org: domain of pacman-dev-bounces@lists.archlinux.org designates 95.217.236.249 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.217.236.249:from,2a01:4f9:c010:3052::1:received]; R_DKIM_ALLOW(-0.20)[archlinux.org:s=dkim-rsa,archlinux.org:s=dkim-ed25519]; MAILLIST(-0.20)[mailman]; R_SPF_ALLOW(-0.20)[+ip4:95.217.236.249]; 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:95.217.0.0/16, 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 --- 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..6f16919c 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.current_build_dir(), '--ldconfig', LDCONFIG, '--verbose', join_paths(meson.current_source_dir(), input)