You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
1.2 KiB

--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -396,14 +396,27 @@ endif # PORTNAME == cygwin || PORTNAME =
%.pc: $(MAKEFILE_LIST)
- echo 'Name: lib$(NAME)' >$@
+ echo 'prefix=$(prefix)' >$@
+ echo 'exec_prefix=$(exec_prefix)' >>$@
+ifeq ($(patsubst $(prefix)/%,,$(includedir)),)
+ echo 'includedir=$${prefix}/$(patsubst $(prefix)/%,%,$(includedir))' >>$@
+else
+ echo 'includedir=$(includedir)' >>$@
+endif
+ifeq ($(patsubst $(exec_prefix)/%,,$(libdir)),)
+ echo 'libdir=$${exec_prefix}/$(patsubst $(exec_prefix)/%,%,$(libdir))' >>$@
+else
+ echo 'libdir=$(libdir)' >>$@
+endif
+ echo >>$@
+ echo 'Name: lib$(NAME)' >>$@
echo 'Description: PostgreSQL lib$(NAME) library' >>$@
echo 'Url: http://www.postgresql.org/' >>$@
echo 'Version: $(VERSION)' >>$@
echo 'Requires: ' >>$@
echo 'Requires.private: $(PKG_CONFIG_REQUIRES_PRIVATE)' >>$@
- echo 'Cflags: -I$(includedir)' >>$@
- echo 'Libs: -L$(libdir) -l$(NAME)' >>$@
+ echo 'Cflags: -I$${includedir}' >>$@
+ echo 'Libs: -L$${libdir} -l$(NAME)' >>$@
# 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