From 7b39b6bc8e05f062eb60638f54c1947c57319047 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Wed, 19 Feb 2025 23:12:27 -0500 Subject: [PATCH] protobuf: install cmake files --- srcpkgs/protobuf/template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srcpkgs/protobuf/template b/srcpkgs/protobuf/template index 0b6f27a360f..ba9a8d6704e 100644 --- a/srcpkgs/protobuf/template +++ b/srcpkgs/protobuf/template @@ -1,7 +1,7 @@ # Template file for 'protobuf' pkgname=protobuf version=25.2 -revision=1 +revision=2 build_style=cmake configure_args="-Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_USE_EXTERNAL_GTEST=ON -Dprotobuf_BUILD_LIBPROTOC=ON -Dprotobuf_ABSL_PROVIDER=package @@ -29,7 +29,6 @@ if [ "$CROSS_BUILD" ]; then fi post_install() { - rm -rf "${DESTDIR}/usr/lib/cmake" vlicense LICENSE } @@ -87,6 +86,11 @@ protobuf-devel_package() { vmove usr/lib/libprotobuf.so vmove usr/lib/libprotobuf-lite.so vmove usr/lib/pkgconfig + vmove usr/lib/cmake + # when cross-building something that uses this cmake file, + # it barfs because it can't execute the target's protobuf binary + vsed -i -e 's,${_IMPORT_PREFIX}/bin,/usr/bin,g' \ + "$PKGDESTDIR"/usr/lib/cmake/protobuf/protobuf-targets-none.cmake vmove "usr/lib/*.a" } }