<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -391,14 +391,27 @@ endif # PORTNAME == cygwin || PORTNAME =
 
 
 %.pc: $(MAKEFILE_LIST)
-	echo 'Name: lib$(NAME)' &gt;$@
+	echo 'prefix=$(prefix)' &gt;$@
+	echo 'exec_prefix=$(exec_prefix)' &gt;&gt;$@
+ifeq ($(patsubst $(prefix)/%,,$(includedir)),)
+	echo 'includedir=$${prefix}/$(patsubst $(prefix)/%,%,$(includedir))' &gt;&gt;$@
+else
+	echo 'includedir=$(includedir)' &gt;&gt;$@
+endif
+ifeq ($(patsubst $(exec_prefix)/%,,$(libdir)),)
+	echo 'libdir=$${exec_prefix}/$(patsubst $(exec_prefix)/%,%,$(libdir))' &gt;&gt;$@
+else
+	echo 'libdir=$(libdir)' &gt;&gt;$@
+endif
+	echo &gt;&gt;$@
+	echo 'Name: lib$(NAME)' &gt;&gt;$@
 	echo 'Description: PostgreSQL lib$(NAME) library' &gt;&gt;$@
 	echo 'Url: $(PACKAGE_URL)' &gt;&gt;$@
 	echo 'Version: $(VERSION)' &gt;&gt;$@
 	echo 'Requires: ' &gt;&gt;$@
 	echo 'Requires.private: $(PKG_CONFIG_REQUIRES_PRIVATE)' &gt;&gt;$@
-	echo 'Cflags: -I$(includedir)' &gt;&gt;$@
-	echo 'Libs: -L$(libdir) -l$(NAME)' &gt;&gt;$@
+	echo 'Cflags: -I$${includedir}' &gt;&gt;$@
+	echo 'Libs: -L$${libdir} -l$(NAME)' &gt;&gt;$@
 # Record -L flags that the user might have passed in to the PostgreSQL
 # build to locate third-party libraries (e.g., ldap, ssl).  Filter out
 # those that point inside the build or source tree.  Use sort to
</pre></body></html>