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" } }