From f7dc0a31cf3d52cc5f0c73a5303021b23151b8f6 Mon Sep 17 00:00:00 2001 From: Tasos Sahanidis Date: Mon, 13 Feb 2023 23:15:20 +0200 Subject: extra/protobuf: Fix static assert fail for 32 bit builds --- extra/protobuf/PKGBUILD | 21 ++++++++++++++++++++- .../protobuf/fix_static_assert_fail_on_32bit.patch | Bin 0 -> 1043 bytes 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 extra/protobuf/fix_static_assert_fail_on_32bit.patch (limited to 'extra/protobuf') diff --git a/extra/protobuf/PKGBUILD b/extra/protobuf/PKGBUILD index 3d825fe1..9e67a5b0 100644 --- a/extra/protobuf/PKGBUILD +++ b/extra/protobuf/PKGBUILD @@ -1,8 +1,26 @@ +source+=('https://github.com/protocolbuffers/protobuf/commit/c94b66706bec17d918495f4715183a5eaf0f8044.patch' + 'fix_static_assert_fail_on_32bit.patch' +) + +sha512sums+=('SKIP' + 'c124cdab5cfb45274d6cfc45d1eb3bb4d6a6e9128a4b84ca0c3b6dd5ddbfa69bb3cf168dc2a5f51ffdd9125246e5e134e22943e56ccdda78a4a0b90eb6ccd164' +) + +_prepare() { + patch -d $pkgbase-$pkgver -p1 < fix_static_assert_fail_on_32bit.patch # Fix 32 bit builds + patch -d $pkgbase-$pkgver -p1 < c94b66706bec17d918495f4715183a5eaf0f8044.patch # Fix some 32 bit tests +} + +eval "$( + declare -f prepare | \ + sed '$ i _prepare' +)" + # ignore failing tests eval "$( declare -f check | \ sed ' - s@make check@make check || true@ + s@cmake --build build --target check@cmake --build build --target check || true@ s@python setup.py test@python setup.py test || true@ ' ) @@ -14,3 +32,4 @@ if [ "$CARCH" = 'i486' ]; then 1i options=(!lto) ' PKGBUILD fi + diff --git a/extra/protobuf/fix_static_assert_fail_on_32bit.patch b/extra/protobuf/fix_static_assert_fail_on_32bit.patch new file mode 100644 index 00000000..d1ea6f51 Binary files /dev/null and b/extra/protobuf/fix_static_assert_fail_on_32bit.patch differ -- cgit v1.2.3-54-g00ecf