fine-grained distinction between required versions of pre-requisites
(DEPENDS) and versions that are recommended for security or library ABI
consistency reasons (RECOMMENDED).
The contents of ${RECOMMENDED} are added to DEPENDS unless
IGNORE_RECOMMENDED is set to YES, in which case a warning will be printed
and IGNORE_RECOMMENDED will be added to BUILD_DEFS.
Add a corresponding BUILDLINK_RECOMMENDED.<pkg> variable for use with
buildlink2 and buildlink3.
they needed to be. Now, when we're emitting untransform rules, we:
(1) change everything back from ${BUILDLINK_DIR} and ${BUILDLINK_X11_DIR}
back into ${LOCALBASE} and ${X11BASE},
(2) protect ${LOCALBASE} and ${X11BASE} from changes,
(3) nuke all other compiler/linker options that have absolute paths that
we haven't blessed, and
(4) unmangle all of the protected directory names back into the right
names.
This should correctly fix the problem where "gtk-config --cflags" didn't
emit any directories for glib headers.
lists values other "include" or "lib", then protect those directories from
being eaten by the wrapper scripts. This allows -I/usr/include/krb5 to be
passed safely through to the real compiler when heimdal/buildlink3.mk is
included.
untransform cases. This should fix the problem noted on tech-pkg@:
"Re: graphics/gdk-pixbuf can't find <gdk/gdk.h> build problem" where the
CFLAGS for glib were being eaten by the unbuildlink step.
in when creating this file based on the one in buildlink2. This should
fix the problem noted on tech-pkg@: "Re: graphics/gdk-pixbuf can't find
<gdk/gdk.h> build problem" where the CFLAGS for glib were being eaten by
the unbuildlink step.
* Don't add any dependencies (via BUILDLINK_DEPENDS) unless
buildlink3.mk files add them. This fixes case where the software
existed both in the base system and in /usr/pkg, we used only the
built-in software, but we still recorded a dependency on the one in
/usr/pkg.
* Re-structure the code that populates ${BUILDLINK_DIR} so that we
don't bump into ARG_MAX limits in the shell. This should fix the
problem present in the buildlink2 framework noted in:
http://mail-index.netbsd.org/tech-pkg/2004/01/03/0005.html
CHANGES:
* Define a new yes/no variable BUILDLINK_USE_BUILTIN.<pkg> that
determines if we should use the built-in software or not. This
should probably replace the various USE_NCURSES, USE_GNU_READLINE,
USE_GNU_GETTEXT, etc. variables with something whose naming is a
bit more consistent and is integrated directly into the buildlink3
framework.
* Garbage-collect "$$pkg_prefix", which was used exclusively in
BUILDLINK_FILES_CMD.<pkg>. It no longer exists in the
buildlink3/pkgviews world. Packages _should_ _no_ _longer_
directly set the PREFIX variable in the package Makefile. As a
consequence, the various Java VM packages will need some changes
when they're converted to use buildlink3.
Prepending caused everything in ${BUILDLINK_DIR} to be found first, which
was bad when you built something like MesaLib where the X11R6 headers
conflict with the ones provided in the source.
need to protect the full path after "-o" from being transformed from
"/srcdir/shlib" to "-L/srcdir -lshlib". This fixes building
graphics/freetype2, which uses lots of full paths to sources and objects.
Changes include supporting XFree86-4.3.99.14 aka XFree86-current.
Added some new library versions and some freetype2 include files.
And bump the required version number in the bsd.buildlink mk's.
know read the arguments by first placing them in a buffer and taking
the argument in the first non-empty buffer as the argument to process.
The buffer is there to allow "splitting" an argument into multiple
arguments (currently up to five arguments), e.g. "-Wl,-R/path1:/path2"
is split into "-Wl,-R/path1" and "-Wl,-R/path2". Each split argument
is placed into a buffer. Using a buffer lets us read and process all
of the arguments in a single pass despite "pushing" more arguments
onto the front of the argument array.
the final installed location for the named shared library, and we
need to protect the full path from "/path/shlib" -> "-L/path -lshlib"
transformation.
their own files: buildcmd and quotearg, which are used to build up the
command line and to quote arguments. Also add the ability to skip
processing the next few arguments and add them directly to the command
line. Now, either the marshall script or the cache scripts can
request skipping the N arguments by setting skipargs=N.
strong cup of coffee. This now works the way it was intended: the
buildlink3.mk file sets a variable that can be checked within itself to
see whether it's already been included or not.
non-recursive dependencies. We now use the check:
.if !defined(BUILDLINK_PACKAGES) || empty(BUILDLINK_PACKAGES:Mfoo)
...
.endif
to replace the FOO_BUILDLINK3_MK guards.
BUILDLINK_{DEPENDS,PACKAGES} and use them throughout bsd.buildlink3.mk.
A lot of processing iterates over these variables and assumes that there
are no repeated items in those lists.
buildlink2/buildlink3 world. We "buildlink" libtool archives into
${BUILDLINK_DIR} and instruct libtool to find those *.la files before
any other ones.
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!
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).