Subject: New PLIST module in infrastructure
To: NetBSD Packages Technical Discussion List <>
From: Johnny Lam <>
List: tech-pkg
Date: 01/12/2006 18:48:42
This is a multi-part message in MIME format.
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I've just committed a new PLIST module as part of refactoring the pkgsrc 
infrastructure.  There are very few user-visible changes, other than 
some changed messages in the installation output.  If you'd like to test 
it, please add the following to your /etc/mk.conf:

	_USE_PLIST_MODULE=	# defined

Yes, the leading underscore variable is supposed to be there.  Please 
reply on this mailing list if you find any problems.


	-- Johnny Lam <>

Content-Type: message/rfc822;
 name="CVS commit: pkgsrc/mk"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="CVS commit: pkgsrc/mk"

From: "Johnny C. Lam" <>
Newsgroups: gmane.os.netbsd.devel.pkgsrc.cvs
Subject: CVS commit: pkgsrc/mk
Date: Thu, 12 Jan 2006 23:43:57 +0000 (UTC)
Message-ID: <>
NNTP-Posting-Date: Thu, 12 Jan 2006 23:44:06 +0000 (UTC)
Original-X-From: Fri Jan 13 00:44:04 2006
Return-path: <>
Original-Received: from ([])
	by with esmtp (Exim 4.43)
	id 1ExC6r-00071D-Ft
	for; Fri, 13 Jan 2006 00:44:01 +0100
Original-Received: by (Postfix, from userid 0)
	id 4BAAA63B276; Thu, 12 Jan 2006 23:43:58 +0000 (UTC)
Original-Received: from ( [])
	by (Postfix) with ESMTP id 5C75A63B268
	for <>; Thu, 12 Jan 2006 23:43:57 +0000 (UTC)
Original-Received: by (Postfix, from userid 500)
	id 57D3B2DA27; Thu, 12 Jan 2006 23:43:57 +0000 (UTC)
Xref: gmane.os.netbsd.devel.pkgsrc.cvs:70268
Archived-At: <>

Module Name:	pkgsrc
Committed By:	jlam
Date:		Thu Jan 12 23:43:57 UTC 2006

Modified Files:
Added Files:
	pkgsrc/mk/plist: doc-compress libtool-expand
	    plist-default.awk plist-functions.awk plist-info.awk
	    plist-libtool.awk plist-man.awk plist-subst.awk shlib-aout.awk shlib-dylib.awk shlib-elf.awk
	    shlib-none.awk shlib-type

Log Message:
Initial commit of a new module that encapsulates all of the code
for manipulating PLISTs.  This module is not used by default pending
more widespread testing -- currently the variable _USE_PLIST_MODULE
must be defined in /etc/mk.conf to enable its use.

The main features of the new PLIST module are:

    (1) Splits out the PLIST-handling code from into a
	separate "plist" module.

    (2) Splits out giant, multi-line awk scripts stored in make
	variables into separate awk scripts that may be joined
	together to post-process PLISTs.  Each of these awk scripts
	consolidates the processing for one set of files, e.g.,
	man pages, info pages, etc., and is more easily commented
	than a make variable.

    (3) Splits out the print-PLIST code from the regular PLIST code
	since they have no common pieces ( vs.

    (4) Completely re-implements the shared-library handling to be
	more efficient.  Along the way, this also fixes a problem
	for Mac OS X users where the PLISTs incorrectly contained
	absolute paths.

    (5) Completely re-implements the info-file handling so that we
	can migrate from INFO_FILES definitions to just adding
	info/ entries in the static PLISTs.

    (6) Adds commented-out support for automatically compressed or
	decompressed info page entries based on the value of MANZ.
	These changes will be activated after has been
	replaced by something that is built using the more modern
	primitives now available in pkgsrc.

    (7) Move the file compression logic into a separate script
	"doc-compress" that compresses or decompresses files while
	minding symlinks.  This script is now called by
	to do the "autmoatic man page handling".  In the future,
	it will also handle the "automatic info page handling" and
	possible others.

In general, the idea is to move stuff out of the Makefiles and into
separate files where we don't need to worry about quoting rules
and where each file can have a separate history of commits.  This
simplifies the makefile logic (especially in terms of readability)
and also simplifies maintenance of the code.

To generate a diff of this commit:
cvs rdiff -r1.1787 -r1.1788 pkgsrc/mk/
cvs rdiff -r1.21 -r1.22 pkgsrc/mk/platform/ pkgsrc/mk/platform/
cvs rdiff -r1.16 -r1.17 pkgsrc/mk/platform/
cvs rdiff -r1.15 -r1.16 pkgsrc/mk/platform/ \
cvs rdiff -r1.23 -r1.24 pkgsrc/mk/platform/
cvs rdiff -r1.20 -r1.21 pkgsrc/mk/platform/ \
    pkgsrc/mk/platform/ pkgsrc/mk/platform/
cvs rdiff -r1.47 -r1.48 pkgsrc/mk/platform/
cvs rdiff -r1.17 -r1.18 pkgsrc/mk/platform/
cvs rdiff -r1.10 -r1.11 pkgsrc/mk/platform/
cvs rdiff -r1.18 -r1.19 pkgsrc/mk/platform/
cvs rdiff -r0 -r1.1 pkgsrc/mk/plist/ pkgsrc/mk/plist/doc-compress \
    pkgsrc/mk/plist/libtool-expand pkgsrc/mk/plist/plist-default.awk \
    pkgsrc/mk/plist/plist-functions.awk pkgsrc/mk/plist/plist-info.awk \
    pkgsrc/mk/plist/plist-libtool.awk pkgsrc/mk/plist/plist-man.awk \
    pkgsrc/mk/plist/plist-subst.awk pkgsrc/mk/plist/ \
    pkgsrc/mk/plist/ pkgsrc/mk/plist/shlib-aout.awk \
    pkgsrc/mk/plist/shlib-dylib.awk pkgsrc/mk/plist/shlib-elf.awk \
    pkgsrc/mk/plist/shlib-none.awk pkgsrc/mk/plist/shlib-type

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