head 1.32; access; symbols pkgsrc-2023Q4:1.32.0.2 pkgsrc-2023Q4-base:1.32 pkgsrc-2023Q3:1.31.0.12 pkgsrc-2023Q3-base:1.31 pkgsrc-2023Q2:1.31.0.10 pkgsrc-2023Q2-base:1.31 pkgsrc-2023Q1:1.31.0.8 pkgsrc-2023Q1-base:1.31 pkgsrc-2022Q4:1.31.0.6 pkgsrc-2022Q4-base:1.31 pkgsrc-2022Q3:1.31.0.4 pkgsrc-2022Q3-base:1.31 pkgsrc-2022Q2:1.31.0.2 pkgsrc-2022Q2-base:1.31 pkgsrc-2022Q1:1.30.0.22 pkgsrc-2022Q1-base:1.30 pkgsrc-2021Q4:1.30.0.20 pkgsrc-2021Q4-base:1.30 pkgsrc-2021Q3:1.30.0.18 pkgsrc-2021Q3-base:1.30 pkgsrc-2021Q2:1.30.0.16 pkgsrc-2021Q2-base:1.30 pkgsrc-2021Q1:1.30.0.14 pkgsrc-2021Q1-base:1.30 pkgsrc-2020Q4:1.30.0.12 pkgsrc-2020Q4-base:1.30 pkgsrc-2020Q3:1.30.0.10 pkgsrc-2020Q3-base:1.30 pkgsrc-2020Q2:1.30.0.8 pkgsrc-2020Q2-base:1.30 pkgsrc-2020Q1:1.30.0.4 pkgsrc-2020Q1-base:1.30 pkgsrc-2019Q4:1.30.0.6 pkgsrc-2019Q4-base:1.30 pkgsrc-2019Q3:1.30.0.2 pkgsrc-2019Q3-base:1.30 pkgsrc-2019Q2:1.29.0.6 pkgsrc-2019Q2-base:1.29 pkgsrc-2019Q1:1.29.0.4 pkgsrc-2019Q1-base:1.29 pkgsrc-2018Q4:1.29.0.2 pkgsrc-2018Q4-base:1.29 pkgsrc-2018Q3:1.28.0.2 pkgsrc-2018Q3-base:1.28 pkgsrc-2018Q2:1.26.0.14 pkgsrc-2018Q2-base:1.26 pkgsrc-2018Q1:1.26.0.12 pkgsrc-2018Q1-base:1.26 pkgsrc-2017Q4:1.26.0.10 pkgsrc-2017Q4-base:1.26 pkgsrc-2017Q3:1.26.0.8 pkgsrc-2017Q3-base:1.26 pkgsrc-2017Q2:1.26.0.4 pkgsrc-2017Q2-base:1.26 pkgsrc-2017Q1:1.26.0.2 pkgsrc-2017Q1-base:1.26 pkgsrc-2016Q4:1.23.0.6 pkgsrc-2016Q4-base:1.23 pkgsrc-2016Q3:1.23.0.4 pkgsrc-2016Q3-base:1.23 pkgsrc-2016Q2:1.23.0.2 pkgsrc-2016Q2-base:1.23 pkgsrc-2016Q1:1.22.0.10 pkgsrc-2016Q1-base:1.22 pkgsrc-2015Q4:1.22.0.8 pkgsrc-2015Q4-base:1.22 pkgsrc-2015Q3:1.22.0.6 pkgsrc-2015Q3-base:1.22 pkgsrc-2015Q2:1.22.0.4 pkgsrc-2015Q2-base:1.22 pkgsrc-2015Q1:1.22.0.2 pkgsrc-2015Q1-base:1.22 pkgsrc-2014Q4:1.20.0.8 pkgsrc-2014Q4-base:1.20 pkgsrc-2014Q3:1.20.0.6 pkgsrc-2014Q3-base:1.20 pkgsrc-2014Q2:1.20.0.4 pkgsrc-2014Q2-base:1.20 pkgsrc-2014Q1:1.20.0.2 pkgsrc-2014Q1-base:1.20 pkgsrc-2013Q4:1.17.0.32 pkgsrc-2013Q4-base:1.17 pkgsrc-2013Q3:1.17.0.30 pkgsrc-2013Q3-base:1.17 pkgsrc-2013Q2:1.17.0.28 pkgsrc-2013Q2-base:1.17 pkgsrc-2013Q1:1.17.0.26 pkgsrc-2013Q1-base:1.17 pkgsrc-2012Q4:1.17.0.24 pkgsrc-2012Q4-base:1.17 pkgsrc-2012Q3:1.17.0.22 pkgsrc-2012Q3-base:1.17 pkgsrc-2012Q2:1.17.0.20 pkgsrc-2012Q2-base:1.17 pkgsrc-2012Q1:1.17.0.18 pkgsrc-2012Q1-base:1.17 pkgsrc-2011Q4:1.17.0.16 pkgsrc-2011Q4-base:1.17 pkgsrc-2011Q3:1.17.0.14 pkgsrc-2011Q3-base:1.17 pkgsrc-2011Q2:1.17.0.12 pkgsrc-2011Q2-base:1.17 pkgsrc-2011Q1:1.17.0.10 pkgsrc-2011Q1-base:1.17 pkgsrc-2010Q4:1.17.0.8 pkgsrc-2010Q4-base:1.17 pkgsrc-2010Q3:1.17.0.6 pkgsrc-2010Q3-base:1.17 pkgsrc-2010Q2:1.17.0.4 pkgsrc-2010Q2-base:1.17 pkgsrc-2010Q1:1.17.0.2 pkgsrc-2010Q1-base:1.17 pkgsrc-2009Q4:1.14.0.8 pkgsrc-2009Q4-base:1.14 pkgsrc-2009Q3:1.14.0.6 pkgsrc-2009Q3-base:1.14 pkgsrc-2009Q2:1.14.0.4 pkgsrc-2009Q2-base:1.14 pkgsrc-2009Q1:1.14.0.2 pkgsrc-2009Q1-base:1.14 pkgsrc-2008Q4:1.13.0.4 pkgsrc-2008Q4-base:1.13 pkgsrc-2008Q3:1.13.0.2 pkgsrc-2008Q3-base:1.13 cube-native-xorg:1.12.0.8 cube-native-xorg-base:1.12 pkgsrc-2008Q2:1.12.0.6 pkgsrc-2008Q2-base:1.12 cwrapper:1.12.0.4 pkgsrc-2008Q1:1.12.0.2 pkgsrc-2008Q1-base:1.12 pkgsrc-2007Q4:1.5.0.2 pkgsrc-2007Q4-base:1.5 pkgsrc-2007Q3:1.3.0.28 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.26 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.24 pkgsrc-2007Q1-base:1.3 jlam-pkgviews:1.3.0.22 jlam-pkgviews-base:1.3 pkgsrc-2006Q4:1.3.0.20 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.18 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.16 pkgsrc-2006Q2-base:1.3 tv-derecurse-eol:1.3 pkgsrc-2006Q1:1.3.0.14 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.12 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.10 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.8 pkgsrc-2005Q2-base:1.3 tv-derecurse-merge:1.3 pkgsrc-2005Q1:1.3.0.6 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.4 pkgsrc-2004Q4-base:1.3 tv-derecurse:1.3.0.2 tv-derecurse-base:1.3 pkgsrc-2004Q3:1.2.0.6 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.4 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.2 pkgsrc-2004Q1-base:1.2; locks; strict; comment @# @; 1.32 date 2023.09.28.18.40.53; author rillig; state Exp; branches; next 1.31; commitid RpHhEL3gK6RKhzGE; 1.31 date 2022.06.11.15.02.28; author rillig; state Exp; branches; next 1.30; commitid 2kQ3l5u8DNUWgDHD; 1.30 date 2019.09.02.02.23.02; author rillig; state Exp; branches; next 1.29; commitid DaKMWu5a60IKFnBB; 1.29 date 2018.12.16.23.21.52; author rillig; state Exp; branches; next 1.28; commitid ASW98z4GdYPHZ44B; 1.28 date 2018.08.18.08.18.42; author ryoon; state Exp; branches; next 1.27; commitid jbp93RT6SmR0RzOA; 1.27 date 2018.08.18.00.14.39; author ryoon; state Exp; branches; next 1.26; commitid cC3PC7oewEN5bxOA; 1.26 date 2017.03.20.00.30.30; author roy; state Exp; branches; next 1.25; commitid QscnlHYB78mUQdKz; 1.25 date 2017.01.05.21.19.24; author roy; state Exp; branches; next 1.24; commitid YeH1WLL6RGxO8PAz; 1.24 date 2017.01.04.15.52.50; author roy; state Exp; branches; next 1.23; commitid DnBACdDzrw4EmFAz; 1.23 date 2016.04.11.04.22.34; author dbj; state Exp; branches; next 1.22; commitid TpixwDg88CcX9a2z; 1.22 date 2015.02.04.16.35.32; author pho; state Exp; branches; next 1.21; commitid yAQihawQzKLs6I8y; 1.21 date 2015.02.02.15.16.32; author pho; state Exp; branches; next 1.20; commitid vP24H8xHXKfmJr8y; 1.20 date 2014.03.12.08.38.47; author obache; state Exp; branches; next 1.19; commitid H6eTmlJNiXxo2osx; 1.19 date 2014.03.10.12.57.03; author obache; state Exp; branches; next 1.18; commitid E1HIV4duR5PXw9sx; 1.18 date 2014.03.09.10.15.32; author roy; state Exp; branches; next 1.17; commitid 8nrg5rrVyszrE0sx; 1.17 date 2010.02.07.10.28.13; author roy; state Exp; branches; next 1.16; 1.16 date 2010.02.07.10.20.37; author roy; state Exp; branches; next 1.15; 1.15 date 2010.02.07.09.46.13; author roy; state Exp; branches; next 1.14; 1.14 date 2009.03.20.19.25.01; author joerg; state Exp; branches; next 1.13; 1.13 date 2008.09.16.04.38.49; author minskim; state Exp; branches; next 1.12; 1.12 date 2008.02.29.16.29.04; author jlam; state Exp; branches; next 1.11; 1.11 date 2008.02.27.21.32.45; author jlam; state Exp; branches; next 1.10; 1.10 date 2008.02.27.15.26.34; author jlam; state Exp; branches; next 1.9; 1.9 date 2008.02.27.06.15.04; author jlam; state Exp; branches; next 1.8; 1.8 date 2008.02.27.04.47.02; author jlam; state Exp; branches; next 1.7; 1.7 date 2008.02.27.02.26.07; author jlam; state Exp; branches; next 1.6; 1.6 date 2008.02.25.04.19.34; author jlam; state Exp; branches; next 1.5; 1.5 date 2007.11.03.15.17.42; author rillig; state Exp; branches; next 1.4; 1.4 date 2007.10.17.10.43.37; author rillig; state Exp; branches; next 1.3; 1.3 date 2004.10.13.20.10.31; author tv; state Exp; branches 1.3.2.1; next 1.2; 1.2 date 2004.03.18.09.12.13; author jlam; state Exp; branches; next 1.1; 1.1 date 2004.02.13.01.02.06; author jlam; state Exp; branches; next ; 1.3.2.1 date 2006.06.07.15.25.38; author tv; state dead; branches; next ; desc @@ 1.32 log @mk/curses: don't search for makefiles outside the pkgsrc directory @ text @# $NetBSD: curses.buildlink3.mk,v 1.31 2022/06/11 15:02:28 rillig Exp $ # # This Makefile fragment is meant to be included by packages that require # any curses implementation instead of one particular one. The available # curses implementations are "curses" if built-in, "ncurses", and # "pdcurses". # # If a package genuinely requires ncurses or pdcurses, then it should # directly include the appropriate buildlink3.mk instead of this file in # the package Makefile. # # User-settable variables: # # CURSES_DEFAULT # This value represents the type of curses we wish to use on the # system. Setting this to "curses" means that the system curses # implementation is fine. # # Possible: curses, ncurses, ncursesw, pdcurses # Default: (depends) # # Package-settable variables: # # USE_CURSES # This value represents the features the package needs from curses. # If the system curses does not provide those features, then # a more suitable curses is pulled in (normally ncurses). # # Possible: wide # For more possible values, see curses.builtin.mk. # Default: (unset) # # FAKE_NCURSES # Some packages look exclusively for ncurses or ncursesw, # headers and libraries. This really is an error with the package, # but patching it can be both challenging and cumbersome. # Set this to YES to transform these to system curses. # # Possible: YES, NO # Default: NO # # INCOMPAT_CURSES # If no test exists the missing curses feature then set this # to match the platform where system curses isn't suitable. # This can include the case where the system curses compiles fine, # but for some reason fails to work. # # Default: (unset) # # System-defined variables: # # CURSES_TYPE # The name of the selected curses implementation. CURSES_BUILDLINK3_MK:= ${CURSES_BUILDLINK3_MK}+ .include "bsd.fast.prefs.mk" .if !empty(CURSES_BUILDLINK3_MK:M+) .if !defined(USE_CURSES) && !empty(PKG_OPTIONS:Mwide-curses) USE_CURSES?= wide .endif # _CURSES_PKGS is an exhaustive list of all of the curses implementations # that may be used with curses.buildlink3.mk. # _CURSES_PKGS?= curses ncurses ncursesw pdcurses CHECK_BUILTIN.curses:= yes . include "curses.builtin.mk" CHECK_BUILTIN.curses:= no # Set the value of CURSES_DEFAULT depending on the platform and what's # available in the base system. # .if defined(USE_BUILTIN.curses) && !empty(USE_BUILTIN.curses:M[yY][eE][sS]) CURSES_DEFAULT?= curses .elif !empty(USE_CURSES:U:Mwide) || !empty(PKG_OPTIONS:U:Mwide-curses) CURSES_DEFAULT?= ncursesw .else CURSES_DEFAULT?= ncurses .endif _CURSES_ACCEPTED= # empty .if defined(USE_BUILTIN.curses) && !empty(USE_BUILTIN.curses:M[yY][eE][sS]) _CURSES_ACCEPTED+= curses # system curses exists .endif .if defined(USE_BUILTIN.cursesw) && !empty(USE_BUILTIN.cursesw:M[yY][eE][sS]) _CURSES_ACCEPTED+= curses # system curses exists .endif _CURSES_ACCEPTED+= ncurses # pkgsrc ncurses _CURSES_ACCEPTED+= ncursesw # pkgsrc ncursesw _CURSES_ACCEPTED+= pdcurses # pkgsrc pdcurses _CURSES_TYPE= ${CURSES_DEFAULT} . if !empty(_CURSES_ACCEPTED:M${_CURSES_TYPE}) CURSES_TYPE= ${_CURSES_TYPE} . else CURSES_TYPE= none . endif BUILD_DEFS+= CURSES_DEFAULT BUILD_DEFS_EFFECTS+= CURSES_TYPE # _PKG_USE_CURSES is a flag for use by the curses packages' buildlink3.mk # files to indicate that the headers and libraries should be usable as # and -lcurses. # _PKG_USE_CURSES= yes .PHONY: buildlink-curses-ncurses-h buildlink-curses-ncurses-h: ${RUN} \ src="${H_CURSES}"; \ dest=${BUILDLINK_DIR}"/include/ncurses.h"; \ if ${TEST} ! -f "$$dest" -a -f "$$src"; then \ ${ECHO_BUILDLINK_MSG} "Linking ${H_CURSES} -> ncurses.h.";\ ${MKDIR} `${DIRNAME} "$$dest"`; \ ${LN} -s "$$src" "$$dest"; \ fi .endif # CURSES_BUILDLINK3_MK .if ${CURSES_TYPE} == "none" PKG_FAIL_REASON+= \ "${_CURSES_TYPE} is not an acceptable curses type for ${PKGNAME}." .elif ${CURSES_TYPE} == "curses" . include "curses.builtin.mk" BUILDLINK_TREE+= curses -curses BUILDLINK_LDADD.curses?= ${BUILDLINK_LIBNAME.curses:S/^/-l/:S/^-l$//} BUILDLINK_BUILTIN_MK.curses= ../../mk/curses.builtin.mk .else . if ${CURSES_TYPE} == "ncurses" USE_NCURSES= yes . include "../devel/ncurses/buildlink3.mk" . elif ${CURSES_TYPE} == "ncursesw" . include "../devel/ncursesw/buildlink3.mk" . elif ${CURSES_TYPE} == "pdcurses" . include "../devel/pdcurses/buildlink3.mk" . endif . for var in BUILDLINK_PKGNAME BUILDLINK_PREFIX BUILDLINK_INCDIRS \ BUILDLINK_LIBDIRS BUILDLINK_LIBNAME BUILDLINK_LDADD ${var}.curses= ${${var}.${CURSES_TYPE}} . endfor .endif # Some packages only look for ncurses # The correct action would be to write a patch and pass it upstream # but by setting FAKE_NCURSES=yes in the package we can temporarily work # around the short-coming. .if defined(FAKE_NCURSES) && !empty(FAKE_NCURSES:M[yY][eE][sS]) . if ${CURSES_TYPE} != "ncurses" . if ${CURSES_TYPE} != "ncursesw" BUILDLINK_TARGETS+= buildlink-curses-ncurses-h BUILDLINK_TRANSFORM+= l:ncursesw:${BUILDLINK_LIBNAME.curses} . endif BUILDLINK_TRANSFORM+= l:ncurses:${BUILDLINK_LIBNAME.curses} . endif .endif _VARGROUPS+= curses _USER_VARS.curses= CURSES_DEFAULT _PKG_VARS.curses= FAKE_NCURSES USE_CURSES USE_NCURSES _SYS_VARS.curses= PKG_OPTIONS CURSES_TYPE BUILDLINK_BUILTIN_MK.curses \ BUILDLINK_PKGNAME.curses \ BUILDLINK_PREFIX.curses BUILDLINK_INCDIRS.curses \ BUILDLINK_LIBDIRS.curses BUILDLINK_LIBNAME.curses \ BUILDLINK_LDADD.curses _USE_VARS.curses= USE_BUILTIN.curses USE_BUILTIN.cursesw _DEF_VARS.curses= USE_CURSES _CURSES_PKGS CHECK_BUILTIN.curses \ _CURSES_ACCEPTED _CURSES_TYPE _PKG_USE_CURSES \ H_CURSES BUILDLINK_TARGETS BUILDLINK_TRANSFORM @ 1.31 log @mk/curses: mark USE_NCURSES as package-settable There are several packages that set this variable, even though it is not documented in curses.buildlink3.mk. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.30 2019/09/02 02:23:02 rillig Exp $ d136 1 a136 1 . include "../../devel/ncurses/buildlink3.mk" d138 1 a138 1 . include "../../devel/ncursesw/buildlink3.mk" d140 1 a140 1 . include "../../devel/pdcurses/buildlink3.mk" @ 1.30 log @mk: use a single form for headings in the documentation comments @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.29 2018/12/16 23:21:52 rillig Exp $ d164 1 a164 1 _PKG_VARS.curses= FAKE_NCURSES USE_CURSES d166 1 a166 1 USE_NCURSES BUILDLINK_PKGNAME.curses \ @ 1.29 log @mk/curses: document the affected variables for make show-all @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.28 2018/08/18 08:18:42 ryoon Exp $ d12 1 a12 1 # === User-settable variables === d22 1 a22 1 # === Package-settable variables === d50 1 a50 1 # === Variables set by this file === @ 1.28 log @Fix typo. Thank you, jperkin@@. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.27 2018/08/18 00:14:39 ryoon Exp $ d142 3 a144 2 . for _var_ in PKGNAME PREFIX INCDIRS LIBDIRS LIBNAME LDADD BUILDLINK_${_var_}.curses= ${BUILDLINK_${_var_}.${CURSES_TYPE}} d161 13 @ 1.27 log @Fix typo in variable name @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.26 2017/03/20 00:30:30 roy Exp $ d55 1 a55 1 CURSES_BUILDLINK3_MK:= ${CURSES_BUILDlINK3_MK}+ @ 1.26 log @Describe USE_CURSES, FAKE_NCURSES and INCOMPAT_CURSES. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.25 2017/01/05 21:19:24 roy Exp $ d55 1 a55 1 CURSES_BUILDLINK3_MK:= ${CURSES_BUILDLINK3_MK}+ d132 1 a132 1 BUSILDLINK_BUILTIN_MK.curses= ../../mk/curses.builtin.mk @ 1.25 log @Add a test for set_escdelay @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.24 2017/01/04 15:52:50 roy Exp $ d22 28 @ 1.24 log @Support FAKE_NCURSES=yes for pdcurses and ncursesw. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.23 2016/04/11 04:22:34 dbj Exp $ d115 1 a115 1 BUILDLINK_${_var_}.curses?= ${BUILDLINK_${_var_}.${CURSES_TYPE}} @ 1.23 log @update PKG_{FAIL,SKIP}_REASON with += @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.22 2015/02/04 16:35:32 pho Exp $ a104 9 # Some packages only look for ncurses # The correct action would be to write a patch and pass it upstream # but by setting FAKE_NCURSES=yes in the package we can temporarily work # around the short-coming. . if defined(FAKE_NCURSES) && !empty(FAKE_NCURSES:M[yY][eE][sS]) BUILDLINK_TARGETS+= buildlink-curses-ncurses-h BUILDLINK_TRANSFORM+= l:ncurses:${BUILDLINK_LIBNAME.curses} BUILDLINK_TRANSFORM+= l:ncursesw:${BUILDLINK_LIBNAME.curses} . endif a108 1 a110 1 a112 1 d118 14 @ 1.22 log @Ensure that BUILDLINK_PKGNAME.curses is always defined. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.21 2015/02/02 15:16:32 pho Exp $ d98 1 a98 1 PKG_FAIL_REASON= \ @ 1.21 log @Ensure BUILDLINK_{INCDIRS,LIBDIRS}.curses are always defined These variables are for packages where populating -I/-L flags into {C,CPP,LD}FLAGS is not enough and need to know accurate paths to header and library directories. This is particularly important for ncurses because its headers sometimes reside in "${BUILDLINK_PREFIX.ncurses}/include/ncurses" and sometimes in "${BUILDLINK_PREFIX.ncurses}/include" while no pkg-config .pc files are available. The same goes for ncursesw. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.20 2014/03/12 08:38:47 obache Exp $ d126 1 a126 1 . for _var_ in PREFIX INCDIRS LIBDIRS LIBNAME LDADD @ 1.20 log @resolve evaluate-undefined-variable issue for old bmake. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.19 2014/03/10 12:57:03 obache Exp $ d114 2 a115 1 .elif ${CURSES_TYPE} == "ncurses" d117 12 a128 14 . include "../../devel/ncurses/buildlink3.mk" BUILDLINK_PREFIX.curses?= ${BUILDLINK_PREFIX.ncurses} BUILDLINK_LIBNAME.curses?= ${BUILDLINK_LIBNAME.ncurses} BUILDLINK_LDADD.curses?= ${BUILDLINK_LDADD.ncurses} .elif ${CURSES_TYPE} == "ncursesw" . include "../../devel/ncursesw/buildlink3.mk" BUILDLINK_PREFIX.curses?= ${BUILDLINK_PREFIX.ncursesw} BUILDLINK_LIBNAME.curses?= ${BUILDLINK_LIBNAME.ncursesw} BUILDLINK_LDADD.curses?= ${BUILDLINK_LDADD.ncursesw} .elif ${CURSES_TYPE} == "pdcurses" . include "../../devel/pdcurses/buildlink3.mk" BUILDLINK_PREFIX.curses?= ${BUILDLINK_PREFIX.pdcurses} BUILDLINK_LIBNAME.curses?= ${BUILDLINK_LIBNAME.pdcurses} BUILDLINK_LDADD.curses?= ${BUILDLINK_LDADD.pdcurses} @ 1.19 log @check FAKE_NCURSES is defined before evaluate it. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.18 2014/03/09 10:15:32 roy Exp $ d50 1 a50 1 .elif !empty(USE_CURSES:Mwide) || !empty(PKG_OPTIONS:Mwide-curses) @ 1.18 log @Move the logic for testing if system curses supports the needed functions from devel/ncurses to the mk infrastructure. FAKE_NCURSES=yes Provides the system curses as ncurses.h and libncurses. USE_CURSES=wide Links to system curses if they provide wide support, otherwise ncursesw. wide-curses in the package options also triggers this. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.17 2010/02/07 10:28:13 roy Exp $ d109 1 a109 1 . if !empty(FAKE_NCURSES:M[yY][eE][sS]) @ 1.17 log @Fix another silly typo. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.16 2010/02/07 10:20:37 roy Exp $ d19 1 a19 1 # Possible: curses, ncurses, pdcurses d32 4 d39 1 a39 1 _CURSES_PKGS?= curses ncurses pdcurses d50 2 d60 3 d64 1 d83 12 d101 1 d104 10 a113 1 BUILDLINK_BUILTIN_MK.curses= ../../mk/curses.builtin.mk d120 5 @ 1.16 log @Remove typo. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.15 2010/02/07 09:46:13 roy Exp $ d84 1 a84 1 . include "../../devel/ncurses/buildlink3.mkxx" @ 1.15 log @Add builtin for working out if we have terminfo installed natively. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.14 2009/03/20 19:25:01 joerg Exp $ a82 1 daaaaa @ 1.14 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: curses.buildlink3.mk,v 1.13 2008/09/16 04:38:49 minskim Exp $ a27 1 d83 1 d85 1 a85 1 . include "../../devel/ncurses/buildlink3.mk" @ 1.13 log @Do not force ncurses on Interix; it does not have a proper shared library. Instead, let curses.buildlink3.mk find out a usable one. This fixes the error reported in PR 39531. However, the PR will remain open for now because it raises another issue whether tnftp should depend on curses or not. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.12 2008/02/29 16:29:04 jlam Exp $ d80 1 a80 3 BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ncurses} BUILDLINK_PACKAGES+= curses BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}curses @ 1.12 log @Ensure that BUILDLINK_PREFIX.curses is always defined. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.11 2008/02/27 21:32:45 jlam Exp $ a44 7 # - Interix has an unusual ncurses installation that is missing some # shared libraries, but the ncurses/builtin.mk will take care of things # for us. # .if ${OPSYS} == "Interix" CURSES_DEFAULT?= ncurses .endif @ 1.11 log @If FOO is empty, then ${FOO:S/^/-l/} has a value of "-l". This is not what we want. Instead, use another pattern to strip away lone "-l" in BUILDLINK_LDADD.*. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.10 2008/02/27 15:26:34 jlam Exp $ d95 1 d100 1 @ 1.10 log @+ Define BUILTIN_LIBNAME.* unconditionally so that their values can always be used in other builtin.mk files. + In the USE_BUILTIN.* == "yes" case, set BUILDLINK_LIBNAME.* to the corresponding BUILTIN_LIBNAME.* value so that BUILDLINK_LIBNAME.* can always be used in other buildlink3.mk files. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.9 2008/02/27 06:15:04 jlam Exp $ d90 1 a90 1 BUILDLINK_LDADD.curses?= ${BUILDLINK_LIBNAME.curses:S/^/-l/} @ 1.9 log @Set BUILDLINK_LDADD.curses in the CURSES_TYPE == "curses" case. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.8 2008/02/27 04:47:02 jlam Exp $ a89 1 BUILDLINK_LIBNAME.curses?= ${BUILTIN_LIBNAME.curses} @ 1.8 log @+ The termlib.buildlink3.mk file is meant to be included by packages that need basic termlib functionality, i.e. tgetent(), tgoto(), tputs(), etc. Together with the termlib.builtin.mk file, they will use either a built-in termcap library, a built-in X/Open "enhanced" curses library, or ncurses to provide these functions. + Add BUILDLINK_LIBNAME.* definitions to the various curses buildlink3.mk and builtin.mk files that give the "base" library name of the curses library, e.g. curses, ncurses, etc. These are used by the termlib files to set BUILDLINK_LIBNAME.termlib. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.7 2008/02/27 02:26:07 jlam Exp $ d90 2 @ 1.7 log @Allow preferring a pkgsrc "curses" implementation for all packages that include curses.buildlink3.mk. Generally, the rule is not to set CURSES_DEFAULT unless it's to set it to "ncurses" or "pdcurses". # Example mk.conf settings and their results. # Use the system curses. PREFER_NATIVE= yes # default value CURSES_DEFAULT= curses # default value # Use system "ncurses" if it's available, otherwise use devel/ncurses # from pkgsrc. # PREFER_NATIVE= yes # default value CURSES_DEFAULT= ncurses # Use devel/ncurses from pkgsrc. PREFER_PKGSRC= yes # Use devel/pdcurses from pkgsrc. PREFER_PKGSRC= yes CURSES_DEFAULT= pdcurses # This causes a package build failure because there is no pkgsrc # curses. # PREFER_PKGSRC= yes CURSES_DEFAULT= curses @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.6 2008/02/25 04:19:34 jlam Exp $ d94 1 d98 1 @ 1.6 log @+ Introduce a way for a user to set the default curses implementation used by packages that need curses. From curses.buildlink3.mk: CURSES_DEFAULT This value represents the type of curses we wish to use on the system. Setting this to "curses" means that the system curses implementation is fine. Possible: curses, ncurses, pdcurses + Move all code to detect a built-in version of curses into a curses.builtin.mk file. + Add code to {n,pd}curses/buildlink3.mk so make the headers and libraries usable as and -lcurses if _PKG_USE_CURSES is defined. _PKG_USE_CURSES is only defined by curses.buildlink3.mk. + Improve the detection of native ncurses in ncurses/builtin.mk and allow headers and libraries to be usable as and -lncurses. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.5 2007/11/03 15:17:42 rillig Exp $ d52 1 a52 1 .if defined(IS_BUILTIN.curses) && !empty(IS_BUILTIN.curses:M[yY][eE][sS]) d59 1 a59 1 .if defined(IS_BUILTIN.curses) && !empty(IS_BUILTIN.curses:M[yY][eE][sS]) @ 1.5 log @Clarified the comment. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.4 2007/10/17 10:43:37 rillig Exp $ d3 4 a6 3 # This file should be included by Makefiles for packages that use curses. # It checks whether a native curses implementation is available, or # otherwise adds a dependency on ncurses. d8 3 a10 3 # If a package genuinely requires ncurses, then it should directly include # ncurses/buildlink3.mk instead of this file in the package Makefile and # additionally set USE_NCURSES=yes. d12 18 d31 23 a53 3 .if !exists(/usr/include/curses.h) && \ !exists(/usr/include/ncurses.h) . include "../../devel/ncurses/buildlink3.mk" d55 9 d65 5 a69 5 # XXX this is ugly, but needed to get the BUILDLINK_TRANSFORM from builtin.mk; # on Interix, libncurses is static yet libcurses (also ncurses) is shared . include "bsd.fast.prefs.mk" . if ${OPSYS} == "Interix" . include "../../devel/ncurses/buildlink3.mk" d72 26 @ 1.4 log @Made the .include lines simpler. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.3 2004/10/13 20:10:31 tv Exp $ d4 2 a5 1 # If a system curses isn't available, then add a dependency on ncurses. d8 3 a10 1 # ncurses/buildlink3.mk instead of this file in the package Makefile. @ 1.3 log @Oy, what a hack. But then, so is Interix.... On Interix, force inclusion of devel/ncurses/buildlink3.mk from mk/curses.buildlink3.mk. This forces inclusion of its builtin.mk too. In devel/ncurses/builtin.mk, if using Interix's builtin ncurses, always transform -lncurses to -lcurses. (-lncurses is static, but -lcurses is shared; we want the shared version.) @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.2 2004/03/18 09:12:13 jlam Exp $ d16 1 a16 1 . include "../../mk/bsd.prefs.mk" @ 1.3.2.1 log @EOL the tv-derecurse branch; it has become too outdated. The last live revision can be fetched at the tv-derecurse-eol tag. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.3 2004/10/13 20:10:31 tv Exp $ @ 1.2 log @Fix serious bug where BUILDLINK_PACKAGES wasn't being ordered properly by moving the inclusion of buildlink3.mk files outside of the protected region. This bug would be seen by users that have set PREFER_PKGSRC or PREFER_NATIVE to non-default values. BUILDLINK_PACKAGES should be ordered so that for any package in the list, that package doesn't depend on any packages to the left of it in the list. This ordering property is used to check for builtin packages in the correct order. The problem was that including a buildlink3.mk file for correctly ensured that was removed from BUILDLINK_PACKAGES and appended to the end. However, since the inclusion of any other buildlink3.mk files within that buildlink3.mk was in a region that was protected against multiple inclusion, those dependencies weren't also moved to the end of BUILDLINK_PACKAGES. @ text @d1 1 a1 1 # $NetBSD: curses.buildlink3.mk,v 1.1 2004/02/13 01:02:06 jlam Exp $ d12 9 @ 1.1 log @curses.buildlink[23].mk files to be included by packages that use the curses library in some way. This file will automatically include ncurses/buildlink[23].mk if a curses implementation isn't available. If a package truly needs ncurses, then it should include ncurses/buildlink[23].mk directly. @ text @d1 1 a1 1 # $NetBSD$ d9 4 a12 8 .if !defined(CURSES_BUILDLINK3_MK) CURSES_BUILDLINK3_MK= # defined . if !exists(/usr/include/curses.h) && \ !exists(/usr/include/ncurses.h) . include "../../devel/ncurses/buildlink3.mk" . endif .endif # CURSES_BUILDLINK3_MK @