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

  1. --- a/src/Makefile.shlib
  2. +++ b/src/Makefile.shlib
  3. @@ -396,14 +396,27 @@ endif # PORTNAME == cygwin || PORTNAME =
  4. %.pc: $(MAKEFILE_LIST)
  5. - echo 'Name: lib$(NAME)' >$@
  6. + echo 'prefix=$(prefix)' >$@
  7. + echo 'exec_prefix=$(exec_prefix)' >>$@
  8. +ifeq ($(patsubst $(prefix)/%,,$(includedir)),)
  9. + echo 'includedir=$${prefix}/$(patsubst $(prefix)/%,%,$(includedir))' >>$@
  10. +else
  11. + echo 'includedir=$(includedir)' >>$@
  12. +endif
  13. +ifeq ($(patsubst $(exec_prefix)/%,,$(libdir)),)
  14. + echo 'libdir=$${exec_prefix}/$(patsubst $(exec_prefix)/%,%,$(libdir))' >>$@
  15. +else
  16. + echo 'libdir=$(libdir)' >>$@
  17. +endif
  18. + echo >>$@
  19. + echo 'Name: lib$(NAME)' >>$@
  20. echo 'Description: PostgreSQL lib$(NAME) library' >>$@
  21. echo 'Url: http://www.postgresql.org/' >>$@
  22. echo 'Version: $(VERSION)' >>$@
  23. echo 'Requires: ' >>$@
  24. echo 'Requires.private: $(PKG_CONFIG_REQUIRES_PRIVATE)' >>$@
  25. - echo 'Cflags: -I$(includedir)' >>$@
  26. - echo 'Libs: -L$(libdir) -l$(NAME)' >>$@
  27. + echo 'Cflags: -I$${includedir}' >>$@
  28. + echo 'Libs: -L$${libdir} -l$(NAME)' >>$@
  29. # Record -L flags that the user might have passed in to the PostgreSQL
  30. # build to locate third-party libraries (e.g., ldap, ssl). Filter out
  31. # those that point inside the build or source tree. Use sort to