Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: bazel-4.1.0
@ 2021-06-09 22:13 Filius-Patris
  2021-06-10  0:40 ` [PR REVIEW] " ericonr
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Filius-Patris @ 2021-06-09 22:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2041 bytes --]

There is a new pull request by Filius-Patris against master on the void-packages repository

https://github.com/Filius-Patris/void-packages master
https://github.com/void-linux/void-packages/pull/31382

New package: bazel-4.1.0
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

### Comments
I don't really know anything about bazel. I just wanted to add it because anki uses it as build system in the newer updates.
Officially, Java is said to be an [optional dependency](https://docs.bazel.build/versions/4.1.0/install-ubuntu.html#step-3-install-a-jdk-optional), however besides `bazel --version`, nothing really seems to work without java. Should I add it as a dependency? (Might be stupid question, I'm new ;P).


<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/31382.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-31382.patch --]
[-- Type: text/x-diff, Size: 3906 bytes --]

From 718b806498c3754df6661c669afb4c1b2513f1e4 Mon Sep 17 00:00:00 2001
From: FiliusPatris <filiuspatrisapps@gmail.com>
Date: Wed, 9 Jun 2021 23:40:15 +0200
Subject: [PATCH] New package: bazel-4.1.0

---
 ...6dd026e90336e80616a8c1004a79a2f8640c.patch | 40 +++++++++++++++++++
 ...6e90336e80616a8c1004a79a2f8640c.patch.args |  1 +
 srcpkgs/bazel/template                        | 30 ++++++++++++++
 3 files changed, 71 insertions(+)
 create mode 100644 srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch
 create mode 100644 srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch.args
 create mode 100644 srcpkgs/bazel/template

diff --git a/srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch b/srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch
new file mode 100644
index 000000000000..88f69b76def9
--- /dev/null
+++ b/srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch
@@ -0,0 +1,40 @@
+From bcce6dd026e90336e80616a8c1004a79a2f8640c Mon Sep 17 00:00:00 2001
+From: philwo <philwo@google.com>
+Date: Thu, 20 May 2021 08:13:09 -0700
+Subject: [PATCH] Add the TEMP_FAILURE_RETRY macro to linux-sandbox-pid1.cc.
+
+This allows us to build Bazel on Linux systems which use a C standard library that does not include this macro, like Alpine Linux (which uses musl).
+
+Fixes #12460.
+
+PiperOrigin-RevId: 374873483
+---
+ src/main/tools/linux-sandbox-pid1.cc | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/src/main/tools/linux-sandbox-pid1.cc b/src/main/tools/linux-sandbox-pid1.cc
+index 5c9c53cb9cd2..5e7c64a7ac7b 100644
+--- a/src/main/tools/linux-sandbox-pid1.cc
++++ b/src/main/tools/linux-sandbox-pid1.cc
+@@ -49,6 +49,19 @@
+ #include <linux/fs.h>
+ #endif
+ 
++#ifndef TEMP_FAILURE_RETRY
++// Some C standard libraries like musl do not define this macro, so we'll
++// include our own version for compatibility.
++#define TEMP_FAILURE_RETRY(exp)            \
++  ({                                       \
++    decltype(exp) _rc;                     \
++    do {                                   \
++      _rc = (exp);                         \
++    } while (_rc == -1 && errno == EINTR); \
++    _rc;                                   \
++  })
++#endif  // TEMP_FAILURE_RETRY
++
+ #include "src/main/tools/linux-sandbox-options.h"
+ #include "src/main/tools/linux-sandbox.h"
+ #include "src/main/tools/logging.h"
+
+
diff --git a/srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch.args b/srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch.args
new file mode 100644
index 000000000000..daa0cbeb2c76
--- /dev/null
+++ b/srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch.args
@@ -0,0 +1 @@
+-p1
diff --git a/srcpkgs/bazel/template b/srcpkgs/bazel/template
new file mode 100644
index 000000000000..984ccdb91841
--- /dev/null
+++ b/srcpkgs/bazel/template
@@ -0,0 +1,30 @@
+# Template file for 'bazel'
+pkgname=bazel
+version=4.1.0
+revision=3
+#archs="i686 x86_64"
+#wrksrc=
+create_wrksrc=yes
+#build_style=
+hostmakedepends=""
+makedepends="which zip unzip openjdk11 python3"
+depends=""
+short_desc="A fast, scalable, multi-language and extensible build system"
+maintainer="TobTobXX <filiuspatrisapps@gmail.com>"
+license="Apache-2.0"
+homepage="https://bazel.build/"
+distfiles="https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip"
+checksum=f377d755c96a50f6bd2f423562598d822f43356783330a0b780ad442864d6eeb
+
+# Stripping breaks the binary:
+# https://github.com/bazelbuild/bazel/issues/600#issuecomment-156456154
+nostrip=yes
+
+# Instructions for bootstrapping bazel are here:
+# https://docs.bazel.build/versions/4.1.0/install-compile-source.html#bootstrap-bazel
+do_build() {
+	env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh
+}
+do_install() {
+	vbin output/bazel
+}

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-11-23 12:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 22:13 [PR PATCH] New package: bazel-4.1.0 Filius-Patris
2021-06-10  0:40 ` [PR REVIEW] " ericonr
2021-06-10  0:40 ` ericonr
2021-06-10  7:02 ` [PR PATCH] [Updated] [WIP] " Filius-Patris
2021-06-10  7:41 ` fosslinux
2021-06-10  7:42 ` fosslinux
2021-06-10 21:29 ` [PR PATCH] [Updated] " Filius-Patris
2021-06-11  9:22 ` Filius-Patris
2021-06-11 15:39 ` [PR PATCH] [Updated] " Filius-Patris
2021-06-11 15:39 ` Filius-Patris
2021-06-11 15:56 ` Filius-Patris
2022-01-06 21:47 ` TobTobXX
2022-05-21  2:00 ` github-actions
2022-06-04  2:09 ` [PR PATCH] [Closed]: " github-actions
2023-11-23 12:02 ` Luciogi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).