While comparing the .pc (pkg-config) files generated by the make and
meson builds, I noticed that the Requires.private entries use different
delimiters. The make build uses spaces, the meson build uses commas.
The pkg-config documentation says that it should be comma-separated, but
apparently about half the .pc in the wild use just spaces.
The pkg-config source code acknowledges that both commas and spaces work:
https://github.com/freedesktop/pkg-config/blob/master/parse.c#L273
https://github.com/pkgconf/pkgconf/blob/master/libpkgconf/dependency.c#L286
I think for consistency we should change the make build to use commas
anyway. See attached patch.From 5501fd952566654e49bcf5b8b4d5dc6c1026a90b Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 15 Mar 2023 08:42:27 +0100
Subject: [PATCH] pkg-config Requires.private entries should be comma-separated
---
src/interfaces/ecpg/compatlib/Makefile | 2 +-
src/interfaces/ecpg/ecpglib/Makefile | 2 +-
src/interfaces/libpq/Makefile | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/interfaces/ecpg/compatlib/Makefile
b/src/interfaces/ecpg/compatlib/Makefile
index da470e5418..b9483fba08 100644
--- a/src/interfaces/ecpg/compatlib/Makefile
+++ b/src/interfaces/ecpg/compatlib/Makefile
@@ -32,7 +32,7 @@ OBJS = \
$(WIN32RES) \
informix.o
-PKG_CONFIG_REQUIRES_PRIVATE = libecpg libpgtypes
+PKG_CONFIG_REQUIRES_PRIVATE = libecpg, libpgtypes
all: all-lib
diff --git a/src/interfaces/ecpg/ecpglib/Makefile
b/src/interfaces/ecpg/ecpglib/Makefile
index 6fadebf53d..652e023405 100644
--- a/src/interfaces/ecpg/ecpglib/Makefile
+++ b/src/interfaces/ecpg/ecpglib/Makefile
@@ -41,7 +41,7 @@ SHLIB_PREREQS = submake-libpq submake-pgtypeslib
SHLIB_EXPORTS = exports.txt
-PKG_CONFIG_REQUIRES_PRIVATE = libpq libpgtypes
+PKG_CONFIG_REQUIRES_PRIVATE = libpq, libpgtypes
all: all-lib
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index c18e914228..0919d8f32f 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -96,7 +96,7 @@ SHLIB_PREREQS = submake-libpgport
SHLIB_EXPORTS = exports.txt
ifeq ($(with_ssl),openssl)
-PKG_CONFIG_REQUIRES_PRIVATE = libssl libcrypto
+PKG_CONFIG_REQUIRES_PRIVATE = libssl, libcrypto
endif
all: all-lib libpq-refs-stamp
--
2.39.2