pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bazel: Unbreak



Module Name:	pkgsrc-wip
Committed By:	Ryo ONODERA <ryoon%NetBSD.org@localhost>
Pushed By:	ryoon
Date:		Sat Dec 9 14:20:28 2023 +0900
Changeset:	9c34cb8205e7d7decf5dd7795dad39bc3bc3197f

Modified Files:
	bazel/Makefile
	bazel/distinfo
	bazel/patches/patch-src_main_cpp_blaze__util__bsd.cc
	bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl

Log Message:
bazel: Unbreak

Works for moz at least.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9c34cb8205e7d7decf5dd7795dad39bc3bc3197f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 bazel/Makefile                                     | 10 ++++---
 bazel/distinfo                                     | 10 +++----
 .../patches/patch-src_main_cpp_blaze__util__bsd.cc |  2 +-
 .../patch-tools_cpp_bsd__cc__toolchain__config.bzl | 31 +++++++++++++---------
 4 files changed, 31 insertions(+), 22 deletions(-)

diffs:
diff --git a/bazel/Makefile b/bazel/Makefile
index af61f475b2..1d085f0dcc 100644
--- a/bazel/Makefile
+++ b/bazel/Makefile
@@ -17,8 +17,7 @@ EXTRACT_SUFX=	.zip
 .else
 DISTNAME=	bazel-6.4.0-dist-netbsd
 PKGNAME=	${DISTNAME:S/-dist-netbsd//}
-#MASTER_SITES=	${MASTER_SITE_LOCAL}
-MASTER_SITES=	https://www.ryoon.net/~ryoon/bazel/20231130/
+MASTER_SITES=	${MASTER_SITE_LOCAL}
 .endif
 CATEGORIES=	devel
 
@@ -44,7 +43,10 @@ REPLACE_BASH+=	scripts/*.sh
 REPLACE_BASH+=	tools/*.sh
 REPLACE_BASH+=	tools/*/*.sh
 
-MAKE_ENV+=	EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk"
+EXTRA_BAZEL_ARGS+=	--tool_java_runtime_version=local_jdk
+#EXTRA_BAZEL_ARGS+=	--host_action_env=CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
+#EXTRA_BAZEL_ARGS+=	--action_env=CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
+MAKE_ENV+=	EXTRA_BAZEL_ARGS=${EXTRA_BAZEL_ARGS:Q}
 
 INSTALLATION_DIRS+=	bin
 
@@ -53,7 +55,7 @@ do-patch:
 
 pre-configure:
 	${FIND} ${WRKSRC} | ${GREP} '\.orig$$' | xargs ${RM}
-	# TODO: Honor environment variables
+	# Do not use wrapped toolchain after installation
 	${RM} -r ${WRKDIR}/.cwrapper
 
 do-build:
diff --git a/bazel/distinfo b/bazel/distinfo
index 16af22f795..f0c44dcee2 100644
--- a/bazel/distinfo
+++ b/bazel/distinfo
@@ -1,8 +1,8 @@
 $NetBSD$
 
-BLAKE2s (bazel-6.4.0-dist-netbsd.tar.gz) = 7ea455aa75176cea36f261671b827b433d0ffb15acb653740d867757c213e5b2
-SHA512 (bazel-6.4.0-dist-netbsd.tar.gz) = 71b2fe9ebd635b4d7fd69a50e4ef8897154016e3e3d400c2bf0eda0e1bc56006d75518de971760fd8c35576832cd33a0d6e62b89d052d872e005280d72a9464d
-Size (bazel-6.4.0-dist-netbsd.tar.gz) = 198661276 bytes
+BLAKE2s (bazel-6.4.0-dist-netbsd.tar.gz) = b334d922c89eaaa175e211be15efce81712c744a9fbfd78ab83a0263c139796d
+SHA512 (bazel-6.4.0-dist-netbsd.tar.gz) = 0a974c72ac6f5d1ad0804c01653677cd88d3e7666e1f1588836d5b405dc5e2edbbbd66b191b49808855d79d4712de24bedff9fe2f24b60506a869da4e5b84c10
+Size (bazel-6.4.0-dist-netbsd.tar.gz) = 198661237 bytes
 SHA1 (patch-distdir__deps.bzl) = 83dead7d5c7374ae7ada4feec5ec3bbd18d9112b
 SHA1 (patch-scripts_bootstrap_buildenv.sh) = 7590cf62b1b7abe722addeddd3d4f0595ebc2a1f
 SHA1 (patch-scripts_packages_BUILD) = 9cbd73caefe9f7b1b23cbbedf3657ee849d4dfdc
@@ -11,7 +11,7 @@ SHA1 (patch-src_BUILD) = cd8858313bec19f56c148944eea0962c9ef83d98
 SHA1 (patch-src_conditions_BUILD) = 5e099200f294e5905a09d323d95161784586e91c
 SHA1 (patch-src_conditions_BUILD.tools) = aec0d6cb07d19229a0e29827b4716c35816c4a7e
 SHA1 (patch-src_main_cpp_BUILD) = f14c549105eeba47593842569822fb2f65a01479
-SHA1 (patch-src_main_cpp_blaze__util__bsd.cc) = dda2e930455ff85a207779f14ec8ee677e99adc7
+SHA1 (patch-src_main_cpp_blaze__util__bsd.cc) = 1495bac14b4644e5317c4866bcfa2941eb99af34
 SHA1 (patch-src_main_java_com_google_devtools_build_lib_analysis_ShellConfiguration.java) = 2030b61056c3919b68dfa22a133e2c66f14ad3c7
 SHA1 (patch-src_main_java_com_google_devtools_build_lib_analysis_config_AutoCpuConverter.java) = 2e4158f0c25afab27abf4316f0580ba99cbbd1eb
 SHA1 (patch-src_main_java_com_google_devtools_build_lib_bazel_repository_LocalConfigPlatformFunction.java) = fb8e2c15b99af685daffa23577da09223fc8cd4b
@@ -44,7 +44,7 @@ SHA1 (patch-third__party_abseil-cpp_netbsd-sunos.patch) = c9ff33d2c331312736db8f
 SHA1 (patch-third__party_grpc_netbsd-config.patch) = ea14e800a118a3541356c00df5d8edb1aed309fa
 SHA1 (patch-third__party_zstd-jni_zstd-jni.BUILD) = 338d636638b429da3f8a695cc15010174651dd23
 SHA1 (patch-tools_cpp_BUILD.static.bsd) = af9e8cf9f2f069bc4264f4ab3e57aa1e8686946a
-SHA1 (patch-tools_cpp_bsd__cc__toolchain__config.bzl) = 369dbfe8b29749cb8aa7dff66dd6cadc8a7190b9
+SHA1 (patch-tools_cpp_bsd__cc__toolchain__config.bzl) = afde4de9ac788a615429b39fa7b297551963cc34
 SHA1 (patch-tools_cpp_cc__configure.bzl) = 24cd5bb7b7a09d12853a7b19a8c41b875a51a30f
 SHA1 (patch-tools_cpp_lib__cc__configure.bzl) = 02a5c867e61f7f59fa2fd61e70548c25448aa366
 SHA1 (patch-tools_cpp_unix__cc__configure.bzl) = a5d181c89fd032e02032d27d0189a8db6a936de4
diff --git a/bazel/patches/patch-src_main_cpp_blaze__util__bsd.cc b/bazel/patches/patch-src_main_cpp_blaze__util__bsd.cc
index 47ba827f84..2df1f41ade 100644
--- a/bazel/patches/patch-src_main_cpp_blaze__util__bsd.cc
+++ b/bazel/patches/patch-src_main_cpp_blaze__util__bsd.cc
@@ -7,7 +7,7 @@ $NetBSD$
  # define HAVE_PROCSTAT
  # define STANDARD_JAVABASE "/usr/local/openjdk8"
 +#elif defined(__NetBSD__)
-+# define STANDARD_JAVABASE "/usr/pkg/java/openjdk17"
++# define STANDARD_JAVABASE "/usr/pkg/java/openjdk11"
  #elif defined(__OpenBSD__)
  # define STANDARD_JAVABASE "/usr/local/jdk-17"
  #else
diff --git a/bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl b/bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl
index 3344869910..3b04696d3a 100644
--- a/bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl
+++ b/bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- tools/cpp/bsd_cc_toolchain_config.bzl.orig	1979-12-31 15:00:00.000000000 +0000
+--- tools/cpp/bsd_cc_toolchain_config.bzl.orig	2023-12-05 16:43:07.613565028 +0000
 +++ tools/cpp/bsd_cc_toolchain_config.bzl
 @@ -56,7 +56,7 @@ all_link_actions = [
  
@@ -11,7 +11,7 @@ $NetBSD$
      compiler = "compiler"
      toolchain_identifier = "local_{}".format(cpu) if is_bsd else "stub_armeabi-v7a"
      host_system_name = "local" if is_bsd else "armeabi-v7a"
-@@ -241,17 +241,32 @@ def _impl(ctx):
+@@ -241,17 +241,19 @@ def _impl(ctx):
      else:
          features = [supports_dynamic_linker_feature, supports_pic_feature]
  
@@ -25,11 +25,25 @@ $NetBSD$
  
 -    if is_bsd:
 +    if is_bsd and not (cpu == "netbsd"):
+         tool_paths = [
+             tool_path(name = "ar", path = "/usr/bin/ar"),
+             tool_path(name = "cpp", path = "/usr/bin/cpp"),
+             tool_path(name = "dwp", path = "/usr/bin/dwp"),
+-            tool_path(name = "gcc", path = "/usr/bin/clang"),
++            tool_path(name = "gcc", path = "/usr/bin/gcc"),
+             tool_path(name = "gcov", path = "/usr/bin/gcov"),
+             tool_path(name = "ld", path = "/usr/bin/ld"),
+             tool_path(name = "nm", path = "/usr/bin/nm"),
+@@ -259,6 +261,19 @@ def _impl(ctx):
+             tool_path(name = "objdump", path = "/usr/bin/objdump"),
+             tool_path(name = "strip", path = "/usr/bin/strip"),
+         ]
++    elif (cpu == "netbsd"):
 +        tool_paths = [
 +            tool_path(name = "ar", path = "/usr/bin/ar"),
 +            tool_path(name = "cpp", path = "/usr/bin/cpp"),
 +            tool_path(name = "dwp", path = "/usr/bin/dwp"),
-+            tool_path(name = "gcc", path = "/usr/bin/cc"),
++            tool_path(name = "gcc", path = "/usr/bin/gcc"),
 +            tool_path(name = "gcov", path = "/usr/bin/gcov"),
 +            tool_path(name = "ld", path = "/usr/bin/ld"),
 +            tool_path(name = "nm", path = "/usr/bin/nm"),
@@ -37,13 +51,6 @@ $NetBSD$
 +            tool_path(name = "objdump", path = "/usr/bin/objdump"),
 +            tool_path(name = "strip", path = "/usr/bin/strip"),
 +        ]
-+    elif (cpu == "netbsd"):
+     else:
          tool_paths = [
-             tool_path(name = "ar", path = "/usr/bin/ar"),
-             tool_path(name = "cpp", path = "/usr/bin/cpp"),
-             tool_path(name = "dwp", path = "/usr/bin/dwp"),
--            tool_path(name = "gcc", path = "/usr/bin/clang"),
-+            tool_path(name = "gcc", path = "/usr/bin/gcc"),
-             tool_path(name = "gcov", path = "/usr/bin/gcov"),
-             tool_path(name = "ld", path = "/usr/bin/ld"),
-             tool_path(name = "nm", path = "/usr/bin/nm"),
+             tool_path(name = "ar", path = "/bin/false"),


Home | Main Index | Thread Index | Old Index