--- orig/RProtoBuf/src/Makevars.ucrt	2023-03-11 23:18:55.000000000 +0100
+++ patched/RProtoBuf/src/Makevars.ucrt	2024-01-18 10:57:52.752369500 +0100
@@ -1,4 +1,9 @@
-PKG_LIBS= -lprotobuf
+
+ifeq (,$(shell pkg-config --version 2>/dev/null))
+   PKG_LIBS = -lprotobuf
+else
+   PKG_LIBS = $(shell pkg-config --libs protobuf)
+endif
 
 ## Make this C++17 so that clang will not complain about [[nodiscard]] in headers
 CXX_STD=CXX17
