[packages/bazel] - initial

qboosh qboosh at pld-linux.org
Thu Dec 12 21:26:03 CET 2019


commit d22ab1f8493eb152f9b5debbf0ee16ccb27686f3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Dec 12 21:26:32 2019 +0100

    - initial

 bazel-glibc.patch | 12 ++++++++++++
 bazel-x86.patch   | 18 ++++++++++++++++++
 bazel.spec        | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+)
---
diff --git a/bazel.spec b/bazel.spec
new file mode 100644
index 0000000..2cf56bb
--- /dev/null
+++ b/bazel.spec
@@ -0,0 +1,53 @@
+# TODO: use system jars
+Summary:	Build and test software of any size, quickly and reliably
+Summary(pl.UTF-8):	Budowanie i testowanie oprogramowania dowolnych rozmiarów - szybko i wiarygodnie
+Name:		bazel
+Version:	1.2.1
+Release:	1
+License:	Apache v2.0
+Group:		Development/Tools
+#Source0Download: https://github.com/bazelbuild/bazel/releases
+Source0:	https://github.com/bazelbuild/bazel/releases/download/%{version}/%{name}-%{version}-dist.zip
+# Source0-md5:	da63b5df0eb5075d6ed3e021ae79cf6b
+Patch0:		%{name}-glibc.patch
+Patch1:		%{name}-x86.patch
+URL:		https://bazel.build/
+BuildRequires:	bash
+BuildRequires:	jdk >= 1.8
+BuildRequires:	libstdc++-devel
+BuildRequires:	python3 >= 1:3.2
+BuildRequires:	unzip
+BuildRequires:	zip
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Build and test software of any size, quickly and reliably.
+
+%description -l pl.UTF-8
+Budowanie i testowanie oprogramowania dowolnych rozmiarów - szybko i
+wiarygodnie.
+
+%prep
+%setup -q -c
+%patch0 -p1
+%patch1 -p1
+
+%{__sed} -i -e 's,/bin/java" ,& -Xmx2g ,' scripts/bootstrap/compile.sh
+
+%build
+BAZEL_JAVAC_OPTS="-J-Xmx1g" \
+EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" \
+bash ./compile.sh
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -D output/bazel $RPM_BUILD_ROOT%{_bindir}/bazel
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CHANGELOG.md CONTRIBUTORS README.md
+%attr(755,root,root) %{_bindir}/bazel
diff --git a/bazel-glibc.patch b/bazel-glibc.patch
new file mode 100644
index 0000000..1c110cb
--- /dev/null
+++ b/bazel-glibc.patch
@@ -0,0 +1,12 @@
+--- bazel-1.2.1/third_party/grpc/src/core/lib/gpr/log_linux.cc.orig	1980-01-01 00:00:00.000000000 +0100
++++ bazel-1.2.1/third_party/grpc/src/core/lib/gpr/log_linux.cc	2019-12-07 15:30:52.746411671 +0100
+@@ -40,7 +40,9 @@
+ #include <time.h>
+ #include <unistd.h>
+ 
++#ifndef __USE_GNU
+ static long gettid(void) { return syscall(__NR_gettid); }
++#endif
+ 
+ void gpr_log(const char* file, int line, gpr_log_severity severity,
+              const char* format, ...) {
diff --git a/bazel-x86.patch b/bazel-x86.patch
new file mode 100644
index 0000000..5c9ba4a
--- /dev/null
+++ b/bazel-x86.patch
@@ -0,0 +1,18 @@
+--- bazel-1.2.1/third_party/BUILD.orig	1980-01-01 00:00:00.000000000 +0100
++++ bazel-1.2.1/third_party/BUILD	2019-12-12 19:51:34.491328309 +0100
+@@ -525,13 +525,13 @@
+     "//src/conditions:darwin": "*.so *.dll",
+     "//src/conditions:darwin_x86_64": "*.so *.dll",
+     "//src/conditions:linux_x86_64": "*.jnilib *.dll",
+-    # The .so file is an x86 one, so we can just remove it if the CPU is not x86
++    # The .so file is an x86_64 one, so we can just remove it if the CPU is not x86_64
+     "//src/conditions:arm": "*.so *.jnilib *.dll",
+     "//src/conditions:linux_aarch64": "*.so *.jnilib *.dll",
+     "//src/conditions:linux_ppc": "*.so *.jnilib *.dll",
+     # Play it safe -- better have a big binary than a slow binary
+     # zip -d does require an argument. Supply something bogus.
+-    "//conditions:default": "*.bogusextension",
++    "//conditions:default": "*.so *.jnilib *.dll",
+ })
+ 
+ # Remove native libraries that are for a platform different from the one we are
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bazel.git/commitdiff/d22ab1f8493eb152f9b5debbf0ee16ccb27686f3



More information about the pld-cvs-commit mailing list