head 1.10; access; symbols pkgsrc-2023Q4:1.10.0.82 pkgsrc-2023Q4-base:1.10 pkgsrc-2023Q3:1.10.0.80 pkgsrc-2023Q3-base:1.10 pkgsrc-2023Q2:1.10.0.78 pkgsrc-2023Q2-base:1.10 pkgsrc-2023Q1:1.10.0.76 pkgsrc-2023Q1-base:1.10 pkgsrc-2022Q4:1.10.0.74 pkgsrc-2022Q4-base:1.10 pkgsrc-2022Q3:1.10.0.72 pkgsrc-2022Q3-base:1.10 pkgsrc-2022Q2:1.10.0.70 pkgsrc-2022Q2-base:1.10 pkgsrc-2022Q1:1.10.0.68 pkgsrc-2022Q1-base:1.10 pkgsrc-2021Q4:1.10.0.66 pkgsrc-2021Q4-base:1.10 pkgsrc-2021Q3:1.10.0.64 pkgsrc-2021Q3-base:1.10 pkgsrc-2021Q2:1.10.0.62 pkgsrc-2021Q2-base:1.10 pkgsrc-2021Q1:1.10.0.60 pkgsrc-2021Q1-base:1.10 pkgsrc-2020Q4:1.10.0.58 pkgsrc-2020Q4-base:1.10 pkgsrc-2020Q3:1.10.0.56 pkgsrc-2020Q3-base:1.10 pkgsrc-2020Q2:1.10.0.52 pkgsrc-2020Q2-base:1.10 pkgsrc-2020Q1:1.10.0.32 pkgsrc-2020Q1-base:1.10 pkgsrc-2019Q4:1.10.0.54 pkgsrc-2019Q4-base:1.10 pkgsrc-2019Q3:1.10.0.50 pkgsrc-2019Q3-base:1.10 pkgsrc-2019Q2:1.10.0.48 pkgsrc-2019Q2-base:1.10 pkgsrc-2019Q1:1.10.0.46 pkgsrc-2019Q1-base:1.10 pkgsrc-2018Q4:1.10.0.44 pkgsrc-2018Q4-base:1.10 pkgsrc-2018Q3:1.10.0.42 pkgsrc-2018Q3-base:1.10 pkgsrc-2018Q2:1.10.0.40 pkgsrc-2018Q2-base:1.10 pkgsrc-2018Q1:1.10.0.38 pkgsrc-2018Q1-base:1.10 pkgsrc-2017Q4:1.10.0.36 pkgsrc-2017Q4-base:1.10 pkgsrc-2017Q3:1.10.0.34 pkgsrc-2017Q3-base:1.10 pkgsrc-2017Q2:1.10.0.30 pkgsrc-2017Q2-base:1.10 pkgsrc-2017Q1:1.10.0.28 pkgsrc-2017Q1-base:1.10 pkgsrc-2016Q4:1.10.0.26 pkgsrc-2016Q4-base:1.10 pkgsrc-2016Q3:1.10.0.24 pkgsrc-2016Q3-base:1.10 pkgsrc-2016Q2:1.10.0.22 pkgsrc-2016Q2-base:1.10 pkgsrc-2016Q1:1.10.0.20 pkgsrc-2016Q1-base:1.10 pkgsrc-2015Q4:1.10.0.18 pkgsrc-2015Q4-base:1.10 pkgsrc-2015Q3:1.10.0.16 pkgsrc-2015Q3-base:1.10 pkgsrc-2015Q2:1.10.0.14 pkgsrc-2015Q2-base:1.10 pkgsrc-2015Q1:1.10.0.12 pkgsrc-2015Q1-base:1.10 pkgsrc-2014Q4:1.10.0.10 pkgsrc-2014Q4-base:1.10 pkgsrc-2014Q3:1.10.0.8 pkgsrc-2014Q3-base:1.10 pkgsrc-2014Q2:1.10.0.6 pkgsrc-2014Q2-base:1.10 pkgsrc-2014Q1:1.10.0.4 pkgsrc-2014Q1-base:1.10 pkgsrc-2013Q4:1.10.0.2 pkgsrc-2013Q4-base:1.10 pkgsrc-2013Q3:1.9.0.4 pkgsrc-2013Q3-base:1.9 pkgsrc-2013Q2:1.9.0.2 pkgsrc-2013Q2-base:1.9 pkgsrc-2013Q1:1.8.0.4 pkgsrc-2013Q1-base:1.8 pkgsrc-2012Q4:1.8.0.2 pkgsrc-2012Q4-base:1.8 pkgsrc-2012Q3:1.7.0.22 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.20 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.18 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.7.0.16 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q3:1.7.0.14 pkgsrc-2011Q3-base:1.7 pkgsrc-2011Q2:1.7.0.12 pkgsrc-2011Q2-base:1.7 pkgsrc-2011Q1:1.7.0.10 pkgsrc-2011Q1-base:1.7 pkgsrc-2010Q4:1.7.0.8 pkgsrc-2010Q4-base:1.7 pkgsrc-2010Q3:1.7.0.6 pkgsrc-2010Q3-base:1.7 pkgsrc-2010Q2:1.7.0.4 pkgsrc-2010Q2-base:1.7 pkgsrc-2010Q1:1.7.0.2 pkgsrc-2010Q1-base:1.7 pkgsrc-2009Q4:1.6.0.8 pkgsrc-2009Q4-base:1.6 pkgsrc-2009Q3:1.6.0.6 pkgsrc-2009Q3-base:1.6 pkgsrc-2009Q2:1.6.0.4 pkgsrc-2009Q2-base:1.6 pkgsrc-2009Q1:1.6.0.2 pkgsrc-2009Q1-base:1.6 pkgsrc-2008Q4:1.5.0.12 pkgsrc-2008Q4-base:1.5 pkgsrc-2008Q3:1.5.0.10 pkgsrc-2008Q3-base:1.5 cube-native-xorg:1.5.0.8 cube-native-xorg-base:1.5 pkgsrc-2008Q2:1.5.0.6 pkgsrc-2008Q2-base:1.5 cwrapper:1.5.0.4 pkgsrc-2008Q1:1.5.0.2 pkgsrc-2008Q1-base:1.5; locks; strict; comment @# @; 1.10 date 2013.11.23.09.10.14; author obache; state Exp; branches; next 1.9; commitid A2FzxLO4eB58Inex; 1.9 date 2013.06.17.05.44.27; author obache; state Exp; branches; next 1.8; commitid 5qTDkyCqCHW3FVTw; 1.8 date 2012.10.31.03.28.40; author asau; state Exp; branches; next 1.7; 1.7 date 2010.02.07.09.46.14; author roy; state Exp; branches; next 1.6; 1.6 date 2009.03.20.19.25.01; author joerg; state Exp; branches; next 1.5; 1.5 date 2008.03.11.15.39.16; author jlam; state Exp; branches; next 1.4; 1.4 date 2008.03.05.16.23.52; author jlam; state Exp; branches; next 1.3; 1.3 date 2008.03.05.07.10.26; author jlam; state Exp; branches; next 1.2; 1.2 date 2008.03.02.07.05.28; author jlam; state Exp; branches; next 1.1; 1.1 date 2008.02.29.22.41.13; author jlam; state Exp; branches; next ; desc @@ 1.10 log @Use find-headers instead of find-files to detect builtin header files. @ text @# $NetBSD: termcap.builtin.mk,v 1.9 2013/06/17 05:44:27 obache Exp $ BUILTIN_PKG:= termcap BUILTIN_FIND_LIBS:= terminfo curses termcap termlib tinfo BUILTIN_FIND_HEADERS_VAR:= H_TERM H_TERMCAP H_TERMLIB BUILTIN_FIND_HEADERS.H_TERM:= term.h BUILTIN_FIND_GREP.H_TERM:= tgetent BUILTIN_FIND_HEADERS.H_TERMCAP:= termcap.h BUILTIN_FIND_GREP.H_TERMCAP:= tgetent BUILTIN_FIND_HEADERS.H_TERMLIB:= termlib.h BUILTIN_FIND_GREP.H_TERMLIB:= tgetent .include "buildlink3/bsd.builtin.mk" ### ### Determine if there is a built-in implementation of the package and ### set IS_BUILTIN. appropriately ("yes" or "no"). ### .if !defined(IS_BUILTIN.termcap) IS_BUILTIN.termcap= no . if empty(H_TERM:M__nonexistent__) && empty(H_TERM:M${LOCALBASE}/*) || \ empty(H_TERMCAP:M__nonexistent__) && empty(H_TERMCAP:M${LOCALBASE}/*) || \ empty(H_TERMLIB:M__nonexistent__) && empty(H_TERMLIB:M${LOCALBASE}/*) || \ !empty(BUILTIN_LIB_FOUND.termlib:M[yY][eE][sS]) IS_BUILTIN.termcap= yes . endif .endif MAKEVARS+= IS_BUILTIN.termcap ### ### Determine whether we should use the built-in implementation if it ### exists, and set USE_BUILTIN. appropriate ("yes" or "no"). ### .if !defined(USE_BUILTIN.termcap) . if ${PREFER.termcap} == "pkgsrc" USE_BUILTIN.termcap= no . else USE_BUILTIN.termcap= ${IS_BUILTIN.termcap} . endif # PREFER.termcap .endif MAKEVARS+= USE_BUILTIN.termcap # Define BUILTIN_LIBNAME.termcap to be the base name of the built-in # termcap library. # # The way this is determined is: # # (1) If exists and libtinfo exists, then it's "tinfo". # (2) If exists and libcurses exists, then it's "curses". # (3) If exists and lib{curses,tinfo} don't, then it's "c". # (4) If exists and libtermcap exists, then it's "termcap". # (5) If exists and libtermcap doesn't, then it's "c". # (6) If exists and libtermlib exists, then it's "termlib". # (7) If exists and libtermlib doesn't, then it's "c". # (8) If libtermlib exists by itself, then it's "termlib". # .if empty(H_TERM:M__nonexistent__) && empty(H_TERM:M${LOCALBASE}/*) . if !empty(BUILTIN_LIB_FOUND.terminfo:M[yY][eE][sS]) BUILTIN_LIBNAME.termcap= terminfo . elif !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS]) BUILTIN_LIBNAME.termcap= tinfo . elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) BUILTIN_LIBNAME.termcap= curses . else BUILTIN_LIBNAME.termcap= c . endif .elif empty(H_TERMCAP:M__nonexistent__) && empty(H_TERMCAP:M${LOCALBASE}/*) . if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS]) BUILTIN_LIBNAME.termcap= termcap . else BUILTIN_LIBNAME.termcap= c . endif .elif empty(H_TERMLIB:M__nonexistent__) && empty(H_TERMLIB:M${LOCALBASE}/*) . if !empty(BUILTIN_LIB_FOUND.termlib:M[yY][eE][sS]) BUILTIN_LIBNAME.termcap= termlib . else BUILTIN_LIBNAME.termcap= c . endif .elif !empty(BUILTIN_LIB_FOUND.termlib:M[yY][eE][sS]) BUILTIN_LIBNAME.termcap= termlib .endif ### ### The section below only applies if we are not including this file ### solely to determine whether a built-in implementation exists. ### CHECK_BUILTIN.termcap?= no .if !empty(CHECK_BUILTIN.termcap:M[nN][oO]) . if !empty(USE_BUILTIN.termcap:M[yY][eE][sS]) BUILDLINK_LIBNAME.termcap= ${BUILTIN_LIBNAME.termcap} . endif # If the package wants both "termcap" and "curses", then we must not # remove the -l options for the curses libraries; otherwise, we should # remove them as GNU configure scripts commonly check for one or both # of those library options. # . if empty(BUILDLINK_TREE:Mcurses) && empty(BUILDLINK_TREE:Mncurses) BUILDLINK_TRANSFORM+= rm:-lcurses BUILDLINK_TRANSFORM+= rm:-lncurses . endif .endif # CHECK_BUILTIN.termcap @ 1.9 log @Change condition of builtin termcap detection to same as termcap implementation detection, so that `term fuction is in libc' and `only shlib, no development environment' will be handled correctly. @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.8 2012/10/31 03:28:40 asau Exp $ d6 2 a7 2 BUILTIN_FIND_FILES_VAR:= H_TERM H_TERMCAP H_TERMLIB BUILTIN_FIND_FILES.H_TERM:= /usr/include/term.h d9 1 a9 1 BUILTIN_FIND_FILES.H_TERMCAP:= /usr/include/termcap.h d11 1 a11 1 BUILTIN_FIND_FILES.H_TERMLIB:= /usr/include/termlib.h @ 1.8 log @Add closing "]". @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.7 2010/02/07 09:46:14 roy Exp $ d22 4 a25 5 . if !empty(BUILTIN_LIB_FOUND.terminfo:M[yY][eE][sS]) || \ !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) || \ !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS]) || \ !empty(BUILTIN_LIB_FOUND.termlib:M[yY][eE][sS]) || \ !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS]) @ 1.7 log @Add builtin for working out if we have terminfo installed natively. @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.6 2009/03/20 19:25:01 joerg Exp $ d22 1 a22 1 . if !empty(BUILTIN_LIB_FOUND.terminfo:M[yY[eE][sS]) || \ @ 1.6 log @Simply and speed up buildlink3.mk files and processing. This changes the buildlink3.mk files to use an include guard for the recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS, BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of enter/exit marker, which can be used to reconstruct the tree and to determine first level includes. Avoiding := for large variables (BUILDLINK_ORDER) speeds up parse time as += has linear complexity. The include guard reduces system time by avoiding reading files over and over again. For complex packages this reduces both %user and %sys time to half of the former time. @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.5 2008/03/11 15:39:16 jlam Exp $ d5 1 a5 1 BUILTIN_FIND_LIBS:= curses termcap termlib tinfo d22 2 a23 1 . if !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) || \ d60 3 a62 1 . if !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS]) @ 1.5 log @Improve the detection of the library that contains the built-in termcap. Instead of just looking at the libraries, we check for the headers as well, and if multiple implementations exist (usually because of symlinks to shared libraries), then we order the search as: tinfo, curses, termcap, termlib, c @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.4 2008/03/05 16:23:52 jlam Exp $ d98 1 a98 1 . if empty(BUILDLINK_PACKAGES:Mcurses) && empty(BUILDLINK_PACKAGES:Mncurses) @ 1.4 log @+ Fix error in previous commit -- too much of the termcap buildlink code was moved to the builtin.mk file. The buildlink3.mk file should contain the bits that always apply to all packages that include it. The builtin.mk file should include the bits that only apply if "termcap" is listed in ${BUILDLINK_PACKAGES} (this isn't the case if we use curses to replace termcap). As such, redistribute the code as follows: + Move the parts that remove -l options for terminal libraries we don't support, as well as for transforming "-ltermcap" into the appropriate libraries, from the builtin.mk back into the buildlink3.mk. + Leave the parts the remove -lcurses and -lncurses in the builtin.mk. We can remove the ${TERMCAP_TYPE} == "curses" check since that part of the file is protected by CHECK_BUILTIN.termcap, so it should only be triggered if "termcap" is in BUILDLINK_PACKAGES, which only happens if ${TERMCAP_TYPE} isn't "curses". @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.3 2008/03/05 07:10:26 jlam Exp $ d5 8 a12 1 BUILTIN_FIND_LIBS:= curses termcap termlib tinfo d47 1 a47 5 # XXX This needs to be more sophisticated. We will want to do what # XXX most packages do: test for tgetent() in the following libraries # XXX in order: c, curses, termcap, termlib. Since we can't test for # XXX symbols in libraries, we'll need to be clever with looking at # XXX headers. d49 11 a59 3 .if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS]) BUILTIN_LIBNAME.termcap= termcap .elif !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS]) d61 1 a61 1 .elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) d63 15 @ 1.3 log @+ Only remove -lcurses and -lncurses in BUILDLINK_TRANSFORM if the package does not use either curses or ncurses. We determine this by inspecting BUILDLINK_PACKAGES and looking for "curses" and "ncurses". + Because the above logic uses BUILDLINK_PACKAGES, the code must be moved from termcap.buildlink3.mk into termcap.builtin.mk where it is safe to inspect BUILDLINK_PACKAGES. @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.2 2008/03/02 07:05:28 jlam Exp $ d5 1 a5 6 # _TERMCAP_TYPES is an exhaustive list of all of the termcap implementations # that may be found. # _TERMCAP_TYPES?= curses termcap termlib tinfo BUILTIN_FIND_LIBS:= ${_TERMCAP_TYPES} a55 11 .if !empty(USE_BUILTIN.termcap:M[yY][eE][sS]) . if defined(BUILTIN_LIBNAME.termcap) TERMCAP_TYPE= ${BUILTIN_LIBNAME.termcap} . else TERMCAP_TYPE= none . endif .else TERMCAP_TYPE= curses # pkgsrc termcap is curses .endif BUILD_DEFS+= TERMCAP_TYPE d67 4 a70 6 # Most GNU configure scripts will try finding every termcap implementation, # so prevent them from finding any except for the one we decide upon. # # There is special handling here for packages that can be provided by # pkgsrc, e.g. curses. In case we need both that package as well as # termcap, we must not remove the -l options for that package's libraries. d72 1 a72 7 . for _tcap_ in ${_TERMCAP_TYPES:Ntermcap:Ncurses} . if empty(TERMCAP_TYPE:M${_tcap_}) BUILDLINK_TRANSFORM+= rm:-l${_tcap_} . endif . endfor . if empty(TERMCAP_TYPE:Mcurses) && \ empty(BUILDLINK_PACKAGES:Mcurses) && empty(BUILDLINK_PACKAGES:Mncurses) a75 1 BUILDLINK_TRANSFORM+= l:termcap:${BUILDLINK_LIBNAME.termcap} @ 1.2 log @+ Teach buildlink3.mk to cause GNU configure script to not find any other terminal library other than the one we specify. + Also look for "termlib" as some systems have that. Note that we need to make the library search more sophisticated to work correctly on more exotic platforms. @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.1 2008/02/29 22:41:13 jlam Exp $ d5 6 a10 1 BUILTIN_FIND_LIBS:= curses termcap termlib tinfo d61 11 d83 19 @ 1.1 log @Rename termlib.* to termcap.* to better document exactly what packages are trying to use (the termcap t*() API). @ text @d1 1 a1 1 # $NetBSD: termcap.builtin.mk,v 1.3 2008/02/27 17:36:34 jlam Exp $ d5 1 a5 1 BUILTIN_FIND_LIBS:= termcap tinfo curses d15 4 a18 3 . if !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS]) || \ !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS]) || \ !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) d40 6 d52 2 @