On 2025/09/29 08:14, Stuart Henderson wrote:
> <snip>. I'm not against adding readline.pc to base (probably best done
> at the same time as renaming and fixing devel/readline's pc file) but best 
> done after unlock
> (and preferably with a test bulk build).

actually, looking at this again, renaming files in devel/readline to
ereadline/ehistory.pc should be zero/low impact, because they're
currently broken.

Adding readline(/history?).pc to base is the part more likely to break
things in ports. (I think we probably do want that, but it will also
require checking for new things picking up readline).

For the first stage I'll try building devel/readline-using ports with
this diff.

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/readline/Makefile,v
diff -u -p -r1.22 Makefile
--- Makefile    16 Aug 2025 14:26:42 -0000      1.22
+++ Makefile    12 Oct 2025 11:58:58 -0000
@@ -1,11 +1,10 @@
 COMMENT =              library to edit command lines as they are typed in
 
-V =                    8.2.13
+V =                    8.3
 DISTNAME =             readline-${V}
 PKGNAME =              readline-${V}
-REVISION =             1
 
-LIBV =                 3.0
+LIBV =                 4.0
 SHARED_LIBS +=         ehistory ${LIBV}
 SHARED_LIBS +=         ereadline ${LIBV}
 
@@ -20,12 +19,15 @@ WANTLIB += curses
 
 SITES =                        ${SITE_GNU:=readline/}
 #SITES.p =             ${SITE_GNU:=readline/${DISTNAME}-patches/}
+
 CONFIGURE_STYLE =      gnu
+CONFIGURE_ARGS =       --includedir=${PREFIX}/include/ereadline
 SEPARATE_BUILD =       Yes
 
 MAKE_ENV =             RL_SHLIB_V=${LIBereadline_VERSION}
+# otherwise the produced .pc file tries to reference a (nonexistent) 
termcap.pc file
+CONFIGURE_ENV =                bash_cv_termcap_lib=ncurses
 MAKE_FLAGS =           SHLIB_LIBS=-lcurses
-FAKE_FLAGS =           includedir=${TRUEPREFIX}/include/ereadline
 
 pre-configure:
        perl -pi \
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/readline/distinfo,v
diff -u -p -r1.7 distinfo
--- distinfo    14 Oct 2024 10:27:11 -0000      1.7
+++ distinfo    12 Oct 2025 11:58:58 -0000
@@ -1,2 +1,2 @@
-SHA256 (readline-8.2.13.tar.gz) = Dlvk0pN+i9m3zWDUZyHOefiKM0Fd1owtc4+1kkY49lY=
-SIZE (readline-8.2.13.tar.gz) = 3045184
+SHA256 (readline-8.3.tar.gz) = /lODIERngozUle6NHTwDen66E4nCK8agQfYnl2+QYcw=
+SIZE (readline-8.3.tar.gz) = 3419642
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/devel/readline/patches/patch-Makefile_in,v
diff -u -p -r1.6 patch-Makefile_in
--- patches/patch-Makefile_in   2 Sep 2023 23:58:34 -0000       1.6
+++ patches/patch-Makefile_in   12 Oct 2025 11:58:58 -0000
@@ -1,7 +1,7 @@
 Index: Makefile.in
 --- Makefile.in.orig
 +++ Makefile.in
-@@ -105,8 +105,8 @@ install_examples = @EXAMPLES_INSTALL_TARGET@
+@@ -111,8 +111,8 @@ install_examples = @EXAMPLES_INSTALL_TARGET@
        $(CC) -c $(CCFLAGS) $<
  
  # The name of the main library target.
@@ -12,7 +12,7 @@ Index: Makefile.in
  
  # The C code source files for this library.
  CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
-@@ -171,12 +171,12 @@ asan:
+@@ -177,12 +177,12 @@ asan:
  
  static: $(STATIC_LIBS)
  
@@ -27,7 +27,18 @@ Index: Makefile.in
        $(RM) $@
        $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o
        -test -n "$(RANLIB)" && $(RANLIB) $@
-@@ -252,12 +252,10 @@ uninstall-pc:
+@@ -248,8 +248,8 @@ uninstall-headers:
+ maybe-uninstall-headers: uninstall-headers
+ 
+ install-pc: installdirs
+-      -$(INSTALL_DATA) $(BUILD_DIR)/readline.pc 
$(DESTDIR)$(pkgconfigdir)/readline.pc
+-      -$(INSTALL_DATA) $(BUILD_DIR)/history.pc 
$(DESTDIR)$(pkgconfigdir)/history.pc
++      -$(INSTALL_DATA) $(BUILD_DIR)/readline.pc 
$(DESTDIR)$(pkgconfigdir)/ereadline.pc
++      -$(INSTALL_DATA) $(BUILD_DIR)/history.pc 
$(DESTDIR)$(pkgconfigdir)/ehistory.pc
+ 
+ uninstall-pc:
+       -test -n "$(pkgconfigdir)" && cd $(DESTDIR)$(pkgconfigdir) && \
+@@ -258,12 +258,10 @@ uninstall-pc:
  maybe-uninstall-pc: uninstall-pc
  
  install-static: installdirs $(STATIC_LIBS) install-headers install-doc 
