Commit graph

29 commits

Author SHA1 Message Date
obache
6d3e81c83d Haiku does not have /usr/include/pthread.h,
but have native pthread support and pthread.h in include path.
2010-02-06 11:06:19 +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
tnn
4a325fa592 Use bsd.fast.prefs.mk in some very commonly included locations. 2008-01-23 17:35:20 +00:00
rillig
2f587dfa62 Made "show-all-pthread" work. 2007-11-07 07:49:02 +00:00
rillig
f6a8043bf5 Replaced the deprecated PKG_SKIP_REASON with PKG_FAIL_REASON. 2007-02-10 08:59:07 +00:00
jlam
c16221a4db Change the format of BUILDLINK_ORDER to contain depth information as well,
and add a new helper target and script, "show-buildlink3", that outputs
a listing of the buildlink3.mk files included as well as the depth at
which they are included.

For example, "make show-buildlink3" in fonts/Xft2 displays:

	zlib
	fontconfig
	    iconv
	    zlib
	    freetype2
	    expat
	freetype2
	Xrender
	    renderproto
2006-07-08 23:10:35 +00:00
jlam
9430e49307 Track information in a new variable BUILDLINK_ORDER that informs us
of the order in which buildlink3.mk files are (recursively) included
by a package Makefile.
2006-07-08 22:38:58 +00:00
reed
5abef9be14 Over 1200 files touched but no revisions bumped :)
RECOMMENDED is removed. It becomes ABI_DEPENDS.

BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo.

BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo.

BUILDLINK_DEPENDS does not change.

IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS
which defaults to "yes".

Added to obsolete.mk checking for IGNORE_RECOMMENDED.

I did not manually go through and fix any aesthetic tab/spacing issues.

I have tested the above patch on DragonFly building and packaging
subversion and pkglint and their many dependencies.

I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I
have used IGNORE_RECOMMENDED for a long time). I have been an active user
of IGNORE_RECOMMENDED since it was available.

As suggested, I removed the documentation sentences suggesting bumping for
"security" issues.

As discussed on tech-pkg.

I will commit to revbump, pkglint, pkg_install, createbuildlink separately.

Note that if you use wip, it will fail!  I will commit to pkgsrc-wip
later (within day).
2006-04-06 06:21:32 +00:00
rillig
63f99d3d29 Shortened and restructured the header comment. Now the interface to this
file is described in terms of input and output variables.
2005-11-04 14:36:23 +00:00
rillig
35de2919d3 Fixed quoting errors. Approved by jlam. 2005-04-13 16:16:50 +00:00
seb
3e4e8e4fea Since last revision PTHREAD_AUTO_VARS defaults to 'no'. 2004-11-29 17:27:14 +00:00
jlam
3bbe73c68a Default PTHREAD_AUTO_VARS to the safer value of "no". Most packages
that use pthreads already implement their own probes for pthreads, so
we don't need to auto-add the compiler/linker flags.
2004-11-25 19:34:03 +00:00
jlam
319f9f72eb PTHREAD_AUTO_VARS is "yes" or "no" for whether the values of the
variables PTHREAD_{CFLAGS,CPPFLAGS,LDFLAGS,LIBS} should be automatically
added to their respective variables.  Defaults to "yes".

Packages that only require some parts to be linked the the pthreads
compiler/linker options should set this to "no" and selectively add
those options via patches to the right makefiles..
2004-11-17 21:05:24 +00:00
jlam
3586ec85db Move PREFER_NATIVE_PTHREADS default setting to from pthread.buildlink3.mk
to defaults/mk.conf, where all defaults should live.
2004-11-12 22:34:15 +00:00
jlam
af591191d2 Remove redundant uses of PTHREAD_{CFLAGS,LDFLAGS} now that they're added
automatically by pthread.buildlink3.mk.  Also, factor out the pthread
library out of PTHREAD_LDFLAGS into a standalone variable PTHREAD_LIBS
and use it in packages where necessary (usually the ones that don't
have a GNU configure script).
2004-11-12 06:39:19 +00:00
jlam
153b3f00b7 (1) Split out the native (built-in) pthread detection in
pthread.buildlink3.mk into a separate file, pthread.builtin.mk,
    that is handled using the usual builtin.mk logic.

