building of software. For packages that use either buildlink2 or
buildlink3, this would be the wrapper script in ${BUILDLINK_DIR}.
* Garbage-collect _BLNK_WRAP_SETENV.* as those are not needed after
the above changes. Configure and make processes will automatically
find the right compilers in the PATH.
* PKGLIBTOOL and PKGSHLIBTOOL are no longer needed since LIBTOOL and
SHLIBTOOL point to the correct libtools regardless of any
USE_BUILDLINK[23] definitions.
and emacs lisp packages should be built for. Users need to set the version
you like in /etc/mk.conf explicitly.
The default is emacs21 (editors/emacs, GNU Emacs 21.x).
This will deprecate EMACS_VERSION_DEFAULT defined in emacs.mk and USE_XEMACS
used in places.
the compiler and that it's behind .tools/bin and .buildlink/bin, regardless
of whether or not we're using gcc3-c or not, or whether it's been installed
yet in the process of satisfying dependencies, etc.
due to a type on gcc.mk that causes the ${_GCC_PREFIX}/bin to always be
prepended to the PATH. The problem that was hiding was "make" resolving
to ${TOOLS_DIR}/bin/make if the package used GNU make, which broke
building since the package Makefile is a BSD Makefile and we passed
PATH to some phases of the build. Fix this by expanding MAKE to the
full path to ${MAKE} in bsd.prefs.mk. We also garbage collect the now
useless checks for PHASES_AFTER_BUILDLINK that cluttered the PREPEND_PATH
code.
(by checking PREPEND_PATH) and only for those phases of the build that
care about the PATH (buildlink or later). We also pass the PATH to
those same phases of the build so that executing ${CC} will work correctly
from custom {pre,do,post}-* targets that occur at buildlink time or
later.
BUILDLINK_PREFER_PKGSRC
This variable determines whether or not to prefer the pkgsrc
versions of software that is also present in the base system.
This variable is multi-state:
defined, or "yes" always prefer the pkgsrc versions
not defined, or "no" only use the pkgsrc versions if
needed by dependency requirements
This can also take a list of packages for which to prefer the
pkgsrc-installed software. The package names may be found by
consulting the value added to BUILDLINK_PACKAGES in the
buildlink[23].mk files for that package.
Any additions to DEPENDS/BUILD_DEPENDS or inclusions of buildlink[23].mk
files are deferred till bsd.compiler.mk is included by bsd.pkg.mk. We
allow bsd.compiler.mk to be included by bsd.prefs.mk solely for the purpose
of setting CC_VERSION properly for use by package Makefiles.
There is the surprising behaviour that CC_VERSION won't necessarily have
the correct value at all times until after "make extract" has been
completed (dependencies are installed before "make extract"), so package
Makefile writers should keep that in mind. Just to note that this is
_existing_ behaviour that's preserved by these changes.
just assume they do unless they're known _not_ to work. So far, only
Darwin-5.* suffers from this problem, apparently because they use some
bizarre version of zsh for /bin/sh.
GCC. If it's found under ${LOCALBASE}, then assume that it came from a
package and proactively require at least that version of GCC so that the
correct package dependencies are added.
that's the way that its set. Also, remove _IGNORE_GCC3C and just overload
_IGNORE_GCC to note that we're building the GCC C compiler and that if
we're building something that it depends on, then avoid a dependency loop.
This is, of course, wrong. Excerpted from the file itself:
# XXX Add this gross and completely inaccurate hack. Packages that
# XXX set USE_GCC_SHLIB should be adjusted to set USE_LANGUAGES
# XXX correctly (most likely by saying it needs either "c++" or
# XXX "c c++"). This is here for now so that ~85 packages won't
# XXX suddenly break.
USE_LANGUAGES
Lists the languages used in the source code of the package,
and is used to determine the correct compilers to install.
Valid values are: c, c++, fortran, java, objc. The default
is "c".
Packages that don't need any compilers and set this variable to an
empty value, e.g. "USE_LANGUAGES=".
This can probably be combined in some smart way with setting
USE_GCC_SHLIBS and USE_FORTRAN automatically.
packages which pass these gcc-specific flags.
also ignore -Werror; if a package passes -Werror, it's expecting that
the compiler is gcc, which in this case it is not. SunPro often emits
warnings on code which gcc doesn't, so transforming this flag to
-errwarn is counterproductive.
script that invokes the correct libtool instead of using a symlink. This
fixes the problem where libtool was invoked by /bin/sh regardless of
whether libtool was built to be run by /bin/ksh instead.
changes from the old compiler.mk are:
* Split apart the compiler-specific logic into separate files. This
should make supporting other compilers a bit easier.
* Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23],
USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER
variable.
* Clean up the GCC handling so that it's all controlled by a single
variable GCC_REQD. The following behaviour is expected:
(a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on
the system.
(b) If there is no GCC, then the appropriate GCC corresponding to
GCC_REQD is installed and used.
(c) If there is a GCC, if it satisfies GCC_REQD, then use it;
otherwise install and use the appropriate GCC package.
(d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3
is installed and used.
(e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is
still used instead of installing lang/gcc.
New features include:
* PKGSRC_COMPILER takes a list of values specifying the chain of
compilers to call when building packages. Valid values are:
distcc distributed C/C++ (chainable)
ccache compiler cache (chainable)
gcc GNU
mipspro Silicon Graphics, Inc. MIPSpro
sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun
ONE Studio
The default is "gcc". You can use ccache and/or distcc with an
appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc".
* Change GCC_REQD to hold a list of values that we scan through to
find the highest version of GCC required by the build. Package
Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
They are:
o IMAKE_KERNMAN_DIR (man4 or cat4)
o IMAKE_MISCMAN_DIR (man7 or cat7)
o IMAKE_KERNMAN_SUFFIX
o IMAKE_MISCMAN_SUFFIX
Ok'ed by Hubert Feyrer in private email.
- move the build summary to the top and include build start/end
times.
- break the report up into three sections for easier navigation:
Broken, Broken dependencies, and Not packaged.
- HTML report now uses a subset of the www.NetBSD.org stylesheet.
- improve some of the text.
several arguments together) from the command line and push it onto the
stack. Pop the top off the stack, process, and push replacement
arguments onto the stack. Repeat the last step until no more processing
is done, and we have our final argument to be passed on through to the
rest of the wrapper script.
specify library orderings with:
BUILDLINK_TRANSFORM+= reorder:l:crypt:crypto
The wrapper scripts then reorder the libraries so that -lcrypt will
always come before -lcrypto. If there are lots of reorder:l:...
commands, then the algorithm looks a bit like a topological sort.
* Support building on x86-64 with gcc -m32.
* Use a BIOS call to turn on/off Gate A20. This should solve various
problems related to Gate A20 in modern BIOSes.
* Add a workaround for buggy BIOSes (notably HP Vectra series) which
don't pass the boot drive correctly.
* Display "GNU GRUB" instead of "GRUB" in the menu.
* Add support for QNX RTP into the grub shell.
* Add support for the initrd max address of a kernel header in Linux.
* Support 32 bit and 64 bit dev_t.
* Add support for an install device in GRUB's notation with no
parenthesis (e.g. grub-install hd0).
* Improve the manual a lot.
While here, add a new build definition, GRUB_PRESET_COMMAND, which can be
set to a single command that will be embedded in grub's stage2 and executed
during bootup (useful for automated diskless setups). Also make use of
BUILD_DEFS properly. And pick up maintainership, as requested by tron@.
some shells can set MAIL to be the mailbox of the user, and
environment variables will override assignments in make when using
conditional assignments.
variables are no longer saved using MAKEFLAGS since the saved values aren't
correct for recursively invoked make targets that bsd.pkg.mk uses
internally for information-gathering, e.g. show-var, run-depends-list.
Instead of saving the values, we now just don't compute them during phases
of the build that don't care about the dependency information, e.g. when
not in extract, install, or package.
definition is not intended to be set by the user, and so has a leading
'_', and is undocumented.
If set to "yes", then a "make clean" of the package will not be done,
thereby preserving the working directory. This is useful for
debugging problems in bulk builds.
create _BLNK_ADD_TO.<depmethod> for each of depencdency methods above from
the BUILDLINK_DEPEND.<pkg> and BUILDLINK_RECOMMENDED.<pkg> lists and save
the created values so they don't need to constantly be recomputed.
bsd.prefs.mk as it's needed in setting X11PREFIX to the correct value,
which is also done in bsd.prefs.mk. This is the follow-through to the
temporary fix in previous revision (1.141) of bsd.prefs.mk.
with a prefix of X11BASE, rather than LOCALBASE - check whether
USE_XPKGWEDGE is defined to {"YES", "yes"} as well as looking for the
existence of the xpkgwedge definition file when calculating the value
of X11PREFIX.
enforce that using PHASES_AFTER_BUILDLINK.
Also, transform the physical path to ${WRKDIR} into the value ${WRKDIR} in
the wrapper scripts. This allows ${WRKDIR} to be a path that traverses a
symlink. In particular, it allows users to set WRKOBJDIR to point to a
symlink.
fetching, extracting, configuring, building, etc. of a package. We
can check what phase we're in by examining the value of ${PKG_PHASE}
and comparing against PHASES_AFTER_<phase>, which list phases that
are "greater than or equal to" <phase>.
One useful example of how to use PKG_PHASE is:
.if !empty(PHASES_AFTER_EXTRACT:${PKG_PHASE})
#
# Some variable settings or targets here that rely on dependencies to
# already be installed, or ${WRKDIR} to be created, etc., as these are
# things that should have happened by the time "make extract" is
# completed.
#
.endif