public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tristan Partin <[email protected]>
To: Tristan Partin <[email protected]>
To: Andres Freund <[email protected]>
Cc: [email protected]
Subject: Re: Meson build updates
Date: Wed, 12 Jul 2023 11:10:21 -0500
Message-ID: <CU0BPAZ4TIJU.2M804H0H066GR@gonk> (raw)
In-Reply-To: <CTPDJLWBJV4V.1O65TIXTC8STQ@gonk>
References: <CSPIJVUDZFKX.3KHMOAVGF94RV@c3po>
<[email protected]>
<CT8BP7BRV4A2.AOE7263UX2SH@gonk>
<[email protected]>
<CTBSCT2V1TVP.2AUJVJLNWQVG3@gonk>
<[email protected]>
<CTPDBT2W78PQ.2QUDVHFNR5MCS@gonk>
<[email protected]>
<CTPDJLWBJV4V.1O65TIXTC8STQ@gonk>
On Thu Jun 29, 2023 at 2:17 PM CDT, Tristan Partin wrote:
> On Thu Jun 29, 2023 at 2:13 PM CDT, Andres Freund wrote:
> > Hi,
> >
> > On 2023-06-29 14:07:19 -0500, Tristan Partin wrote:
> > > I still think the overrides are important, at the very least for libpq,
> > > but I will defer to your aforementioned decision for now.
> >
> > libpq makes sense to me, fwiw. Just doing it for all binaries individually
> > didn't seem as obviously beneficial.
> >
> > FWIW, it seems it could be handled somewhat centrally for binaries, the
> > bin_targets array should have all that's needed?
>
> I will send a follow-up patch with at least libpq overridden. I will
> investigate the bin_targets.
Attached is a patch which does just that without overriding the
binaries. I investigated the bin_targets stuff, but some test
executables get added there, so it wouldn't work out that well.
--
Tristan Partin
Neon (https://neon.tech)
Attachments:
[text/x-patch] v6-0001-Add-Meson-override-for-libpq.patch (1.3K, ../CU0BPAZ4TIJU.2M804H0H066GR@gonk/2-v6-0001-Add-Meson-override-for-libpq.patch)
download | inline diff:
From b52a13d1575e4965e8c1794e7a62f24ecfeeb1cf Mon Sep 17 00:00:00 2001
From: Tristan Partin <[email protected]>
Date: Wed, 17 May 2023 10:36:52 -0500
Subject: [PATCH v6] Add Meson override for libpq
Meson has the ability to do transparent overrides when projects are used
as subprojects. For instance, say I am building a Postgres extension. I
can define Postgres to be a subproject of my extension given the
following wrap file:
[wrap-git]
url = https://git.postgresql.org/git/postgresql.git
revision = master
depth = 1
[provide]
dependency_names = libpq
Then in my extension (root project), I can have the following line
snippet:
libpq = dependency('libpq')
This will tell Meson to transparently compile libpq prior to it
compiling my extension (because I depend on libpq) if libpq isn't found
on the host system.
---
src/interfaces/libpq/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/interfaces/libpq/meson.build b/src/interfaces/libpq/meson.build
index 80e6a15adf..6d18970e81 100644
--- a/src/interfaces/libpq/meson.build
+++ b/src/interfaces/libpq/meson.build
@@ -84,6 +84,8 @@ libpq = declare_dependency(
include_directories: [include_directories('.')]
)
+meson.override_dependency('libpq', libpq)
+
pkgconfig.generate(
name: 'libpq',
description: 'PostgreSQL libpq library',
--
Tristan Partin
Neon (https://neon.tech)
view thread (5+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Meson build updates
In-Reply-To: <CU0BPAZ4TIJU.2M804H0H066GR@gonk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox