commit 2b0fdfe0925e810bc1ba43e077eb45b7b0e20388061cf7115d6c57c881bdd392 Author: Martin Pluskal Date: Sun May 14 17:33:17 2023 +0000 Accepting request 1087033 from home:ftake:branches:M17N The latest version of Mozc requires bazel 6 to build. This SR introduce bazel 6.1.2. OBS-URL: https://build.opensuse.org/request/show/1087033 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/bazel6?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..9fb5343 --- /dev/null +++ b/_constraints @@ -0,0 +1,10 @@ + + + + 4 + + + 4 + + + diff --git a/abseil-missing-stdint.patch b/abseil-missing-stdint.patch new file mode 100644 index 0000000..143ac46 --- /dev/null +++ b/abseil-missing-stdint.patch @@ -0,0 +1,10 @@ +--- abseil-cpp.orig/absl/strings/internal/str_format/extension.h ++++ abseil-cpp/absl/strings/internal/str_format/extension.h +@@ -26,6 +26,7 @@ + #include "absl/base/port.h" + #include "absl/meta/type_traits.h" + #include "absl/strings/internal/str_format/output.h" ++#include + #include "absl/strings/string_view.h" + + namespace absl { \ No newline at end of file diff --git a/apply-abseil-missing-stdint.patch b/apply-abseil-missing-stdint.patch new file mode 100644 index 0000000..2f4afb7 --- /dev/null +++ b/apply-abseil-missing-stdint.patch @@ -0,0 +1,13 @@ +--- distdir_deps.bzl.org 2023-04-28 08:13:57.023479154 +0900 ++++ distdir_deps.bzl 2023-05-09 10:00:40.719979952 +0900 +@@ -230,6 +230,10 @@ + }, + "com_google_absl": { + "archive": "20211102.0.tar.gz", ++ "patch_args": ["-p1"], ++ "patches": [ ++ "//:abseil-missing-stdint.patch" ++ ], + "sha256": "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4", + "urls": [ + "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", diff --git a/bazel-6.1.2-dist.zip b/bazel-6.1.2-dist.zip new file mode 100644 index 0000000..fad096c --- /dev/null +++ b/bazel-6.1.2-dist.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fb3ee22fe9fa86d82e173572d504c089f10825d749725592626e090b38c9679 +size 194649137 diff --git a/bazel-6.1.2-dist.zip.sig b/bazel-6.1.2-dist.zip.sig new file mode 100644 index 0000000..236bbe8 Binary files /dev/null and b/bazel-6.1.2-dist.zip.sig differ diff --git a/bazel6.changes b/bazel6.changes new file mode 100644 index 0000000..1504d71 --- /dev/null +++ b/bazel6.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed May 10 12:40:16 UTC 2023 - Fuminobu Takeyama - 6.1.2 + +- initial package based on Bazel 3.2 diff --git a/bazel6.spec b/bazel6.spec new file mode 100644 index 0000000..363e09a --- /dev/null +++ b/bazel6.spec @@ -0,0 +1,123 @@ +# +# spec file for package bazel6.0 +# +# Copyright (c) 2021 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null) +%define shortname bazel +# Bazel 4.0 and higher follow semantic versioning. +%define shortver 6 + +Name: bazel%{shortver} +Version: 6.1.2 +Release: 0 +Summary: Tool for the automation of building and testing of software +License: Apache-2.0 +Group: Development/Tools/Building +URL: http://bazel.io/ +Source0: https://github.com/bazelbuild/bazel/releases/download/%{version}/%{shortname}-%{version}-dist.zip +Source1: https://github.com/bazelbuild/bazel/releases/download/%{version}/%{shortname}-%{version}-dist.zip.sig +Source2: abseil-missing-stdint.patch +# PATCH-FIX-OPENSUSE apply-abseil-missing-stdint.patch +Patch0: apply-abseil-missing-stdint.patch +BuildRequires: gcc-c++ +BuildRequires: java-11-openjdk-devel +BuildRequires: pkgconfig +BuildRequires: python3 +BuildRequires: unzip +BuildRequires: zip +BuildRequires: pkgconfig(bash-completion) +BuildRequires: pkgconfig(zlib) +Requires(post): update-alternatives +Requires(postun): update-alternatives +# Bazel6.0 does not support Java 8 and 17 +Requires: java-11-openjdk-devel +Provides: bazel = %{version} +ExcludeArch: %ix86 %arm + +%description +Tool for the automation of building and testing of software. It supports Java, +C++ and Go as programing languages. It also has a support for Android and iOS +as mobile operating systems. + +%prep +%setup -q -c +# Remove executable permissions +chmod 0644 AUTHORS CHANGELOG.md CONTRIBUTORS LICENSE + +%patch0 -p0 + +cp %{SOURCE2} . + +%build +%ifarch aarch64 %arm +export BAZEL_JAVAC_OPTS="-J-Xmx2g -J-Xms200m" +%endif +%ifarch s390x +export BAZEL_JAVAC_OPTS="-J-Xmx4g -J-Xms1g" +%endif +export CC=gcc +export CXX=g++ +export EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" +./compile.sh +./scripts/generate_bash_completion.sh \ + --bazel=output/bazel \ + --output=output/bazel-complete.bash \ + --prepend=scripts/bazel-complete-header.bash \ + --prepend=scripts/bazel-complete-template.bash +./output/bazel shutdown + +%install +export NO_BRP_STRIP_DEBUG=true +export NO_DEBUGINFO_STRIP_DEBUG=true +%define __debug_install_post %{nil} +: >debugfiles.list +: >debugsources.list +: >debugsourcefiles.list + +install -Dm0755 output/bazel %{buildroot}%{_bindir}/bazel%{shortver} +install -Dm0644 output/bazel-complete.bash %{buildroot}%{_datadir}/%{name}/bazel-complete.bash + +# update-alternatives +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +ln -sf %{_sysconfdir}/alternatives/bazel %{buildroot}%{_bindir}/bazel +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions +ln -sf %{_sysconfdir}/alternatives/bazel-complete.bash %{buildroot}%{_datadir}/bash-completion/completions/bazel + +%post +update-alternatives \ + --install %{_bindir}/bazel bazel %{_bindir}/bazel%{shortver} 100 \ + --slave %{_datadir}/bash-completion/completions/bazel \ + bazel-complete.bash \ + %{_datadir}/%{name}/bazel-complete.bash + +%postun +if [ $1 -eq 0 ] ; then + update-alternatives --remove bazel %{_bindir}/bazel%{shortver} +fi + +%files +%doc AUTHORS CHANGELOG.md CONTRIBUTORS +%license LICENSE +%{_bindir}/bazel +%{_bindir}/bazel%{shortver} +%{_datadir}/bash-completion/completions/bazel +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/bazel-complete.bash +%ghost %{_sysconfdir}/alternatives/bazel +%ghost %{_sysconfdir}/alternatives/bazel-complete.bash + +%changelog