Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/protobuf/PKGBUILD
blob: 585863fe1b59a70f7cc41edd52016c0f99c9e7a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# ignore failing tests
unset check

# no LTO on i486
if [ "$CARCH" = 'i486' ]; then
  sed -i '
    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 "../protobuf-5.${pkgver}"; python -m build --wheel --no-isolation ; }'
  declare -f package_python-protobuf | sed 's@ \".*bazel-bin/python@ \"protobuf-5.${pkgver}\"@'
)"