libtool documentation. Specifically, many authors now link against an
uninstalled libtool archive with:
-L../package/source/dir -lfoo
instead of the correct (according to the libtool documentation):
../package/source/dir/libfoo.la
The workarounds convert the former into the latter. Changes originally
suggested by Rene Hexel <rh@netbsd.org> in private e-mail.
path/subpath/libfoo.so => -Lpath/subpath -lfoo
and
path/libfoo.so => -Lpath -lfoo
This fixes converting /usr/lib/libintl.so into "-L/usr/lib -lintl", which
wasn't happening before.
(*) Since buildlink2 is a layer of abstraction atop the toolchain,
it's a logical place to deal with the vagaries of unusual
toolchains. For example, on Darwin we could reliably pass
the "-no-cpp-precomp" switch to every compiler invocation
by emitting it from the compiler wrapper. Likewise, the
use of _USE_RPATH in bsd.pkg.mk might be better handled in
the linker wrapper.
Always check for ${OPSYS} == "IRIX" (and not once for != and once for ==)
Always use "-Wl,-rpath,/path" rather than sometimes "-Wl,-rpath -Wl,/path"
and sometimes "-Wl,-rpath,/path".
the runtime CPU checks; it defaults to YES, which makes the binary package
usable on more machines; setting it to NO might make mplayer a bit faster.
Suggested by veego.
correct manipulation of variables containing values with escaped
metacharacters by the shell. The new code only does partial caching, which
doesn't cache "special" arguments that contain escaped metacharacters or
other oddly quoted values. On certain platforms listed in _BLNK_CACHE_ALL
in bsd.buildlink2.mk, we do full caching, which has enormous speed benefits
since it avoids an extra sed invocation per "special" argument.
Known working platforms:
MacOS X 10.1.5 (schmonz)
MacOS X 10.2 (grant)
NetBSD 1.6 [full caching] (jlam)
OpenBSD (cjep)
Solaris 8 (grant)
Solaris 9 (salo)
for 'pkg_admin pmatch' which is used by some pkgs (eg gettext-lib/buildlink2.mk).
The pmatch command was not present in 1.5.* systems. This fixes part of the
problem seen with libintl-using pkgs on 1.5.*
incompatible.
Fixes buildlink2 problems with converters/libiconv, which assumed that
iconv was in the base system (on Solaris) due to the existance of
/usr/include/iconv.h.
only if if MESSAGE_SRC and MESSAGE are _not_ already set fall back to setting
MESSAGE_SRC to ${PKGDIR}/MESSAGE if it exists.
This fix builds of mail/sendmail{,811}/.
can stop builds when a dependency is broken, yet continue builds
when a dependency is merely skipped (usually because it duplicates
functionality in the base system). Thus IGNORE_FAIL, the
oft-misunderstood and naught-documented option, goes away.
This addresses many people's complaints on tech-pkg@ and other
lists, as well as PR pkg/18157.
path to the java home directory depending upon whether the operating
system includes Java by default. Use the operating system-dependent
definitions files to set this value.
more generic, way - use an abstraction called ${_OPSYS_RPATH_NAME} which
takes the value "-rpath," or "-R", set appropriately in the opsys-dependent
defs files.
This patch corrects a typo and uses PKGCONFIG_OVERRIDE_SED rather than
adjusting sed lateron in the target.
Modification of the patch: use '-Wl,-rpath,/path' rather than '-Wl,-rpath -Wl,/path'
as suggested by jlam in another email.
separated list of files relative to ${WRKSRC} on which we do PKGLOCALEDIR
replacement. This is in addition to the files on which we already do the
PKGLOCALEDIR replacement (Makefile.in* and Makefile*).
The logic is:
- if package defines USE_PKGLOCALEDIR and PKGLOCALEDIR is not 'share' as GNU
autotools expects then
- fix variables 'localedir', 'gnulocaledir' and define coorect 'LOCALEDIR' in
the Makefile.in.* files
From Packages.txt:
10.29 Packages providing locale catalogues
==========================================
If the package provides its own locale catalogues, the variable
USE_PKGLOCALEDIR should be defined. It will ensure that the package's
Makefile template files are fixed and point to the correct locale directories
(which may vary, depending on OS), if necessary. See also section 5.1 for
details about ${PKGLOCALEDIR}. This functionality is buildlink2-only.
We do not have opsys-specific patches, and this note becomes more
and more confusing the more OSs we support with pkgsrc.
Pointed out and patch provided by Jeremy C. Reed (reed at reedmedia dot net)
in PR pkg/19172.
USE_BUILDLINK2 is defined. AUTOMAKE_OVERRIDE == "yes" is the default, and
means that pkgsrc will try to avoid executing the GNU autotools during the
build process. Setting AUTOMAKE_OVERRIDE to "no" will avoid these extra
steps by pkgsrc, so that the GNU autotools will be automatically invoked
if they are found (though they may not necessarily invoke the correct ones
and the effects may be surprising...do this only if you know what you are
doing).
that are outside of ${LOCALBASE} belong to the package that lists them.
If the directory already exists before the package is installed, then
we don't presume ownership of the directory.
This addresses pkg/18383 by Grant Beattie.
the GNU auto* tools from being executed during the build process. We now
just create shell scripts that simply return an error status for each of
the GNU auto* tools in ${BUILDLINK_DIR}/bin and ignore the other goop in
bsd.pkg.mk that tried to accomplish the same thing.
shells to /etc/shells.
This feature can be disabled by setting PKG_REGISTER_SHELLS to NO in
/etc/mk.conf.
An excerpt from Packages.txt, section 10.28:
10.28 Packages providing login shells
=====================================
If the purpose of the package is to provide a login shell, the variable
PKG_SHELL should contain the full pathname of the shell executable installed
by this package. The package Makefile also must include
"../../mk/bsd.pkg.install.mk" prior to the inclusion of bsd.pkg.mk to use the
automatically generated INSTALL/DEINSTALL scripts.
An example taken from shells/zsh:
PKG_SHELL= ${PREFIX}/bin/zsh
.include "../../mk/bsd.pkg.install.mk"
The shell is registered into /etc/shells file automatically in the
post-install target by the INSTALL script generated by bsd.pkg.install.mk and
removed in the deinstall target by the DEINSTALL script.
back to the current page, just list it as regular text.
- Put each dependency hyperlink on a separate line in the README.html file.
These were both noted by Thomas Klausner in a private email.
avoid simply appending to it.
- add some additional error checks when using the -r/--restart options to
make sure that the database exists and give a useful error message if it
doesn't
directory of a single package (e.g. graphics/gimp) for which a README.html
is to be generated. This provides the required hook to be able to use this
script to generate a README.html file for a single package as well as
for all packages.
don't exist, exit with a fatal error and don't try and make empty README.html
files.
- fix a bug which caused some duplication in category README.html files.
Problem noted on netbsd-help@ by Nicolas Saurbier ( Nicolas dot Saurbier at biodata dot de)
way than the previous recursive make approach. The 'mkreadme' script is
the top level script. 'mkreadme -h' or 'mkreadme --help' for complete
documentation on its use. Generates README.html files more than two orders
of magnitude faster than the recursive make approach by only calling make(1)
once per pkg.
It runs pre-test, do-test, and post-test. The default pre-test and
post-test targets are empty; the default do-test target runs
TEST_TARGET (in each TEST_DIRS (defaults to BUILD_DIRS)) if it is set
and does nothing otherwise. Thus the test target defaults to doing
nothing.
The usual way to use this is to set TEST_TARGET to the target to run
(e.g. TEST_TARGET=check for GNU packages).
If PKGSRC_RUN_TEST is set to yes (in mk.conf, defaults to no),
the test target is run before install.
(approved by agc)
causes the shell environment to be discarded. This also discards
OBJMACHINE or OBJHOSTNAME, which causes WRKDIR_BASENAME to be different
between the "non-root" and "root" make targets and leads to the breakage
seen in pkg/18879 by Simon Burge. Fix this by saving the OBJHOSTNAME or
OBJMACHINE setting in MAKEFLAGS so that it is seen even after we "su -l" to
root.
if the package uses X11 and merge the BUILDLINK_X11PKG_DIR and
BUILDLINK_X11_DIR variables into a single variable: BUILDLINK_X11_DIR.
This creates a one-to-one mapping between X11BASE and BUILDLINK_X11_DIR,
instead of X11BASE mapping to both BUILDLINK_X11_DIR and to
BUILDLINK_X11PKG_DIR.
Remove the now unused II and LL parts of the BUILDLINK_TRANSFORM language.
Add a new "static" keyword to the mini-language and fix building
statically-linked binaries when building with libtool.
.transform.sed and .untransform.sed that are generated by a new
gen-transform.sh shell script. This avoids all of the silliness with
exceeding the length of the value of a make variable that brought about
breaking the original _BLNK_TRANSFORM_SED into _BLNK_TRANSFORM_SED.[1-4].
It's also vastly easier to understand the gen-transform.sh script as
opposed to the juxtaposition of make and sed regular expressions, a.k.a.
massive eyesores, that were in bsd.buildlink.mk.
Also fix the directory protection scheme so that it might actually work
if the pkgsrc directory is a subdirectory of /usr/pkg (${LOCALBASE}).
Lastly, filter out /usr/X11R6 (${X11BASE}) if the package doesn't define
USE_X11. This should catch packages that use X11 without announcing it,
and avoids one way you can circumvent buildlink2.
Compare...
$ gmake --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i386--netbsdelf
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <bug-make@gnu.org>.
to...
$ gmake --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
# Used in the rpm package to note the prefix of the path to the RPM
# databases. The RPM databases are stored in ${RPM_DB_PREFIX}/lib/rpm.
# Possible: any valid location, e.g. ${LOCALBASE}
# Default: /var/pkg
dependencies to deal with changes in the source rc.d script file (this is
possible now that some variables have moved to bsd.prefs.mk from
bsd.pkg.mk).
2. New variable PKGNAME_PREFIX, which is either null string or xemacs-
depending on EMACS_FLAVOR. Intended to use like:
DEPENDS+= ${PKGNAME_PREFIX}apel>=10.4:../../devel/apel
BUILD_DEPENDS+= ${PKGNAME_PREFIX}apel>=10.4:../../devel/apel
JVMs from the package-provided PKG_JVM_ACCEPTED list, filter out those
JVMs that aren't available for the current platform. This allows a
package to simply list all JVMs that may be used to build it in
PKG_JVM_ACCEPTED, regardless of platform issues, instead of having to
construct a different PKG_JVM_ACCEPTED based on the platform we are using.
platform, and use the intersection of these JVMs and the ones
listed in PKG_JVMS_ACCEPTED as the JVMS that may really be used.
Currently, we assume all of the JVMs are usable by all platforms.
in bsd.pkg.mk. The java.mk Java handling is largely based on the
lang/python/pyversion.mk file.
There are two new variables:
PKG_JVM_DEFAULT is a user-settable variable whose value is the
default JVM to use.
PKG_JVMS_ACCEPTED is a package-settable list of JVMs that may be
used as possible dependencies for the package.
Two existing variables have been redefined to be only read-only, though
there is some logic to handle legacy /etc/mk.conf which may contain an
explicit PKG_JVM=...
PKG_JVM is a publicly readable variable containing the name of
the JVM we will be using.
PKG_JAVA_HOME is a publicly readable variable containing
${JAVA_HOME} for the PKG_JVM described above.
To do:
Have some way to specify which JVMs are acceptable for each
platform, and use the intersection of these JVMs and the ones
listed in PKG_JVMS_ACCEPTED as the JVMS that may really be used.
Currently, we assume all of the JVMs are usable by all platforms.
I'm not sure if Darwin's special stub sun-{jre,jdk}13 packages
are usable by buildlink2. This needs to be verified.
stdout a list of files relative to ${BUILDLINK_PREFIX.<pkg>}. The shell
variable $${pkg_prefix} may be used and is the subdirectory (ending in /)
of ${BUILDLINK_PREFIX.<pkg>} to which the PLIST is relative, e.g. if
`pkg_info -qp foo' returns "/usr/pkg/java/kaffe", then $${pkg_prefix} is
"java/kaffe/".
BUILDLINK_PKGBASE.<pkg> that is the ${PKGBASE} for that package and can
be used as "pkg_info ${BUILDLINK_PKGBASE.<pkg>}". This variable is
currently only used if the buildlink2.mk file uses
BUILDILNK_PLIST_CMD.<pkg> (described below).
* Create readable variable BUILDLINK_PLIST_CMD.<pkg> that is a pipeline of
shell commands that outputs to stdout a list of the files installed the
<pkg>, relative to its installation prefix.
readable through CONFIGURE_ENV and MAKE_ENV. These may be used to fix
up packages that use imake to check the appropriate locations for headers
and libraries.
* Don't be so aggressive in prepending _BLNK_{CPP,LD}FLAGS to
{C,CPP,CXX,LD}FLAGS. The buildlink2 wrapper scripts will automatically
filter out bad -[IL] paths, even if their added inadvertantly by package
Makefiles, so we can simply append them to the existing
{C,CPP,CXX,LD}FLAGS. We try to be smarter about appending them to avoid
needless duplication.
${CONFIGURE_ENV} and in ${MAKE_ENV} for the configure and build processes,
respectively. This allows overriding the value of "CC" passed to the
build, e.g.:
BUILDLINK_ENV+= CC="/usr/pkg/pthread/bin/pgcc"
Disables to "no", which results in no gnome-libs being needed.
Patch contributed by Stefan Krüger <skrueger@europe.com> in private mail,
with some changes from me.
SPECIAL_PERMS are lists that look like:
file user group mode
At post-install time, file (it may be a directory) is changed to be
owned by user:group with mode permissions.
SPECIAL_PERMS should be used primarily to change permissions of files or
directories listed in the PLIST. This may be used to make certain files
set-uid or to change the ownership or a directory.
Packages that install setuid executables should list them in SPECIAL_PERMS
so that the correct user and group will be used for file ownership, even
if the uid/gid changes between the package creation and the package
installation.
was only able to check the paths for NetBSD and Linux...Solaris and Darwin
pkgsrc developers should change the path to expr in the right defs.*.mk
file.
environment. Instead, create a new variable PKG_JAVA_HOME, which is
passed to the configure and build processes via:
JAVA_HOME=${PKG_JAVA_HOME}
to override any environment setting for JAVA_HOME. This should fix
pkg/17989.
preference to or in place of Sun audio support in various packages. People
using audio/oss should set USE_OSS in their /etc/mk.conf when building
packages.
when support for BUILD_DEPEND-only java packages was introduced -- this problem
was preventing java from being registered as a dependency for a number of java-based
packages.
to only add -Ldir/.libs for *.la files that are not named with absolute
paths or named with an absolute path starting with ${WRKSRC}. This should
fix the problem with converting kdebase3 to buildlink2.