FreeBSD Bugzilla – Attachment 210550 Details for
Bug 243202
devel/meson: update to 0.53.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v1
bug243202.diff (text/plain), 10.03 KB, created by
Jan Beich
on 2020-01-09 02:45:39 UTC
(
hide
)
Description:
v1
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2020-01-09 02:45:39 UTC
Size:
10.03 KB
patch
obsolete
>From bddaa20ee79b99374b4ee90d7afc96083b7f2a03 Mon Sep 17 00:00:00 2001 >From: jbeich <jbeich@35697150-7ecd-e111-bb59-0022644237b5> >Date: Sat, 7 Dec 2019 18:20:19 +0000 >Subject: [PATCH] devel/meson: update to 0.53.0 > >Changes: https://mesonbuild.com/Release-notes-for-0-53-0.html >Changes: https://github.com/mesonbuild/meson/compare/0.52.1...0.53.0 >PR: 243202 >Exp-run by: antoine >--- > devel/meson/Makefile | 2 +- > devel/meson/distinfo | 6 +- > .../patch-mesonbuild_dependencies_base.py | 110 ------------------ > devel/meson/files/patch-run__unittests.py | 53 --------- > 4 files changed, 4 insertions(+), 167 deletions(-) > delete mode 100644 devel/meson/files/patch-mesonbuild_dependencies_base.py > >diff --git a/devel/meson/Makefile b/devel/meson/Makefile >index 36c492b20f9c..6470d1d00cc9 100644 >--- a/devel/meson/Makefile >+++ b/devel/meson/Makefile >@@ -2,7 +2,7 @@ > # $FreeBSD$ > > PORTNAME= meson >-PORTVERSION= 0.52.1 >+PORTVERSION= 0.53.0 > CATEGORIES= devel python > MASTER_SITES= https://github.com/mesonbuild/${PORTNAME}/releases/download/${PORTVERSION}/ > >diff --git a/devel/meson/distinfo b/devel/meson/distinfo >index 74422029b448..a028984c47b6 100644 >--- a/devel/meson/distinfo >+++ b/devel/meson/distinfo >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1575035474 >-SHA256 (meson-0.52.1.tar.gz) = 0c277472e49950a5537e3de3e60c57b80dbf425788470a1a8ed27446128fc035 >-SIZE (meson-0.52.1.tar.gz) = 1507726 >+TIMESTAMP = 1453575159 >+SHA256 (meson-0.53.0.tar.gz) = 035e75993ab6fa6c9ebf902b835c64cf397a763eb8e65c9bb6e1cc9730a9d3f6 >+SIZE (meson-0.53.0.tar.gz) = 1548224 >diff --git a/devel/meson/files/patch-mesonbuild_dependencies_base.py b/devel/meson/files/patch-mesonbuild_dependencies_base.py >deleted file mode 100644 >index e79ecd4b7220..000000000000 >--- a/devel/meson/files/patch-mesonbuild_dependencies_base.py >+++ /dev/null >@@ -1,110 +0,0 @@ >-https://github.com/mesonbuild/meson/pull/4325 >- >-From c4686de2612157a4040766738a700b710d866da4 Mon Sep 17 00:00:00 2001 >-From: Ting-Wei Lan <lantw@src.gnome.org> >-Date: Thu, 4 Oct 2018 23:30:28 +0800 >-Subject: [PATCH] PkgConfigDependency: Sort -L flags according to >- PKG_CONFIG_PATH >- >-When there is more than one path in PKG_CONFIG_PATH. It is almost always >-preferred to find things in the order specified by PKG_CONFIG_PATH >-instead of assuming pkg-config returns flags in a meaningful order. >- >-For example: >- >-/usr/local/lib/libgtk-3.so.0 >-/usr/local/lib/pkgconfig/gtk+-3.0.pc >-/usr/local/lib/libcanberra-gtk3.so >-/usr/local/lib/pkgconfig/libcanberra-gtk3.pc >-/home/mesonuser/.local/lib/libgtk-3.so.0 >-/home/mesonuser/.local/lib/pkgconfig/gtk+-3.0.pc >- >-PKG_CONFIG_PATH="/home/mesonuser/.local/lib/pkgconfig:/usr/local/lib/pkgconfig" >- >-libcanberra-gtk3 is a library which depends on gtk+-3.0. The dependency >-is mentioned in the .pc file with 'Requires', so flags from gtk+-3.0 are >-used in both dynamic and static linking. >- >-Assume the user wants to compile an application which needs both >-libcanberra-gtk3 and gtk+-3.0. The application depends on features added >-in the latest version of gtk+-3.0, which can be found in the home >-directory of the user but not in /usr/local. When meson asks pkg-config >-for linker flags of libcanberra-gtk3, pkg-config picks >-/usr/local/lib/pkgconfig/libcanberra-gtk3.pc and >-/home/mesonuser/.local/lib/pkgconfig/gtk+-3.0.pc. Since these two >-libraries come from different prefixes, there will be two -L arguments >-in the output of pkg-config. If -L/usr/local/lib is put before >--L/home/mesonuser/.local/lib, meson will find both libraries in >-/usr/local/lib instead of picking libgtk-3.so.0 from the home directory. >- >-This can result in linking failure such as undefined references error >-when meson decides to put linker arguments of libcanberra-gtk3 before >-linker arguments of gtk+-3.0. When both /usr/local/lib/libgtk-3.so.0 and >-/home/mesonuser/.local/lib/libgtk-3.so.0 are present on the command >-line, the linker chooses the first one and ignores the second one. If >-the application needs new symbols that are only available in the second >-one, the linker will throw an error because of missing symbols. >- >-To resolve the issue, we should reorder -L flags according to >-PKG_CONFIG_PATH ourselves before using it to find the full path of >-library files. This makes sure that we always follow the preferences of >-users, without depending on the unreliable part of pkg-config output. >- >-Fixes https://github.com/mesonbuild/meson/issues/4271. >- >---- mesonbuild/dependencies/base.py.orig 2019-10-06 17:01:35 UTC >-+++ mesonbuild/dependencies/base.py >-@@ -784,6 +784,22 @@ class PkgConfigDependency(ExternalDependency): >- # Resolve the path as a compiler in the build directory would >- path = os.path.join(self.env.get_build_dir(), path) >- prefix_libpaths.add(path) >-+ # Library paths are not always ordered in a meaningful way >-+ # >-+ # Instead of relying on pkg-config or pkgconf to provide -L flags in a >-+ # specific order, we reorder library paths ourselves, according to th >-+ # order specified in PKG_CONFIG_PATH. See: >-+ # https://github.com/mesonbuild/meson/issues/4271 >-+ # >-+ # Only prefix_libpaths are reordered here because there should not be >-+ # too many system_libpaths to cause library version issues. >-+ pkg_config_path = os.environ.get('PKG_CONFIG_PATH') >-+ if pkg_config_path: >-+ pkg_config_path = pkg_config_path.split(os.pathsep) >-+ else: >-+ pkg_config_path = [] >-+ pkg_config_path = self._convert_mingw_paths(pkg_config_path) >-+ prefix_libpaths = sort_libpaths(prefix_libpaths, pkg_config_path) >- system_libpaths = OrderedSet() >- full_args = self._convert_mingw_paths(self._split_args(out)) >- for arg in full_args: >-@@ -2284,6 +2300,30 @@ def _build_external_dependency_list(name, env: Environ >- False, None, env, None, kwargs)) >- >- return candidates >-+ >-+ >-+def sort_libpaths(libpaths: List[str], refpaths: List[str]) -> List[str]: >-+ """Sort <libpaths> according to <refpaths> >-+ >-+ It is intended to be used to sort -L flags returned by pkg-config. >-+ Pkg-config returns flags in random order which cannot be relied on. >-+ """ >-+ if len(refpaths) == 0: >-+ return list(libpaths) >-+ >-+ def key_func(libpath): >-+ common_lengths = [] >-+ for refpath in refpaths: >-+ try: >-+ common_path = os.path.commonpath([libpath, refpath]) >-+ except ValueError: >-+ common_path = '' >-+ common_lengths.append(len(common_path)) >-+ max_length = max(common_lengths) >-+ max_index = common_lengths.index(max_length) >-+ reversed_max_length = len(refpaths[max_index]) - max_length >-+ return (max_index, reversed_max_length) >-+ return sorted(libpaths, key=key_func) >- >- >- def strip_system_libdirs(environment, for_machine: MachineChoice, link_args): >diff --git a/devel/meson/files/patch-run__unittests.py b/devel/meson/files/patch-run__unittests.py >index f6304188a5ee..0b3054794639 100644 >--- a/devel/meson/files/patch-run__unittests.py >+++ b/devel/meson/files/patch-run__unittests.py >@@ -1,60 +1,7 @@ > https://github.com/mesonbuild/meson/pull/4324 >-https://github.com/mesonbuild/meson/pull/4325 >-https://github.com/mesonbuild/meson/pull/6007 > > --- run_unittests.py.orig 2019-10-06 17:01:35 UTC > +++ run_unittests.py >-@@ -57,6 +57,7 @@ from mesonbuild.mesonlib import ( >- from mesonbuild.environment import detect_ninja >- from mesonbuild.mesonlib import MesonException, EnvironmentException >- from mesonbuild.dependencies import PkgConfigDependency, ExternalProgram >-+import mesonbuild.dependencies.base >- from mesonbuild.build import Target >- import mesonbuild.modules.pkgconfig >- >-@@ -1164,7 +1165,26 @@ class InternalTests(unittest.TestCase): >- deps = d.get_all_dependencies(target) >- self.assertEqual(deps, expdeps) >- >-+ def test_sort_libpaths(self): >-+ sort_libpaths = mesonbuild.dependencies.base.sort_libpaths >-+ self.assertEqual(sort_libpaths( >-+ ['/home/mesonuser/.local/lib', '/usr/local/lib', '/usr/lib'], >-+ ['/home/mesonuser/.local/lib/pkgconfig', '/usr/local/lib/pkgconfig']), >-+ ['/home/mesonuser/.local/lib', '/usr/local/lib', '/usr/lib']) >-+ self.assertEqual(sort_libpaths( >-+ ['/usr/local/lib', '/home/mesonuser/.local/lib', '/usr/lib'], >-+ ['/home/mesonuser/.local/lib/pkgconfig', '/usr/local/lib/pkgconfig']), >-+ ['/home/mesonuser/.local/lib', '/usr/local/lib', '/usr/lib']) >-+ self.assertEqual(sort_libpaths( >-+ ['/usr/lib', '/usr/local/lib', '/home/mesonuser/.local/lib'], >-+ ['/home/mesonuser/.local/lib/pkgconfig', '/usr/local/lib/pkgconfig']), >-+ ['/home/mesonuser/.local/lib', '/usr/local/lib', '/usr/lib']) >-+ self.assertEqual(sort_libpaths( >-+ ['/usr/lib', '/usr/local/lib', '/home/mesonuser/.local/lib'], >-+ ['/home/mesonuser/.local/lib/pkgconfig', '/usr/local/libdata/pkgconfig']), >-+ ['/home/mesonuser/.local/lib', '/usr/local/lib', '/usr/lib']) >- >-+ >- @unittest.skipIf(is_tarball(), 'Skipping because this is a tarball release') >- class DataTests(unittest.TestCase): >- >-@@ -5643,6 +5664,7 @@ class LinuxlikeTests(BasePlatformTests): >- # Assert that >- self.assertEqual(len(line.split(lib)), 2, msg=(lib, line)) >- >-+ @skipIfNoPkgconfig >- def test_noncross_options(self): >- # C_std defined in project options must be in effect also when native compiling. >- testdir = os.path.join(self.unit_test_dir, '51 noncross options') >-@@ -5665,6 +5687,7 @@ c = ['{0}'] >- # TODO should someday be explicit about build platform only here >- self.init(testdir, override_envvars=env) >- >-+ @skipIfNoPkgconfig >- def test_static_link(self): >- if is_cygwin(): >- raise unittest.SkipTest("Cygwin doesn't support LD_LIBRARY_PATH.") > @@ -5680,7 +5703,7 @@ c = ['{0}'] > # Test that installed libraries works > self.new_builddir()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 243202
: 210550