head 1.13; access; symbols pkgsrc-2023Q4:1.13.0.36 pkgsrc-2023Q4-base:1.13 pkgsrc-2023Q3:1.13.0.34 pkgsrc-2023Q3-base:1.13 pkgsrc-2023Q2:1.13.0.32 pkgsrc-2023Q2-base:1.13 pkgsrc-2023Q1:1.13.0.30 pkgsrc-2023Q1-base:1.13 pkgsrc-2022Q4:1.13.0.28 pkgsrc-2022Q4-base:1.13 pkgsrc-2022Q3:1.13.0.26 pkgsrc-2022Q3-base:1.13 pkgsrc-2022Q2:1.13.0.24 pkgsrc-2022Q2-base:1.13 pkgsrc-2022Q1:1.13.0.22 pkgsrc-2022Q1-base:1.13 pkgsrc-2021Q4:1.13.0.20 pkgsrc-2021Q4-base:1.13 pkgsrc-2021Q3:1.13.0.18 pkgsrc-2021Q3-base:1.13 pkgsrc-2021Q2:1.13.0.16 pkgsrc-2021Q2-base:1.13 pkgsrc-2021Q1:1.13.0.14 pkgsrc-2021Q1-base:1.13 pkgsrc-2020Q4:1.13.0.12 pkgsrc-2020Q4-base:1.13 pkgsrc-2020Q3:1.13.0.10 pkgsrc-2020Q3-base:1.13 pkgsrc-2020Q2:1.13.0.8 pkgsrc-2020Q2-base:1.13 pkgsrc-2020Q1:1.13.0.4 pkgsrc-2020Q1-base:1.13 pkgsrc-2019Q4:1.13.0.6 pkgsrc-2019Q4-base:1.13 pkgsrc-2019Q3:1.13.0.2 pkgsrc-2019Q3-base:1.13 pkgsrc-2019Q2:1.12.0.6 pkgsrc-2019Q2-base:1.12 pkgsrc-2019Q1:1.12.0.4 pkgsrc-2019Q1-base:1.12 pkgsrc-2018Q4:1.12.0.2 pkgsrc-2018Q4-base:1.12 pkgsrc-2018Q3:1.11.0.22 pkgsrc-2018Q3-base:1.11 pkgsrc-2018Q2:1.11.0.20 pkgsrc-2018Q2-base:1.11 pkgsrc-2018Q1:1.11.0.18 pkgsrc-2018Q1-base:1.11 pkgsrc-2017Q4:1.11.0.16 pkgsrc-2017Q4-base:1.11 pkgsrc-2017Q3:1.11.0.14 pkgsrc-2017Q3-base:1.11 pkgsrc-2017Q2:1.11.0.10 pkgsrc-2017Q2-base:1.11 pkgsrc-2017Q1:1.11.0.8 pkgsrc-2017Q1-base:1.11 pkgsrc-2016Q4:1.11.0.6 pkgsrc-2016Q4-base:1.11 pkgsrc-2016Q3:1.11.0.4 pkgsrc-2016Q3-base:1.11 pkgsrc-2016Q2:1.11.0.2 pkgsrc-2016Q2-base:1.11 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.8.0.30 pkgsrc-2013Q3-base:1.8 pkgsrc-2013Q2:1.8.0.28 pkgsrc-2013Q2-base:1.8 pkgsrc-2013Q1:1.8.0.26 pkgsrc-2013Q1-base:1.8 pkgsrc-2012Q4:1.8.0.24 pkgsrc-2012Q4-base:1.8 pkgsrc-2012Q3:1.8.0.22 pkgsrc-2012Q3-base:1.8 pkgsrc-2012Q2:1.8.0.20 pkgsrc-2012Q2-base:1.8 pkgsrc-2012Q1:1.8.0.18 pkgsrc-2012Q1-base:1.8 pkgsrc-2011Q4:1.8.0.16 pkgsrc-2011Q4-base:1.8 pkgsrc-2011Q3:1.8.0.14 pkgsrc-2011Q3-base:1.8 pkgsrc-2011Q2:1.8.0.12 pkgsrc-2011Q2-base:1.8 pkgsrc-2011Q1:1.8.0.10 pkgsrc-2011Q1-base:1.8 pkgsrc-2010Q4:1.8.0.8 pkgsrc-2010Q4-base:1.8 pkgsrc-2010Q3:1.8.0.6 pkgsrc-2010Q3-base:1.8 pkgsrc-2010Q2:1.8.0.4 pkgsrc-2010Q2-base:1.8 pkgsrc-2010Q1:1.8.0.2 pkgsrc-2010Q1-base:1.8 pkgsrc-2009Q4:1.7.0.8 pkgsrc-2009Q4-base:1.7 pkgsrc-2009Q3:1.7.0.6 pkgsrc-2009Q3-base:1.7 pkgsrc-2009Q2:1.7.0.4 pkgsrc-2009Q2-base:1.7 pkgsrc-2009Q1:1.7.0.2 pkgsrc-2009Q1-base:1.7 pkgsrc-2008Q4:1.6.0.12 pkgsrc-2008Q4-base:1.6 pkgsrc-2008Q3:1.6.0.10 pkgsrc-2008Q3-base:1.6 cube-native-xorg:1.6.0.8 cube-native-xorg-base:1.6 pkgsrc-2008Q2:1.6.0.6 pkgsrc-2008Q2-base:1.6 cwrapper:1.6.0.4 pkgsrc-2008Q1:1.6.0.2 pkgsrc-2008Q1-base:1.6; locks; strict; comment @# @; 1.13 date 2019.09.02.02.23.02; author rillig; state Exp; branches; next 1.12; commitid DaKMWu5a60IKFnBB; 1.12 date 2018.12.20.17.08.27; author rillig; state Exp; branches; next 1.11; commitid VfW7H6tjkbGINy4B; 1.11 date 2016.04.11.04.22.34; author dbj; state Exp; branches; next 1.10; commitid TpixwDg88CcX9a2z; 1.10 date 2013.10.19.19.12.41; author roy; state Exp; branches; next 1.9; commitid bhPKoZHZMEbUaW9x; 1.9 date 2013.10.16.16.51.28; author roy; state Exp; branches; next 1.8; commitid jEgnx6XPAzVqux9x; 1.8 date 2010.02.07.09.46.14; author roy; state Exp; branches; next 1.7; 1.7 date 2009.03.20.19.25.01; author joerg; state Exp; branches; next 1.6; 1.6 date 2008.03.05.17.38.58; author jlam; state Exp; branches; next 1.5; 1.5 date 2008.03.05.16.23.52; author jlam; state Exp; branches; next 1.4; 1.4 date 2008.03.05.07.10.26; author jlam; state Exp; branches; next 1.3; 1.3 date 2008.03.05.03.58.20; 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.13 log @mk: use a single form for headings in the documentation comments @ text @# $NetBSD: termcap.buildlink3.mk,v 1.12 2018/12/20 17:08:27 rillig Exp $ # # This Makefile fragment is meant to be included by packages that require # a termcap implementation that supports the basic termcap functions: # # tgetent, tgetstr, tgetflag, tgetnum, tgoto, tputs # # System-defined variables: # # TERMCAP_TYPE # The name of the selected termcap implementation. TERMCAP_BUILDLINK3_MK:= ${TERMCAP_BUILDLINK3_MK}+ .include "bsd.fast.prefs.mk" .if !empty(TERMCAP_BUILDLINK3_MK:M+) # _TERMCAP_TYPES is an exhaustive list of all of the termcap # implementations that may be found. # _TERMCAP_TYPES?= terminfo curses termcap termlib tinfo CHECK_BUILTIN.termcap:= yes . include "termcap.builtin.mk" CHECK_BUILTIN.termcap:= no .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_EFFECTS+= TERMCAP_TYPE # 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 for packages that can be provided by pkgsrc, # e.g. curses -- see termcap.builtin.mk for details. # . for _tcap_ in ${_TERMCAP_TYPES:Ntermcap:Ncurses} . if empty(TERMCAP_TYPE:M${_tcap_}) \ && (!defined(TERMINFO_TYPE) || empty(TERMINFO_TYPE:M${_tcap_})) \ && (!defined(CURSES_TYPE) || empty(CURSES_TYPE:M${_tcap_})) BUILDLINK_TRANSFORM+= rm:-l${_tcap_} . endif . endfor BUILDLINK_TRANSFORM+= l:termcap:${BUILDLINK_LIBNAME.termcap} .endif # TERMCAP_BUILDLINK3_MK .if ${TERMCAP_TYPE} == "none" PKG_FAIL_REASON+= "No usable termcap library found on the system." .elif (${TERMCAP_TYPE} == "terminfo") || \ (${TERMCAP_TYPE} == "termlib") || \ (${TERMCAP_TYPE} == "termcap") || \ (${TERMCAP_TYPE} == "tinfo") BUILDLINK_TREE+= termcap -termcap BUILDLINK_LIBNAME.termcap?= ${BUILTIN_LIBNAME.termcap} BUILDLINK_LDADD.termcap?= ${BUILDLINK_LIBNAME.termcap:S/^/-l/:S/^-l$//} BUILDLINK_BUILTIN_MK.termcap= ../../mk/termcap.builtin.mk .elif ${TERMCAP_TYPE} == "curses" . include "../../mk/curses.buildlink3.mk" BUILDLINK_PREFIX.termcap?= ${BUILDLINK_PREFIX.curses} BUILDLINK_LIBNAME.termcap?= ${BUILDLINK_LIBNAME.curses} BUILDLINK_LDADD.termcap?= ${BUILDLINK_LDADD.curses} .endif _VARGROUPS+= termcap _DEF_VARS.termcap= _TERMCAP_TYPES BUILD_DEFS_EFFECTS BUILDLINK_TRANSFORM _SYS_VARS.termcap= CHECK_BUILTIN.termcap BUILTIN_LIBNAME.termcap \ TERMCAP_TYPE \ BUILDLINK_PREFIX.termcap BUILDLINK_LIBNAME.termcap \ BUILDLINK_LDADD.termcap \ BUILDLINK_PREFIX.curses BUILDLINK_LIBNAME.curses \ BUILDLINK_LDADD.curses _USER_VARS.termcap= USE_BUILTIN.termcap _USE_VARS.termcap= CURSES_TYPE @ 1.12 log @mk/termcap.buildlink3.mk: add show-all-termcap target for debugging @ text @d1 1 a1 1 # $NetBSD: termcap.buildlink3.mk,v 1.11 2016/04/11 04:22:34 dbj Exp $ d8 1 a8 1 # === Variables set by this file === @ 1.11 log @update PKG_{FAIL,SKIP}_REASON with += @ text @d1 1 a1 1 # $NetBSD: termcap.buildlink3.mk,v 1.10 2013/10/19 19:12:41 roy Exp $ d72 11 @ 1.10 log @Fix for older bmake @ text @d1 1 a1 1 # $NetBSD: termcap.buildlink3.mk,v 1.9 2013/10/16 16:51:28 roy Exp $ d57 1 a57 1 PKG_FAIL_REASON= "No usable termcap library found on the system." @ 1.9 log @If TERMINFO or CURSES is already set, don't undefine them. @ text @d1 1 a1 1 # $NetBSD: termcap.buildlink3.mk,v 1.8 2010/02/07 09:46:14 roy Exp $ d47 2 a48 2 && empty(TERMINFO_TYPE:M${_tcap_}) \ && empty(CURSES_TYPE:M${_tcap_}) @ 1.8 log @Add builtin for working out if we have terminfo installed natively. @ text @d1 1 a1 1 # $NetBSD: termcap.buildlink3.mk,v 1.7 2009/03/20 19:25:01 joerg Exp $ d46 3 a48 1 . if empty(TERMCAP_TYPE:M${_tcap_}) @ 1.7 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.buildlink3.mk,v 1.6 2008/03/05 17:38:58 jlam Exp $ d22 1 a22 1 _TERMCAP_TYPES?= curses termcap termlib tinfo d56 2 a57 1 .elif (${TERMCAP_TYPE} == "termlib") || \ @ 1.6 log @TERMCAP_TYPE isn't really a variable that you can set, so add it to BUILD_DEFS_EFFECTS instead of BUILD_DEFS. @ text @d1 1 a1 1 # $NetBSD: termcap.buildlink3.mk,v 1.5 2008/03/05 16:23:52 jlam Exp $ d59 1 a59 3 BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermcap} BUILDLINK_PACKAGES+= termcap BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termcap @ 1.5 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.buildlink3.mk,v 1.4 2008/03/05 07:10:26 jlam Exp $ d37 1 a37 1 BUILD_DEFS+= TERMCAP_TYPE @ 1.4 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.buildlink3.mk,v 1.3 2008/03/05 03:58:20 jlam Exp $ d11 1 a11 2 # The name of the selected termcap implementation. This is actually # indirectly set by termcap.builtin.mk but is exported by this file. d19 5 d28 24 @ 1.3 log @If the TERMCAP_TYPE isn't "curses", then also remove "-lncurses" from the command line so we don't find any system ncurses library. XXX This currently causes problems with packages using both termcap XXX (usually via readline) and curses. This will be fixed in time. @ text @d1 1 a1 1 # $NetBSD: termcap.buildlink3.mk,v 1.2 2008/03/02 07:05:28 jlam Exp $ d11 2 a12 1 # The name of the selected termcap implementation. a19 5 # _TERMCAP_TYPES is an exhaustive list of all of the termcap implementations # that may be found. # _TERMCAP_TYPES?= curses termcap termlib tinfo a23 24 . 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 . endif BUILD_DEFS+= TERMCAP_TYPE # Most GNU configure scripts will try finding every termcap implementation, # so prevent them from finding any except for the one we decide upon. # .for _tcap_ in ${_TERMCAP_TYPES:Ntermcap} . if empty(TERMCAP_TYPE:M${_tcap_}) BUILDLINK_TRANSFORM+= rm:-l${_tcap_} . endif .endfor .if empty(TERMCAP_TYPE:Mcurses) BUILDLINK_TRANSFORM+= rm:-lncurses .endif 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.buildlink3.mk,v 1.1 2008/02/29 22:41:13 jlam Exp $ d47 3 @ 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.buildlink3.mk,v 1.5 2008/02/29 16:28:51 jlam Exp $ d19 5 d37 1 d39 9 a47 1 BUILD_DEFS+= TERMCAP_TYPE d53 2 a54 1 .elif (${TERMCAP_TYPE} == "termcap") || \ @