From 311255adc0d1c3b3aa0f6bed5af58e718f0607b2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 8 Apr 2023 10:57:17 -0400 Subject: gnu: meson: Update to 1.0.1. * gnu/packages/build-tools.scm (meson-0.63): Update to 1.0.1. (meson-0.63): Rename to... (meson): ... this. [arguments]: Update explanatory comment about why tests are disabled. Use gexps and search-input-file in wrap phase override. Also use site-packages to simplify the phase. [inputs]: Replace python-wrapper with python. (meson-0.60, meson-0.59): Delete variables. * gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. --- gnu/local.mk | 1 - gnu/packages/build-tools.scm | 73 +++++----------------- .../meson-allow-dirs-outside-of-prefix.patch | 20 ------ 3 files changed, 17 insertions(+), 77 deletions(-) delete mode 100644 gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index d583e06e18..b07811f1cb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1539,7 +1539,6 @@ dist_patch_DATA = \ %D%/packages/patches/mercurial-openssl-compat.patch \ %D%/packages/patches/mesa-opencl-all-targets.patch \ %D%/packages/patches/mesa-fix-sporadic-test-failures.patch \ - %D%/packages/patches/meson-allow-dirs-outside-of-prefix.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ %D%/packages/patches/mia-fix-boost-headers.patch \ %D%/packages/patches/mia-vtk9.patch \ diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 29871eee26..ccd5bafda8 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2021 qblade -;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021, 2023 Maxim Cournoyer ;;; Copyright © 2022 Juliana Sims ;;; ;;; This file is part of GNU Guix. @@ -283,10 +283,10 @@ files and generates build instructions for the Ninja build system.") ;; X11 license. (license (list license:bsd-3 license:x11))))) -(define-public meson-0.63 +(define-public meson (package (name "meson") - (version "0.63.2") + (version "1.0.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/mesonbuild/meson/" @@ -294,28 +294,23 @@ files and generates build instructions for the Ninja build system.") version ".tar.gz")) (sha256 (base32 - "1gwba75z47m2hv3w08gw8sgqgbknjr7rj1qwr510bgknxwbjy8hn")))) + "1hfk75wcrci7jhv9wbsjqghblrqnf1gbqmvwrhl8flbgvqqbf9nr")))) (build-system python-build-system) (arguments - `(;; FIXME: Tests require many additional inputs and patching many - ;; hard-coded file system locations in "run_unittests.py". - #:tests? #f - #:phases (modify-phases %standard-phases - ;; Meson calls the various executables in out/bin through the - ;; Python interpreter, so we cannot use the shell wrapper. - (replace 'wrap - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((python-version - (python-version (assoc-ref inputs "python"))) - (output (assoc-ref outputs "out"))) - (substitute* (string-append output "/bin/meson") - (("# EASY-INSTALL-ENTRY-SCRIPT") - (format #f "\ + (list #:tests? #f ;disabled to avoid extra dependencies + #:phases + #~(modify-phases %standard-phases + ;; Meson calls the various executables in out/bin through the + ;; Python interpreter, so we cannot use the shell wrapper. + (replace 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* (search-input-file outputs "bin/meson") + (("# EASY-INSTALL-ENTRY-SCRIPT") + (format #f "\ import sys -sys.path.insert(0, '~a/lib/python~a/site-packages') -# EASY-INSTALL-ENTRY-SCRIPT" - output python-version))))))))) - (inputs (list python-wrapper ninja)) +sys.path.insert(0, '~a') +# EASY-INSTALL-ENTRY-SCRIPT" (site-packages inputs outputs))))))))) + (inputs (list python ninja)) (home-page "https://mesonbuild.com/") (synopsis "Build system designed to be fast and user-friendly") (description @@ -327,40 +322,6 @@ files}, are written in a custom domain-specific language (@dfn{DSL}) that resembles Python.") (license license:asl2.0))) -(define-public meson-0.60 - (package - (inherit meson-0.63) - (version "0.60.3") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/mesonbuild/meson/" - "releases/download/" version "/meson-" - version ".tar.gz")) - (sha256 - (base32 - "13mrrizg4vl6n5k7fz6amyafnn3i097dcarr552qc0ca6nlmzjl7")) - (patches (search-patches - "meson-allow-dirs-outside-of-prefix.patch")))))) - -;;; This older Meson variant is kept for now for gtkmm and others that may -;;; have problems with 0.60. -(define-public meson-0.59 - (package - (inherit meson-0.60) - (version "0.59.4") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/mesonbuild/meson/" - "releases/download/" version "/meson-" - version ".tar.gz")) - (sha256 - (base32 - "117cm8794h291lca1wljz1pwnzidgbvrpg3mw3np6ksma368hyd7")) - (patches (search-patches - "meson-allow-dirs-outside-of-prefix.patch")))))) - -(define-public meson meson-0.63) - (define-public meson-python (package (name "meson-python") diff --git a/gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch b/gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch deleted file mode 100644 index f16daa8009..0000000000 --- a/gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch +++ /dev/null @@ -1,20 +0,0 @@ -Source: https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch ---- a/mesonbuild/coredata.py -+++ b/mesonbuild/coredata.py -@@ -506,7 +506,6 @@ class CoreData: - return value - if option.name.endswith('dir') and value.is_absolute() and \ - option not in BULITIN_DIR_NOPREFIX_OPTIONS: -- # Value must be a subdir of the prefix - # commonpath will always return a path in the native format, so we - # must use pathlib.PurePath to do the same conversion before - # comparing. -@@ -518,7 +517,7 @@ class CoreData: - try: - value = value.relative_to(prefix) - except ValueError: -- raise MesonException(msg.format(option, value, prefix)) -+ pass - if '..' in str(value): - raise MesonException(msg.format(option, value, prefix)) - return value.as_posix() -- cgit v1.2.3