Github messages for voidlinux
 help / color / mirror / Atom feed
From: Filius-Patris <Filius-Patris@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] New package: bazel-4.1.0
Date: Fri, 11 Jun 2021 17:39:40 +0200
Message-ID: <20210611153940.GqSV0zZqSMymolDEONLoo6cJToqNWDesVkeeKabp5Xs@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31382@inbox.vuxu.org>

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

There is an updated 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

[WIP] 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).

#### WIP: I'm gonna try to update anki too.


<!--
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: 3386 bytes --]

From 940e158249038067d3e57eb733cce0ff795b99ed 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 +++++++++++++++++++
 srcpkgs/bazel/template                        | 28 +++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 srcpkgs/bazel/patches/bcce6dd026e90336e80616a8c1004a79a2f8640c.patch
 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/template b/srcpkgs/bazel/template
new file mode 100644
index 000000000000..1d26a136b0aa
--- /dev/null
+++ b/srcpkgs/bazel/template
@@ -0,0 +1,28 @@
+# Template file for 'bazel'
+pkgname=bazel
+version=4.1.0
+revision=3
+create_wrksrc=yes
+makedepends="which zip unzip openjdk11 python3"
+depends="openjdk11"
+short_desc="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
+
+patch_args=-Np1
+
+# 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
+}

  parent reply	other threads:[~2021-06-11 15:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 22:13 [PR PATCH] " 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 ` Filius-Patris [this message]
2021-06-11 15:39 ` Filius-Patris
2021-06-11 15:56 ` Filius-Patris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210611153940.GqSV0zZqSMymolDEONLoo6cJToqNWDesVkeeKabp5Xs@z \
    --to=filius-patris@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Github messages for voidlinux

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/voidlinux-github

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 voidlinux-github voidlinux-github/ http://inbox.vuxu.org/voidlinux-github \
		voidlinux-github@inbox.vuxu.org
	public-inbox-index voidlinux-github

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git