Mon Jun 1 07:01:20 2020 UTC ()
ncurses: Simplify handling of TOOLS_TBL.

Don't try to handle obscure cases where certain parts of curses are builtin,
historically it has been shown to lead to failures and a growing list of
special cases.  Just disable completely if native tbl(1) is not available.

Fixes latest issue seen by sjmulder on OpenIndiana.


(jperkin)
diff -r1.45 -r1.46 pkgsrc/devel/ncurses/Makefile.common

cvs diff -r1.45 -r1.46 pkgsrc/devel/ncurses/Makefile.common (expand / switch to unified diff)

--- pkgsrc/devel/ncurses/Makefile.common 2020/03/09 06:11:55 1.45
+++ pkgsrc/devel/ncurses/Makefile.common 2020/06/01 07:01:19 1.46
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.45 2020/03/09 06:11:55 wiz Exp $ 1# $NetBSD: Makefile.common,v 1.46 2020/06/01 07:01:19 jperkin Exp $
2# 2#
3# used by devel/ncurses/Makefile 3# used by devel/ncurses/Makefile
4# used by devel/ncursesw/Makefile 4# used by devel/ncursesw/Makefile
5 5
6DISTNAME= ncurses-${NC_VERS} 6DISTNAME= ncurses-${NC_VERS}
7NC_VERS= 6.2 7NC_VERS= 6.2
8CATEGORIES= devel 8CATEGORIES= devel
9MASTER_SITES= ${MASTER_SITE_GNU:=ncurses/} 9MASTER_SITES= ${MASTER_SITE_GNU:=ncurses/}
10MASTER_SITES+= ftp://dickey.his.com/ncurses/ 10MASTER_SITES+= ftp://dickey.his.com/ncurses/
11MASTER_SITES+= ftp://dickey.his.com/ncurses/${NC_VERS}/ 11MASTER_SITES+= ftp://dickey.his.com/ncurses/${NC_VERS}/
12 12
13MAINTAINER= pkgsrc-users@NetBSD.org 13MAINTAINER= pkgsrc-users@NetBSD.org
14HOMEPAGE= https://invisible-island.net/ncurses/ncurses.html 14HOMEPAGE= https://invisible-island.net/ncurses/ncurses.html
@@ -17,63 +17,54 @@ LICENSE= mit @@ -17,63 +17,54 @@ LICENSE= mit
17USE_LANGUAGES= c c++ 17USE_LANGUAGES= c c++
18USE_LIBTOOL= yes 18USE_LIBTOOL= yes
19USE_TOOLS+= gmake pkg-config tbl 19USE_TOOLS+= gmake pkg-config tbl
20GNU_CONFIGURE= yes 20GNU_CONFIGURE= yes
21CONFIGURE_ARGS+= --with-libtool 21CONFIGURE_ARGS+= --with-libtool
22CONFIGURE_ARGS+= --enable-bsdpad 22CONFIGURE_ARGS+= --enable-bsdpad
23CONFIGURE_ARGS+= --enable-overwrite 23CONFIGURE_ARGS+= --enable-overwrite
24CONFIGURE_ARGS+= --with-cxx-binding 24CONFIGURE_ARGS+= --with-cxx-binding
25CONFIGURE_ARGS+= --enable-pc-files 25CONFIGURE_ARGS+= --enable-pc-files
26CONFIGURE_ARGS+= --with-pkg-config-libdir=${PREFIX}/lib/pkgconfig 26CONFIGURE_ARGS+= --with-pkg-config-libdir=${PREFIX}/lib/pkgconfig
27CONFIGURE_ARGS+= --without-ada 27CONFIGURE_ARGS+= --without-ada
28CONFIGURE_ARGS+= --without-gpm 28CONFIGURE_ARGS+= --without-gpm
29CONFIGURE_ARGS+= --with-manpage-format=normal 29CONFIGURE_ARGS+= --with-manpage-format=normal
30CONFIGURE_ARGS+= --with-manpage-tbl 
31CONFIGURE_ARGS+= --without-manpage-renames 30CONFIGURE_ARGS+= --without-manpage-renames
32CONFIGURE_ARGS+= --with-default-terminfo-dir=${PREFIX}/${TERMINFODIR} 31CONFIGURE_ARGS+= --with-default-terminfo-dir=${PREFIX}/${TERMINFODIR}
33CONFIGURE_ARGS+= --with-terminfo-dirs=${PREFIX}/${TERMINFODIR} 32CONFIGURE_ARGS+= --with-terminfo-dirs=${PREFIX}/${TERMINFODIR}
34CONFIGURE_ARGS+= --includedir=${PREFIX}/include/ncurses 33CONFIGURE_ARGS+= --includedir=${PREFIX}/include/ncurses
35 34
36SUBST_CLASSES+= rpath 35SUBST_CLASSES+= rpath
37SUBST_FILES.rpath+= misc/ncurses-config 36SUBST_FILES.rpath+= misc/ncurses-config
38SUBST_STAGE.rpath= post-configure 37SUBST_STAGE.rpath= post-configure
39SUBST_SED.rpath+= -e "s|-L\\(.libdir\\)|${COMPILER_RPATH_FLAG}\\1 -L\\1|" 38SUBST_SED.rpath+= -e "s|-L\\(.libdir\\)|${COMPILER_RPATH_FLAG}\\1 -L\\1|"
40SUBST_MESSAGE.rpath= Fixing rpath in ncurses-config. 39SUBST_MESSAGE.rpath= Fixing rpath in ncurses-config.
41 40
42.include "../../mk/bsd.prefs.mk" 41.include "../../mk/bsd.prefs.mk"
43 42
44CONFIGURE_ARGS.Darwin+= --disable-mixed-case 43CONFIGURE_ARGS.Darwin+= --disable-mixed-case
45 44
46.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) 45.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
47TOOL_DEPENDS+= ncurses-${NC_VERS}:../../devel/ncurses 46TOOL_DEPENDS+= ncurses-${NC_VERS}:../../devel/ncurses
48CONFIGURE_ENV+= BUILD_CC=${NATIVE_CC:Q} 47CONFIGURE_ENV+= BUILD_CC=${NATIVE_CC:Q}
49CONFIGURE_ENV+= ac_cv_path_TIC_PATH=${LOCALBASE}/bin/tic 48CONFIGURE_ENV+= ac_cv_path_TIC_PATH=${LOCALBASE}/bin/tic
50.endif 49.endif
51 50
52.if !defined(TOOLS_TBL) 51# If there's no native tbl(1) then the tools infrastructure would pull in
53# This means that groff needs to be built to get tbl(1). 52# groff, causing various circular dependencies.
54# We can only build groff if there is a builtin implementation of curses, 53.if defined(TOOLS_TBL)
55# otherwise we get a circular dependency problem. 54CONFIGURE_ARGS+= --with-manpage-tbl
56# Additionally, Interix is special, see ../../mk/curses.buildlink3.mk 55.else
57# Additionally, Arch Linux boostrap comes without curses package. 
58. if !(exists(/usr/include/curses.h) || exists(/usr/include/ncurses.h)) || \ 
59 ${OPSYS} == "Interix" || \ 
60 (${OPSYS} == "FreeBSD" && empty(OS_VERSION:M[0-9].*) && \ 
61 empty(OS_VERSION:M1[01].*)) || \ 
62 (${OPSYS} == "Linux" && exists(/etc/arch-release)) 
63# None was available, so disable use of tbl(1) 
64USE_TOOLS:= ${USE_TOOLS:Ntbl} 56USE_TOOLS:= ${USE_TOOLS:Ntbl}
65CONFIGURE_ARGS+= --without-manpage-tbl 57CONFIGURE_ARGS+= --without-manpage-tbl
66. endif 
67.endif 58.endif
68 59
69.include "../../mk/compiler.mk" 60.include "../../mk/compiler.mk"
70 61
71# Fix build under FreeBSD 10.2 62# Fix build under FreeBSD 10.2
72.if !empty(PKGSRC_COMPILER:Mclang) 63.if !empty(PKGSRC_COMPILER:Mclang)
73CONFIGURE_ENV+= ac_cv_c_compiler_gnu=no 64CONFIGURE_ENV+= ac_cv_c_compiler_gnu=no
74CONFIGURE_ENV+= ac_cv_cxx_compiler_gnu=no 65CONFIGURE_ENV+= ac_cv_cxx_compiler_gnu=no
75.endif 66.endif
76 67
77.if ${OPSYS} == "SunOS" 68.if ${OPSYS} == "SunOS"
78CONFIGURE_ARGS+= --disable-const 69CONFIGURE_ARGS+= --disable-const
79TERMINFODIR= share/lib/terminfo 70TERMINFODIR= share/lib/terminfo