(2) If pthread.buildlink3.mk is included by a package Makefile, then
    automatically add the necessary compiler and linker flags to
    compile and link pthread-enabled/reentrant code.  For native
    pthreads, this means passing -pthread to the compiler and linker.
    For the userland pthread replacement, we pass -D_REENTRANT and
    -lpthread instead.

(3) Add PTHREAD_{CFLAGS,LDFLAGS,LIBS} in both CONFIGURE_ENV and MAKE_ENV
    when pthread.buildlink3.mk is included so that the configure and
    build processes can use these values.  Remove these definitions
    from bsd.pkg.mk since PTHREAD_* variables are all declared within
    pthread.buildlink3.mk.

XXX For now, PTHREAD_LDFLAGS is a superset of PTHREAD_LIBS until
XXX packages that use use PTHREAD_LDFLAGS can be fixed.
2004-11-12 05:20:01 +00:00
jlam
2d6f90d42d Backout previous pending further testing. There are rumors of problems
with -pthread/-pthreads GCC options detection that may be difficult to
overcome.
2004-11-10 18:46:07 +00:00
jlam
0d1a6b1c29 If we are using native pthreads, then add "pthread" to BUILDLINK_PACKAGES
so that the buildlink3 framework knows to use the various
BUILDLINK_*.pthread variables.  This fixes a long-standing and long-
overlooked bug in pthread.buildlink3.mk that has existed since the
buildlink3 framework was initially committed.

As a result of this change, modifications to packages to introduce
PTHREAD_{CFLAGS,LDFLAGS} in various places to either the configure script
or into Makefiles are probably no longer needed.
2004-11-10 17:29:37 +00:00
xtraeme
ee561b38da eww, replace another [ with ${TEST}. 2004-07-27 11:30:55 +00:00
xtraeme
5d398fabc4 s/echo/${ECHO}/ 2004-07-27 11:28:41 +00:00
wiz
0b38542de9 Do not use continuation -- line is short
enough, and this silences a pkglint warning.
2004-07-01 13:09:39 +00:00
xtraeme
38e875e52b Check for libpthread.so.* file with -f instead of echo as suggested by
grant, because previous check was not working fine, I tested it under
OpenBSD 3.5 and now just works.
2004-06-21 21:57:00 +00:00
xtraeme
b259186410 Under OpenBSD there is no libpthread.so, just libpthread.so.X.X, and
BUILDLINK_LDADD.pthread was empty, so add a check to find the libraries
and if they are found, add -lpthread to BUILDLINK_LDADD.pthread, thanks
to grant beattie for the suggestion.

Reported and tested by Sergio Jimenez <tripledes at eslack dot org>.
2004-06-21 00:06:37 +00:00
grant
c4e3c8cd15 when using native threads, only set BUILDLINK_CFLAGS.pthread=-pthread on
systems known to support its (FreeBSD, NetBSD, Linux).

fixes breakage caused by passing -pthread to SunPro cc(1) and likely
also fixes platforms other than the above.
2004-06-12 03:19:52 +00:00
seb
71f733521f revert previous. 2004-03-31 20:18:46 +00:00
seb
db7fd89879 When PTHREAD_TYPE is 'native' set USE_BUILTIN.pthread to YES and
add 'pthread' to BUILDLINK_PACKAGES so that
BUILDLINK_{{LD,C}FLAGS,LDADD}.pthread actually have an effect.

This should fix the build of at least tcl/tk related packages now
that tcl and tk packages are thread-aware.

Remove comments about linking native pthread libraries and headers into
${BUILDLINK_DIR} as this does not happen.
2004-03-29 15:16:58 +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
0129c7eedd Append to BUILDLINK_DEPENDS.<pkg> instead of overriding it so that the
most restrictive dependency is always part of the DEPENDS/BUILD_DEPENDS
list.
2004-01-25 16:17:37 +00:00
jlam
339cd13cb2 Initial sprinkling of work-in-progress buildlink3.mk files for using the
buildlink3 framework.
2004-01-03 23:06:43 +00:00