Skip to content

New package: bazel-4.1.0 #31382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

New package: bazel-4.1.0 #31382

wants to merge 1 commit into from

Conversation

Filius-Patris
Copy link

@Filius-Patris Filius-Patris commented Jun 9, 2021

General

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
  • 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, 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.

Copy link
Member

@ericonr ericonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What package are you going to build with bazel?

Edit: I see, anki. If you want to include anki in this PR (with a separate commit), I think that'd be reasonable. And yes, make bazel depend on openjdk11.

@Filius-Patris Filius-Patris changed the title New package: bazel-4.1.0 [WIP] New package: bazel-4.1.0 Jun 10, 2021
@fosslinux
Copy link
Contributor

fosslinux commented Jun 10, 2021

I have attempted this in the past. Your bazel template looks sane.

Bazel is not sane. Neither is anki, has a stupid mix of nodejs, bazel, python and rust.

Here's my template thus far, not for the latest version yet:

# Template file for 'anki'
pkgname=anki
version=2.1.42
revision=1
hostmakedepends="bazel python3-pip git protobuf rust cargo rsync"
makedepends="protobuf-devel glib-devel python3-PyQt5-webengine"
depends="python3-PyQt5-webengine python3-requests python3-SQLAlchemy
 python3-PyAudio python3-mpv python3-Markdown python3-send2trash
 python3-BeautifulSoup4 python3-decorator python3-jsonschema
 python3-protobuf python3-Flask-Cors python3-waitress"
short_desc="Spaced repetition flashcard program"
maintainer="fosslinux <[email protected]>"
license="AGPL-3.0-or-later"
homepage="https://apps.ankiweb.net"
changelog="https://apps.ankiweb.net/docs/changes.html"
distfiles="https://github.com/ankitects/anki/archive/${version}.tar.gz"
checksum=a23e1ad9cc9d2ec2031810c847ae15efcd315123c7e0c3b3def40bd6d451d9c9
python_version=3
patch_args="-Np1"

do_build() {
        # Bazel dies on ccache
        if [ "$CROSS_BUILD" ]; then
                export CC="$(command -v ${XBPS_CROSS_TRIPLET}-gcc)"
        else
                export CC="$(command -v gcc)"
        fi
        export PYTHON_SITE_PACKAGES="${XBPS_CROSS_BASE}/${py3_sitelib}"

        bazel build -c opt dist --jobs=1
        bsdtar -xf bazel-bin/dist.tar
}

do_install() {
        # I dislike bazel
        PIP_CONFIG_FILE=/dev/null TMPDIR=/tmp python3 -m pip install --isolated --root=${DESTDIR} --prefix=/usr --ignore-installed --no-deps bazel-dist/*.whl

        vbin qt/runanki.py anki
        vinstall qt/linux/anki.desktop 644 usr/share/applications
        vinstall qt/linux/anki.png 644 usr/share/pixmaps
        vinstall qt/linux/anki.xpm 644 usr/share/pixmaps
        vman qt/linux/anki.1

        vlicense LICENSE
}

Haven't worked on it for a while.

Cross is still broken IIRC. Mutlicore building is broken last I checked. Musl is broken (you may need a patch for bazel for musl which I have also).

@Filius-Patris
Copy link
Author

Hey there. I think I'm hopping distros, away from void for the time being. Thus I retracted my progress so far concerning building anki itself (@fosslinux's template is more complete than mine anyway).

A couple of remarks:

  • I forgot to search for currently open PRs before opening this one. This PR supersedes New package: bazel-3.5.0 #24978 and the latter could probably be closed.
  • Should you need me to change anything about the PR, just ping me, I still have a live image ready.
  • Made and built on x86_64-musl. Might work on other archs too, as it truly bootstraps the codebase, but didn't dig into how cross compiling works.

Thanks for the experience, loved my stay on void.

@Filius-Patris Filius-Patris changed the title [WIP] New package: bazel-4.1.0 New package: bazel-4.1.0 Jun 11, 2021
@ericonr ericonr added the new-package This PR adds a new package label Jun 11, 2021
@TobTobXX
Copy link

TobTobXX commented Jan 6, 2022

Hey, here I am again, half a year later. I'm still not on void, but I've been notified by an Alpine contributor, that he seemingly successfully built the latest Anki.

https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29054

(Alpine is a musl libc distribution and the MR is for x86_64 and aarch64).

If anyone wants to pick up and build on OItmanns work, this might help.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label May 21, 2022
@github-actions github-actions bot closed this Jun 4, 2022
@Luciogi
Copy link
Contributor

Luciogi commented Nov 23, 2023

any progress here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-package This PR adds a new package Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants