Merge branch 'main' into meteorcloudy-patch-1

This commit is contained in:
James Sharpe 2024-08-08 17:05:53 +01:00 committed by GitHub
commit 61498f0ef4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 46 additions and 118 deletions

View File

@ -30,7 +30,7 @@ use_repo(
"glib_src", "glib_src",
"gnumake_src", "gnumake_src",
"meson_src", "meson_src",
"ninja_1.12.0_toolchains", "ninja_1.12.1_toolchains",
"ninja_build_src", "ninja_build_src",
"pkgconfig_src", "pkgconfig_src",
"rules_foreign_cc_framework_toolchains", "rules_foreign_cc_framework_toolchains",
@ -39,7 +39,7 @@ use_repo(
register_toolchains( register_toolchains(
"@rules_foreign_cc_framework_toolchains//:all", "@rules_foreign_cc_framework_toolchains//:all",
"@cmake_3.23.2_toolchains//:all", "@cmake_3.23.2_toolchains//:all",
"@ninja_1.12.0_toolchains//:all", "@ninja_1.12.1_toolchains//:all",
"@python_3_9//:all", "@python_3_9//:all",
"@rules_foreign_cc//toolchains:all", "@rules_foreign_cc//toolchains:all",
) )

View File

@ -86,7 +86,8 @@ test_suite(
"//cares:test_c_ares", "//cares:test_c_ares",
"//cares:test_c_ares_ios", "//cares:test_c_ares_ios",
"//curl:curl_test_suite", "//curl:curl_test_suite",
"//glib:glib_build_test", # Fails due to linker error in ffi (https://github.com/mesonbuild/meson/issues/12282)
# "//glib:glib_build_test",
"//gn:gn_launch_test", "//gn:gn_launch_test",
"//gperftools:test", "//gperftools:test",
"//iconv:iconv_macos_build_test", "//iconv:iconv_macos_build_test",
@ -95,7 +96,8 @@ test_suite(
"//libpng:test_libpng", "//libpng:test_libpng",
"//libssh2:libssh2_build_test", "//libssh2:libssh2_build_test",
"//log4cxx:log4cxx_build_test", "//log4cxx:log4cxx_build_test",
"//mesa:mesa_build_test", # Fails due to linker argument error (https://github.com/mesonbuild/meson/issues/12282)
# "//mesa:mesa_build_test",
"//openssl:openssl_test_suite", "//openssl:openssl_test_suite",
"//pcre:pcre_build_test", "//pcre:pcre_build_test",
"//python:python_tests", "//python:python_tests",

View File

@ -50,6 +50,10 @@ configure_make(
configure_options = [ configure_options = [
"--disable-shared", "--disable-shared",
], ],
configure_prefix = select({
"@platforms//os:macos": "CPPFLAGS=-DAPR_IOVEC_DEFINED ",
"//conditions:default": "",
}),
env = select({ env = select({
"@platforms//os:macos": {"AR": ""}, "@platforms//os:macos": {"AR": ""},
"//conditions:default": {}, "//conditions:default": {},

View File

@ -9,17 +9,16 @@ def apr_repositories():
name = "apr", name = "apr",
build_file = Label("//apr:BUILD.apr.bazel"), build_file = Label("//apr:BUILD.apr.bazel"),
patches = [ patches = [
# https://bz.apache.org/bugzilla/show_bug.cgi?id=50146
Label("//apr:macos_iovec.patch"),
# https://bz.apache.org/bugzilla/show_bug.cgi?id=64753 # https://bz.apache.org/bugzilla/show_bug.cgi?id=64753
Label("//apr:macos_pid_t.patch"), Label("//apr:macos_pid_t.patch"),
# https://apachelounge.com/viewtopic.php?t=8260 # https://apachelounge.com/viewtopic.php?t=8260
Label("//apr:windows_winnt.patch"), Label("//apr:windows_winnt.patch"),
], ],
sha256 = "48e9dbf45ae3fdc7b491259ffb6ccf7d63049ffacbc1c0977cced095e4c2d5a2", sha256 = "",
strip_prefix = "apr-1.7.0", strip_prefix = "apr-1.7.4",
urls = [ urls = [
"https://mirror.bazel.build/www-eu.apache.org/dist/apr/apr-1.7.0.tar.gz", "https://mirror.bazel.build/www-eu.apache.org/dist/apr/apr-1.7.4.tar.gz",
"https://www-eu.apache.org/dist/apr/apr-1.7.0.tar.gz", "https://dlcdn.apache.org/apr/apr-1.7.4.tar.gz",
"https://www-eu.apache.org/dist/apr/apr-1.7.4.tar.gz",
], ],
) )

View File

@ -1,97 +0,0 @@
diff -ruN configure configure
--- configure 2019-04-01 19:56:23.000000000 +0200
+++ configure 2019-04-01 19:56:23.000000000 +0200
@@ -24475,6 +24475,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+$ac_includes_default
#include <sys/types.h>
#ifdef WIN32
#define binmode "b"
@@ -24485,7 +24486,7 @@
{
FILE *f=fopen("conftestval", "w" binmode);
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(pid_t));
+ fprintf(f, "%zd\n", sizeof(pid_t));
exit(0);
}
_ACEOF
@@ -24800,6 +24801,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+$ac_includes_default
#include <sys/types.h>
#ifdef WIN32
#define binmode "b"
@@ -24810,7 +24812,7 @@
{
FILE *f=fopen("conftestval", "w" binmode);
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(ssize_t));
+ fprintf(f, "%zd\n", sizeof(ssize_t));
exit(0);
}
_ACEOF
@@ -24863,6 +24865,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+$ac_includes_default
#include <stddef.h>
#ifdef WIN32
#define binmode "b"
@@ -24873,7 +24876,7 @@
{
FILE *f=fopen("conftestval", "w" binmode);
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(size_t));
+ fprintf(f, "%zd\n", sizeof(size_t));
exit(0);
}
_ACEOF
@@ -24927,6 +24930,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+$ac_includes_default
#include <sys/types.h>
#ifdef WIN32
#define binmode "b"
@@ -24937,7 +24941,7 @@
{
FILE *f=fopen("conftestval", "w" binmode);
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(off_t));
+ fprintf(f, "%zd\n", sizeof(off_t));
exit(0);
}
_ACEOF
@@ -25308,7 +25312,7 @@
{
FILE *f=fopen("conftestval", "w" binmode);
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(ino_t));
+ fprintf(f, "%zd\n", sizeof(ino_t));
exit(0);
}
_ACEOF
@@ -25584,6 +25588,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+$ac_includes_default
#include <sys/types.h>
#include <sys/uio.h>
#ifdef WIN32
@@ -25595,7 +25600,7 @@
{
FILE *f=fopen("conftestval", "w" binmode);
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(struct iovec));
+ fprintf(f, "%zd\n", sizeof(struct iovec));
exit(0);
}
_ACEOF

View File

@ -9,10 +9,10 @@ def bison_repositories():
http_archive, http_archive,
name = "bison", name = "bison",
build_file = Label("//bison:BUILD.bison.bazel"), build_file = Label("//bison:BUILD.bison.bazel"),
strip_prefix = "bison-3.3", strip_prefix = "bison-3.8.2",
urls = [ urls = [
"https://mirror.bazel.build/ftp.gnu.org/gnu/bison/bison-3.3.tar.gz", "https://mirror.bazel.build/ftp.gnu.org/gnu/bison/bison-3.8.2.tar.gz",
"http://ftp.gnu.org/gnu/bison/bison-3.3.tar.gz", "https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.gz",
], ],
sha256 = "fdeafb7fffade05604a61e66b8c040af4b2b5cbb1021dcfe498ed657ac970efd", sha256 = "",
) )

