gcc buildlink2.mk files and splitting the non-buildlink2.mk bits out
into compiler.mk.
this allows USE_GCC2 and USE_GCC3 to work with non-buildlink2 packages
again.
DEFAULT_VIEW.${PKGBASE} default view for ${PKGBASE}
VIEWBASE base location of files at run-time
The first is meant to be set by package Makefiles or in /etc/mk.conf, while
the latter is meant to read/used only. VIEWBASE is either ${LOCALBASE} or
or ${LOCALBASE}/${DEFAULT_VIEW.${PKGBASE}} depending on whether the first
variable is the empty string or not.
to by a package Makefile. This is passed as the environment when running
the test target. We often need this since packages can require setting
up LD_LIBRARY_PATH so that we can test before installation.
"pkg_delete -O pkgname" actually remove file entries for pkgname from the
pkgdb.byfile.db database. This makes FORCE_PKG_REGISTER work again (this
must have been broken for a long time).
Introduce private variables _{MAKEINFO,TEXINFO_REQD}_{MAJOR,MINOR}
holding the major and minor number version numbers of available makeinfo
and of the minimum required version.
Use these to sort out if devel/gtexinfo is needed as dependency.
we've already seen:
-[DILR]*|-Wl,-R*|-Wl,-*,/*
These are all only useful the first time we see them. All other
instances are redundant.
-l*
Extra libraries are suppressed if they're repeated, e.g.,
"-lm -lm -lm -lX11 -lX11 -lm -lm" -> "-lm -lX11 -lm".
The screen output is still likely to be very verbose, but you can check
in work/.work.log to see the actual commands executed.
do it for rpath specifications, e.g. -Wl,-R/dir, -Wl,-rpath,/dir, etc.
This lets the depot directory for a package, in addition to the usual
/usr/pkg/lib, to be added to the rpath of a program or shared library
of an "overwrite" package. Now, if the package instance in the
default view is forcibly removed, then shared library references will
still resolve to the existing shared libraries in the depot directory.
In the following example, I've built jpeg as a pkgviews package, and
tiff as an "overwrite" package:
% ldd /usr/pkg/lib/libtiff.so
/usr/pkg/lib/libtiff.so:
-ljpeg.62 => /usr/pkg/lib/libjpeg.so.62
-lz.0 => /usr/lib/libz.so.0
-lm.0 => /usr/lib/libm387.so.0
-lm.0 => /usr/lib/libm.so.0
% pkg_delete -f jpeg-6b
pkg_delete: package `jpeg-6b' is required by other packages:
tiff-3.5.7nb1
% ldd /usr/pkg/lib/libtiff.so
/usr/pkg/lib/libtiff.so:
-ljpeg.62 => /usr/pkg/packages/jpeg-6b/lib/libjpeg.so.62
-lz.0 => /usr/lib/libz.so.0
-lm.0 => /usr/lib/libm387.so.0
-lm.0 => /usr/lib/libm.so.0
The benefit here is that if the jpeg package is updated and also has
a bump in the major number of the shared lib, e.g. libjpeg.so.63.0,
then you can remove the old jpeg instance from the default view and
add the new jpeg package into the default view, and
/usr/pkg/lib/libtiff.so will _still_ resolve its libjpeg.so.62
reference.
Welcome to the power of Package Views!
PKG_SYSCONFBASE when they want PKG_SYSCONFDIR stripped of
PKG_SYSCONFSUBDIR. This makes PKG_SYSCONFBASE=/etc work with pkgviews by
installing all config files into /etc/packages/<pkg> instead of
occasionally putting some directly into /etc.
Also only create PKG_SYSCONFDIR if we're actually going to copy config
files.
automatically added to CFLAGS and CXXFLAGS. Note that -D... and -I...
settings should go into BUILDLINK_CPPFLAGS.<pkg> instead. BUILDLINK_CFLAGS
is reserved for stuff like "-pthread" or other compiler-specific flags.
Also note why we add BUILDLINK_CPPFLAGS.<pkg> to both CFLAGS and CXXFLAGS
(because a lot of software just uses CFLAGS and ignores any CPPFLAGS value
that we pass to it).
modules that will work with more than one version of the apache web server
to not require a separate package for each version of apache. This was
originally based on java-vm.mk
Makefile variables added:
PKG_APACHE_ACCEPTED : Contains the list of valid versions of apache.
USE_APR : If set, the package required apr to run.
User variabled added:
PKG_APACHE_DEFAULT : The version of apache to install, if there is
none yet. Defaults to apache13
Variables set:
PKG_APACHE : Which version of apache is being used.
This fix NO_MTREE installation on Solaris when ${PREFIX} already exists
and is a symlink.
Example:
# uname -sr
SunOS 5.9
# cd /tmp
# rm -f foo
# ln -s /etc foo
# /bin/mkdir -p /tmp/foo
mkdir: "/tmp/foo": Exists but is not a directory
#
well as stripping -L to subdirs of these directories from dependency_libs
lines in *.lai files. This corrects the changes in revision 1.18 of this
file and restores some functionality accidentally removed in version 1.19
of this file. Should fix the subversion buildlink/libtool problem
reported on tech-pkg@.
is meant for {,DE}INSTALL_EXTRA_TMPL. Package makefiles should explicitly
set those variables if they want to use them in conjunction with
USE_PKGINSTALL.
${LOCALBASE}/bin/gmake. ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}/make
technically works, too, but this covers the (unsupported!!) case where the
user has GNU_PROGRAM_PREFIX="" and has moved the "make" binary directly
over the "gmake" symlink created by pkgsrc (Jeremy Reed reported this
problem on tech-pkg@ because he uses this a a debugging technique to find
out whether GNU make is actually needed by a package or not).
thing.
(*) Move the code to adjust Makefiles to refer to the correct
PKGLOCALEDIR into bsd.pkg.mk and reimplement it using subst.mk so
that it's non-USE_BUILDLINK2 packages can use it, too.
(*) Reimplement the PKGCONFIG_OVERRIDE code in bsd.pkg.mk using subst.mk.
(*) Reimplement the unbuildlink code in bsd.buildlink2.mk using subst.mk.
facility for different classes of files in ${WRKSRC}. For each class of
files, a target <class>-subst is created to perform the text replacement.
The following variables are used:
SUBST_STAGE.<class>
"stage" at which we do the text replacement, e.g. pre-configure,
post-build, etc.
SUBST_MESSAGE.<class>
message to display, noting what is being substituted
SUBST_FILES.<class>
files on which to run the substitution; these are relative to
${WRKSRC}
SUBST_SED.<class>
sed(1) substitution expression to run on the specified files
This basically extracts a useful piece of code from bsd.buildlink2.mk and
puts it in a place that allows it to be more widely used, and so that the
functionality doesn't depend on USE_BUILDLINK2 being defined.
${TOOLS_DIR}/bin/make. If a package wants GNU make, then it should
set:
USE_GNU_TOOLS+= make
in the package Makefile. Allow for USE_GMAKE to continue to work
until we get a chance to sweep through pkgsrc and remove the usage
of this now-redundant variable.
This change allows us to avoid patching makefiles that use a bare
"make" command to invoke sub-make processes. Idea suggested by
salo@netbsd.org in pkg/22509.
before trying to create the binary package. This makes:
cd pkgsrc/category/foo
make install
pkg_delete foo
make package
fail because package "foo" isn't actually installed, so no binary package
can be built.
to ${LOCALBASE}/bin/gmake. Patch by Soren Jacobsen in PR pkg/22506.
(Not closing that PR, as we should determine a procedure to bootstrap
on a system without any make.)
devel/gettext and other pkgs installing libraries ending in eg.
`x.y.z.so' rather than `.so.x.y.z'.
also fix off-by-one bug in shlib handling awk script causing the
first .so entry to not be commented out in the PLIST when it should
be.
ok'd by jlam.
file exist when installing a package and it does not contain at
least one line starting with '*' then remove it and let install-info
create a new one.
This should address PR pkg/22555 from reed@.
to run ldd if it is executable.
fixes bug where binaries just installed would be run (!) and the
install process possibly "hang" on Darwin because Darwin has no ldd!
from texinfo.mk. Only set them there from tools.mk: this way they are
always set whatever the value of INFO_FILES and USE_MAKEINFO as
texinfo.mk is included only if INFO_FILES is not empty or USE_MAKEINFO is
not "no".
Please note that now with tools.mk install-info and makeinfo usage by a
package build and installation process is always caught by the
overriding scripts in ${TOOLS_DIR}/bin/{install-info,makeinfo} even if
the package does not use the buildlink framework.
Many thanks to Johnny for that!
XXX: I think I'm going to sweep over packages marked with INFO_FILES
and USE_MAKEINFO to remove the need of INSTALL_INFO and MAKEINFO in
environment and thus only relying on the overriding scripts.
This will clear a bit the clutter in {MAKE,CONFIGURE}_ENV.
put the tools in ${WRKDIR}/.tools/bin instead of in ${BUILDLINK_DIR},
and remove the need for buildlink2 to use USE_GNU_TOOLS. In the
modified USE_GNU_TOOLS implementation, the following implementation-
specific variables have the following meanings:
_TOOLS_REPLACE.<tool>
means that we want ${AWK}, ${SED}, etc. symlinked into
${TOOLS_DIR} as awk, sed, etc.
_TOOLS_NEED_GNU.<tool>
means that we want to use the pkgsrc version of <tool>
symlinked info ${TOOLS_DIR} as awk, sed, etc. If this is
"YES", then it always trumps _TOOLS_REPLACE.<tool>.
And we want nothing to happen if we're building the pkgsrc GNU tool
itself. The modified USE_GNU_TOOLS implementation should also
hopefully fix the circular dependency problem.
Create a new target "tools" that is run after "patch" and before
"buildlink" that populates the ${TOOLS_DIR} directory. This ensures
that it's always run at the right time, instead of relying on
pre-buildlink or pre-configure, which may be cancelled by
NO_BUILDLINK or NO_CONFIGURE.
XXX There is some possible fallout in texinfo.mk with the MAKE_ENV and
XXX CONFIGURE_ENV settings for INSTALL_INFO and MAKEINFO. It looks
XXX like the MAKE_ENV and CONFIGURE_ENV settings should move from
XXX tools.mk into texinfo.mk, and they no longer need to be
XXX conditional on USE_BUILDLINK2. I'll leave it to the texinfo.mk
XXX dude (Hi, Stoned!).
Make COMMON_DIRS generating an awk script instead of sed expressions hence
use awk instead of sed to deal with the mtree file.
This get ride of the annoying 'sed: Too many commands' message making
print-PLIST unusable with Solaris' seds.
by the loops introduced by tools.mk) causing make failures.
But show-all-depends-dirs and show-all-depends-dirs-excl are not.
So use show-all-depends-dirs-excl in clean-depends target and remove
clean-depends-list altogether.
Besides this remove a bit of clutter and redundancy from this
already monstrous file.
sets, so that this target will work on all native sed programs. The extra
invocation gets lost in amongst all the other sort, grep, sed, and awk
invocations that are there, and is a much more appealling prospect than
installing GNU sed.
defined, then show the BUILD_DEFS to the user. If not, then just keep quiet.
Whilst I'm here, re-indent the cpp-like .if/.else/.endif/.for/.endfor lines
properly.
Also, remove the ":u" modifier in the build-defs-message code - it's not
strictly necessary (duplicate definitions will be displayed, but this isn't
a major problem), and it removes the requirement to have a make(1) binary
which supports ":u".
This should fix PR 22402 from Alan Barrett, and also addresses some concerns
raised by Robert Elz.
users to whom the MESSAGE file should be mailed at package
installation time, and mail the MESSAGE file at the "make install"
stage (if PKGSRC_MESSAGE_RECIPIENTS is not empty).
Inspired by PR 22328 from Jeremy Reed.
MAKE_ENV. There is no effective way to unset CPP otherwise and there are
some packages (the cross compilers using gcc) where having CPP set will
break things.
- Introduce EXIM_GROUP and EXIM_USER to tune the details of the group and
user used by the daemon.
- Honour PKG_SYSCONFDIR.
- Install sample files under the examples directory.
- Automatically install example files under sysconfdir using CONF_FILES.
This simplifies exim's set up from admin's point of view.
- Use RCD_SCRIPTS to handle the startup script.
As a result, bump PKGREVISION of exim and exim-user.
and awk. as proposed on tech-pkg@, with some changes to set the
appropriate tool variables and handle OSs which provide GNU tools
in the base system (ie. do nothing).
this allows packages or users to force the use of pkgsrc GNU tools
when they are not present in the base system by defining e.g.
USE_GNU_TOOLS="awk sed".
Solaris' sed is marked as incompatible, as even the XPG4 sed is too
limited for a number of packages (especially large ones which use
libtool, as libtool calls blind 'sed'), so GNU sed is always used
on Solaris.
INFO_FILES is now defined by default to the empty value.
If it is not empty it means that install-info -or a suitable
replacement like pkg_install-info- is required.
USE_MAKEINFO is now defined by default to the 'no' value.
If it has any other value it means that makeinfo is required.
Note that as before simply defining USE_MAKEINFO in a package
Makefile is enough to trigger the use of makeinfo. I.e. it is not
required to be '[yY][eE][sS]'.
As a side effect when using buildlink2 always create install-info and
makeinfo wrappers in ${BUILDLINK_DIR}/bin. This could help
package maintainer to catch spurious/hidden install-info and makeinfo
usage.
Note that for now this nice feature is not really enabled as the relevant
part of bsd.buildlink2.mk is still conditional upon USE_NEW_TEXINFO.
It will really be when USE_NEW_TEXINFO will be removed from pkgsrc.
files inside the WRKDIR. This is done by setting RCD_SCRIPT_WRK.<name> to
the requested filename, like:
RCD_SCRIPT_WRK.foobar= ${WRKDIR}/foobar.sh
This fixes a problem (rc.d script not beeing generated) when there is a name
conflict in the WRKDIR (i.e., the file already exists or WRKSRC has the same
basename).
pre-fetch stage. Do this by creating a cookie file inside the WRKDIR.
Also let the user override the target from mk.conf to disable these messages.
This fixes PR pkg/22305 by Robert Elz.
Introduce sandboxEmptyFiles a list of files to create empty in the
sandbox if they exist on the hosting system. Hence put /var/run in
sandboxEmptyDirs list.
Use $cppprog instead of cp.
in the sandbox if they exist on the hosting system: put /var/spool/mqueue
as it was already created before and add /var/log for now (needed
for various packages, like security/ssh2).
Only create /var/run/utmp(x) if they exist on the hosting system.
XXX this may better be an opsys dependent action.
Remove IRCD_HYBRID_DPATH from bsd.pkg.defaults.mk and BUILD_DEFS,
set PKG_SYSCONFSUBDIR to 'ircd-hybrid' instead: the package builder is
now expected to adjust Ircd Hybrid configuration directory with
PKG_SYSCONFBASE(.${PKG_SYSCONFVAR}).
Replace local DOC_SUBST stuff with FILES_SUBST from bsd.pkg.install.mk.
Go with the previous PKGREVISION bump.
XXX Having the log files as SUPPORT_FILES is not optimal.
XXX I really should update this package.
can be customized for the package beeing built. This list is extracted from
the contents of BUILD_DEFS, and the message is not shown if it's empty.
Each variable is printed together with its actual value.
The new target is called in the pre-fetch stage, so it's shown early to the
user.
that are not wanted in the binary program. It is empty by default, so that all
drivers are linked in to get a full featured binary package. Packages using
this variable include mplayer and gmplayer. While building mencoder, disable
all of these drivers, as they are not needed. Bump PKGREVISION.
arts is now a enabled if not present in the variable. This detail closes
PR pkg/21775 by Marc Recht.
no listed homepage. Thanks to Grant Beattie for noting this and providing a
patch which I changed slightly.
- fix a bug which put extra stuff in the categories field. Thanks to Grant
for noting this.
several orders of magnitude and 'make index' now takes 30 minutes or so
instead of several days on my test machine. The approach now is to take
one pass through every package and extract some key information including
the explicitly listed dependencies. After the data is extracted, the
dependencies are flattened in one step which avoids the extremely
inefficient recursive make that was previously used.
shared object "provides" and "requires" information. This is only
turned on just now if ${CHECK_SHLIBS} is set to "YES".
Example output:
% pkg_info -B libutf | grep '^PROVIDES'
PROVIDES=/usr/pkg/lib/libutf.so.2
% pkg_info -B ssam | grep '^REQUIRES'
REQUIRES=/usr/lib/libc.so.12
REQUIRES=/usr/pkg/lib/libutf.so.2
%