From a6d426ee78e776ff412035f45e342cf2d6c2ac0b5ca9f265779c07a48d41c06e Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 15 Jul 2020 12:23:12 +0000 Subject: [PATCH 1/7] Accepting request 821061 from home:gmbr3:testing - Update to version 0.55.0 + rpath removal now more careful + Added ability to specify targets in `meson compile` + Added test protocol for gtest + meson.add_*_script methods accept new types + Native and cross files now support string and list concatenation + Ability to configure CMake subprojects with meson.subproject_options + find_program: Fixes when the program has been overridden by executable + Response files enabled on Linux + `unstable-kconfig` module renamed to `unstable-keyval` + Config tool based dependencies no longer search PATH for cross compiling + String concatenation in meson_options.txt + Clang coverage support + Implicit dependency fallback + Added ability to specify backend arguments in `meson compile` - Removed meson-fix-gnome-test.patch: contained in upstream - Changed meson-suse-ify-macros.patch: to be compatible with new version OBS-URL: https://build.opensuse.org/request/show/821061 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=179 --- meson-0.54.3.tar.gz | 3 --- meson-0.54.3.tar.gz.asc | 16 -------------- meson-0.55.0.tar.gz | 3 +++ meson-0.55.0.tar.gz.asc | 16 ++++++++++++++ meson-fix-gnome-test.patch | 32 ---------------------------- meson-suse-ify-macros.patch | 42 +++++++++++++++++++------------------ meson.changes | 22 +++++++++++++++++++ meson.spec | 5 +---- 8 files changed, 64 insertions(+), 75 deletions(-) delete mode 100644 meson-0.54.3.tar.gz delete mode 100644 meson-0.54.3.tar.gz.asc create mode 100644 meson-0.55.0.tar.gz create mode 100644 meson-0.55.0.tar.gz.asc delete mode 100644 meson-fix-gnome-test.patch diff --git a/meson-0.54.3.tar.gz b/meson-0.54.3.tar.gz deleted file mode 100644 index 5088318..0000000 --- a/meson-0.54.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2bdf4cf0694e696b48261cdd14380fb1d0fe33d24744d8b2df0c12f33ebb662 -size 1690919 diff --git a/meson-0.54.3.tar.gz.asc b/meson-0.54.3.tar.gz.asc deleted file mode 100644 index cb04f30..0000000 --- a/meson-0.54.3.tar.gz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEElRgfTu0U/fTkG1GNO/RpO/7rlCgFAl7nrU8ACgkQO/RpO/7r -lCgctQ//aaBmSPDXNxXuIbJBrfVT+yOqibmzqq1GC5ut2p2zi2JQqG8C+x0yqI/s -GMWubAnfXcmnSDITVH+6zN2fs2J4ejftZzxUF+oruvwztr6QtNmbkXZ43H5tsAJu -Q2eSou4sEmlEIW193uflkohgRUVXcbPS9TRwq33h09sEVIGE2zboYvdN9E9C4AVV -mlOsXmAtdZT3y3QLgnzvOXd+9gRz/QPjFECpkJJeKx/pPFEwWpkbi5b2XTH1CVmo -0QuZzL1YbUB7RhlkZAkpXoYyoaFg3wHTc5CfOgCsoTxfxpjzilhIsdXGzEgbeGfm -Wja5Cp0aoYahPKEVY9FeQtImsxz4aFuX7c+T70yLmDw0TFR6ezCpg5H84GLR34HP -gtpcPNuH6o19JsBar/7bXgbYcREt1fRHSVnsIjE17l/Ogf2keknW+zdiO85H45DC -MdlRi2CNRPcEwfiGV+0tfRC1vqowyg1i6zLyQm0Sill2Xu5tWzutsbxOXBPQnFzn -N8fSQHb510+9JIibBO5APB+1Zmg8SqRv21350aKi+1vNncOQTnkoz4uRx4j5Z7bH -D/L8PwwClM59e32/CWPpr0zGNgdFDeXoQQ/X0GUoZKlQ9uSPYtzQl6kO9CuiOkWA -OtB9tLosyf0BZHlNwf304+3EnDCJY3e1kbZDWyc+ja7ZwIquhiw= -=qN7q ------END PGP SIGNATURE----- diff --git a/meson-0.55.0.tar.gz b/meson-0.55.0.tar.gz new file mode 100644 index 0000000..a8ec0dc --- /dev/null +++ b/meson-0.55.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a1ae2bfe2ae14ac47593537f93290fb79e9b775c55b4c53c282bc3ca3745b35 +size 1742882 diff --git a/meson-0.55.0.tar.gz.asc b/meson-0.55.0.tar.gz.asc new file mode 100644 index 0000000..5eadca0 --- /dev/null +++ b/meson-0.55.0.tar.gz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEElRgfTu0U/fTkG1GNO/RpO/7rlCgFAl8LJuoACgkQO/RpO/7r +lChofw//QDF0raThfyJjZZeMZ9jNKr7xosgS/idAGSBjRmWCOFkKkPhbPqTCzChQ +fgItk44CN9lma4AjftQIlZcdCo2CgZDgH+SFbWRtuxAbN0MX4auiIHlfPL4uNPMn +9dm9nLxkF0B0ZBvo8c7OW5fDNuLTEL+4DMmbY7ypb+pYqc6C/JdcrGF8yTeZ9EYR +Vff07pdJcuipI0SlfnTu5v/SV0p2AX9/edAzmOUVpKY13x/qnz3ds2emDjILAE54 +H50aof9TYhzKSdqyftkz9OUa+JqRyRRnkp7KDOj0rXBogfq4Vi+5CGAXkYXWppku +JTQk8SEZmVP6plzGCJlVeTfITtiuK4tRAAQgn4xfU8HjpceQR9Ypab1U1tcpV8/K +TcuvvHx7pWoSjrTmxoIhdTKtIIajI1s8zyZG8fxS9qwCvnC/SGNdAUcCPkjRpbTj +zmy9XanCNxAZpjpa8KV4t88Lp1U3b301YT0SEkFGD3r5NyTzfr+A+laIUVmHJmwq +4BN99BVJi+cIsc8WAdDOikJVlW82Qq29KLiczsHfGObe2OrUvEraPCF82zRldfsm +oAQ8Bu6EHo4b1DXtXjXmzEAS25qqY7cNLoLmFzH7CWA903Lfbk8VIFzyGkJvu79l +GRLdAZ6pOsIM1/fCqwG93ZuXFqTUtzv3uoBZ3kbjWmTtWHSAtYo= +=ITLc +-----END PGP SIGNATURE----- diff --git a/meson-fix-gnome-test.patch b/meson-fix-gnome-test.patch deleted file mode 100644 index 0ca3dcd..0000000 --- a/meson-fix-gnome-test.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5157ef0f2c8ca4074d91e345b53abe60f014b543 Mon Sep 17 00:00:00 2001 -From: Mike Gorse -Date: Fri, 26 Jun 2020 11:45:30 -0500 -Subject: [PATCH] test: fix enum generation for GNOME - -Fixes: #7252 ---- - test cases/frameworks/7 gnome/mkenums/meson.build | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/test cases/frameworks/7 gnome/mkenums/meson.build b/test cases/frameworks/7 gnome/mkenums/meson.build -index af4a9017e..3d7adf052 100644 ---- a/test cases/frameworks/7 gnome/mkenums/meson.build -+++ b/test cases/frameworks/7 gnome/mkenums/meson.build -@@ -126,6 +126,14 @@ enums5 = gnome.mkenums_simple('enums5', sources : 'meson-sample.h', - install_header : true, - decorator : 'MESON_EXPORT', - header_prefix : '#include "meson-decls.h"') -+ -+conf = configuration_data() -+conf.set('ENUM_FILE', 'enums5.h') -+main = configure_file( -+ input : 'main.c', -+ output : 'main5.c', -+ configuration : conf) -+ - enumexe5 = executable('enumprog5', main, enums5, dependencies : gobj) - - # Generate template then use as input to mkenums --- -2.27.0 - diff --git a/meson-suse-ify-macros.patch b/meson-suse-ify-macros.patch index b94446d..8fe3a57 100644 --- a/meson-suse-ify-macros.patch +++ b/meson-suse-ify-macros.patch @@ -1,19 +1,14 @@ -Index: meson-0.51.0/data/macros.meson +Index: meson-0.55.0/data/macros.meson =================================================================== ---- meson-0.51.0.orig/data/macros.meson -+++ meson-0.51.0/data/macros.meson -@@ -1,6 +1,8 @@ +--- meson-0.55.0.orig/data/macros.meson ++++ meson-0.55.0/data/macros.meson +@@ -1,9 +1,15 @@ %__meson %{_bindir}/meson %__meson_wrap_mode nodownload %__meson_auto_features enabled +%_vpath_srcdir . +%_vpath_builddir build - - %_smp_mesonflags %([ -z "$MESON_BUILD_NCPUS" ] \\\ - && MESON_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\ -@@ -9,7 +11,11 @@ - if [ "$MESON_BUILD_NCPUS" -gt 1 ]; then echo "--num-processes $MESON_BUILD_NCPUS"; fi) - + %meson \ - %set_build_flags \ + export LANG=C.UTF-8 \ @@ -24,19 +19,26 @@ Index: meson-0.51.0/data/macros.meson %{shrink:%{__meson} \ --buildtype=plain \ --prefix=%{_prefix} \ -@@ -31,12 +37,15 @@ - %{nil}} - +@@ -25,6 +31,7 @@ + %{nil}} + %meson_build \ -+ export LANG=C.UTF-8 \ - %ninja_build -C %{_vpath_builddir} - ++ export LANG=C.UTF-8 \ + %{shrink:%{__meson} compile \ + -C %{_vpath_builddir} \ + -j %{_smp_build_ncpus} \ +@@ -32,12 +39,14 @@ + %{nil}} + %meson_install \ + export LANG=C.UTF-8 \ - %ninja_install -C %{_vpath_builddir} - + %{shrink:DESTDIR=%{buildroot} %{__meson} install \ + -C %{_vpath_builddir} \ + --no-rebuild \ + %{nil}} + %meson_test \ + export LANG=C.UTF-8 \ - %{shrink: %{__meson} test \ + %{shrink:%{__meson} test \ -C %{_vpath_builddir} \ - %{?_smp_mesonflags} \ + --num-processes %{_smp_build_ncpus} \ diff --git a/meson.changes b/meson.changes index 561d1c3..0afbb09 100644 --- a/meson.changes +++ b/meson.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Wed Jul 15 09:00:59 UTC 2020 - Callum Farmer + +- Update to version 0.55.0 + + rpath removal now more careful + + Added ability to specify targets in `meson compile` + + Added test protocol for gtest + + meson.add_*_script methods accept new types + + Native and cross files now support string and list concatenation + + Ability to configure CMake subprojects with meson.subproject_options + + find_program: Fixes when the program has been overridden by executable + + Response files enabled on Linux + + `unstable-kconfig` module renamed to `unstable-keyval` + + Config tool based dependencies no longer search PATH for cross compiling + + String concatenation in meson_options.txt + + Clang coverage support + + Implicit dependency fallback + + Added ability to specify backend arguments in `meson compile` +- Removed meson-fix-gnome-test.patch: contained in upstream +- Changed meson-suse-ify-macros.patch: to be compatible with new version + + ------------------------------------------------------------------- Fri Jun 26 16:51:35 UTC 2020 - Michael Gorse diff --git a/meson.spec b/meson.spec index 1d6dd56..316fa2d 100644 --- a/meson.spec +++ b/meson.spec @@ -28,7 +28,7 @@ %{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim} %bcond_with setuptools Name: meson%{name_ext} -Version: 0.54.3 +Version: 0.55.0 Release: 0 Summary: Python-based build system License: Apache-2.0 @@ -49,8 +49,6 @@ Patch3: meson-suse-fix-llvm-3.8.patch Patch4: meson-fix-gcc48.patch # PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal@suse.com -- build and install using distutils instead of full setuptools Patch5: meson-distutils.patch -# PATCH-FIX-UPSTREAM meson-fix-gnome-test.patch bsc#1173025 mgorse@suse.com -- fix GNOME test that sometimes fails. -Patch6: meson-fix-gnome-test.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-base @@ -175,7 +173,6 @@ This package provides support for meson.build files in Vim. %if !%{with setuptools} %patch5 -p1 %endif -%patch6 -p1 # We do not have gmock available at this moment - can't run the test suite for it rm -r "test cases/frameworks/3 gmock" \ From 2887c6fcc2c38caaad01b8a674541b30ea84c2d745c225fb91bbdffc221ee935 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 15 Jul 2020 12:23:51 +0000 Subject: [PATCH 2/7] OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=180 --- meson.changes | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.changes b/meson.changes index 0afbb09..7aa95d1 100644 --- a/meson.changes +++ b/meson.changes @@ -19,7 +19,6 @@ Wed Jul 15 09:00:59 UTC 2020 - Callum Farmer - Removed meson-fix-gnome-test.patch: contained in upstream - Changed meson-suse-ify-macros.patch: to be compatible with new version - ------------------------------------------------------------------- Fri Jun 26 16:51:35 UTC 2020 - Michael Gorse From dc1cebf6fdfbd299284770e2e832b0dfc2b3cf3d2b532054ee05d7c1b591dfd2 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 23 Jul 2020 10:22:26 +0000 Subject: [PATCH 3/7] Accepting request 822336 from home:gmbr3:testing - Add meson-pr7461-remove-setuptools-dependency.patch(gh#mesonbuild/meson#7461) + Fixes forced requirement on setuptools OBS-URL: https://build.opensuse.org/request/show/822336 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=181 --- ...-pr7461-remove-setuptools-dependency.patch | 685 ++++++++++++++++++ meson.changes | 6 + meson.spec | 3 + 3 files changed, 694 insertions(+) create mode 100644 meson-pr7461-remove-setuptools-dependency.patch diff --git a/meson-pr7461-remove-setuptools-dependency.patch b/meson-pr7461-remove-setuptools-dependency.patch new file mode 100644 index 0000000..b4acc8a --- /dev/null +++ b/meson-pr7461-remove-setuptools-dependency.patch @@ -0,0 +1,685 @@ +From 019ed04331695bb6f5c5fff70dfced34c4ba9012 Mon Sep 17 00:00:00 2001 +From: Daniel Mensinger +Date: Thu, 16 Jul 2020 20:29:34 +0200 +Subject: [PATCH 1/3] mdata: Generate mesondata.py from */data folders + +--- + mesonbuild/mesondata.py | 374 ++++++++++++++++++++++++++++++++++++++++ + tools/gen_data.py | 139 +++++++++++++++ + 2 files changed, 513 insertions(+) + create mode 100644 mesonbuild/mesondata.py + create mode 100755 tools/gen_data.py + +diff --git a/mesonbuild/mesondata.py b/mesonbuild/mesondata.py +new file mode 100644 +index 0000000000..1f223c251b +--- /dev/null ++++ b/mesonbuild/mesondata.py +@@ -0,0 +1,374 @@ ++# Copyright 2020 The Meson development team ++ ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++ ++# http://www.apache.org/licenses/LICENSE-2.0 ++ ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++ ++ ++#### ++#### WARNING: This is an automatically generated file! Do not edit! ++#### Generated by tools/gen_data.py ++#### ++ ++ ++from pathlib import Path ++import typing as T ++ ++if T.TYPE_CHECKING: ++ from .environment import Environment ++ ++###################### ++# BEGIN Data section # ++###################### ++ ++file_0_data_CMakeListsLLVM_txt = '''\ ++cmake_minimum_required(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} ) ++ ++set(PACKAGE_FOUND FALSE) ++ ++while(TRUE) ++ find_package(LLVM REQUIRED CONFIG QUIET) ++ ++ # ARCHS has to be set via the CMD interface ++ if(LLVM_FOUND OR "${ARCHS}" STREQUAL "") ++ break() ++ endif() ++ ++ list(GET ARCHS 0 CMAKE_LIBRARY_ARCHITECTURE) ++ list(REMOVE_AT ARCHS 0) ++endwhile() ++ ++if(LLVM_FOUND) ++ set(PACKAGE_FOUND TRUE) ++ ++ foreach(mod IN LISTS LLVM_MESON_MODULES) ++ # Reset variables ++ set(out_mods) ++ set(real_mods) ++ ++ # Generate a lower and upper case version ++ string(TOLOWER "${mod}" mod_L) ++ string(TOUPPER "${mod}" mod_U) ++ ++ # Get the mapped components ++ llvm_map_components_to_libnames(out_mods ${mod} ${mod_L} ${mod_U}) ++ list(SORT out_mods) ++ list(REMOVE_DUPLICATES out_mods) ++ ++ # Make sure that the modules exist ++ foreach(i IN LISTS out_mods) ++ if(TARGET ${i}) ++ list(APPEND real_mods ${i}) ++ endif() ++ endforeach() ++ ++ # Set the output variables ++ set(MESON_LLVM_TARGETS_${mod} ${real_mods}) ++ foreach(i IN LISTS real_mods) ++ set(MESON_TARGET_TO_LLVM_${i} ${mod}) ++ endforeach() ++ endforeach() ++ ++ # Check the following variables: ++ # LLVM_PACKAGE_VERSION ++ # LLVM_VERSION ++ # LLVM_VERSION_STRING ++ if(NOT DEFINED PACKAGE_VERSION) ++ if(DEFINED LLVM_PACKAGE_VERSION) ++ set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") ++ elseif(DEFINED LLVM_VERSION) ++ set(PACKAGE_VERSION "${LLVM_VERSION}") ++ elseif(DEFINED LLVM_VERSION_STRING) ++ set(PACKAGE_VERSION "${LLVM_VERSION_STRING}") ++ endif() ++ endif() ++ ++ # Check the following variables: ++ # LLVM_LIBRARIES ++ # LLVM_LIBS ++ set(libs) ++ if(DEFINED LLVM_LIBRARIES) ++ set(libs LLVM_LIBRARIES) ++ elseif(DEFINED LLVM_LIBS) ++ set(libs LLVM_LIBS) ++ endif() ++ ++ # Check the following variables: ++ # LLVM_INCLUDE_DIRS ++ # LLVM_INCLUDES ++ # LLVM_INCLUDE_DIR ++ set(includes) ++ if(DEFINED LLVM_INCLUDE_DIRS) ++ set(includes LLVM_INCLUDE_DIRS) ++ elseif(DEFINED LLVM_INCLUDES) ++ set(includes LLVM_INCLUDES) ++ elseif(DEFINED LLVM_INCLUDE_DIR) ++ set(includes LLVM_INCLUDE_DIR) ++ endif() ++ ++ # Check the following variables: ++ # LLVM_DEFINITIONS ++ set(definitions) ++ if(DEFINED LLVM_DEFINITIONS) ++ set(definitions LLVM_DEFINITIONS) ++ endif() ++ ++ set(PACKAGE_INCLUDE_DIRS "${${includes}}") ++ set(PACKAGE_DEFINITIONS "${${definitions}}") ++ set(PACKAGE_LIBRARIES "${${libs}}") ++endif() ++''' ++ ++file_1_data_CMakePathInfo_txt = '''\ ++cmake_minimum_required(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}) ++ ++set(TMP_PATHS_LIST) ++list(APPEND TMP_PATHS_LIST ${CMAKE_PREFIX_PATH}) ++list(APPEND TMP_PATHS_LIST ${CMAKE_FRAMEWORK_PATH}) ++list(APPEND TMP_PATHS_LIST ${CMAKE_APPBUNDLE_PATH}) ++list(APPEND TMP_PATHS_LIST $ENV{CMAKE_PREFIX_PATH}) ++list(APPEND TMP_PATHS_LIST $ENV{CMAKE_FRAMEWORK_PATH}) ++list(APPEND TMP_PATHS_LIST $ENV{CMAKE_APPBUNDLE_PATH}) ++list(APPEND TMP_PATHS_LIST ${CMAKE_SYSTEM_PREFIX_PATH}) ++list(APPEND TMP_PATHS_LIST ${CMAKE_SYSTEM_FRAMEWORK_PATH}) ++list(APPEND TMP_PATHS_LIST ${CMAKE_SYSTEM_APPBUNDLE_PATH}) ++ ++set(LIB_ARCH_LIST) ++if(CMAKE_LIBRARY_ARCHITECTURE_REGEX) ++ file(GLOB implicit_dirs RELATIVE /lib /lib/*-linux-gnu* ) ++ foreach(dir ${implicit_dirs}) ++ if("${dir}" MATCHES "${CMAKE_LIBRARY_ARCHITECTURE_REGEX}") ++ list(APPEND LIB_ARCH_LIST "${dir}") ++ endif() ++ endforeach() ++endif() ++ ++# "Export" these variables: ++set(MESON_ARCH_LIST ${LIB_ARCH_LIST}) ++set(MESON_PATHS_LIST ${TMP_PATHS_LIST}) ++set(MESON_CMAKE_ROOT ${CMAKE_ROOT}) ++set(MESON_CMAKE_SYSROOT ${CMAKE_SYSROOT}) ++set(MESON_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}) ++ ++message(STATUS ${TMP_PATHS_LIST}) ++''' ++ ++file_2_data_CMakeLists_txt = '''\ ++# fail noisily if attempt to use this file without setting: ++# cmake_minimum_required(VERSION ${CMAKE_VERSION}) ++# project(... LANGUAGES ...) ++ ++cmake_policy(SET CMP0000 NEW) ++ ++set(PACKAGE_FOUND FALSE) ++set(_packageName "${NAME}") ++string(TOUPPER "${_packageName}" PACKAGE_NAME) ++ ++while(TRUE) ++ find_package("${NAME}" QUIET COMPONENTS ${COMPS}) ++ ++ # ARCHS has to be set via the CMD interface ++ if(${_packageName}_FOUND OR ${PACKAGE_NAME}_FOUND OR "${ARCHS}" STREQUAL "") ++ break() ++ endif() ++ ++ list(GET ARCHS 0 CMAKE_LIBRARY_ARCHITECTURE) ++ list(REMOVE_AT ARCHS 0) ++endwhile() ++ ++if(${_packageName}_FOUND OR ${PACKAGE_NAME}_FOUND) ++ set(PACKAGE_FOUND TRUE) ++ ++ # Check the following variables: ++ # FOO_VERSION ++ # Foo_VERSION ++ # FOO_VERSION_STRING ++ # Foo_VERSION_STRING ++ if(NOT DEFINED PACKAGE_VERSION) ++ if(DEFINED ${_packageName}_VERSION) ++ set(PACKAGE_VERSION "${${_packageName}_VERSION}") ++ elseif(DEFINED ${PACKAGE_NAME}_VERSION) ++ set(PACKAGE_VERSION "${${PACKAGE_NAME}_VERSION}") ++ elseif(DEFINED ${_packageName}_VERSION_STRING) ++ set(PACKAGE_VERSION "${${_packageName}_VERSION_STRING}") ++ elseif(DEFINED ${PACKAGE_NAME}_VERSION_STRING) ++ set(PACKAGE_VERSION "${${PACKAGE_NAME}_VERSION_STRING}") ++ endif() ++ endif() ++ ++ # Check the following variables: ++ # FOO_LIBRARIES ++ # Foo_LIBRARIES ++ # FOO_LIBS ++ # Foo_LIBS ++ set(libs) ++ if(DEFINED ${_packageName}_LIBRARIES) ++ set(libs ${_packageName}_LIBRARIES) ++ elseif(DEFINED ${PACKAGE_NAME}_LIBRARIES) ++ set(libs ${PACKAGE_NAME}_LIBRARIES) ++ elseif(DEFINED ${_packageName}_LIBS) ++ set(libs ${_packageName}_LIBS) ++ elseif(DEFINED ${PACKAGE_NAME}_LIBS) ++ set(libs ${PACKAGE_NAME}_LIBS) ++ endif() ++ ++ # Check the following variables: ++ # FOO_INCLUDE_DIRS ++ # Foo_INCLUDE_DIRS ++ # FOO_INCLUDES ++ # Foo_INCLUDES ++ # FOO_INCLUDE_DIR ++ # Foo_INCLUDE_DIR ++ set(includes) ++ if(DEFINED ${_packageName}_INCLUDE_DIRS) ++ set(includes ${_packageName}_INCLUDE_DIRS) ++ elseif(DEFINED ${PACKAGE_NAME}_INCLUDE_DIRS) ++ set(includes ${PACKAGE_NAME}_INCLUDE_DIRS) ++ elseif(DEFINED ${_packageName}_INCLUDES) ++ set(includes ${_packageName}_INCLUDES) ++ elseif(DEFINED ${PACKAGE_NAME}_INCLUDES) ++ set(includes ${PACKAGE_NAME}_INCLUDES) ++ elseif(DEFINED ${_packageName}_INCLUDE_DIR) ++ set(includes ${_packageName}_INCLUDE_DIR) ++ elseif(DEFINED ${PACKAGE_NAME}_INCLUDE_DIR) ++ set(includes ${PACKAGE_NAME}_INCLUDE_DIR) ++ endif() ++ ++ # Check the following variables: ++ # FOO_DEFINITIONS ++ # Foo_DEFINITIONS ++ set(definitions) ++ if(DEFINED ${_packageName}_DEFINITIONS) ++ set(definitions ${_packageName}_DEFINITIONS) ++ elseif(DEFINED ${PACKAGE_NAME}_DEFINITIONS) ++ set(definitions ${PACKAGE_NAME}_DEFINITIONS) ++ endif() ++ ++ set(PACKAGE_INCLUDE_DIRS "${${includes}}") ++ set(PACKAGE_DEFINITIONS "${${definitions}}") ++ set(PACKAGE_LIBRARIES "${${libs}}") ++endif() ++''' ++ ++file_3_data_preload_cmake = '''\ ++if(MESON_PS_LOADED) ++ return() ++endif() ++ ++set(MESON_PS_LOADED ON) ++ ++# Dummy macros that have a special meaning in the meson code ++macro(meson_ps_execute_delayed_calls) ++endmacro() ++ ++macro(meson_ps_reload_vars) ++endmacro() ++ ++# Helper macro to inspect the current CMake state ++macro(meson_ps_inspect_vars) ++ set(MESON_PS_CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") ++ set(MESON_PS_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") ++ meson_ps_execute_delayed_calls() ++endmacro() ++ ++ ++# Override some system functions with custom code and forward the args ++# to the original function ++macro(add_custom_command) ++ meson_ps_inspect_vars() ++ _add_custom_command(${ARGV}) ++endmacro() ++ ++macro(add_custom_target) ++ meson_ps_inspect_vars() ++ _add_custom_target(${ARGV}) ++endmacro() ++ ++macro(set_property) ++ meson_ps_inspect_vars() ++ _set_property(${ARGV}) ++endmacro() ++ ++function(set_source_files_properties) ++ set(FILES) ++ set(I 0) ++ set(PROPERTIES OFF) ++ ++ while(I LESS ARGC) ++ if(NOT PROPERTIES) ++ if("${ARGV${I}}" STREQUAL "PROPERTIES") ++ set(PROPERTIES ON) ++ else() ++ list(APPEND FILES "${ARGV${I}}") ++ endif() ++ ++ math(EXPR I "${I} + 1") ++ else() ++ set(ID_IDX ${I}) ++ math(EXPR PROP_IDX "${ID_IDX} + 1") ++ ++ set(ID "${ARGV${ID_IDX}}") ++ set(PROP "${ARGV${PROP_IDX}}") ++ ++ set_property(SOURCE ${FILES} PROPERTY "${ID}" "${PROP}") ++ math(EXPR I "${I} + 2") ++ endif() ++ endwhile() ++endfunction() ++ ++set(MESON_PS_DELAYED_CALLS add_custom_command;add_custom_target;set_property) ++meson_ps_reload_vars() ++''' ++ ++ ++#################### ++# END Data section # ++#################### ++ ++class DataFile: ++ def __init__(self, path: Path, sha256sum: str, data: str) -> None: ++ self.path = path ++ self.sha256sum = sha256sum ++ self.data = data ++ ++ def write_once(self, path: Path) -> None: ++ if not path.exists(): ++ path.write_text(self.data) ++ ++ def write_to_private(self, env: 'Environment') -> Path: ++ out_file = Path(env.scratch_dir) / 'data' / self.path.name ++ out_file.parent.mkdir(exist_ok=True) ++ self.write_once(out_file) ++ return out_file ++ ++ ++mesondata = { ++ 'dependencies/data/CMakeListsLLVM.txt': DataFile( ++ Path('dependencies/data/CMakeListsLLVM.txt'), ++ '412cec3315597041a978d018cdaca282dcd47693793540da88ae2f80d0cbd7cd', ++ file_0_data_CMakeListsLLVM_txt, ++ ), ++ 'dependencies/data/CMakePathInfo.txt': DataFile( ++ Path('dependencies/data/CMakePathInfo.txt'), ++ '90da8b443982d9c87139b7dc84228eb58cab4315764949637208f25e2bda7db2', ++ file_1_data_CMakePathInfo_txt, ++ ), ++ 'dependencies/data/CMakeLists.txt': DataFile( ++ Path('dependencies/data/CMakeLists.txt'), ++ '71a2d58381f912bbfb1c8709884d34d721f682edf2fca001e1f582f0bffd0da7', ++ file_2_data_CMakeLists_txt, ++ ), ++ 'cmake/data/preload.cmake': DataFile( ++ Path('cmake/data/preload.cmake'), ++ '064d047b18a5c919ad016b838bed50c5d40aebe9e53da0e70eff9d52a2c1ca1f', ++ file_3_data_preload_cmake, ++ ), ++} +diff --git a/tools/gen_data.py b/tools/gen_data.py +new file mode 100755 +index 0000000000..2cc05a44e7 +--- /dev/null ++++ b/tools/gen_data.py +@@ -0,0 +1,139 @@ ++#!/usr/bin/env python3 ++ ++# Copyright 2020 Daniel Mensinger ++ ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++ ++# http://www.apache.org/licenses/LICENSE-2.0 ++ ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++ ++import sys ++import hashlib ++import textwrap ++import re ++from pathlib import Path ++from datetime import datetime ++import typing as T ++ ++class DataFile: ++ file_counter = 0 ++ ++ def __init__(self, path: Path, root: Path): ++ self.path = path ++ self.id = self.path.relative_to(root) ++ self.data_str = f'file_{DataFile.file_counter}_data_' + re.sub('[^a-zA-Z0-9]', '_', self.path.name) ++ DataFile.file_counter += 1 ++ ++ b = self.path.read_bytes() ++ self.data = b.decode() ++ self.sha256sum = hashlib.sha256(b).hexdigest() ++ ++ def __repr__(self) -> str: ++ return f'<{type(self).__name__}: [{self.sha256sum}] {self.id}>' ++ ++def main() -> int: ++ root_dir = Path(__file__).resolve().parents[1] ++ mesonbuild_dir = root_dir / 'mesonbuild' ++ out_file = mesonbuild_dir / 'mesondata.py' ++ ++ data_dirs = mesonbuild_dir.glob('**/data') ++ ++ data_files: T.List[DataFile] = [] ++ ++ for d in data_dirs: ++ for p in d.iterdir(): ++ data_files += [DataFile(p, mesonbuild_dir)] ++ ++ print(f'Found {len(data_files)} data files') ++ ++ # Generate the data script ++ data = '' ++ ++ data += textwrap.dedent(f'''\ ++ # Copyright {datetime.today().year} The Meson development team ++ ++ # Licensed under the Apache License, Version 2.0 (the "License"); ++ # you may not use this file except in compliance with the License. ++ # You may obtain a copy of the License at ++ ++ # http://www.apache.org/licenses/LICENSE-2.0 ++ ++ # Unless required by applicable law or agreed to in writing, software ++ # distributed under the License is distributed on an "AS IS" BASIS, ++ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ # See the License for the specific language governing permissions and ++ # limitations under the License. ++ ++ ++ #### ++ #### WARNING: This is an automatically generated file! Do not edit! ++ #### Generated by {Path(__file__).resolve().relative_to(root_dir)} ++ #### ++ ++ ++ from pathlib import Path ++ import typing as T ++ ++ if T.TYPE_CHECKING: ++ from .environment import Environment ++ ++ ###################### ++ # BEGIN Data section # ++ ###################### ++ ++ ''') ++ ++ for i in data_files: ++ data += f"{i.data_str} = '''\\\n{i.data}'''\n\n" ++ ++ data += textwrap.dedent(f''' ++ #################### ++ # END Data section # ++ #################### ++ ++ class DataFile: ++ def __init__(self, path: Path, sha256sum: str, data: str) -> None: ++ self.path = path ++ self.sha256sum = sha256sum ++ self.data = data ++ ++ def write_once(self, path: Path) -> None: ++ if not path.exists(): ++ path.write_text(self.data) ++ ++ def write_to_private(self, env: 'Environment') -> Path: ++ out_file = Path(env.scratch_dir) / 'data' / self.path.name ++ out_file.parent.mkdir(exist_ok=True) ++ self.write_once(out_file) ++ return out_file ++ ++ ++ mesondata = {{ ++ ''') ++ ++ for i in data_files: ++ data += textwrap.indent(textwrap.dedent(f"""\ ++ '{i.id}': DataFile( ++ Path('{i.id}'), ++ '{i.sha256sum}', ++ {i.data_str}, ++ ), ++ """), ' ') ++ ++ data += textwrap.dedent('''\ ++ } ++ ''') ++ ++ print(f'Updating {out_file}') ++ out_file.write_text(data) ++ return 0 ++ ++if __name__ == '__main__': ++ sys.exit(main()) + +From 05ddd6543d4c4fc33b4c64f26291e73f49733f71 Mon Sep 17 00:00:00 2001 +From: Daniel Mensinger +Date: Thu, 16 Jul 2020 20:33:57 +0200 +Subject: [PATCH 2/3] mdata: remove setuptools and use mesondata instead + +--- + mesonbuild/cmake/interpreter.py | 5 ++--- + mesonbuild/dependencies/base.py | 6 ++---- + setup.py | 5 ----- + 4 files changed, 4 insertions(+), 12 deletions(-) + +diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py +index 05169478e8..f404109cf6 100644 +--- a/mesonbuild/cmake/interpreter.py ++++ b/mesonbuild/cmake/interpreter.py +@@ -15,8 +15,6 @@ + # This class contains the basic functionality needed to run any interpreter + # or an interpreter-based tool. + +-import pkg_resources +- + from .common import CMakeException, CMakeTarget, TargetOptions + from .client import CMakeClient, RequestCMakeInputs, RequestConfigure, RequestCompute, RequestCodeModel + from .fileapi import CMakeFileAPI +@@ -25,6 +23,7 @@ + from .. import mlog, mesonlib + from ..environment import Environment + from ..mesonlib import MachineChoice, OrderedSet, version_compare ++from ..mesondata import mesondata + from ..compilers.compilers import lang_suffixes, header_suffixes, obj_suffixes, lib_suffixes, is_header + from enum import Enum + from functools import lru_cache +@@ -814,7 +813,7 @@ def configure(self, extra_cmake_options: T.List[str]) -> None: + raise CMakeException('Unable to find CMake') + self.trace = CMakeTraceParser(cmake_exe.version(), self.build_dir, permissive=True) + +- preload_file = pkg_resources.resource_filename('mesonbuild', 'cmake/data/preload.cmake') ++ preload_file = mesondata['cmake/data/preload.cmake'].write_to_private(self.env) + + # Prefere CMAKE_PROJECT_INCLUDE over CMAKE_TOOLCHAIN_FILE if possible, + # since CMAKE_PROJECT_INCLUDE was actually designed for code injection. +diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py +index 23701da957..4c9c9fe18a 100644 +--- a/mesonbuild/dependencies/base.py ++++ b/mesonbuild/dependencies/base.py +@@ -29,8 +29,6 @@ + from enum import Enum + from pathlib import Path, PurePath + +-import pkg_resources +- + from .. import mlog + from .. import mesonlib + from ..compilers import clib_langs +@@ -40,6 +38,7 @@ + from ..mesonlib import MachineChoice, MesonException, OrderedSet, PerMachine + from ..mesonlib import Popen_safe, version_compare_many, version_compare, listify, stringlistify, extract_as_list, split_args + from ..mesonlib import Version, LibType ++from ..mesondata import mesondata + + if T.TYPE_CHECKING: + from ..compilers.compilers import CompilerType # noqa: F401 +@@ -1512,8 +1511,7 @@ def _setup_cmake_dir(self, cmake_file: str) -> str: + build_dir = self._get_build_dir() + + # Insert language parameters into the CMakeLists.txt and write new CMakeLists.txt +- # Per the warning in pkg_resources, this is *not* a path and os.path and Pathlib are *not* safe to use here. +- cmake_txt = pkg_resources.resource_string('mesonbuild', 'dependencies/data/' + cmake_file).decode() ++ cmake_txt = mesondata['dependencies/data/' + cmake_file].data + + # In general, some Fortran CMake find_package() also require C language enabled, + # even if nothing from C is directly used. An easy Fortran example that fails +diff --git a/setup.py b/setup.py +index 1f95be70c8..145f19c522 100644 +--- a/setup.py ++++ b/setup.py +@@ -37,10 +37,6 @@ + 'mesonbuild.scripts', + 'mesonbuild.templates', + 'mesonbuild.wrap'] +-package_data = { +- 'mesonbuild.dependencies': ['data/CMakeLists.txt', 'data/CMakeListsLLVM.txt', 'data/CMakePathInfo.txt'], +- 'mesonbuild.cmake': ['data/run_ctgt.py', 'data/preload.cmake'], +-} + data_files = [] + if sys.platform != 'win32': + # Only useful on UNIX-like systems +@@ -51,6 +47,5 @@ + setup(name='meson', + version=version, + packages=packages, +- package_data=package_data, + entry_points=entries, + data_files=data_files,) + +From 393d6e133d9abd584a2fc414971628e84ea48b7c Mon Sep 17 00:00:00 2001 +From: Daniel Mensinger +Date: Thu, 16 Jul 2020 20:34:15 +0200 +Subject: [PATCH 3/3] mdata: Add test to ensure mesondata.py is up-to-date + +--- + run_unittests.py | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/run_unittests.py b/run_unittests.py +index 820b705b54..2c03a3e75c 100755 +--- a/run_unittests.py ++++ b/run_unittests.py +@@ -1485,6 +1485,38 @@ def test_all_functions_defined_in_ast_interpreter(self): + astint = AstInterpreter('.', '', '') + self.assertEqual(set(interp.funcs.keys()), set(astint.funcs.keys())) + ++ def test_mesondata_is_up_to_date(self): ++ from mesonbuild.mesondata import mesondata ++ err_msg = textwrap.dedent(''' ++ ++ ########################################################### ++ ### mesonbuild.mesondata is not up-to-date ### ++ ### Please regenerate it by running tools/gen_data.py ### ++ ########################################################### ++ ++ ''') ++ ++ root_dir = Path(__file__).resolve().parent ++ mesonbuild_dir = root_dir / 'mesonbuild' ++ ++ data_dirs = mesonbuild_dir.glob('**/data') ++ data_files = [] # type: T.List[T.Tuple(str, str)] ++ ++ for i in data_dirs: ++ for p in i.iterdir(): ++ data_files += [(p.relative_to(mesonbuild_dir).as_posix(), hashlib.sha256(p.read_bytes()).hexdigest())] ++ ++ from pprint import pprint ++ current_files = set(mesondata.keys()) ++ scanned_files = set([x[0] for x in data_files]) ++ ++ self.assertSetEqual(current_files, scanned_files, err_msg + 'Data files were added or removed\n') ++ errors = [] ++ for i in data_files: ++ if mesondata[i[0]].sha256sum != i[1]: ++ errors += [i[0]] ++ ++ self.assertListEqual(errors, [], err_msg + 'Files were changed') + + class BasePlatformTests(unittest.TestCase): + prefix = '/usr' diff --git a/meson.changes b/meson.changes index 7aa95d1..efb4bb3 100644 --- a/meson.changes +++ b/meson.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 22 17:51:19 UTC 2020 - Callum Farmer + +- Add meson-pr7461-remove-setuptools-dependency.patch(gh#mesonbuild/meson#7461) + + Fixes forced requirement on setuptools + ------------------------------------------------------------------- Wed Jul 15 09:00:59 UTC 2020 - Callum Farmer diff --git a/meson.spec b/meson.spec index 316fa2d..ba6f98d 100644 --- a/meson.spec +++ b/meson.spec @@ -49,6 +49,8 @@ Patch3: meson-suse-fix-llvm-3.8.patch Patch4: meson-fix-gcc48.patch # PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal@suse.com -- build and install using distutils instead of full setuptools Patch5: meson-distutils.patch +# PATCH-FIX-UPSTREAM meson-pr7461-remove-setuptools-dependency.patch github.com/mesonbuild/meson/pull/7461 +Patch6: meson-pr7461-remove-setuptools-dependency.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-base @@ -173,6 +175,7 @@ This package provides support for meson.build files in Vim. %if !%{with setuptools} %patch5 -p1 %endif +%patch6 -p1 # We do not have gmock available at this moment - can't run the test suite for it rm -r "test cases/frameworks/3 gmock" \ From 6c7671f8283ec2dcfd32c8ebb84d6563dc87c01f44f27a9832318afd65cfa973 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sun, 26 Jul 2020 16:11:36 +0000 Subject: [PATCH 4/7] OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=182 --- meson-suse-ify-macros.patch | 26 ++++++++++++++------------ meson.changes | 5 +++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/meson-suse-ify-macros.patch b/meson-suse-ify-macros.patch index 8fe3a57..1464623 100644 --- a/meson-suse-ify-macros.patch +++ b/meson-suse-ify-macros.patch @@ -1,14 +1,12 @@ -Index: meson-0.55.0/data/macros.meson -=================================================================== ---- meson-0.55.0.orig/data/macros.meson -+++ meson-0.55.0/data/macros.meson +--- a/data/macros.meson ++++ b/data/macros.meson @@ -1,9 +1,15 @@ %__meson %{_bindir}/meson %__meson_wrap_mode nodownload %__meson_auto_features enabled +%_vpath_srcdir . +%_vpath_builddir build - + %meson \ - %set_build_flags \ + export LANG=C.UTF-8 \ @@ -19,26 +17,30 @@ Index: meson-0.55.0/data/macros.meson %{shrink:%{__meson} \ --buildtype=plain \ --prefix=%{_prefix} \ -@@ -25,6 +31,7 @@ +@@ -25,21 +31,24 @@ %{nil}} - + %meson_build \ + export LANG=C.UTF-8 \ %{shrink:%{__meson} compile \ -C %{_vpath_builddir} \ - -j %{_smp_build_ncpus} \ -@@ -32,12 +39,14 @@ +- -j %{_smp_build_ncpus} \ ++ %{?_smp_mflags} \ + --verbose \ %{nil}} - + %meson_install \ + export LANG=C.UTF-8 \ %{shrink:DESTDIR=%{buildroot} %{__meson} install \ -C %{_vpath_builddir} \ --no-rebuild \ %{nil}} - + %meson_test \ + export LANG=C.UTF-8 \ %{shrink:%{__meson} test \ -C %{_vpath_builddir} \ - --num-processes %{_smp_build_ncpus} \ +- --num-processes %{_smp_build_ncpus} \ ++ %{?jobs:--num-processes %{jobs}} \ + --print-errorlogs \ + %{nil}} diff --git a/meson.changes b/meson.changes index efb4bb3..aee570b 100644 --- a/meson.changes +++ b/meson.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jul 26 15:59:52 UTC 2020 - Alexei Sorokin + +- Remove %_smp_build_ncpus in meson-suse-ify-macros.patch. + ------------------------------------------------------------------- Wed Jul 22 17:51:19 UTC 2020 - Callum Farmer From 54f3dbbc23d04ff3067dbb0898545aff14cc1b942df8e373666a926956b952d8 Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Sun, 26 Jul 2020 16:14:49 +0000 Subject: [PATCH 5/7] OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=183 --- meson-fix-gcc48.patch | 101 --------- meson-restore-python3.4.patch | 392 ---------------------------------- meson-suse-fix-llvm-3.8.patch | 40 ---- meson.changes | 2 + meson.spec | 19 +- 5 files changed, 6 insertions(+), 548 deletions(-) delete mode 100644 meson-fix-gcc48.patch delete mode 100644 meson-restore-python3.4.patch delete mode 100644 meson-suse-fix-llvm-3.8.patch diff --git a/meson-fix-gcc48.patch b/meson-fix-gcc48.patch deleted file mode 100644 index 8e7b881..0000000 --- a/meson-fix-gcc48.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- a/mesonbuild/compilers/cpp.py -+++ b/mesonbuild/compilers/cpp.py -@@ -140,8 +140,8 @@ class ClangCPPCompiler(ClangCompiler, CP - def get_options(self): - opts = CPPCompiler.get_options(self) - opts.update({'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use', -- ['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z', 'c++2a', -- 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z', 'gnu++2a'], -+ ['none', 'c++98', 'c++03', 'c++11', 'c++1y', 'c++14', 'c++17', 'c++1z', 'c++2a', -+ 'gnu++11', 'gnu++1y', 'gnu++14', 'gnu++17', 'gnu++1z', 'gnu++2a'], - 'none')}) - return opts - -@@ -171,8 +171,8 @@ class ArmclangCPPCompiler(ArmclangCompil - def get_options(self): - opts = CPPCompiler.get_options(self) - opts.update({'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use', -- ['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', -- 'gnu++98', 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17'], -+ ['none', 'c++98', 'c++03', 'c++11', 'c++1y', 'c++14', 'c++17', -+ 'gnu++98', 'gnu++03', 'gnu++11', 'gnu++1y', 'gnu++14', 'gnu++17'], - 'none')}) - return opts - -@@ -197,10 +197,12 @@ class GnuCPPCompiler(GnuCompiler, CPPCom - '3': default_warn_args + ['-Wextra', '-Wpedantic']} - - def get_options(self): -+ cpp_stds = ['c++98', 'c++03', 'c++11', 'c++1y', 'gnu++11', 'gnu++1y'] -+ if version_compare(self.version, '>=5.0.0'): -+ cpp_stds += ['c++14', 'c++17', 'c++1z', 'c++2a', 'gnu++14', 'gnu++17', 'gnu++1z', 'gnu++2a'] - opts = CPPCompiler.get_options(self) - opts.update({'cpp_std': coredata.UserComboOption('cpp_std', 'C++ language standard to use', -- ['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z', 'c++2a', -- 'gnu++03', 'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z', 'gnu++2a'], -+ ['none'] + cpp_stds, - 'none'), - 'cpp_debugstl': coredata.UserBooleanOption('cpp_debugstl', - 'STL debug mode', -@@ -276,7 +278,7 @@ class IntelCPPCompiler(IntelCompiler, CP - c_stds = ['c++98', 'c++03'] - g_stds = ['gnu++98', 'gnu++03'] - if version_compare(self.version, '>=15.0.0'): -- c_stds += ['c++11', 'c++14'] -+ c_stds += ['c++11', 'c++1y', 'c++14'] - g_stds += ['gnu++11'] - if version_compare(self.version, '>=16.0.0'): - c_stds += ['c++17'] ---- a/mesonbuild/minit.py -+++ b/mesonbuild/minit.py -@@ -143,7 +143,7 @@ int main(int argc, char **argv) {{ - hello_cpp_meson_template = '''project('{project_name}', 'cpp', - version : '{version}', - default_options : ['warning_level=3', -- 'cpp_std=c++14']) -+ 'cpp_std=c++1y']) - - exe = executable('{exe_name}', '{source_name}', - install : true) -@@ -214,7 +214,7 @@ int main(int argc, char **argv) {{ - - lib_cpp_meson_template = '''project('{project_name}', 'cpp', - version : '{version}', -- default_options : ['warning_level=3', 'cpp_std=c++14']) -+ default_options : ['warning_level=3', 'cpp_std=c++1y']) - - # These arguments are only used to build the shared library - # not the executables that use the library. -@@ -404,7 +404,7 @@ def create_meson_build(options): - default_options = ['warning_level=3'] - if options.language == 'cpp': - # This shows how to set this very common option. -- default_options += ['cpp_std=c++14'] -+ default_options += ['cpp_std=c++1y'] - # If we get a meson.build autoformatter one day, this code could - # be simplified quite a bit. - formatted_default_options = ', '.join("'{}'".format(x) for x in default_options) ---- "a/test cases/common/152 simd/simdchecker.c" -+++ "b/test cases/common/152 simd/simdchecker.c" -@@ -10,11 +10,12 @@ int check_simd_implementation(float *fou - const float *expected, - simd_func fptr, - const int blocksize) { -+ int i; - int rv = 0; - memcpy(four, four_initial, blocksize*sizeof(float)); - printf("Using %s.\n", simd_type); - fptr(four); -- for(int i=0; i= (3, 5): -+ return os.path.commonpath(paths) -+ -+ import pathlib -+ if not paths: -+ raise ValueError('commonpath() arg is an empty sequence') -+ common = pathlib.PurePath(paths[0]) -+ for path in paths[1:]: -+ new = [] -+ path = pathlib.PurePath(path) -+ for c, p in zip(common.parts, path.parts): -+ if c != p: -+ break -+ new.append(c) -+ if not new: -+ raise ValueError("Can't mix absolute and relative paths") from None -+ new = os.path.join(*new) -+ common = pathlib.PurePath(new) -+ return str(common) -+ - class OrderedSet(collections.abc.MutableSet): - """A set that preserves the order in which items are added, by first - insertion. ---- a/mesonbuild/mesonmain.py -+++ b/mesonbuild/mesonmain.py -@@ -149,8 +149,8 @@ def run_script_command(script_name, scri - return 1 - - def run(original_args, mainfile): -- if sys.version_info < (3, 5): -- print('Meson works correctly only with python 3.5+.') -+ if sys.version_info < (3, 4): -+ print('Meson works correctly only with python 3.4+.') - print('You have python %s.' % sys.version) - print('Please update your environment') - return 1 ---- a/mesonbuild/minstall.py -+++ b/mesonbuild/minstall.py -@@ -348,8 +348,8 @@ class Installer: - if shutil.which('pkexec') is not None and 'PKEXEC_UID' not in os.environ: - print('Installation failed due to insufficient permissions.') - print('Attempting to use polkit to gain elevated privileges...') -- os.execlp('pkexec', 'pkexec', sys.executable, main_file, *sys.argv[1:], -- '-C', os.getcwd()) -+ os.execvp('pkexec', ['pkexec', sys.executable, main_file] + sys.argv[1:] + -+ ['-C', os.getcwd()]) - else: - raise - ---- a/mesonbuild/modules/python.py -+++ b/mesonbuild/modules/python.py -@@ -516,7 +516,7 @@ class PythonModule(ExtensionModule): - # Sanity check, we expect to have something that at least quacks in tune - try: - info = json.loads(run_command(python, INTROSPECT_COMMAND)) -- except json.JSONDecodeError: -+ except ValueError: - info = None - - if isinstance(info, dict) and 'version' in info and self._check_version(name_or_path, info['version']): ---- a/mesonbuild/mtest.py -+++ b/mesonbuild/mtest.py -@@ -114,7 +114,12 @@ def returncode_to_status(retcode): - if retcode < 0: - signum = -retcode - try: -- signame = signal.Signals(signum).name -+ if sys.version_info >= (3, 5): -+ signame = signal.Signals(signum).name -+ else: -+ try: signame = [next(n for n, i in signal.__dict__.items() -+ if i == signum)] -+ except StopIteration: raise ValueError - except ValueError: - signame = 'SIGinvalid' - return '(killed by signal %d %s)' % (signum, signame) -@@ -124,7 +129,12 @@ def returncode_to_status(retcode): - - signum = retcode - 128 - try: -- signame = signal.Signals(signum).name -+ if sys.version_info >= (3, 5): -+ signame = signal.Signals(signum).name -+ else: -+ try: signame = [next(n for n, i in signal.__dict__.items() -+ if i == signum)] -+ except StopIteration: raise ValueError - except ValueError: - signame = 'SIGinvalid' - return '(exit status %d or signal %d %s)' % (retcode, signum, signame) ---- a/mesonbuild/scripts/gtkdochelper.py -+++ b/mesonbuild/scripts/gtkdochelper.py -@@ -17,7 +17,7 @@ import subprocess - import shlex - import shutil - import argparse --from ..mesonlib import MesonException, Popen_safe, is_windows -+from ..mesonlib import MesonException, Popen_safe, commonpath, is_windows - from . import destdir_join - - parser = argparse.ArgumentParser() -@@ -108,7 +108,7 @@ def build_gtkdoc(source_root, build_root - # FIXME: Use mesonlib.File objects so we don't need to do this - if not os.path.isabs(f): - f = os.path.join(doc_src, f) -- elif os.path.commonpath([f, build_root]) == build_root: -+ elif commonpath([f, build_root]) == build_root: - continue - shutil.copyfile(f, os.path.join(abs_out, os.path.basename(f))) - ---- a/run_meson_command_tests.py -+++ b/run_meson_command_tests.py -@@ -19,6 +19,7 @@ import os - import tempfile - import unittest - import subprocess -+import sys - import zipapp - from pathlib import Path - -@@ -68,9 +69,15 @@ class CommandTests(unittest.TestCase): - # If this call hangs CI will just abort. It is very hard to distinguish - # between CI issue and test bug in that case. Set timeout and fail loud - # instead. -- p = subprocess.run(command, stdout=subprocess.PIPE, -- env=os.environ.copy(), universal_newlines=True, -- cwd=workdir, timeout=60 * 5) -+ if sys.version_info >= (3, 5): -+ p = subprocess.run(command, stdout=subprocess.PIPE, -+ env=os.environ.copy(), universal_newlines=True, -+ cwd=workdir, timeout=60 * 5) -+ else: -+ p = subprocess.Popen(command, stdout=subprocess.PIPE, -+ env=os.environ.copy(), universal_newlines=True, -+ cwd=workdir) -+ p.stdout = p.communicate(timeout=60 * 5)[0] - print(p.stdout) - if p.returncode != 0: - raise subprocess.CalledProcessError(p.returncode, command) ---- a/run_unittests.py -+++ b/run_unittests.py -@@ -956,6 +956,24 @@ class DataTests(unittest.TestCase): - defined = set([a.strip() for a in res.group().split('\\')][1:]) - self.assertEqual(defined, set(chain(interp.funcs.keys(), interp.builtin.keys()))) - -+ def test_commonpath(self): -+ from os.path import sep -+ commonpath = mesonbuild.mesonlib.commonpath -+ self.assertRaises(ValueError, commonpath, []) -+ self.assertEqual(commonpath(['/usr', '/usr']), sep + 'usr') -+ self.assertEqual(commonpath(['/usr', '/usr/']), sep + 'usr') -+ self.assertEqual(commonpath(['/usr', '/usr/bin']), sep + 'usr') -+ self.assertEqual(commonpath(['/usr/', '/usr/bin']), sep + 'usr') -+ self.assertEqual(commonpath(['/usr/./', '/usr/bin']), sep + 'usr') -+ self.assertEqual(commonpath(['/usr/bin', '/usr/bin']), sep + 'usr' + sep + 'bin') -+ self.assertEqual(commonpath(['/usr//bin', '/usr/bin']), sep + 'usr' + sep + 'bin') -+ self.assertEqual(commonpath(['/usr/./bin', '/usr/bin']), sep + 'usr' + sep + 'bin') -+ self.assertEqual(commonpath(['/usr/local', '/usr/lib']), sep + 'usr') -+ self.assertEqual(commonpath(['/usr', '/bin']), sep) -+ prefix = '/some/path/to/prefix' -+ libdir = '/some/path/to/prefix/libdir' -+ self.assertEqual(commonpath([prefix, libdir]), str(PurePath(prefix))) -+ - - class BasePlatformTests(unittest.TestCase): - def setUp(self): -@@ -1036,9 +1054,15 @@ class BasePlatformTests(unittest.TestCas - # If this call hangs CI will just abort. It is very hard to distinguish - # between CI issue and test bug in that case. Set timeout and fail loud - # instead. -- p = subprocess.run(command, stdout=subprocess.PIPE, -- stderr=subprocess.STDOUT, env=os.environ.copy(), -- universal_newlines=True, cwd=workdir, timeout=60 * 5) -+ if sys.version_info >= (3, 5): -+ p = subprocess.run(command, stdout=subprocess.PIPE, -+ stderr=subprocess.STDOUT, env=os.environ.copy(), -+ universal_newlines=True, cwd=workdir, timeout=60 * 5) -+ else: -+ p = subprocess.Popen(command, stdout=subprocess.PIPE, -+ stderr=subprocess.STDOUT, env=os.environ.copy(), -+ universal_newlines=True, cwd=workdir) -+ p.stdout = p.communicate(timeout=60 * 5)[0] - print(p.stdout) - if p.returncode != 0: - if 'MESON_SKIP_TEST' in p.stdout: -@@ -2849,17 +2873,23 @@ recommended as it is not supported on so - of = open(mfile, 'w') - of.write("project('foobar', 'c')\n") - of.close() -- pc = subprocess.run(self.setup_command, -- cwd=srcdir, -- stdout=subprocess.PIPE, -- stderr=subprocess.DEVNULL) -+ if sys.version_info >= (3, 5): -+ pc = subprocess.run(self.setup_command, -+ cwd=srcdir, -+ stdout=subprocess.PIPE, -+ stderr=subprocess.DEVNULL) -+ else: -+ pc = subprocess.Popen(self.setup_command, -+ cwd=srcdir, -+ stdout=subprocess.PIPE, -+ stderr=subprocess.DEVNULL) -+ pc.stdout = pc.communicate()[0] - self.assertIn(b'Must specify at least one directory name', pc.stdout) - with tempfile.TemporaryDirectory(dir=srcdir) as builddir: -- subprocess.run(self.setup_command, -- check=True, -- cwd=builddir, -- stdout=subprocess.DEVNULL, -- stderr=subprocess.DEVNULL) -+ subprocess.check_call(self.setup_command, -+ cwd=builddir, -+ stdout=subprocess.DEVNULL, -+ stderr=subprocess.DEVNULL) - - def get_opts_as_dict(self): - result = {} -@@ -4671,13 +4701,14 @@ class NativeFileTests(BasePlatformTests) - f.write(' print("{}", file=sys.{})\n'.format(value, kwargs.get('outfile', 'stdout'))) - f.write(' sys.exit(0)\n') - f.write(textwrap.dedent(''' -- ret = subprocess.run( -+ ret = subprocess.Popen( - ["{}"] + extra_args, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, -- encoding='utf-8') -- print(ret.stdout) -- print(ret.stderr, file=sys.stderr) -+ universal_newlines=True) -+ stdout, stderr = ret.communicate() -+ print(stdout) -+ print(stderr, file=sys.stderr) - sys.exit(ret.returncode) - - if __name__ == '__main__': ---- a/setup.py -+++ b/setup.py -@@ -16,9 +16,9 @@ - - import sys - --if sys.version_info < (3, 5, 0): -+if sys.version_info < (3, 4, 0): - print('Tried to install with an unsupported version of Python. ' -- 'Meson requires Python 3.5.0 or greater') -+ 'Meson requires Python 3.4.0 or greater') - sys.exit(1) - - from mesonbuild.coredata import version ---- "a/test cases/common/188 find override/subdir/converter.py" -+++ "b/test cases/common/188 find override/subdir/converter.py" -@@ -10,6 +10,7 @@ ftempl = '''int %s() { - } - ''' - --d = pathlib.Path(ifilename).read_text().split('\n')[0].strip() -- --pathlib.Path(ofilename).write_text(ftempl % d) -+with pathlib.Path(ifilename).open('r') as f: -+ d = f.readline().strip() -+with pathlib.Path(ofilename).open('w') as f: -+ f.write(ftempl % d) ---- "a/test cases/common/188 find override/subdir/gencodegen.py.in" -+++ "b/test cases/common/188 find override/subdir/gencodegen.py.in" -@@ -10,6 +10,7 @@ ftempl = '''int %s() { - } - ''' - --d = pathlib.Path(ifilename).read_text().split('\n')[0].strip() -- --pathlib.Path(ofilename).write_text(ftempl % d) -+with pathlib.Path(ifilename).open('r') as f: -+ d = f.readline().strip() -+with pathlib.Path(ofilename).open('w') as f: -+ f.write(ftempl % d) ---- "a/test cases/unit/35 dist script/replacer.py" -+++ "b/test cases/unit/35 dist script/replacer.py" -@@ -11,6 +11,8 @@ source_root = pathlib.Path(os.environ['M - - modfile = source_root / 'prog.c' - --contents = modfile.read_text() -+with modfile.open('r') as f: -+ contents = f.read() - contents = contents.replace(sys.argv[1], sys.argv[2]) --modfile.write_text(contents) -+with modfile.open('w') as f: -+ f.write(contents) ---- "a/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig.py" -+++ "b/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig.py" -@@ -9,4 +9,4 @@ environ['PKG_CONFIG_LIBDIR'] = os.path.j - os.path.dirname(os.path.realpath(__file__)), 'cross_pkgconfig') - - sys.exit( -- subprocess.run(['pkg-config'] + sys.argv[1:], env=environ).returncode) -+ subprocess.call(['pkg-config'] + sys.argv[1:], env=environ)) ---- "a/test cases/windows/13 test argument extra paths/test/test_run_exe.py" -+++ "b/test cases/windows/13 test argument extra paths/test/test_run_exe.py" -@@ -7,6 +7,6 @@ if __name__ == '__main__': - parser.add_argument('prog') - args = parser.parse_args() - -- res = subprocess.run(args.prog) -+ ret = subprocess.call(args.prog) - -- sys.exit(res.returncode - 42) -+ sys.exit(ret - 42) diff --git a/meson-suse-fix-llvm-3.8.patch b/meson-suse-fix-llvm-3.8.patch deleted file mode 100644 index 72712fc..0000000 --- a/meson-suse-fix-llvm-3.8.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/mesonbuild/dependencies/dev.py -+++ b/mesonbuild/dependencies/dev.py -@@ -343,10 +343,11 @@ class LLVMDependency(ConfigToolDependenc - not for shared-linnking, we have to figure those out ourselves, because - of course we do. - """ -- if self.static: -- self.link_args = self.get_config_value( -- ['--libs', '--ldflags', '--system-libs'] + list(self.required_modules), -- 'link_args') -+ #if self.static: -+ self.link_args = self.get_config_value( -+ ['--libs', '--ldflags', '--system-libs'] + list(self.required_modules), -+ 'link_args') -+ """ - else: - # llvm-config will provide arguments for static linking, so we get - # to figure out for ourselves what to link with. We'll do that by -@@ -365,6 +366,7 @@ class LLVMDependency(ConfigToolDependenc - else: - raise DependencyException( - 'Could not find a dynamically linkable library for LLVM.') -+ """ - - def check_components(self, modules, required=True): - """Check for llvm components (modules in meson terms). ---- a/run_unittests.py -+++ b/run_unittests.py -@@ -4771,6 +4771,11 @@ class NativeFileTests(BasePlatformTests) - # Do the skip at this level to avoid screwing up the cache - if not shutil.which('llvm-config'): - raise unittest.SkipTest('No llvm-installed, cannot test') -+ -+ output = subprocess.getoutput('llvm-config --version') -+ if version_compare(output, '< 3.9'): -+ raise unittest.SkipTest('llvm-config >= 3.9 needed for the test') -+ - self._simple_test('config_dep', 'llvm-config') - - def test_python3_module(self): diff --git a/meson.changes b/meson.changes index aee570b..9925226 100644 --- a/meson.changes +++ b/meson.changes @@ -2,6 +2,8 @@ Sun Jul 26 15:59:52 UTC 2020 - Alexei Sorokin - Remove %_smp_build_ncpus in meson-suse-ify-macros.patch. +- Drop broken meson-restore-python3.4.patch, + meson-suse-fix-llvm-3.8.patch, meson-fix-gcc48.patch. ------------------------------------------------------------------- Wed Jul 22 17:51:19 UTC 2020 - Callum Farmer diff --git a/meson.spec b/meson.spec index ba6f98d..5a517c8 100644 --- a/meson.spec +++ b/meson.spec @@ -41,16 +41,10 @@ Source2: meson.keyring Patch0: meson-suse-ify-macros.patch # PATCH-FIX-OPENSUSE meson-test-installed-bin.patch dimstar@opensuse.org -- We want the test suite to run against /usr/bin/meson coming from our meson package. Patch1: meson-test-installed-bin.patch -# PATCH-FIX-OPENSUSE meson-restore-python3.4.patch -- Restore Python 3.4 support (reverts commit 0538009). -Patch2: meson-restore-python3.4.patch -# PATCH-FIX-OPENSUSE meson-suse-fix-llvm-3.8.patch -- Fix LLVM 3.8 tests. -Patch3: meson-suse-fix-llvm-3.8.patch -# PATCH-FIX-OPENSUSE meson-fix-gcc48.patch sor.alexei@meowr.ru -- Fix GCC 4.8 handling for openSUSE Leap 42.x. -Patch4: meson-fix-gcc48.patch # PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal@suse.com -- build and install using distutils instead of full setuptools -Patch5: meson-distutils.patch +Patch2: meson-distutils.patch # PATCH-FIX-UPSTREAM meson-pr7461-remove-setuptools-dependency.patch github.com/mesonbuild/meson/pull/7461 -Patch6: meson-pr7461-remove-setuptools-dependency.patch +Patch3: meson-pr7461-remove-setuptools-dependency.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-base @@ -167,15 +161,10 @@ This package provides support for meson.build files in Vim. %setup -q -n meson-%{version} %patch0 -p1 %patch1 -p1 -%if 0%{?suse_version} < 1500 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%endif %if !%{with setuptools} -%patch5 -p1 +%patch2 -p1 %endif -%patch6 -p1 +%patch3 -p1 # We do not have gmock available at this moment - can't run the test suite for it rm -r "test cases/frameworks/3 gmock" \ From ca224bf974e771c4a7b8cf3d2a59d993e4d259732442f39eee2cab83438013a4 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 14 Aug 2020 12:37:31 +0000 Subject: [PATCH 6/7] tweak OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=184 --- meson.changes | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meson.changes b/meson.changes index 9925226..7f7f700 100644 --- a/meson.changes +++ b/meson.changes @@ -8,8 +8,8 @@ Sun Jul 26 15:59:52 UTC 2020 - Alexei Sorokin ------------------------------------------------------------------- Wed Jul 22 17:51:19 UTC 2020 - Callum Farmer -- Add meson-pr7461-remove-setuptools-dependency.patch(gh#mesonbuild/meson#7461) - + Fixes forced requirement on setuptools +- Add meson-pr7461-remove-setuptools-dependency.patch: Fixes forced + requirement on setuptools (gh#mesonbuild/meson#7461). ------------------------------------------------------------------- Wed Jul 15 09:00:59 UTC 2020 - Callum Farmer @@ -30,7 +30,8 @@ Wed Jul 15 09:00:59 UTC 2020 - Callum Farmer + Implicit dependency fallback + Added ability to specify backend arguments in `meson compile` - Removed meson-fix-gnome-test.patch: contained in upstream -- Changed meson-suse-ify-macros.patch: to be compatible with new version +- Changed meson-suse-ify-macros.patch: to be compatible with new + version ------------------------------------------------------------------- Fri Jun 26 16:51:35 UTC 2020 - Michael Gorse From 534c29ec7b738436a963fb1407289b0c04cf8ca083e83c2043dd23ca189fd29c Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 17 Aug 2020 14:52:52 +0000 Subject: [PATCH 7/7] Accepting request 827368 from GNOME:Next Update to 0.55.1 - no regressions seen in GNOME:Next compared to 0.55.0 OBS-URL: https://build.opensuse.org/request/show/827368 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/meson?expand=0&rev=185 --- meson-0.55.0.tar.gz | 3 - meson-0.55.0.tar.gz.asc | 16 - meson-0.55.1.tar.gz | 3 + meson-0.55.1.tar.gz.asc | 16 + ...-pr7461-remove-setuptools-dependency.patch | 685 ------------------ meson.changes | 13 + meson.spec | 5 +- 7 files changed, 33 insertions(+), 708 deletions(-) delete mode 100644 meson-0.55.0.tar.gz delete mode 100644 meson-0.55.0.tar.gz.asc create mode 100644 meson-0.55.1.tar.gz create mode 100644 meson-0.55.1.tar.gz.asc delete mode 100644 meson-pr7461-remove-setuptools-dependency.patch diff --git a/meson-0.55.0.tar.gz b/meson-0.55.0.tar.gz deleted file mode 100644 index a8ec0dc..0000000 --- a/meson-0.55.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a1ae2bfe2ae14ac47593537f93290fb79e9b775c55b4c53c282bc3ca3745b35 -size 1742882 diff --git a/meson-0.55.0.tar.gz.asc b/meson-0.55.0.tar.gz.asc deleted file mode 100644 index 5eadca0..0000000 --- a/meson-0.55.0.tar.gz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEElRgfTu0U/fTkG1GNO/RpO/7rlCgFAl8LJuoACgkQO/RpO/7r -lChofw//QDF0raThfyJjZZeMZ9jNKr7xosgS/idAGSBjRmWCOFkKkPhbPqTCzChQ -fgItk44CN9lma4AjftQIlZcdCo2CgZDgH+SFbWRtuxAbN0MX4auiIHlfPL4uNPMn -9dm9nLxkF0B0ZBvo8c7OW5fDNuLTEL+4DMmbY7ypb+pYqc6C/JdcrGF8yTeZ9EYR -Vff07pdJcuipI0SlfnTu5v/SV0p2AX9/edAzmOUVpKY13x/qnz3ds2emDjILAE54 -H50aof9TYhzKSdqyftkz9OUa+JqRyRRnkp7KDOj0rXBogfq4Vi+5CGAXkYXWppku -JTQk8SEZmVP6plzGCJlVeTfITtiuK4tRAAQgn4xfU8HjpceQR9Ypab1U1tcpV8/K -TcuvvHx7pWoSjrTmxoIhdTKtIIajI1s8zyZG8fxS9qwCvnC/SGNdAUcCPkjRpbTj -zmy9XanCNxAZpjpa8KV4t88Lp1U3b301YT0SEkFGD3r5NyTzfr+A+laIUVmHJmwq -4BN99BVJi+cIsc8WAdDOikJVlW82Qq29KLiczsHfGObe2OrUvEraPCF82zRldfsm -oAQ8Bu6EHo4b1DXtXjXmzEAS25qqY7cNLoLmFzH7CWA903Lfbk8VIFzyGkJvu79l -GRLdAZ6pOsIM1/fCqwG93ZuXFqTUtzv3uoBZ3kbjWmTtWHSAtYo= -=ITLc ------END PGP SIGNATURE----- diff --git a/meson-0.55.1.tar.gz b/meson-0.55.1.tar.gz new file mode 100644 index 0000000..73fd39b --- /dev/null +++ b/meson-0.55.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b5741f884e04928bdfa1947467ff06afa6c98e623c25cef75adf71ca39ce080 +size 1740517 diff --git a/meson-0.55.1.tar.gz.asc b/meson-0.55.1.tar.gz.asc new file mode 100644 index 0000000..7606360 --- /dev/null +++ b/meson-0.55.1.tar.gz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEElRgfTu0U/fTkG1GNO/RpO/7rlCgFAl84KRIACgkQO/RpO/7r +lCjTtA//TYt4PrlN+c81Qpl3Bzk1MUTJD435i2aMTrOap30s7KZLnUJhnjhwMTkG +CZGIcXN9I20pUHXmWdnqPNMdnB411jnjtSx7VzP9/tjmdG69wHKb2C8BD7g8UTr2 +zIyGmSa/VQAEeCIXuKutNxVreRvFdFt8tP8WrQn37zNrXAogLb9TQ0sE/mvzRDzs +O8brztF6rpYZ2owP2W8IAH3xW1wAe4TfzwOVmpPAEeH5OMRpdn602xDXBbx6Zvbf +2jHFJqY8vGmLGpqUEih+vQEQ6oDHakxareUISMmhn2S7WnIEgPmLh6/+N4xNCFYy +vdyJMz1mzEG7aiT9+UxYHEb7iN+MQzqIOcYfwNB3s6KuC23xz+YzW59ev+3VYgjH +h0OVAIfr4l88iUYCuZdDMNjIghERz1yZttstkFvE2OyqPIRhysnv+9fYkkNZCaCQ +R2vCk4b470+XhpcarRFkFrrOaimLyfPpnTBe0bnzGPgui/W6tIzGN2iLoTYSWdM1 +T4iMSiN4RVO4BpfB6kAKbRgtKrUPsglERTW9i8GDdLlU9fIALkJtDvkwaBJs/ibW +JZKDLkNXJGRsrsbMaH3nvNnbmTItHeb9ocdxXBP1h9XNlw8Bn2KtmUN4nwtd+2P3 +Xt8o3KxekEkW6NbxPfOwIragFdv3UaM9qTUQmpUJqH9V109/lsk= +=Etlk +-----END PGP SIGNATURE----- diff --git a/meson-pr7461-remove-setuptools-dependency.patch b/meson-pr7461-remove-setuptools-dependency.patch deleted file mode 100644 index b4acc8a..0000000 --- a/meson-pr7461-remove-setuptools-dependency.patch +++ /dev/null @@ -1,685 +0,0 @@ -From 019ed04331695bb6f5c5fff70dfced34c4ba9012 Mon Sep 17 00:00:00 2001 -From: Daniel Mensinger -Date: Thu, 16 Jul 2020 20:29:34 +0200 -Subject: [PATCH 1/3] mdata: Generate mesondata.py from */data folders - ---- - mesonbuild/mesondata.py | 374 ++++++++++++++++++++++++++++++++++++++++ - tools/gen_data.py | 139 +++++++++++++++ - 2 files changed, 513 insertions(+) - create mode 100644 mesonbuild/mesondata.py - create mode 100755 tools/gen_data.py - -diff --git a/mesonbuild/mesondata.py b/mesonbuild/mesondata.py -new file mode 100644 -index 0000000000..1f223c251b ---- /dev/null -+++ b/mesonbuild/mesondata.py -@@ -0,0 +1,374 @@ -+# Copyright 2020 The Meson development team -+ -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+ -+# http://www.apache.org/licenses/LICENSE-2.0 -+ -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+ -+ -+#### -+#### WARNING: This is an automatically generated file! Do not edit! -+#### Generated by tools/gen_data.py -+#### -+ -+ -+from pathlib import Path -+import typing as T -+ -+if T.TYPE_CHECKING: -+ from .environment import Environment -+ -+###################### -+# BEGIN Data section # -+###################### -+ -+file_0_data_CMakeListsLLVM_txt = '''\ -+cmake_minimum_required(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} ) -+ -+set(PACKAGE_FOUND FALSE) -+ -+while(TRUE) -+ find_package(LLVM REQUIRED CONFIG QUIET) -+ -+ # ARCHS has to be set via the CMD interface -+ if(LLVM_FOUND OR "${ARCHS}" STREQUAL "") -+ break() -+ endif() -+ -+ list(GET ARCHS 0 CMAKE_LIBRARY_ARCHITECTURE) -+ list(REMOVE_AT ARCHS 0) -+endwhile() -+ -+if(LLVM_FOUND) -+ set(PACKAGE_FOUND TRUE) -+ -+ foreach(mod IN LISTS LLVM_MESON_MODULES) -+ # Reset variables -+ set(out_mods) -+ set(real_mods) -+ -+ # Generate a lower and upper case version -+ string(TOLOWER "${mod}" mod_L) -+ string(TOUPPER "${mod}" mod_U) -+ -+ # Get the mapped components -+ llvm_map_components_to_libnames(out_mods ${mod} ${mod_L} ${mod_U}) -+ list(SORT out_mods) -+ list(REMOVE_DUPLICATES out_mods) -+ -+ # Make sure that the modules exist -+ foreach(i IN LISTS out_mods) -+ if(TARGET ${i}) -+ list(APPEND real_mods ${i}) -+ endif() -+ endforeach() -+ -+ # Set the output variables -+ set(MESON_LLVM_TARGETS_${mod} ${real_mods}) -+ foreach(i IN LISTS real_mods) -+ set(MESON_TARGET_TO_LLVM_${i} ${mod}) -+ endforeach() -+ endforeach() -+ -+ # Check the following variables: -+ # LLVM_PACKAGE_VERSION -+ # LLVM_VERSION -+ # LLVM_VERSION_STRING -+ if(NOT DEFINED PACKAGE_VERSION) -+ if(DEFINED LLVM_PACKAGE_VERSION) -+ set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") -+ elseif(DEFINED LLVM_VERSION) -+ set(PACKAGE_VERSION "${LLVM_VERSION}") -+ elseif(DEFINED LLVM_VERSION_STRING) -+ set(PACKAGE_VERSION "${LLVM_VERSION_STRING}") -+ endif() -+ endif() -+ -+ # Check the following variables: -+ # LLVM_LIBRARIES -+ # LLVM_LIBS -+ set(libs) -+ if(DEFINED LLVM_LIBRARIES) -+ set(libs LLVM_LIBRARIES) -+ elseif(DEFINED LLVM_LIBS) -+ set(libs LLVM_LIBS) -+ endif() -+ -+ # Check the following variables: -+ # LLVM_INCLUDE_DIRS -+ # LLVM_INCLUDES -+ # LLVM_INCLUDE_DIR -+ set(includes) -+ if(DEFINED LLVM_INCLUDE_DIRS) -+ set(includes LLVM_INCLUDE_DIRS) -+ elseif(DEFINED LLVM_INCLUDES) -+ set(includes LLVM_INCLUDES) -+ elseif(DEFINED LLVM_INCLUDE_DIR) -+ set(includes LLVM_INCLUDE_DIR) -+ endif() -+ -+ # Check the following variables: -+ # LLVM_DEFINITIONS -+ set(definitions) -+ if(DEFINED LLVM_DEFINITIONS) -+ set(definitions LLVM_DEFINITIONS) -+ endif() -+ -+ set(PACKAGE_INCLUDE_DIRS "${${includes}}") -+ set(PACKAGE_DEFINITIONS "${${definitions}}") -+ set(PACKAGE_LIBRARIES "${${libs}}") -+endif() -+''' -+ -+file_1_data_CMakePathInfo_txt = '''\ -+cmake_minimum_required(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}) -+ -+set(TMP_PATHS_LIST) -+list(APPEND TMP_PATHS_LIST ${CMAKE_PREFIX_PATH}) -+list(APPEND TMP_PATHS_LIST ${CMAKE_FRAMEWORK_PATH}) -+list(APPEND TMP_PATHS_LIST ${CMAKE_APPBUNDLE_PATH}) -+list(APPEND TMP_PATHS_LIST $ENV{CMAKE_PREFIX_PATH}) -+list(APPEND TMP_PATHS_LIST $ENV{CMAKE_FRAMEWORK_PATH}) -+list(APPEND TMP_PATHS_LIST $ENV{CMAKE_APPBUNDLE_PATH}) -+list(APPEND TMP_PATHS_LIST ${CMAKE_SYSTEM_PREFIX_PATH}) -+list(APPEND TMP_PATHS_LIST ${CMAKE_SYSTEM_FRAMEWORK_PATH}) -+list(APPEND TMP_PATHS_LIST ${CMAKE_SYSTEM_APPBUNDLE_PATH}) -+ -+set(LIB_ARCH_LIST) -+if(CMAKE_LIBRARY_ARCHITECTURE_REGEX) -+ file(GLOB implicit_dirs RELATIVE /lib /lib/*-linux-gnu* ) -+ foreach(dir ${implicit_dirs}) -+ if("${dir}" MATCHES "${CMAKE_LIBRARY_ARCHITECTURE_REGEX}") -+ list(APPEND LIB_ARCH_LIST "${dir}") -+ endif() -+ endforeach() -+endif() -+ -+# "Export" these variables: -+set(MESON_ARCH_LIST ${LIB_ARCH_LIST}) -+set(MESON_PATHS_LIST ${TMP_PATHS_LIST}) -+set(MESON_CMAKE_ROOT ${CMAKE_ROOT}) -+set(MESON_CMAKE_SYSROOT ${CMAKE_SYSROOT}) -+set(MESON_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}) -+ -+message(STATUS ${TMP_PATHS_LIST}) -+''' -+ -+file_2_data_CMakeLists_txt = '''\ -+# fail noisily if attempt to use this file without setting: -+# cmake_minimum_required(VERSION ${CMAKE_VERSION}) -+# project(... LANGUAGES ...) -+ -+cmake_policy(SET CMP0000 NEW) -+ -+set(PACKAGE_FOUND FALSE) -+set(_packageName "${NAME}") -+string(TOUPPER "${_packageName}" PACKAGE_NAME) -+ -+while(TRUE) -+ find_package("${NAME}" QUIET COMPONENTS ${COMPS}) -+ -+ # ARCHS has to be set via the CMD interface -+ if(${_packageName}_FOUND OR ${PACKAGE_NAME}_FOUND OR "${ARCHS}" STREQUAL "") -+ break() -+ endif() -+ -+ list(GET ARCHS 0 CMAKE_LIBRARY_ARCHITECTURE) -+ list(REMOVE_AT ARCHS 0) -+endwhile() -+ -+if(${_packageName}_FOUND OR ${PACKAGE_NAME}_FOUND) -+ set(PACKAGE_FOUND TRUE) -+ -+ # Check the following variables: -+ # FOO_VERSION -+ # Foo_VERSION -+ # FOO_VERSION_STRING -+ # Foo_VERSION_STRING -+ if(NOT DEFINED PACKAGE_VERSION) -+ if(DEFINED ${_packageName}_VERSION) -+ set(PACKAGE_VERSION "${${_packageName}_VERSION}") -+ elseif(DEFINED ${PACKAGE_NAME}_VERSION) -+ set(PACKAGE_VERSION "${${PACKAGE_NAME}_VERSION}") -+ elseif(DEFINED ${_packageName}_VERSION_STRING) -+ set(PACKAGE_VERSION "${${_packageName}_VERSION_STRING}") -+ elseif(DEFINED ${PACKAGE_NAME}_VERSION_STRING) -+ set(PACKAGE_VERSION "${${PACKAGE_NAME}_VERSION_STRING}") -+ endif() -+ endif() -+ -+ # Check the following variables: -+ # FOO_LIBRARIES -+ # Foo_LIBRARIES -+ # FOO_LIBS -+ # Foo_LIBS -+ set(libs) -+ if(DEFINED ${_packageName}_LIBRARIES) -+ set(libs ${_packageName}_LIBRARIES) -+ elseif(DEFINED ${PACKAGE_NAME}_LIBRARIES) -+ set(libs ${PACKAGE_NAME}_LIBRARIES) -+ elseif(DEFINED ${_packageName}_LIBS) -+ set(libs ${_packageName}_LIBS) -+ elseif(DEFINED ${PACKAGE_NAME}_LIBS) -+ set(libs ${PACKAGE_NAME}_LIBS) -+ endif() -+ -+ # Check the following variables: -+ # FOO_INCLUDE_DIRS -+ # Foo_INCLUDE_DIRS -+ # FOO_INCLUDES -+ # Foo_INCLUDES -+ # FOO_INCLUDE_DIR -+ # Foo_INCLUDE_DIR -+ set(includes) -+ if(DEFINED ${_packageName}_INCLUDE_DIRS) -+ set(includes ${_packageName}_INCLUDE_DIRS) -+ elseif(DEFINED ${PACKAGE_NAME}_INCLUDE_DIRS) -+ set(includes ${PACKAGE_NAME}_INCLUDE_DIRS) -+ elseif(DEFINED ${_packageName}_INCLUDES) -+ set(includes ${_packageName}_INCLUDES) -+ elseif(DEFINED ${PACKAGE_NAME}_INCLUDES) -+ set(includes ${PACKAGE_NAME}_INCLUDES) -+ elseif(DEFINED ${_packageName}_INCLUDE_DIR) -+ set(includes ${_packageName}_INCLUDE_DIR) -+ elseif(DEFINED ${PACKAGE_NAME}_INCLUDE_DIR) -+ set(includes ${PACKAGE_NAME}_INCLUDE_DIR) -+ endif() -+ -+ # Check the following variables: -+ # FOO_DEFINITIONS -+ # Foo_DEFINITIONS -+ set(definitions) -+ if(DEFINED ${_packageName}_DEFINITIONS) -+ set(definitions ${_packageName}_DEFINITIONS) -+ elseif(DEFINED ${PACKAGE_NAME}_DEFINITIONS) -+ set(definitions ${PACKAGE_NAME}_DEFINITIONS) -+ endif() -+ -+ set(PACKAGE_INCLUDE_DIRS "${${includes}}") -+ set(PACKAGE_DEFINITIONS "${${definitions}}") -+ set(PACKAGE_LIBRARIES "${${libs}}") -+endif() -+''' -+ -+file_3_data_preload_cmake = '''\ -+if(MESON_PS_LOADED) -+ return() -+endif() -+ -+set(MESON_PS_LOADED ON) -+ -+# Dummy macros that have a special meaning in the meson code -+macro(meson_ps_execute_delayed_calls) -+endmacro() -+ -+macro(meson_ps_reload_vars) -+endmacro() -+ -+# Helper macro to inspect the current CMake state -+macro(meson_ps_inspect_vars) -+ set(MESON_PS_CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") -+ set(MESON_PS_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") -+ meson_ps_execute_delayed_calls() -+endmacro() -+ -+ -+# Override some system functions with custom code and forward the args -+# to the original function -+macro(add_custom_command) -+ meson_ps_inspect_vars() -+ _add_custom_command(${ARGV}) -+endmacro() -+ -+macro(add_custom_target) -+ meson_ps_inspect_vars() -+ _add_custom_target(${ARGV}) -+endmacro() -+ -+macro(set_property) -+ meson_ps_inspect_vars() -+ _set_property(${ARGV}) -+endmacro() -+ -+function(set_source_files_properties) -+ set(FILES) -+ set(I 0) -+ set(PROPERTIES OFF) -+ -+ while(I LESS ARGC) -+ if(NOT PROPERTIES) -+ if("${ARGV${I}}" STREQUAL "PROPERTIES") -+ set(PROPERTIES ON) -+ else() -+ list(APPEND FILES "${ARGV${I}}") -+ endif() -+ -+ math(EXPR I "${I} + 1") -+ else() -+ set(ID_IDX ${I}) -+ math(EXPR PROP_IDX "${ID_IDX} + 1") -+ -+ set(ID "${ARGV${ID_IDX}}") -+ set(PROP "${ARGV${PROP_IDX}}") -+ -+ set_property(SOURCE ${FILES} PROPERTY "${ID}" "${PROP}") -+ math(EXPR I "${I} + 2") -+ endif() -+ endwhile() -+endfunction() -+ -+set(MESON_PS_DELAYED_CALLS add_custom_command;add_custom_target;set_property) -+meson_ps_reload_vars() -+''' -+ -+ -+#################### -+# END Data section # -+#################### -+ -+class DataFile: -+ def __init__(self, path: Path, sha256sum: str, data: str) -> None: -+ self.path = path -+ self.sha256sum = sha256sum -+ self.data = data -+ -+ def write_once(self, path: Path) -> None: -+ if not path.exists(): -+ path.write_text(self.data) -+ -+ def write_to_private(self, env: 'Environment') -> Path: -+ out_file = Path(env.scratch_dir) / 'data' / self.path.name -+ out_file.parent.mkdir(exist_ok=True) -+ self.write_once(out_file) -+ return out_file -+ -+ -+mesondata = { -+ 'dependencies/data/CMakeListsLLVM.txt': DataFile( -+ Path('dependencies/data/CMakeListsLLVM.txt'), -+ '412cec3315597041a978d018cdaca282dcd47693793540da88ae2f80d0cbd7cd', -+ file_0_data_CMakeListsLLVM_txt, -+ ), -+ 'dependencies/data/CMakePathInfo.txt': DataFile( -+ Path('dependencies/data/CMakePathInfo.txt'), -+ '90da8b443982d9c87139b7dc84228eb58cab4315764949637208f25e2bda7db2', -+ file_1_data_CMakePathInfo_txt, -+ ), -+ 'dependencies/data/CMakeLists.txt': DataFile( -+ Path('dependencies/data/CMakeLists.txt'), -+ '71a2d58381f912bbfb1c8709884d34d721f682edf2fca001e1f582f0bffd0da7', -+ file_2_data_CMakeLists_txt, -+ ), -+ 'cmake/data/preload.cmake': DataFile( -+ Path('cmake/data/preload.cmake'), -+ '064d047b18a5c919ad016b838bed50c5d40aebe9e53da0e70eff9d52a2c1ca1f', -+ file_3_data_preload_cmake, -+ ), -+} -diff --git a/tools/gen_data.py b/tools/gen_data.py -new file mode 100755 -index 0000000000..2cc05a44e7 ---- /dev/null -+++ b/tools/gen_data.py -@@ -0,0 +1,139 @@ -+#!/usr/bin/env python3 -+ -+# Copyright 2020 Daniel Mensinger -+ -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+ -+# http://www.apache.org/licenses/LICENSE-2.0 -+ -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+ -+import sys -+import hashlib -+import textwrap -+import re -+from pathlib import Path -+from datetime import datetime -+import typing as T -+ -+class DataFile: -+ file_counter = 0 -+ -+ def __init__(self, path: Path, root: Path): -+ self.path = path -+ self.id = self.path.relative_to(root) -+ self.data_str = f'file_{DataFile.file_counter}_data_' + re.sub('[^a-zA-Z0-9]', '_', self.path.name) -+ DataFile.file_counter += 1 -+ -+ b = self.path.read_bytes() -+ self.data = b.decode() -+ self.sha256sum = hashlib.sha256(b).hexdigest() -+ -+ def __repr__(self) -> str: -+ return f'<{type(self).__name__}: [{self.sha256sum}] {self.id}>' -+ -+def main() -> int: -+ root_dir = Path(__file__).resolve().parents[1] -+ mesonbuild_dir = root_dir / 'mesonbuild' -+ out_file = mesonbuild_dir / 'mesondata.py' -+ -+ data_dirs = mesonbuild_dir.glob('**/data') -+ -+ data_files: T.List[DataFile] = [] -+ -+ for d in data_dirs: -+ for p in d.iterdir(): -+ data_files += [DataFile(p, mesonbuild_dir)] -+ -+ print(f'Found {len(data_files)} data files') -+ -+ # Generate the data script -+ data = '' -+ -+ data += textwrap.dedent(f'''\ -+ # Copyright {datetime.today().year} The Meson development team -+ -+ # Licensed under the Apache License, Version 2.0 (the "License"); -+ # you may not use this file except in compliance with the License. -+ # You may obtain a copy of the License at -+ -+ # http://www.apache.org/licenses/LICENSE-2.0 -+ -+ # Unless required by applicable law or agreed to in writing, software -+ # distributed under the License is distributed on an "AS IS" BASIS, -+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ # See the License for the specific language governing permissions and -+ # limitations under the License. -+ -+ -+ #### -+ #### WARNING: This is an automatically generated file! Do not edit! -+ #### Generated by {Path(__file__).resolve().relative_to(root_dir)} -+ #### -+ -+ -+ from pathlib import Path -+ import typing as T -+ -+ if T.TYPE_CHECKING: -+ from .environment import Environment -+ -+ ###################### -+ # BEGIN Data section # -+ ###################### -+ -+ ''') -+ -+ for i in data_files: -+ data += f"{i.data_str} = '''\\\n{i.data}'''\n\n" -+ -+ data += textwrap.dedent(f''' -+ #################### -+ # END Data section # -+ #################### -+ -+ class DataFile: -+ def __init__(self, path: Path, sha256sum: str, data: str) -> None: -+ self.path = path -+ self.sha256sum = sha256sum -+ self.data = data -+ -+ def write_once(self, path: Path) -> None: -+ if not path.exists(): -+ path.write_text(self.data) -+ -+ def write_to_private(self, env: 'Environment') -> Path: -+ out_file = Path(env.scratch_dir) / 'data' / self.path.name -+ out_file.parent.mkdir(exist_ok=True) -+ self.write_once(out_file) -+ return out_file -+ -+ -+ mesondata = {{ -+ ''') -+ -+ for i in data_files: -+ data += textwrap.indent(textwrap.dedent(f"""\ -+ '{i.id}': DataFile( -+ Path('{i.id}'), -+ '{i.sha256sum}', -+ {i.data_str}, -+ ), -+ """), ' ') -+ -+ data += textwrap.dedent('''\ -+ } -+ ''') -+ -+ print(f'Updating {out_file}') -+ out_file.write_text(data) -+ return 0 -+ -+if __name__ == '__main__': -+ sys.exit(main()) - -From 05ddd6543d4c4fc33b4c64f26291e73f49733f71 Mon Sep 17 00:00:00 2001 -From: Daniel Mensinger -Date: Thu, 16 Jul 2020 20:33:57 +0200 -Subject: [PATCH 2/3] mdata: remove setuptools and use mesondata instead - ---- - mesonbuild/cmake/interpreter.py | 5 ++--- - mesonbuild/dependencies/base.py | 6 ++---- - setup.py | 5 ----- - 4 files changed, 4 insertions(+), 12 deletions(-) - -diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py -index 05169478e8..f404109cf6 100644 ---- a/mesonbuild/cmake/interpreter.py -+++ b/mesonbuild/cmake/interpreter.py -@@ -15,8 +15,6 @@ - # This class contains the basic functionality needed to run any interpreter - # or an interpreter-based tool. - --import pkg_resources -- - from .common import CMakeException, CMakeTarget, TargetOptions - from .client import CMakeClient, RequestCMakeInputs, RequestConfigure, RequestCompute, RequestCodeModel - from .fileapi import CMakeFileAPI -@@ -25,6 +23,7 @@ - from .. import mlog, mesonlib - from ..environment import Environment - from ..mesonlib import MachineChoice, OrderedSet, version_compare -+from ..mesondata import mesondata - from ..compilers.compilers import lang_suffixes, header_suffixes, obj_suffixes, lib_suffixes, is_header - from enum import Enum - from functools import lru_cache -@@ -814,7 +813,7 @@ def configure(self, extra_cmake_options: T.List[str]) -> None: - raise CMakeException('Unable to find CMake') - self.trace = CMakeTraceParser(cmake_exe.version(), self.build_dir, permissive=True) - -- preload_file = pkg_resources.resource_filename('mesonbuild', 'cmake/data/preload.cmake') -+ preload_file = mesondata['cmake/data/preload.cmake'].write_to_private(self.env) - - # Prefere CMAKE_PROJECT_INCLUDE over CMAKE_TOOLCHAIN_FILE if possible, - # since CMAKE_PROJECT_INCLUDE was actually designed for code injection. -diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py -index 23701da957..4c9c9fe18a 100644 ---- a/mesonbuild/dependencies/base.py -+++ b/mesonbuild/dependencies/base.py -@@ -29,8 +29,6 @@ - from enum import Enum - from pathlib import Path, PurePath - --import pkg_resources -- - from .. import mlog - from .. import mesonlib - from ..compilers import clib_langs -@@ -40,6 +38,7 @@ - from ..mesonlib import MachineChoice, MesonException, OrderedSet, PerMachine - from ..mesonlib import Popen_safe, version_compare_many, version_compare, listify, stringlistify, extract_as_list, split_args - from ..mesonlib import Version, LibType -+from ..mesondata import mesondata - - if T.TYPE_CHECKING: - from ..compilers.compilers import CompilerType # noqa: F401 -@@ -1512,8 +1511,7 @@ def _setup_cmake_dir(self, cmake_file: str) -> str: - build_dir = self._get_build_dir() - - # Insert language parameters into the CMakeLists.txt and write new CMakeLists.txt -- # Per the warning in pkg_resources, this is *not* a path and os.path and Pathlib are *not* safe to use here. -- cmake_txt = pkg_resources.resource_string('mesonbuild', 'dependencies/data/' + cmake_file).decode() -+ cmake_txt = mesondata['dependencies/data/' + cmake_file].data - - # In general, some Fortran CMake find_package() also require C language enabled, - # even if nothing from C is directly used. An easy Fortran example that fails -diff --git a/setup.py b/setup.py -index 1f95be70c8..145f19c522 100644 ---- a/setup.py -+++ b/setup.py -@@ -37,10 +37,6 @@ - 'mesonbuild.scripts', - 'mesonbuild.templates', - 'mesonbuild.wrap'] --package_data = { -- 'mesonbuild.dependencies': ['data/CMakeLists.txt', 'data/CMakeListsLLVM.txt', 'data/CMakePathInfo.txt'], -- 'mesonbuild.cmake': ['data/run_ctgt.py', 'data/preload.cmake'], --} - data_files = [] - if sys.platform != 'win32': - # Only useful on UNIX-like systems -@@ -51,6 +47,5 @@ - setup(name='meson', - version=version, - packages=packages, -- package_data=package_data, - entry_points=entries, - data_files=data_files,) - -From 393d6e133d9abd584a2fc414971628e84ea48b7c Mon Sep 17 00:00:00 2001 -From: Daniel Mensinger -Date: Thu, 16 Jul 2020 20:34:15 +0200 -Subject: [PATCH 3/3] mdata: Add test to ensure mesondata.py is up-to-date - ---- - run_unittests.py | 32 ++++++++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - -diff --git a/run_unittests.py b/run_unittests.py -index 820b705b54..2c03a3e75c 100755 ---- a/run_unittests.py -+++ b/run_unittests.py -@@ -1485,6 +1485,38 @@ def test_all_functions_defined_in_ast_interpreter(self): - astint = AstInterpreter('.', '', '') - self.assertEqual(set(interp.funcs.keys()), set(astint.funcs.keys())) - -+ def test_mesondata_is_up_to_date(self): -+ from mesonbuild.mesondata import mesondata -+ err_msg = textwrap.dedent(''' -+ -+ ########################################################### -+ ### mesonbuild.mesondata is not up-to-date ### -+ ### Please regenerate it by running tools/gen_data.py ### -+ ########################################################### -+ -+ ''') -+ -+ root_dir = Path(__file__).resolve().parent -+ mesonbuild_dir = root_dir / 'mesonbuild' -+ -+ data_dirs = mesonbuild_dir.glob('**/data') -+ data_files = [] # type: T.List[T.Tuple(str, str)] -+ -+ for i in data_dirs: -+ for p in i.iterdir(): -+ data_files += [(p.relative_to(mesonbuild_dir).as_posix(), hashlib.sha256(p.read_bytes()).hexdigest())] -+ -+ from pprint import pprint -+ current_files = set(mesondata.keys()) -+ scanned_files = set([x[0] for x in data_files]) -+ -+ self.assertSetEqual(current_files, scanned_files, err_msg + 'Data files were added or removed\n') -+ errors = [] -+ for i in data_files: -+ if mesondata[i[0]].sha256sum != i[1]: -+ errors += [i[0]] -+ -+ self.assertListEqual(errors, [], err_msg + 'Files were changed') - - class BasePlatformTests(unittest.TestCase): - prefix = '/usr' diff --git a/meson.changes b/meson.changes index 7f7f700..d0a937a 100644 --- a/meson.changes +++ b/meson.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Aug 17 09:45:41 UTC 2020 - Dominique Leuenberger + +- Update to version 0.55.1: + + find_library: Print type of library not found. + + interpreter: Don't force fallback when subproject failed to + configure. + + Various fixes around cmake integration. + + mdata: Generate mesondata.py from */data folders. + + mdata: remove setuptools and use mesondata instead. +- Drop meson-pr7461-remove-setuptools-dependency.patch: fixed + upstream. + ------------------------------------------------------------------- Sun Jul 26 15:59:52 UTC 2020 - Alexei Sorokin diff --git a/meson.spec b/meson.spec index 5a517c8..53219e2 100644 --- a/meson.spec +++ b/meson.spec @@ -28,7 +28,7 @@ %{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim} %bcond_with setuptools Name: meson%{name_ext} -Version: 0.55.0 +Version: 0.55.1 Release: 0 Summary: Python-based build system License: Apache-2.0 @@ -43,8 +43,6 @@ Patch0: meson-suse-ify-macros.patch Patch1: meson-test-installed-bin.patch # PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal@suse.com -- build and install using distutils instead of full setuptools Patch2: meson-distutils.patch -# PATCH-FIX-UPSTREAM meson-pr7461-remove-setuptools-dependency.patch github.com/mesonbuild/meson/pull/7461 -Patch3: meson-pr7461-remove-setuptools-dependency.patch BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-base @@ -164,7 +162,6 @@ This package provides support for meson.build files in Vim. %if !%{with setuptools} %patch2 -p1 %endif -%patch3 -p1 # We do not have gmock available at this moment - can't run the test suite for it rm -r "test cases/frameworks/3 gmock" \