termux_setup_meson: Bump Meson to 1.0.0

This commit is contained in:
Tee KOBAYASHI 2023-01-24 14:00:01 +09:00 committed by xtkoba
parent 3920c81190
commit dc63012fa7
2 changed files with 20 additions and 39 deletions

View File

@ -1,36 +1,25 @@
# Always return true for libintl check.
--- misc.py.orig 2022-05-24 23:37:10.802388776 +0530
+++ ./mesonbuild/dependencies/misc.py 2022-05-24 23:39:14.342388729 +0530
@@ -471,25 +471,18 @@
class IntlBuiltinDependency(BuiltinDependency):
def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]):
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -494,7 +494,7 @@
self.feature_since = ('0.59.0', "consider checking for `ngettext` with and without `find_library('intl')`")
code = '''#include <libintl.h>\n\nint main() {\n gettext("Hello world");\n}'''
- if self.clib_compiler.links(code, env)[0]:
+ if True:
self.is_found = True
@@ -503,10 +503,7 @@
super().__init__(name, env, kwargs)
-
- if self.clib_compiler.has_function('ngettext', '', env)[0]:
- self.is_found = True
+ self.is_found = True
class IntlSystemDependency(SystemDependency):
def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]):
super().__init__(name, env, kwargs)
+ self.is_found = True
self.feature_since = ('0.59.0', "consider checking for `ngettext` with and without `find_library('intl')`")
- h = self.clib_compiler.has_header('libintl.h', '', env)
- self.link_args = self.clib_compiler.find_library('intl', env, [], self.libtype)
-
- if h[0] and self.link_args:
- self.is_found = True
-
- if self.static:
- if not self._add_sub_dependency(iconv_factory(env, self.for_machine, {'static': True})):
- self.is_found = False
- return
+ if self.static:
+ if not self._add_sub_dependency(iconv_factory(env, self.for_machine, {'static': True})):
+ self.is_found = False
+ return
@factory_methods({DependencyMethods.PKGCONFIG, DependencyMethods.CONFIG_TOOL, DependencyMethods.SYSTEM})
+ if True:
self.is_found = True
if self.static:

View File

@ -1,6 +1,6 @@
termux_setup_meson() {
termux_setup_ninja
local MESON_VERSION=0.61.2
local MESON_VERSION=1.0.0
local MESON_FOLDER
if [ "${TERMUX_PACKAGES_OFFLINE-false}" = "true" ]; then
@ -16,16 +16,8 @@ termux_setup_meson() {
termux_download \
"https://github.com/mesonbuild/meson/releases/download/$MESON_VERSION/meson-$MESON_VERSION.tar.gz" \
"$MESON_TAR_FILE" \
0233a7f8d959079318f6052b0939c27f68a5de86ba601f25c9ee6869fb5f5889
aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05
tar xf "$MESON_TAR_FILE" -C "$TERMUX_PKG_TMPDIR"
if [ "$MESON_VERSION" = "0.61.2" ]; then
local MESON_0_61_2_GTKDOC_PATCH_FILE=$TERMUX_PKG_TMPDIR/meson-0.61.2-gtkdoc.patch
termux_download \
"https://github.com/mesonbuild/meson/commit/266e8acb5807b38a550cb5145cea0e19545a21d7.patch" \
"$MESON_0_61_2_GTKDOC_PATCH_FILE" \
79ecf0e16f613396f43621a928df6c17e6260aa190c320e5c01adad94abd07ad
patch --silent -p1 -d "$MESON_TMP_FOLDER" < "$MESON_0_61_2_GTKDOC_PATCH_FILE"
fi
shopt -s nullglob
local f
for f in "$TERMUX_SCRIPTDIR"/scripts/build/setup/meson-*.patch; do