1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

devel/bazel update to 3.0.0

Release notes: https://blog.bazel.build/2020/03/31/bazel-3.0.html

PR:		245427
Submitted by:	Klaus Aehlig <aehlig@linta.de> (maintainer)
This commit is contained in:
Tobias C. Berner 2020-04-11 06:55:54 +00:00
parent 9cbc74d939
commit 2bd7230199
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=531405
5 changed files with 36 additions and 26 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= bazel
DISTVERSION= 2.1.0
DISTVERSION= 3.0.0
CATEGORIES= devel java
MASTER_SITES= https://storage.googleapis.com/bazel/${PORTVERSION}/rc${FINALRC}/
DISTNAME= bazel-${PORTVERSION}rc${FINALRC}-dist
@ -29,7 +29,7 @@ CONFLICTS_INSTALL= bazel029
# In bazel, a release is always code-wise identical to the final release candidate.
# Hence we can also download that one and so have a simple way to also test earlier release
# candidates.
FINALRC= 4
FINALRC= 2
SHEBANG_REGEX= .*(sh|txt|_stub|stub_.*|bazel|get_workspace_status|protobuf_support|_so)
USE_JAVA= yes
@ -64,7 +64,7 @@ post-patch:
-e 's|^\(PYTHON_BIN=.*\)|if [ "%VERSION%" = "3" ] ; then PYTHON_BIN=${PYTHON_CMD}; else \1 ; fi|' \
${WRKSRC}/tools/python/pywrapper_template.txt
@${REINPLACE_CMD} \
-e 's|/usr/bin/env python|${PYTHON_CMD}|' \
-e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
${WRKSRC}/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
do-build:

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1580457560
SHA256 (bazel-2.1.0rc4-dist.zip) = ac1d9a6189d717ba5aafcbc0745809155d24044df1a69e8de254c5b9182e894b
SIZE (bazel-2.1.0rc4-dist.zip) = 259805171
TIMESTAMP = 1584210642
SHA256 (bazel-3.0.0rc2-dist.zip) = 6431e745e304bb77e54386b577554c076a7b6e918e5f494bb7b8e77c6ecdc5ec
SIZE (bazel-3.0.0rc2-dist.zip) = 269096438

View File

@ -0,0 +1,21 @@
--- src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java.orig 2020-03-03 17:09:23 UTC
+++ src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
@@ -237,15 +237,15 @@ public class BazelPythonSemantics implem
PathFragment shExecutable = ShToolchain.getPathOrError(ruleContext);
// TODO(#8685): Remove this special-case handling as part of making the proper shebang a
// property of the Python toolchain configuration.
- String pythonExecutableName = OS.getCurrent() == OS.OPENBSD ? "python3" : "python";
+ String pythonExecutable = "%%PYTHON_CMD%%";
ruleContext.registerAction(
new SpawnAction.Builder()
.addInput(zipFile)
.addOutput(executable)
.setShellCommand(
shExecutable,
- "echo '#!/usr/bin/env "
- + pythonExecutableName
+ "echo '#!"
+ + pythonExecutable
+ "' | cat - "
+ zipFile.getExecPathString()
+ " > "

View File

@ -1,11 +0,0 @@
--- third_party/BUILD.orig 2019-07-11 08:41:05.213918000 +0000
+++ third_party/BUILD 2019-07-11 08:41:40.502181000 +0000
@@ -536,7 +536,7 @@
name = "filter_netty_dynamic_libs",
srcs = ["netty_tcnative/netty-tcnative-boringssl-static-2.0.24.Final.jar"],
outs = ["netty_tcnative/netty-tcnative-filtered.jar"],
- cmd = "cp $< $@ && zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES,
+ cmd = "cp $< $@ && (zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES + " || : )",
)
java_import(

View File

@ -1,6 +1,6 @@
--- tools/jdk/default_java_toolchain.bzl.orig 2019-08-06 08:09:07.930962000 +0000
+++ tools/jdk/default_java_toolchain.bzl 2019-08-06 08:16:15.674960000 +0000
@@ -19,25 +19,6 @@
--- tools/jdk/default_java_toolchain.bzl.orig 2020-02-14 20:56:31.911758000 +0100
+++ tools/jdk/default_java_toolchain.bzl 2020-02-14 20:57:09.531875000 +0100
@@ -21,25 +21,6 @@
]
JDK9_JVM_OPTS = [
@ -26,12 +26,12 @@
]
DEFAULT_JAVACOPTS = [
@@ -70,7 +51,7 @@
"@bazel_tools//tools/jdk:jdk_compiler_jar",
],
@@ -63,7 +44,7 @@
"javac_supports_workers": 1,
- "jvm_opts": JDK9_JVM_OPTS,
+ "jvm_opts": JDK8_JVM_OPTS,
"jvm_opts": select({
"@bazel_tools//src/conditions:openbsd": JDK8_JVM_OPTS,
- "//conditions:default": JDK9_JVM_OPTS,
+ "//conditions:default": JDK8_JVM_OPTS,
}),
"misc": DEFAULT_JAVACOPTS,
"compatible_javacopts": COMPATIBLE_JAVACOPTS,
"singlejar": ["@bazel_tools//tools/jdk:singlejar"],