Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: devel/readline: fix readline.pc
To:
Matthieu Herrb <matthieu@openbsd.org>, <ports@openbsd.org>
Date:
Sat, 16 Aug 2025 17:33:15 +0100

Download raw body.

Thread
yes. I am broadly ok with the change to fix the file but would like to have 
it installed as ereadline.pc (and patch consumers as necessary), generally 
I think we'd like to keep using readline from base where it works.

-- 
  Sent from a phone, apologies for poor formatting.

On 16 August 2025 15:26:07 Matthieu Herrb <matthieu@openbsd.org> wrote:

> On Sat, Aug 16, 2025 at 11:52:56AM +0200, Jeremie Courreges-Anglas wrote:
>> On Sat, Aug 16, 2025 at 11:40:00AM +0200, Landry Breuil wrote:
>> > Le Sat, Aug 16, 2025 at 11:03:34AM +0200, Matthieu Herrb a écrit :
>> > > Hi,
>> > >
>> > > The inormation provided by /usr/local/lib/pkg-config/readline.pc is
>> > > not correct and leads to mix with base readline. This patch fixes it
>> > > so that ports that use pkg-config(1) to determine if readline is
>> > > available pick up the correct includes and libs.
>> > >
>> > > comments, ok ?
>> >
>> > that looks correct, i'm just wary of the consequences on the consumers,
>> > be it WANTLIB or behaviour changes.. worth putting in a bulk ?
>>
>> I just checked, all the consumers have *e*readline in WANTLIB.
>> Regarding behavior change *at* runtime, a bulk build can't really
>> help, can it?
>>
>> The main fallout I'm thinking of is that some ports might start to
>> pick readline from ports.  By default bulk build might catch a few but
>> one should prevent dpb from junking devel/readline and then should
>> skim through the logs to assess all the offenders.
>>
>> Another approach is to fix the hidden deps as they appear. ;)
>>
> aja found that it breaks python and probably others. Let's revert for
> now :
>
> ok ?
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/readline/Makefile,v
> diff -u -p -u -r1.21 Makefile
> --- Makefile	16 Aug 2025 11:16:02 -0000	1.21
> +++ Makefile	16 Aug 2025 14:24:31 -0000
> @@ -3,7 +3,7 @@ COMMENT =		library to edit command lines
> V =			8.2.13
> DISTNAME =		readline-${V}
> PKGNAME =		readline-${V}
> -REVISION =		0
> +REVISION =		1
>
> LIBV =			3.0
> SHARED_LIBS +=		ehistory ${LIBV}
> Index: patches/patch-readline_pc_in
> ===================================================================
> RCS file: patches/patch-readline_pc_in
> diff -N patches/patch-readline_pc_in
> --- patches/patch-readline_pc_in	16 Aug 2025 11:16:02 -0000	1.1
> +++ /dev/null	1 Jan 1970 00:00:00 -0000
> @@ -1,21 +0,0 @@
> -Adjust for ereadline
> -
> -Index: readline.pc.in
> ---- readline.pc.in.orig
> -+++ readline.pc.in
> -@@ -1,12 +1,12 @@
> - prefix=@prefix@
> - exec_prefix=@exec_prefix@
> - libdir=@libdir@
> --includedir=@includedir@
> -+includedir=@includedir@/ereadline
> -
> - Name: Readline
> - Description: Gnu Readline library for command line editing
> - URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html
> - Version: @LIBVERSION@
> --Requires.private: @TERMCAP_PKG_CONFIG_LIB@
> --Libs: -L${libdir} -lreadline
> -+Requires.private: ncurses
> -+Libs: -L${libdir} -lereadline
> - Cflags: -I${includedir}
>
> --
> Matthieu Herrb