${install_examples} install-pc
Index: patches/patch-doc_Makefile_in
===================================================================
RCS file: /cvs/ports/devel/readline/patches/patch-doc_Makefile_in,v
diff -u -p -r1.5 patch-doc_Makefile_in
--- patches/patch-doc_Makefile_in       2 Sep 2023 23:58:34 -0000       1.5
+++ patches/patch-doc_Makefile_in       12 Oct 2025 11:58:58 -0000
@@ -1,7 +1,7 @@
 Index: doc/Makefile.in
 --- doc/Makefile.in.orig
 +++ doc/Makefile.in
-@@ -217,30 +217,30 @@ installdirs:     $(topdir)/support/mkdirs
+@@ -240,30 +240,30 @@ installdirs:     $(topdir)/support/mkdirs
  
  install:      installdirs
        if test -f readline.info; then \
Index: patches/patch-history_pc_in
===================================================================
RCS file: patches/patch-history_pc_in
diff -N patches/patch-history_pc_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-history_pc_in 12 Oct 2025 11:58:58 -0000
@@ -0,0 +1,10 @@
+Index: history.pc.in
+--- history.pc.in.orig
++++ history.pc.in
+@@ -7,5 +7,5 @@ Name: History
+ Description: Gnu History library for managing previously-entered lines
+ URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html
+ Version: @LIBVERSION@
+-Libs: -L${libdir} -lhistory
++Libs: -L${libdir} -lehistory
+ Cflags: -I${includedir}
Index: patches/patch-readline_pc_in
===================================================================
RCS file: patches/patch-readline_pc_in
diff -N patches/patch-readline_pc_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-readline_pc_in        12 Oct 2025 11:58:58 -0000
@@ -0,0 +1,10 @@
+Index: readline.pc.in
+--- readline.pc.in.orig
++++ readline.pc.in
+@@ -8,5 +8,5 @@ Description: Gnu Readline library for command line edi
+ URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html
+ Version: @LIBVERSION@
+ Requires.private: @TERMCAP_PKG_CONFIG_LIB@
+-Libs: -L${libdir} -lreadline
++Libs: -L${libdir} -lereadline
+ Cflags: -I${includedir}
Index: patches/patch-shlib_Makefile_in
===================================================================
RCS file: /cvs/ports/devel/readline/patches/patch-shlib_Makefile_in,v
diff -u -p -r1.3 patch-shlib_Makefile_in
--- patches/patch-shlib_Makefile_in     11 Mar 2022 18:53:09 -0000      1.3
+++ patches/patch-shlib_Makefile_in     12 Oct 2025 11:58:58 -0000
@@ -1,7 +1,7 @@
 Index: shlib/Makefile.in
 --- shlib/Makefile.in.orig
 +++ shlib/Makefile.in
-@@ -118,8 +118,8 @@ CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS
+@@ -120,8 +120,8 @@ CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS
  
  # The name of the main library target.
  
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/readline/pkg/PLIST,v
diff -u -p -r1.9 PLIST
--- pkg/PLIST   2 Sep 2023 23:58:34 -0000       1.9
+++ pkg/PLIST   12 Oct 2025 11:58:58 -0000
@@ -15,24 +15,34 @@ include/ereadline/readline/tilde.h
 @lib lib/libehistory.so.${LIBehistory_VERSION}
 @static-lib lib/libereadline.a
 @lib lib/libereadline.so.${LIBereadline_VERSION}
-lib/pkgconfig/history.pc
-lib/pkgconfig/readline.pc
+lib/pkgconfig/ehistory.pc
+lib/pkgconfig/ereadline.pc
 @man man/man3/ehistory.3
 @man man/man3/ereadline.3
 share/doc/readline/
 share/doc/readline/CHANGES
 share/doc/readline/INSTALL
 share/doc/readline/README
+share/doc/readline/history.html
+share/doc/readline/readline.html
+share/doc/readline/rluserman.html
 share/readline/
 share/readline/excallback.c
 share/readline/fileman.c
+share/readline/hist_erasedups.c
+share/readline/hist_purgecmd.c
 share/readline/histexamp.c
 share/readline/manexamp.c
+share/readline/rl-callbacktest.c
+share/readline/rl-callbacktest2.c
+share/readline/rl-callbacktest3.c
 share/readline/rl-fgets.c
+share/readline/rl-timeout.c
 share/readline/rl.c
 share/readline/rlbasic.c
 share/readline/rlcat.c
 share/readline/rlevent.c
+share/readline/rlkeymaps.c
 share/readline/rlptytest.c
 share/readline/rltest.c
 share/readline/rlversion.c

Reply via email to