Skip to content

Commit

Permalink
meson: update to 0.62.1, add cross-files for ppc & ppc64
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 authored and kencu committed May 16, 2022
1 parent 2fd08a2 commit 9eaac52
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 33 deletions.
18 changes: 6 additions & 12 deletions devel/meson/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PortSystem 1.0
PortGroup python 1.0
PortGroup github 1.0

github.setup mesonbuild meson 0.59.3
github.setup mesonbuild meson 0.62.1
revision 0

github.tarball_from releases
Expand All @@ -23,14 +23,13 @@ long_description Meson is a build system designed to optimize programmer prod
Valgrind, CCache and the like. It is both extremely fast, and, even more importantly, \
as user friendly as possible.

checksums rmd160 36994a8e29e15751a9a1977aad581057a52f3943 \
sha256 0a35cfd4cb779a6a415ad3ccbf2d4143334e96139125585ce49915bec494da02 \
size 1953620
checksums rmd160 96db39f90328a64d508cc7c0075aa89fecde939b \
sha256 a0f5caa1e70da12d5e63aa6a9504273759b891af36c8d87de381a4ed1380e845 \
size 2034805

# as of verison 0.45.0,requires python 3.5 or better
# As of verison 0.62.0, requires python 3.7 or later

python.versions 36 37 38 39
python.default_version 39
python.default_version 310
python.link_binaries no

depends_build-append \
Expand Down Expand Up @@ -80,7 +79,6 @@ platform darwin 8 {
size 1899464

patchfiles-delete patch-meson-clang-unknown-optimization-error.diff \
patch-meson-objc-accept-gnu89.diff \
patch-meson-32bit-apple.diff \
patch-meson-gnome.diff
patchfiles-append patch-meson57-tiger-no-rpath-fix.diff \
Expand Down Expand Up @@ -125,10 +123,6 @@ post-destroot {
xinstall -d ${destroot}${vim_dir}/${d}
xinstall -m 644 ${worksrcpath}/data/syntax-highlighting/vim/${d}/meson.vim ${destroot}${vim_dir}/${d}
}

set emacs_lispdir ${prefix}/share/emacs/site-lisp
xinstall -d ${destroot}${emacs_lispdir}
xinstall -m 644 ${worksrcpath}/data/syntax-highlighting/emacs/meson.el ${destroot}${emacs_lispdir}
}

# the following block avoids requiring users to 'sudo port select python3 python37'
Expand Down
9 changes: 9 additions & 0 deletions devel/meson/files/cross/ppc-darwin
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[host_machine]
system = 'darwin'
cpu_family = 'ppc'
cpu = 'ppc'
endian = 'big'

[binaries]
pkgconfig = '@@PREFIX@@/bin/pkg-config'
cmake = '@@PREFIX@@/bin/cmake'
9 changes: 9 additions & 0 deletions devel/meson/files/cross/ppc64-darwin
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[host_machine]
system = 'darwin'
cpu_family = 'ppc64'
cpu = 'ppc64'
endian = 'big'

[binaries]
pkgconfig = '@@PREFIX@@/bin/pkg-config'
cmake = '@@PREFIX@@/bin/cmake'
26 changes: 10 additions & 16 deletions devel/meson/files/patch-meson-gcc-appleframeworks.diff
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
Upstream: https://github.com/mesonbuild/meson/pull/9211

Fix the following error when configuring pango (or any project with
appleframeworks listed as a dependency) using GCC:

ERROR: Dependency "appleframeworks" not found, tried framework
--- mesonbuild/compilers/mixins/clike.py.orig 2021-09-02 16:07:01.000000000 -0400
+++ mesonbuild/compilers/mixins/clike.py 2021-09-02 16:07:36.000000000 -0400
@@ -1199,9 +1199,6 @@
Finds the framework with the specified name, and returns link args for
the same or returns None when the framework is not found.
--- mesonbuild/compilers/mixins/clike.py.orig 2022-01-03 04:12:32.000000000 +0800
+++ mesonbuild/compilers/mixins/clike.py 2022-04-06 05:50:19.000000000 +0800
@@ -1123,9 +1123,6 @@
unless you select a particular macOS SDK with the -isysroot flag.
You can also add to this by setting -F in CFLAGS.
'''
- # TODO: maybe this belongs in clang? also, should probably check for macOS?
- # TODO: this really needs to be *AppleClang*, not just any clang.
- if self.id != 'clang':
- raise mesonlib.MesonException('Cannot find frameworks with non-clang compiler')
return self._find_framework_impl(name, env, extra_dirs, allow_system)

def get_crt_compile_args(self, crt_val: str, buildtype: str) -> T.List[str]:
- raise mesonlib.MesonException('Cannot find framework path with non-clang compiler')
# Construct the compiler command-line
commands = self.get_exelist() + ['-v', '-E', '-']
commands += self.get_always_args()
10 changes: 5 additions & 5 deletions devel/meson/files/patch-meson-gnome.diff
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ the above command, which should print something like

[1] https://trac.macports.org/ticket/62391

--- mesonbuild/modules/gnome.py.orig
+++ mesonbuild/modules/gnome.py
@@ -816,6 +816,13 @@
--- mesonbuild/modules/gnome.py.orig 2022-03-22 05:17:35.000000000 +0800
+++ mesonbuild/modules/gnome.py 2022-04-06 05:54:44.000000000 +0800
@@ -1177,6 +1177,13 @@
for incdir in typelib_includes:
typelib_cmd += ["--includedir=" + incdir]

Expand All @@ -29,6 +29,6 @@ the above command, which should print something like
+ state.environment.get_shared_lib_dir(),
+ target.filename)]
+
typelib_target = self._make_typelib_target(state, typelib_output, typelib_cmd, generated_files, kwargs)
typelib_target = self._make_typelib_target(state, typelib_output, typelib_cmd, generated_files, T.cast('T.Dict[str, T.Any]', kwargs))

self._devenv_append('GI_TYPELIB_PATH', os.path.join(state.environment.get_build_dir(), state.subdir))
self._devenv_prepend('GI_TYPELIB_PATH', os.path.join(state.environment.get_build_dir(), state.subdir))

2 comments on commit 9eaac52

@tomio-arisaka
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meson cannot build pango on PPC/Tiger

When building pango, the following error occurs:

:info:configure Run-time dependency appleframeworks found: NO (tried framework)
:info:configure meson.build:370:2: ERROR: Dependency "appleframeworks" not found, tried framework

This issue is a regression due to the wrong patch-file.

The meson port includes two versions (0.62.1 and 0.58.2).
On Tiger, version 0.58.2 of meson is installed.
But the patch-files are not for version 0.58.2.
Then this issue occurs.
(The previous version of patch-file works well)

@kencu
Copy link
Contributor

@kencu kencu commented on 9eaac52 Dec 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fixed by

4397617

Please sign in to comment.