that these directories will be conditionally removed (based on reference
counts), regardless of the value of PKG_CONFIG. Bump the PKGREVISION
for packages that were modified as a result.
Several changes are involved since they are all interrelated. These
changes affect about 1000 files.
The first major change is rewriting bsd.builtin.mk as well as all of
the builtin.mk files to follow the new example in bsd.builtin.mk.
The loop to include all of the builtin.mk files needed by the package
is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk
is now included by each of the individual builtin.mk files and provides
some common logic for all of the builtin.mk files. Currently, this
includes the computation for whether the native or pkgsrc version of
the package is preferred. This causes USE_BUILTIN.* to be correctly
set when one builtin.mk file includes another.
The second major change is teach the builtin.mk files to consider
files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most
of the builtin.mk files test for the presence of built-in software by
checking for the existence of certain files, e.g. <pthread.h>, and we
now assume that if that file is under ${LOCALBASE}, then it must be
from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The
exceptions to this new check are the X11 distribution packages, which
are handled specially as noted below.
The third major change is providing builtin.mk and version.mk files
for each of the X11 distribution packages in pkgsrc. The builtin.mk
file can detect whether the native X11 distribution is the same as
the one provided by pkgsrc, and the version.mk file computes the
version of the X11 distribution package, whether it's built-in or not.
The fourth major change is that the buildlink3.mk files for X11 packages
that install parts which are part of X11 distribution packages, e.g.
Xpm, Xcursor, etc., now use imake to query the X11 distribution for
whether the software is already provided by the X11 distribution.
This is more accurate than grepping for a symbol name in the imake
config files. Using imake required sprinkling various builtin-imake.mk
helper files into pkgsrc directories. These files are used as input
to imake since imake can't use stdin for that purpose.
The fifth major change is in how packages note that they use X11.
Instead of setting USE_X11, package Makefiles should now include
x11.buildlink3.mk instead. This causes the X11 package buildlink3
and builtin logic to be executed at the correct place for buildlink3.mk
and builtin.mk files that previously set USE_X11, and fixes packages
that relied on buildlink3.mk files to implicitly note that X11 is
needed. Package buildlink3.mk should also include x11.buildlink3.mk
when linking against the package libraries requires also linking
against the X11 libraries. Where it was obvious, redundant inclusions
of x11.buildlink3.mk have been removed.
gnome1-dirs and gnome2-dirs):
- Introduce a global USE_DIRS variable, which takes pairs of names and
versions. For example, an xdg-1.1 value will request the use of the
xdg-dirs package, at least version 1.1. This variable must always be
appended to. If there are duplicates with different versions, the
one with the higher number will be picked up.
- Introduce the mk/dirs.mk file, which is automatically included by
bsd.pkg.mk when USE_DIRS is not empty. It parses the variable's value
and includes the required dirs.mk files, present in each -dirs package.
- For each -dirs package, add a dirs.mk file that defines a variable
holding the list of directories provided by it, adds a dependency on
that package, and modifies the PRINT_PLIST_AWK variable to output
comments for the directories handled by it.
- Drop some Makefile.common files that only make things difficult and
more confusing now (in favour of the new dirs.mk files). The only thing
to worry about is to keep version numbers consistent across xdg-* and
gnome*-* packages, but that will be easier to handle.
The main reason for this change is to be able to modify PRINT_PLIST_AWK in
a clean way, but I hope this will improve clarity too. Also, this simplifies
the addition of future -dirs packages (if needed) in a consistent way.
xdg-x11-dirs installs a set of shared directories used by freedesktop.org
XDG based systems (kde 3.2 and gnome 2.4). It is useful to simplify PLIST
handling in other packages.
This package differs from xdg-dirs in that shared directories are created
under X11's tree. Has no effect if using xpkgwedge, other than depending
directly on xdg-dirs.