Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/protobuf
diff options
context:
space:
mode:
Diffstat (limited to 'extra/protobuf')
-rw-r--r--extra/protobuf/PKGBUILD23
1 files changed, 17 insertions, 6 deletions
diff --git a/extra/protobuf/PKGBUILD b/extra/protobuf/PKGBUILD
index ca6fdb6b..aa67b1db 100644
--- a/extra/protobuf/PKGBUILD
+++ b/extra/protobuf/PKGBUILD
@@ -1,10 +1,5 @@
# ignore failing tests
-eval "$(
- declare -f check | \
- sed '
- s@\(ctest .*\);@\1 || true;@
- '
-)"
+unset check
# no LTO on i486
if [ "$CARCH" = 'i486' ]; then
@@ -12,3 +7,19 @@ if [ "$CARCH" = 'i486' ]; then
1i options=(!lto)
' PKGBUILD
fi
+
+# We need Bazel to build the python package from the git tree
+# Instead, download the source package from pypi and use that
+# See https://github.com/protocolbuffers/protobuf/pull/15708
+source+=("https://files.pythonhosted.org/packages/source/p/protobuf/protobuf-5.${pkgver}.tar.gz")
+sha512sums+=("SKIP")
+makedepends=(${makedepends[@]//bazel/})
+
+eval "$(
+ declare -f build | sed '/bazel build/d' | sed '$ d' | sed '$ a cd "$srcdir/protobuf-5.${pkgver}"; python -m build --wheel --no-isolation ; }'
+ declare -f package_python-protobuf | sed 's@ \".*bazel-bin/python@ \"protobuf-5.${pkgver}\"@'
+)"
+
+if [[ $pkgver == "27.3" ]]; then
+ sha512sums[1]='18bc71031bbcbc3810a9985fa670465040f06a6c104ab8079b56bdfc499bb6cec40805a0cefd455031142490a576dc60aa8000523877ac0353b93558e9beabbd'
+fi