Commit graph

23 commits

Author SHA1 Message Date
dbj
dde82c09aa update PKG_{FAIL,SKIP}_REASON with += 2016-04-11 04:22:33 +00:00
pho
a6508da71f Ensure that BUILDLINK_PKGNAME.curses is always defined. 2015-02-04 16:35:32 +00:00
pho
19991de3ea 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.
2015-02-02 15:16:32 +00:00
obache
6a15c197ba resolve evaluate-undefined-variable issue for old bmake. 2014-03-12 08:38:47 +00:00
obache
07b0df283c check FAKE_NCURSES is defined before evaluate it. 2014-03-10 12:57:03 +00:00
roy
1537427543 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.
2014-03-09 10:15:32 +00:00
roy
3483adad93 Fix another silly typo. 2010-02-07 10:28:13 +00:00
roy
26a6e3ce0c Remove typo. 2010-02-07 10:20:37 +00:00
roy
21a2919170 Add builtin for working out if we have terminfo installed natively. 2010-02-07 09:46:13 +00:00
joerg
2d1ba244e9 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.
2009-03-20 19:23:50 +00:00
minskim
79e332ed88 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.
2008-09-16 04:38:49 +00:00
jlam
1a25985362 Ensure that BUILDLINK_PREFIX.curses is always defined. 2008-02-29 16:29:04 +00:00
jlam
b97840c070 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.*.
2008-02-27 21:32:45 +00:00
jlam
496391a1f0 + 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.
2008-02-27 15:26:34 +00:00
jlam
5f1962e280 Set BUILDLINK_LDADD.curses in the CURSES_TYPE == "curses" case. 2008-02-27 06:15:04 +00:00
jlam
f686df4e6c + 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.
2008-02-27 04:47:02 +00:00
jlam
8dbadc06ac 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
2008-02-27 02:26:07 +00:00
jlam
6c632be065 + 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 <curses.h> 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 <ncurses.h> and -lncurses.
2008-02-25 04:19:34 +00:00
rillig
a21f857cf8 Clarified the comment. 2007-11-03 15:17:42 +00:00
rillig
b2e71313c3 Made the .include lines simpler. 2007-10-17 10:43:36 +00:00
tv
d133a216ec 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.)
2004-10-13 20:10:31 +00:00
jlam
7db11b582a 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 <pkg> correctly ensured that <pkg> 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.
2004-03-18 09:12:08 +00:00
jlam
3460f0818e 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.
2004-02-13 01:02:06 +00:00