View File

@ -4,7 +4,7 @@ load("//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
load("//toolchains:prebuilt_toolchains.bzl", "prebuilt_toolchains") load("//toolchains:prebuilt_toolchains.bzl", "prebuilt_toolchains")
_DEFAULT_CMAKE_VERSION = "3.23.2" _DEFAULT_CMAKE_VERSION = "3.23.2"
_DEFAULT_NINJA_VERSION = "1.12.0" _DEFAULT_NINJA_VERSION = "1.12.1"
cmake_toolchain_version = tag_class(attrs = { cmake_toolchain_version = tag_class(attrs = {
"version": attr.string(doc = "The cmake version", default = _DEFAULT_CMAKE_VERSION), "version": attr.string(doc = "The cmake version", default = _DEFAULT_CMAKE_VERSION),

View File

@ -110,10 +110,13 @@ def _create_meson_script(configureParameters):
prefix = "{} ".format(expand_locations_and_make_variables(ctx, attrs.tool_prefix, "tool_prefix", data)) if attrs.tool_prefix else "" prefix = "{} ".format(expand_locations_and_make_variables(ctx, attrs.tool_prefix, "tool_prefix", data)) if attrs.tool_prefix else ""
script.append("{prefix}{meson} --prefix={install_dir} {options} {source_dir}".format( setup_args_str = " ".join(expand_locations_and_make_variables(ctx, ctx.attr.setup_args, "setup_args", data))
script.append("{prefix}{meson} setup --prefix={install_dir} {setup_args} {options} {source_dir}".format(
prefix = prefix, prefix = prefix,
meson = attrs.meson_path, meson = attrs.meson_path,
install_dir = "$$INSTALLDIR$$", install_dir = "$$INSTALLDIR$$",
setup_args = setup_args_str,
options = options_str, options = options_str,
source_dir = "$$EXT_BUILD_ROOT$$/" + root, source_dir = "$$EXT_BUILD_ROOT$$/" + root,
)) ))
@ -171,6 +174,10 @@ def _attrs():
mandatory = False, mandatory = False,
default = {}, default = {},
), ),
"setup_args": attr.string_list(
doc = "Arguments for the Meson setup command",
mandatory = False,
),
}) })
return attrs return attrs

