summaryrefslogtreecommitdiff
path: root/mk/buildlink3
AgeCommit message (Collapse)AuthorFilesLines
2009-03-20Restore duplication check for _BLNK_PACKAGES that got lost with earlierjoerg1-2/+2
versions and was not fatal.
2009-03-20Simply and speed up buildlink3.mk files and processing.joerg3-42/+55
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-16Move _SYS_VARS processing to a point where BUILDLINK_PACKAGES isjoerg1-14/+14
finalised.
2008-12-15Fixes typo, able to detect builtin libiconv again.obache1-2/+2
2008-12-14Add /usr/lib${LIBABISUFFIX} to the search pathjmcneill1-1/+3
2008-10-06Complete previous, by entering the package version definition if the filecube1-2/+4
looked up is not a pkgconfig one, at the condition that the version script is defined.
2008-10-06Allow the caller to override the script that extracts the version of thecube1-3/+10
built-in package. That means pkgconfig-builtin.mk can be used in even more situations now.
2008-10-05Merge cube-native-xorg, so that pkgsrc-current can be used with the nativecube1-0/+57
X.Org found in NetBSD-current. Thanks a lot to all who helped, especially Matthias Scheler who did repeated tests on Mac OS X and older versions of NetBSD to make sure the support for those platforms wouldn't be broken (or at least, not fatally, as I would still expect a few hiccups here and there, because there is only so much one can test in such limited time). On the infrastructure side, this branch brings pkgconfig-builtin.mk, in order to write very easily new builtin.mk files. It can actually handle more than just pkgconfig files, but it will provide a version if it finds such a file. x11.builtin.mk has also been made more useful and now all existing (and future!) native-X11-related builtin.mk files should include it.
2008-06-22When bombing out because the package we need isn't installed, printdholland1-2/+2
the full requirement rather than just the package name. This message should never be seen (after all, the package we need is supposed to *get* installed) but sometimes if things are screwed up in one way or another it does show up. Since often what's wrong is that the package that's installed is the wrong version, not that it's missing entirely, this way the error message makes a lot more sense. E.g. http://mail-index.netbsd.org/tech-pkg/2008/06/12/msg001126.html et seq. ok dillo@
2008-03-10Replace "pkg_admin -S lsbest" usage with pkg_info -E. The base strippingjoerg1-7/+5
in bsd.buildlink3.mk was broken with pkg_install-20080309 was it returned a relative path. It would have failed before e.g. with symbolic links in the path. pkg_info -E is simpler and was added exactly for this purpose. Fixes PR 38213 and PR 38211.
2008-02-19Check if BUILDLINK_AUTO_VARS.${_pkg_} is defined before testing itxtraeme1-2/+3
via !empty. This fixes a problem with gnome-panel and db1.
2008-02-07Replaced _PKG_SILENT and _PKG_DEBUG with RUN.rillig1-22/+22
2008-01-23Use bsd.fast.prefs.mk in some very commonly included locations.tnn1-2/+2
2007-12-05Escape colons in preprocessor, compiler or linker flags while checkingtron1-12/+12
their existances in other variables. This avoids parsing errors if e.g. "BUILDLINK_LDFLAGS.<pkg>" contains a colon.
2007-11-27Made the code a bit more readable by elimination common subexpressions.rillig1-7/+10
2007-10-07fix obsolete URLs for www.NetBSD.orgkano2-4/+4
close PR pkg/37071 reviewd by xtraeme@
2007-10-01Why don't we use pkg_info -qL instead of pkg_info -f?rillig1-1/+2
2007-08-02Add core of the infrastructure support for cross-compilation.joerg1-2/+2
- USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of the target filesystem - derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR - buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR - compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf) - PKG_DBDIR is prefixed with _CROSS_DESTDIR - package-install and bin-install are not called with su - install and strip are redirected to the tool version - links for the target specific ar, as, ld, nm, objdump, ranlib and strip are added - compiler wrapper detect if linking is requested or not - special command sinks for CPP and CC/CXX add the cross-compile magic: - modify include dirs to get the target /usr/include - modify linker dirs and runpath to use target /usr/lib at link time, but keep correct rpath entries Supported-by: Google SoC 2007 Basic tests by he@ on Sparc. Review from jlam@.
2007-07-27If using X11_TYPE=modular this means we have imake(1) from pkgsrc.tnn1-3/+7
We can't use our own imake to check for builtin packages so disable the check and always report that no builtin implementation exists. No objections on tech-pkg@
2007-07-27Remove remaining traces of BUILDLINK_TRANSFORM.${pkg}.joerg1-5/+1
2007-07-23*blush* One variable was missing for the !modular case.joerg1-1/+2
2007-07-23More aggressively conditionalize X11BASE handling. Only one casejoerg1-6/+28
is left now and that is hidden by LOCALBASE=X11BASE for modular Xorg.
2007-06-06Added _VARGROUPS.rillig1-1/+14
2007-04-09Remove special treatment of "DynaLoader.a" completely. It's not necessarytron1-16/+1
with current libtool version and breaks the build under Darwin 8.x and NetBSD 4.0_BETA2.
2007-03-12Don't handle Perl's "DynaLoader.a" specially under Mac OS X. It is nottron1-3/+5
necessary and doing so causes build problems. This fixes PR pkg/35990.
2007-01-25Absolute never use .x11-buildlink. Some cases get nasty to fix, sojoerg1-1/+5
back to this.
2007-01-17Renamed BUILDLINK_TRANSFORM.* to BUILDLINK_FNAME_TRANSFORM.*, to makerillig1-5/+9
clear that these variables are completely unrelated to BUILDLINK_TRANSFORM. Added a legacy check that catches appearances of BUILDLINK_TRANSFORM.*. XXX: Where should incompatible changes in pkgsrc be documented?
2006-12-20For modular Xorg disable xpkgwedge (will be made a hard error later).joerg1-12/+12
Don't add ${X11BASE}/bin to PATH, don't include mk/x11.buildlink3.mk when USE_X11BASE is set and don't use BUILDLINK_X11_DIR and related magic. OKed by wiz@
2006-12-15Remove trailing tabs.martti1-2/+2
2006-12-15Remove trailing spaces.martti1-2/+2
2006-11-17Added a check for whether X11BASE is set correctly. Currently the errorrillig1-1/+5
message is Syntax error: word unexpected (expecting ")") which is not helpful at all.
2006-11-09Fixed two scripts so that they also run when "set -u" is in effect.rillig2-4/+5
2006-11-05Special case LOCALBASE before X11BASE, as they can be identical injoerg1-1/+2
the case of modular Xorg and the latter is more specific.
2006-09-10ensure that -I and -L paths are correctly rewritten even if ${LOCALBASE}schwarz1-4/+15
contains ${X11BASE} (e.g. ${LOCALBASE} being /usr/local and ${X11BASE} being /usr)
2006-09-10Fix PR pkg/34139 in a diffent way:tron2-7/+13
Setting "WRAPPER_SKIP_TRANSFORM" to "yes" isn't enough because "imake" will invoke the C compiler which might be a wrapper script which always fails because the package didn't use "USE_LANGUAGES+= c". The "imake-check" script now simply uses the original command path before "bsd.pkg.mk" modified and will therefore avoid using any wrappers.
2006-09-03Call imake(1) with `WRAPPER_SKIP_TRANSFORM=yes'. The argumentshira1-2/+3
should not be transformed by wrapper. This fixes PR pkg/34139. Reviewed by tron@.
2006-08-28Add missing $NetBSD$dmcmahill1-0/+2
2006-08-09Drop .ORDER declarations since pkgsrc doesn't support "make -j ...".jlam1-3/+1
2006-07-22Modify the barrier so that we always invoke the recursive make processjlam1-2/+2
when passing through the barrier. This ensures the PATH (passed via PKGSRC_MAKE_ENV) is correctly set for all phases after the barrier. This fixes a bug in "interactive" pkgsrc use, where if you have no work directory and type "make build && make install", then the "install" step does not have a PATH set to include all the wrapper and tools directories.
2006-07-10Fix typo in comment.wiz1-2/+2
2006-07-10Always add dependencies for packages pulled in indirectly buildlink3 thatjlam1-22/+13
are build dependencies. This should fix PR pkg/33940. Thanks to Joerg for the debugging hint.
2006-07-08Change the format of BUILDLINK_ORDER to contain depth information as well,jlam2-1/+28
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-07Rename <phase>_COOKIE variables to _COOKIE.<phase>. These are privatejlam1-2/+2
variables so there are no user-visible changes. This change just makes it a little easier to write for loops.
2006-07-05Flatten out recursive makes into a single re-invocation of make byjlam1-20/+7
introducing the concept of a "barrier". We separate the user-invokable targets into ones that must happen before the barrier, and ones that must happen after the barrier. The ones that happen after the barrier are run in a sub-make process. In this case, the targets that must be run after the barrier are from the "wrapper" step and beyond. We rewrite the various "flow" targets, e.g. wrapper, configure, build, etc., so that they of the right form to use the barrier target. This now completely removes the concept of PKG_PHASE from pkgsrc. It is replaced with the concept of "before" and "after" the barrier, and this state can be checked by testing for the existence of the barrier cookie file. Because we've removed most of the recursive makes, there is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove them for now. As part of this commit, put back the logic that conditionalized the sources for the various cookie files. Because the sources are all "phony" targets, they were always run, regardless of whether or not the cookie file already existed. Now, if a cookie file exists, then that entire phase associated with that cookie file is skipped. Lastly, fix a thinko in configure/bsd.configure.mk where setting NO_CONFIGURE in a package Makefile would manage to skip the "wrapper" step altogether. Fix this by correctly noting "wrapper" and not "patch" as the preceding step to "configure".
2006-06-09pkglint says, the :Q operator should not be used in double quotes.rillig1-20/+20
The code here only worked due to many conincidences: Let's assume a variable has the value "a b" and is used with the :Q operator, which results in "a\ b" (a, backslash, space, b). When used in double quotes, the shell command looks like: echo "a\ b" which, depending on the shell, may output the backslash literally or not. In the case of this file, the ":Q" string was not passed to echo(1), but to sed(1). sed(1) in turn interprets (backslash, space) in the replacement text as equivalent to (space), and that's where the backslash finally disappears. So it's only to this coincident that the code worked although it was not correct.
2006-06-07Use ERROR_MSG for an error message.jlam1-3/+3
2006-06-06Remove PKG_PHASEs that no longer exist from the various *_PHASE_* lists.jlam1-4/+3
2006-06-04Band-aid for dependency handling due to the stricter rules from thejoerg1-2/+2
dependency cookie. We now want all dependencies in the default phase, since depends is run before/outside real-extract. This can be seen e.g. by textproc/troffcvt, which has a build dependency in a build dependency. Discussed and tested with seb@.
2006-05-06If USE_ABI_DEPENDS=no, do not add the BUILDLINK_ABI_DEPENDS.$pkgreed1-3/+4
to BUILD_DEPENDS. (I posted about this to pkgsrc-users on April 14.)
2006-04-14If we can't find the package with pkg_info when computing BUILDLINK_PREFIX,jlam1-3/+5
make the resulting error message more useful for debugging purposes by including the name of the variable in a null statement that is part of the command executed.