Download raw body.
ncurses: more pkg-config files?
On 2026/01/28 17:18, Theo Buehler wrote:
> On Tue, Jan 27, 2026 at 10:36:51AM +0000, Stuart Henderson wrote:
> > For 7.7 I added a pkg-config file for curses (ncurses.pc) because some
> > ports were not picking it up correctly (notably Python).
> >
> > I've now run into a problem where some Python functions are disabled
> > because it thinks we don't have ncursesw so I'd like to add at least
> > a pkg-config file for that.
> >
> > A build of ncurses from the normal upstream distribution also gives
> > pkg-config files for the other libraries (form/formw, menu/menuw,
> > panel/panelw) as well as those for the libraries that we don't
> > provide - ncurses++/ncurses++w, tic, tinfo.
> >
> > I'm wondering whether it would just make sense to add the .pc file
> > that I've identified a need for, or proactively do the others as well.
> > Any thoughts?
>
> I can't think of a downside to install them all, except possibly a bit
> of ports churn when we add them. They're tiny, easy to maintain and
> might well save some easily avoidable headache down the road (similar
> to the cplay case below).
fwiw, from nearly a full i386 bulk (the wrapper script I used for
instrumentation interfered with a few ports but those aren't using
curses anyway, and it's unlikely that ports blocked by those would
either), the only place menuw/panelw show up is sysutils/crust (in
kconfig), formw doesn't show up at all.
here's the complete src diff I'd like to commit.
ok?
(I'll also bump REVISIONs for the 30-odd ports which have a pkg-config
check for ncursesw and regen PLIST/WANTLIB for vlc, which builds a new
binary and plugin, but will wait a few days before doing that).
Index: distrib/sets/lists/base/mi
===================================================================
RCS file: /cvs/src/distrib/sets/lists/base/mi,v
diff -u -p -r1.1179 mi
--- distrib/sets/lists/base/mi 23 Jan 2026 04:08:14 -0000 1.1179
+++ distrib/sets/lists/base/mi 29 Jan 2026 14:18:14 -0000
@@ -801,14 +801,18 @@
./usr/lib/pkgconfig
./usr/lib/pkgconfig/expat.pc
./usr/lib/pkgconfig/form.pc
+./usr/lib/pkgconfig/formw.pc
./usr/lib/pkgconfig/fuse.pc
./usr/lib/pkgconfig/libcrypto.pc
./usr/lib/pkgconfig/libelf.pc
./usr/lib/pkgconfig/libssl.pc
./usr/lib/pkgconfig/menu.pc
+./usr/lib/pkgconfig/menuw.pc
./usr/lib/pkgconfig/ncurses.pc
+./usr/lib/pkgconfig/ncursesw.pc
./usr/lib/pkgconfig/openssl.pc
./usr/lib/pkgconfig/panel.pc
+./usr/lib/pkgconfig/panelw.pc
./usr/lib/pkgconfig/sndio.pc
./usr/lib/pkgconfig/zlib.pc
./usr/lib/rcrt0.o
Index: lib/libcurses/Makefile
===================================================================
RCS file: /cvs/src/lib/libcurses/Makefile,v
diff -u -p -r1.77 Makefile
--- lib/libcurses/Makefile 21 Feb 2025 18:16:45 -0000 1.77
+++ lib/libcurses/Makefile 29 Jan 2026 14:18:14 -0000
@@ -73,7 +73,7 @@ MAN= curs_add_wch.3 curs_add_wchstr.3 cu
GENERATED= codes.c comp_captab.c comp_userdefs.c expanded.c fallback.c \
init_keytry.h keys.list lib_gen.c lib_keyname.c make_hash make_keys \
names.c unctrl.c
-PC_FILES= ncurses.pc
+PC_FILES= ncurses.pc ncursesw.pc
CAPLIST = ${.CURDIR}/Caps
USE_BIG_STRINGS = 1
Index: lib/libcurses/generate_pkgconfig.sh
===================================================================
RCS file: /cvs/src/lib/libcurses/generate_pkgconfig.sh,v
diff -u -p -r1.1 generate_pkgconfig.sh
--- lib/libcurses/generate_pkgconfig.sh 21 Feb 2025 18:16:45 -0000 1.1
+++ lib/libcurses/generate_pkgconfig.sh 29 Jan 2026 14:18:14 -0000
@@ -75,3 +75,21 @@ Requires.private:
Libs: -lncurses
Cflags:
__EOF__
+
+pc_file="${objdir}/ncursesw.pc"
+cat > ${pc_file} << __EOF__
+prefix=/usr
+exec_prefix=\${prefix}
+libdir=\${exec_prefix}/lib
+includedir=\${prefix}/include
+abi_version=${abi_version}
+major_version=${abi_version}
+version=${lib_version}
+
+Name: ncursesw
+Description: ncurses library
+Version: ${lib_version}
+Requires.private:
+Libs: -lncursesw
+Cflags:
+__EOF__
Index: lib/libform/Makefile
===================================================================
RCS file: /cvs/src/lib/libform/Makefile,v
diff -u -p -r1.18 Makefile
--- lib/libform/Makefile 21 Feb 2025 18:16:45 -0000 1.18
+++ lib/libform/Makefile 29 Jan 2026 14:18:14 -0000
@@ -18,7 +18,7 @@ MAN= form.3 form_cursor.3 form_data.3 fo
form_hook.3 form_new.3 form_new_page.3 form_opts.3 form_page.3 \
form_post.3 form_requestname.3 form_userptr.3 form_variables.3 \
form_win.3
-PC_FILES= form.pc
+PC_FILES= form.pc formw.pc
CLEANFILES+= ${PC_FILES}
includes:
Index: lib/libform/generate_pkgconfig.sh
===================================================================
RCS file: /cvs/src/lib/libform/generate_pkgconfig.sh,v
diff -u -p -r1.1 generate_pkgconfig.sh
--- lib/libform/generate_pkgconfig.sh 21 Feb 2025 18:16:45 -0000 1.1
+++ lib/libform/generate_pkgconfig.sh 29 Jan 2026 14:18:14 -0000
@@ -76,3 +76,22 @@ Libs: -lform
Libs.private:
Cflags:
__EOF__
+
+pc_file="${objdir}/formw.pc"
+cat > ${pc_file} << __EOF__
+prefix=/usr
+exec_prefix=\${prefix}
+libdir=\${exec_prefix}/lib
+includedir=\${prefix}/include
+abi_version=${abi_version}
+major_version=${abi_version}
+version=${lib_version}
+
+Name: formw
+Description: ncurses add-on library
+Version: ${lib_version}
+Requires.private: ncursesw
+Libs: -lformw
+Libs.private:
+Cflags:
+__EOF__
Index: lib/libmenu/Makefile
===================================================================
RCS file: /cvs/src/lib/libmenu/Makefile,v
diff -u -p -r1.21 Makefile
--- lib/libmenu/Makefile 21 Feb 2025 18:16:45 -0000 1.21
+++ lib/libmenu/Makefile 29 Jan 2026 14:18:14 -0000
@@ -13,7 +13,7 @@ MAN= menu.3 menu_attributes.3 menu_curso
menu_pattern.3 menu_post.3 menu_requestname.3 menu_spacing.3 \
menu_userptr.3 menu_win.3 mitem_current.3 mitem_name.3 mitem_new.3 \
mitem_opts.3 mitem_userptr.3 mitem_value.3 mitem_visible.3
-PC_FILES= menu.pc
+PC_FILES= menu.pc menuw.pc
CLEANFILES+= ${PC_FILES}
includes:
Index: lib/libmenu/generate_pkgconfig.sh
===================================================================
RCS file: /cvs/src/lib/libmenu/generate_pkgconfig.sh,v
diff -u -p -r1.1 generate_pkgconfig.sh
--- lib/libmenu/generate_pkgconfig.sh 21 Feb 2025 18:16:45 -0000 1.1
+++ lib/libmenu/generate_pkgconfig.sh 29 Jan 2026 14:18:14 -0000
@@ -76,3 +76,22 @@ Libs: -lmenu
Libs.private:
Cflags:
__EOF__
+
+pc_file="${objdir}/menuw.pc"
+cat > ${pc_file} << __EOF__
+prefix=/usr
+exec_prefix=\${prefix}
+libdir=\${exec_prefix}/lib
+includedir=\${prefix}/include
+abi_version=${abi_version}
+major_version=${abi_version}
+version=${lib_version}
+
+Name: menuw
+Description: ncurses add-on library
+Version: ${lib_version}
+Requires.private: ncursesw
+Libs: -lmenuw
+Libs.private:
+Cflags:
+__EOF__
Index: lib/libpanel/Makefile
===================================================================
RCS file: /cvs/src/lib/libpanel/Makefile,v
diff -u -p -r1.14 Makefile
--- lib/libpanel/Makefile 21 Feb 2025 18:16:45 -0000 1.14
+++ lib/libpanel/Makefile 29 Jan 2026 14:18:14 -0000
@@ -7,7 +7,7 @@ SRCS= p_above.c p_below.c p_bottom.c p_d
HDRS= panel.h
CFLAGS+=-I${.CURDIR}/../libcurses -D_XOPEN_SOURCE_EXTENDED -DNDEBUG
MAN= panel.3
-PC_FILES= panel.pc
+PC_FILES= panel.pc panelw.pc
CLEANFILES+= ${PC_FILES}
includes:
Index: lib/libpanel/generate_pkgconfig.sh
===================================================================
RCS file: /cvs/src/lib/libpanel/generate_pkgconfig.sh,v
diff -u -p -r1.1 generate_pkgconfig.sh
--- lib/libpanel/generate_pkgconfig.sh 21 Feb 2025 18:16:45 -0000 1.1
+++ lib/libpanel/generate_pkgconfig.sh 29 Jan 2026 14:18:14 -0000
@@ -76,3 +76,22 @@ Libs: -lpanel
Libs.private:
Cflags:
__EOF__
+
+pc_file="${objdir}/panelw.pc"
+cat > ${pc_file} << __EOF__
+prefix=/usr
+exec_prefix=\${prefix}
+libdir=\${exec_prefix}/lib
+includedir=\${prefix}/include
+abi_version=${abi_version}
+major_version=${abi_version}
+version=${lib_version}
+
+Name: panelw
+Description: ncurses add-on library
+Version: ${lib_version}
+Requires.private: ncursesw
+Libs: -lpanelw
+Libs.private:
+Cflags:
+__EOF__
ncurses: more pkg-config files?