View File

@ -95,11 +95,11 @@ fi
) )
def copy_dir_contents_to_dir(source, target): def copy_dir_contents_to_dir(source, target):
# Beause FreeBSD `cp` doesn't have `--no-copy-directory`, we have to # Beause FreeBSD `cp` doesn't have `--no-target-directory`, we have to
# do something more complex for this environment. # do something more complex for this environment.
return """\ return """\
if [[ -d "{source}" ]]; then if [[ -d "{source}" ]]; then
cp -L -R "{source}"/* "{target}" cp -L -R "{source}"/. "{target}"
else else
cp -L -R "{source}" "{target}" cp -L -R "{source}" "{target}"
fi fi

View File

@ -86,11 +86,11 @@ fi
) )
def copy_dir_contents_to_dir(source, target): def copy_dir_contents_to_dir(source, target):
# Beause macos `cp` doesn't have `--no-copy-directory`, we have to # Beause macos `cp` doesn't have `--no-target-directory`, we have to
# do something more complext for this environment. # do something more complext for this environment.
return """\ return """\
if [[ -d "{source}" ]]; then if [[ -d "{source}" ]]; then
cp -L -R "{source}"/ "{target}" cp -L -R "{source}"/. "{target}"
else else
cp -L -R "{source}" "{target}" cp -L -R "{source}" "{target}"
fi fi

View File

@ -11,7 +11,7 @@ def rules_foreign_cc_dependencies(
register_default_tools = True, register_default_tools = True,
cmake_version = "3.23.2", cmake_version = "3.23.2",
make_version = "4.4.1", make_version = "4.4.1",
ninja_version = "1.12.0", ninja_version = "1.12.1",
meson_version = "1.1.1", meson_version = "1.1.1",
pkgconfig_version = "0.29.2", pkgconfig_version = "0.29.2",
register_preinstalled_tools = True, register_preinstalled_tools = True,

View File

@ -135,6 +135,19 @@ def _ninja_toolchain(version, register_toolchains):
native.register_toolchains( native.register_toolchains(
"@rules_foreign_cc//toolchains:built_ninja_toolchain", "@rules_foreign_cc//toolchains:built_ninja_toolchain",
) )
if version == "1.12.1":
maybe(
http_archive,
name = "ninja_build_src",
build_file_content = _ALL_CONTENT,
integrity = "sha256-ghvf9Io/aDvEuztvC1/nstZHz2XVKutjMoyRpsbfKFo=",
strip_prefix = "ninja-1.12.1",
urls = [
"https://mirror.bazel.build/github.com/ninja-build/ninja/archive/v1.12.1.tar.gz",
"https://github.com/ninja-build/ninja/archive/v1.12.1.tar.gz",
],
)
return
if version == "1.12.0": if version == "1.12.0":
maybe( maybe(
http_archive, http_archive,