Skip to content

Commit

Permalink
community/php82-pecl-grpc: fix build failure on loongarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
znley authored and andypost committed Jun 4, 2024
1 parent 4efcc59 commit a603a4b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
7 changes: 5 additions & 2 deletions community/php82-pecl-grpc/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pkgname=php82-pecl-grpc
_extname=grpc
pkgver=1.64.1
pkgrel=0
pkgrel=1
pkgdesc="PHP 8.2 extension provide a concrete implementation of the gRPC protocol, layered over HTTP/2."
url="https://pecl.php.net/package/grpc"
arch="all !s390x !ppc64le !riscv64" # build failures
Expand All @@ -11,7 +11,9 @@ _phpv=82
_php=php$_phpv
depends="$_php-common"
makedepends="$_php-dev openssl-dev linux-headers"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz
boringssl.patch
"
builddir="$srcdir"/$_extname-$pkgver

build() {
Expand All @@ -34,4 +36,5 @@ package() {

sha512sums="
dd899a44e98ffeab5fe552764fb00ae1ebc93edcfe62a5c267f7347b16d36379d9b1a29af51c987abadfb112e214b71056623aaddf6b91d4284c5620ded2b9e5 php-pecl-grpc-1.64.1.tgz
6b551439ad5fd513720f1a267dab743b1c261f1662dd7a364080ec5e38a41eaf402e8950c8d8a5c3ef49297be8954f10d1ae9414da3ebce96a2dc8d87bee6bfd boringssl.patch
"
14 changes: 14 additions & 0 deletions community/php82-pecl-grpc/boringssl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/third_party/boringssl-with-bazel/src/include/openssl/target.h b/third_party/boringssl-with-bazel/src/include/openssl/target.h
index 2760f52..5013b45 100644
--- a/third_party/boringssl-with-bazel/src/include/openssl/target.h
+++ b/third_party/boringssl-with-bazel/src/include/openssl/target.h
@@ -45,6 +45,9 @@
#define OPENSSL_RISCV64
#elif defined(__riscv) && __SIZEOF_POINTER__ == 4
#define OPENSSL_32_BIT
+#elif defined(__loongarch64)
+#define OPENSSL_64_BIT
+#define OPENSSL_LOONGARCH64
#elif defined(__pnacl__)
#define OPENSSL_32_BIT
#define OPENSSL_PNACL

0 comments on commit a603a4b

Please sign in to comment.