meson: Add 0.54.0 (#15952)

* meson: Add 0.54.0

This change also improves the rpath patch we are using. Instead of never
removing the rpath, we now only keep it if running within Spack to
guarantee consistent behavior of Meson.

* meson: Make ninja a hard dependency
This commit is contained in:
Michael Kuhn 2020-04-10 00:11:52 +02:00 committed by GitHub
parent e0e092050c
commit 35c4f614c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 16 deletions

View File

@ -14,6 +14,7 @@ class Meson(PythonPackage):
homepage = "http://mesonbuild.com/" homepage = "http://mesonbuild.com/"
url = "https://github.com/mesonbuild/meson/archive/0.49.0.tar.gz" url = "https://github.com/mesonbuild/meson/archive/0.49.0.tar.gz"
version('0.54.0', sha256='95efdbaa7cb3e915ab9a7b26b1412475398fdc3e834842a780f1646c7764f2d9')
version('0.53.2', sha256='eab4f5d5dde12d002b7ddd958a9a0658589b63622b6cea2715e0235b95917888') version('0.53.2', sha256='eab4f5d5dde12d002b7ddd958a9a0658589b63622b6cea2715e0235b95917888')
version('0.49.1', sha256='a944e7f25a2bc8e4ba3502ab5835d8a8b8f2530415c9d6fcffb53e0abaea2ced') version('0.49.1', sha256='a944e7f25a2bc8e4ba3502ab5835d8a8b8f2530415c9d6fcffb53e0abaea2ced')
version('0.49.0', sha256='11bc959e7173e714e4a4e85dd2bd9d0149b0a51c8ba82d5f44cc63735f603c74') version('0.49.0', sha256='11bc959e7173e714e4a4e85dd2bd9d0149b0a51c8ba82d5f44cc63735f603c74')
@ -21,13 +22,12 @@ class Meson(PythonPackage):
version('0.41.2', sha256='2daf448d3f2479d60e30617451f09bf02d26304dd1bd12ee1de936a53e42c7a4') version('0.41.2', sha256='2daf448d3f2479d60e30617451f09bf02d26304dd1bd12ee1de936a53e42c7a4')
version('0.41.1', sha256='a48901f02ffeb9ff5cf5361d71b1fca202f9cd72998043ad011fc5de0294cf8b') version('0.41.1', sha256='a48901f02ffeb9ff5cf5361d71b1fca202f9cd72998043ad011fc5de0294cf8b')
variant('ninjabuild', default=True) depends_on('python@3.5:', type=('build', 'run'))
depends_on('python@3:', type=('build', 'run'))
depends_on('py-setuptools', type=('build', 'run')) depends_on('py-setuptools', type=('build', 'run'))
depends_on('ninja', when='+ninjabuild', type=('build', 'run')) depends_on('ninja', type='run')
# By default, Meson strips the rpath on installation. This patch disables # By default, Meson strips the rpath on installation. This patch disables
# rpath modification completely to make sure that Spack's rpath changes # rpath modification completely to make sure that Spack's rpath changes
# are not reverted. # are not reverted.
patch('rpath.patch', when='@0.49:') patch('rpath-0.49.patch', when='@0.49:0.53')
patch('rpath-0.54.patch', when='@0.54:')

View File

@ -0,0 +1,20 @@
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -15,6 +15,7 @@
import sys, struct
import shutil, subprocess
+import os
from ..mesonlib import OrderedSet
@@ -429,6 +430,9 @@ def fix_jar(fname):
subprocess.check_call(['jar', 'ufm', fname, 'META-INF/MANIFEST.MF'])
def fix_rpath(fname, new_rpath, final_path, install_name_mappings, verbose=True):
+ # Do not strip rpath when run from within Spack
+ if 'SPACK_RPATH_DIRS' in os.environ:
+ return
# Static libraries never have rpaths
if fname.endswith('.a'):
return

View File

@ -0,0 +1,20 @@
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -15,6 +15,7 @@
import sys, struct
import shutil, subprocess
+import os
from ..mesonlib import OrderedSet
@@ -432,6 +433,9 @@ def fix_jar(fname):
def fix_rpath(fname, new_rpath, final_path, install_name_mappings, verbose=True):
global INSTALL_NAME_TOOL
+ # Do not strip rpath when run from within Spack
+ if 'SPACK_RPATH_DIRS' in os.environ:
+ return
# Static libraries, import libraries, debug information, headers, etc
# never have rpaths
# DLLs and EXE currently do not need runtime path fixing

View File

@ -1,11 +0,0 @@
diff -ru meson-0.49.1.orig/mesonbuild/scripts/depfixer.py meson-0.49.1/mesonbuild/scripts/depfixer.py
--- meson-0.49.1.orig/mesonbuild/scripts/depfixer.py 2019-01-23 17:46:50.000000000 +0100
+++ meson-0.49.1/mesonbuild/scripts/depfixer.py 2019-01-29 14:38:45.590583458 +0100
@@ -429,6 +429,7 @@
subprocess.check_call(['jar', 'ufm', fname, 'META-INF/MANIFEST.MF'])
def fix_rpath(fname, new_rpath, final_path, install_name_mappings, verbose=True):
+ return
# Static libraries never have rpaths
if fname.endswith('.a'):
return