diff --git a/dev-libs/protobuf/protobuf-21.12.ebuild b/dev-libs/protobuf/protobuf-21.12.ebuild index 3672570cf..899a34cfb 100644 --- a/dev-libs/protobuf/protobuf-21.12.ebuild +++ b/dev-libs/protobuf/protobuf-21.12.ebuild @@ -72,9 +72,14 @@ src_compile() { multilib_src_install_all() { find "${ED}" -name "*.la" -delete || die - if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then + if [[ ${CHOST} == *-darwin* ]]; then + local lib_filename="${ED}/usr/$(get_libdir)/libprotobuf.${SLOT#*/}.dylib" + else + local lib_filename="${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" + fi + if [[ ! -f "${lib_filename}" ]]; then eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ - "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" + "Expected value: ${lib_filename}" die "Please update SLOT variable" fi