Subject: CVS commit: pkgsrc
To: None <pkgsrc-changes@NetBSD.org>
From: Julio M. Merino Vidal <jmmv@netbsd.org>
List: pkgsrc-changes
Date: 04/14/2004 15:26:41
Module Name:	pkgsrc
Committed By:	jmmv
Date:		Wed Apr 14 15:26:41 UTC 2004

Modified Files:
	pkgsrc/misc/gnome-dirs: Makefile
	pkgsrc/misc/gnome1-dirs: Makefile
	pkgsrc/misc/gnome2-dirs: Makefile
	pkgsrc/misc/xdg-dirs: Makefile
	pkgsrc/misc/xdg-x11-dirs: Makefile
	pkgsrc/mk: bsd.pkg.mk
Added Files:
	pkgsrc/misc/gnome-dirs: dirs.mk
	pkgsrc/misc/gnome1-dirs: dirs.mk
	pkgsrc/misc/gnome2-dirs: dirs.mk
	pkgsrc/misc/xdg-dirs: dirs.mk
	pkgsrc/misc/xdg-x11-dirs: dirs.mk
	pkgsrc/mk: dirs.mk
Removed Files:
	pkgsrc/misc/gnome-dirs: Makefile.common
	pkgsrc/misc/xdg-dirs: Makefile.common

Log Message:
Rework the way to use the -dirs packages (ATM, xdg-dirs, xdg-x11-dirs,
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.


To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 pkgsrc/misc/gnome-dirs/Makefile
cvs rdiff -r1.7 -r0 pkgsrc/misc/gnome-dirs/Makefile.common
cvs rdiff -r0 -r1.1 pkgsrc/misc/gnome-dirs/dirs.mk
cvs rdiff -r1.13 -r1.14 pkgsrc/misc/gnome1-dirs/Makefile
cvs rdiff -r0 -r1.1 pkgsrc/misc/gnome1-dirs/dirs.mk
cvs rdiff -r1.15 -r1.16 pkgsrc/misc/gnome2-dirs/Makefile
cvs rdiff -r0 -r1.1 pkgsrc/misc/gnome2-dirs/dirs.mk
cvs rdiff -r1.3 -r1.4 pkgsrc/misc/xdg-dirs/Makefile
cvs rdiff -r1.1 -r0 pkgsrc/misc/xdg-dirs/Makefile.common
cvs rdiff -r0 -r1.1 pkgsrc/misc/xdg-dirs/dirs.mk
cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/misc/xdg-x11-dirs/Makefile
cvs rdiff -r0 -r1.1 pkgsrc/misc/xdg-x11-dirs/dirs.mk
cvs rdiff -r1.1440 -r1.1441 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/dirs.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.