pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pkg-config Requires.private entries should be comma-separated
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2023-03-16 4ef1be5a0b  pkg-config Requires.private entries should be comma-separated
* pkg-config Requires.private entries should be comma-separated
@ 2023-03-15 07:51  Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Peter Eisentraut @ 2023-03-15 07:51 UTC (permalink / raw)
  To: pgsql-hackers

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.

Attachments:

0001-pkg-config-Requires.private-entries-should-be-comma-.patch (text/plain, 1.7K) download From 5501fd952566654e49bcf5b8b4d5dc6c1026a90b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <peter@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
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: pkg-config Requires.private entries should be comma-separated
@ 2023-03-15 16:10  Andres Freund <andres@anarazel.de>
  parent: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Andres Freund @ 2023-03-15 16:10 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>; +Cc: pgsql-hackers

Hi,

On 2023-03-15 08:51:04 +0100, Peter Eisentraut wrote:
> 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.

Makes sense.

Greetings,

Andres Freund





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-03-15 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 07:51 pkg-config Requires.private entries should be comma-separated Peter Eisentraut <peter.eisentraut@enterprisedb.com>
2023-03-15 16:10 ` Andres Freund <andres@anarazel.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox