Index: head/devel/bazel/Makefile =================================================================== --- head/devel/bazel/Makefile (revision 531404) +++ head/devel/bazel/Makefile (revision 531405) @@ -1,90 +1,90 @@ # Created by: Klaus Aehlig # $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 MAINTAINER= aehlig@linta.de COMMENT= Fast and correct build system LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_aarch64= fails to build: java.lang.OutOfMemoryError: Java heap space BROKEN_armv6= fails to package: cp: bazel: No such file or directory BROKEN_armv7= fails to package: cp: bazel: No such file or directory BROKEN_FreeBSD_11_powerpc64= fails to compile: Action failed to execute: java.io.IOException: Cannot run program /usr/bin/clang BROKEN_FreeBSD_12_powerpc64= fails to compile: Action failed to execute: java.io.IOException: Cannot run program /usr/bin/clang BUILD_DEPENDS= bash:shells/bash \ zip:archivers/zip USES= python:3.3+ shebangfix zip:infozip 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 JAVA_VENDOR= openjdk JAVA_VERSION= 1.8 JAVA_BUILD= yes JAVA_RUN= yes NO_WRKSUBDIR= YES # The bazel binary is also a zip archive (extracted by the elf part), it must not be stripped STRIP= .include .if ${ARCH} == "i386" EXTRA_PATCHES+= ${FILESDIR}/extra-i386_tools_cpp_BUILD.static.freebsd .endif # Have the location of the system-wide rc file reside ${ETCDIR}. # Also adapt the sample file to disable persistent java workers as they # do not work reliably on FreeBSD. post-patch: @${REINPLACE_CMD} \ -e "s|/etc/bazel.bazelrc|${ETCDIR}/bazel.bazelrc|" \ ${WRKSRC}/src/main/cpp/blaze_util_posix.cc \ ${WRKSRC}/src/main/cpp/BUILD @${ECHO_CMD} build --strategy=Javac=standalone >> ${WRKSRC}/scripts/packages/bazel.bazelrc @${ECHO_CMD} build --host_javabase=@local_jdk//:jdk >> ${WRKSRC}/scripts/packages/bazel.bazelrc @${ECHO_CMD} build --action_env=PATH=/bin:/usr/bin/:${LOCALBASE}/bin >> ${WRKSRC}/scripts/packages/bazel.bazelrc @${REINPLACE_CMD} \ -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: @${MKDIR} ${WRKDIR}/bazel_tmp (if [ -z "$${SOURCE_DATE_EPOCH}" ] ; \ then SOURCE_DATE_EPOCH=`grep TIMESTAMP ${DISTINFO_FILE} \ | ${SED} -e 's/[^0-9]//g'`; \ fi ; \ cd ${WRKSRC} && \ ${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \ TMPDIR=${WRKDIR}/bazel_tmp \ EMBED_LABEL='${PORTVERSION}' \ PATH=${LOCALBASE}/bin:$$PATH \ SOURCE_DATE_EPOCH=$${SOURCE_DATE_EPOCH} \ EXTRA_BAZEL_ARGS=--host_javabase=@local_jdk//:jdk \ ${LOCALBASE}/bin/bash ./compile.sh) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/scripts/packages/bazel.bazelrc ${STAGEDIR}${ETCDIR}/bazel.bazelrc.sample .include Index: head/devel/bazel/distinfo =================================================================== --- head/devel/bazel/distinfo (revision 531404) +++ head/devel/bazel/distinfo (revision 531405) @@ -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 Index: head/devel/bazel/files/patch-third_party__BUILD =================================================================== --- head/devel/bazel/files/patch-third_party__BUILD (revision 531404) +++ head/devel/bazel/files/patch-third_party__BUILD (nonexistent) @@ -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( Property changes on: head/devel/bazel/files/patch-third_party__BUILD ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/bazel/files/patch-src_main_java_com_google_devtools_build_lib_bazel_rules_python_BazelPythonSemantics.java =================================================================== --- head/devel/bazel/files/patch-src_main_java_com_google_devtools_build_lib_bazel_rules_python_BazelPythonSemantics.java (nonexistent) +++ head/devel/bazel/files/patch-src_main_java_com_google_devtools_build_lib_bazel_rules_python_BazelPythonSemantics.java (revision 531405) @@ -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() + + " > " Property changes on: head/devel/bazel/files/patch-src_main_java_com_google_devtools_build_lib_bazel_rules_python_BazelPythonSemantics.java ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/bazel/files/patch-tools__jdk__default_java_toolchain.bzl =================================================================== --- head/devel/bazel/files/patch-tools__jdk__default_java_toolchain.bzl (revision 531404) +++ head/devel/bazel/files/patch-tools__jdk__default_java_toolchain.bzl (revision 531405) @@ -1,37 +1,37 @@ ---- 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 = [ - # Allow JavaBuilder to access internal javac APIs. - "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - - # override the javac in the JDK. - "--patch-module=java.compiler=$(location @bazel_tools//tools/jdk:java_compiler_jar)", - "--patch-module=jdk.compiler=$(location @bazel_tools//tools/jdk:jdk_compiler_jar)", - - # quiet warnings from com.google.protobuf.UnsafeUtil, - # see: https://github.com/google/protobuf/issues/3781 - # and: https://github.com/bazelbuild/bazel/issues/5599 - "--add-opens=java.base/java.nio=ALL-UNNAMED", - "--add-opens=java.base/java.lang=ALL-UNNAMED", ] 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"],