diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 63 |
1 files changed, 54 insertions, 9 deletions
@@ -1,41 +1,86 @@ +# vim: set sts=2 sw=2 et: # Maintainer: blacktea <blackteahamburger@outlook.com> # Contributor: kXuan <kxuanobj@gmail.com> +# Contributor: Dan Fuhry <dan@fuhry.com> pkgname=envoyproxy -pkgver=1.14.4 +pkgver=1.29.2 pkgrel=1 pkgdesc="A high performance, open source, general RPC framework that puts mobile and HTTP/2 first." arch=('i686' 'x86_64') url='https://envoyproxy.io' license=('Apache2') makedepends=( - 'bazel' 'cmake' + 'clang' 'git' + 'lld' 'go' 'java-environment-openjdk' 'ninja' + 'llvm' 'perl' 'python' + 'libxcrypt-compat' ) source=( "https://github.com/$pkgname/envoy/archive/v$pkgver.tar.gz" + 0001-arch-dynamically-link-libpsl.patch + 0002-patch-cel-cpp-to-not-break-build.patch ) -sha512sums=('ddec1df1ed09fee3c9299c6d7b8cfb34fb415e9a79b60005761d5a1672fa8ee679d46364ae8de82814c9bda3d76c3b5037f41a413aff051f7198fc8cee8dd977' -) +sha512sums=('40db5d45e8620680a0aece41de7bf8d09ac81d0bf339a77a3d70baca61823c4aa4e8e951a2c57f417ebe4fecda8acf17edda593292170b7c5f39e5b753f4579a' + '82a695c4c5ebd3f154acd424e00c5b9be27d809ed895870650b1ea0d1a757104753c242b67718bb68eef128d507668af2a5c7b101a64c346f27a9d0d5ad33cb9' + '6306c91abe482533dbc11aa4c39b0fc0ca145893c6692d56d5ecc77a8bf195e9495151c417ffa5d0702b85c0ad8a96133e1ec8fb01d04b1cdf5db9d71f51216f') prepare() { cd "envoy-$pkgver" - go get github.com/bazelbuild/buildtools/buildifier - bazel --version | cut -d\ -f2 > .bazelversion - # The commit id of $pkgver - echo "923c4111bb48405ac96ef050c4f59ebbad3d7761" > SOURCE_VERSION + + for f in ${source[@]}; do + # test that "$f" ends in ".patch" + if [ "${f%.patch}" != "$f" ]; then + msg "Applying patch: $f" + patch -Np1 -i "../$f" + fi + done + + export GOPATH="$srcdir"/go + + msg "Building bazelisk" + go install github.com/bazelbuild/bazelisk@latest + export BAZELISK="$GOPATH/bin/bazelisk" + + msg "Setting SOURCE_VERSION" + # https://github.com/envoyproxy/envoy/blob/main/bazel/get_workspace_status + echo "65a0228c93d2b7ca20c2ec56940735e5b6d76a38" > SOURCE_VERSION + + msg "Setting build environment for Clang" + ./bazel/setup_clang.sh } build() { cd "envoy-$pkgver" - bazel build --verbose_failures --workspace_status_command bazel/get_workspace_status -c opt //source/exe:envoy-static + $BAZELISK build \ + --workspace_status_command bazel/get_workspace_status \ + --config=clang --verbose_failures -c opt \ + --features=-default_compile_flags \ + --copt=-g \ + --copt=-fstack-protector \ + --copt=-fcolor-diagnostics \ + --copt=-D_FORTIFY_SOURCE=1 \ + --copt=-O2 \ + --copt=-DNDEBUG \ + --copt=-ffunction-sections \ + --copt=-fdata-sections \ + --cxxopt=-std=c++17 \ + --host_cxxopt=-std=c++17 \ + --cxxopt='-includecstdint' \ + --host_cxxopt='-includecstdint' \ + --cxxopt='-includestring' \ + --host_cxxopt='-includestring' \ + --cxxopt='-includestring_view' \ + --host_cxxopt='-includestring_view' \ + //source/exe:envoy-static } package() { |