Subject: New PLIST module in infrastructure
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.org>
From: Johnny Lam <jlam@pkgsrc.org>
List: tech-pkg
Date: 01/12/2006 18:48:42
This is a multi-part message in MIME format.
--------------080400030007050006030309
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.

	Cheers,

	-- Johnny Lam <jlam@pkgsrc.org>

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

Path: news.gmane.org!not-for-mail
From: "Johnny C. Lam" <jlam@netbsd.org>
Newsgroups: gmane.os.netbsd.devel.pkgsrc.cvs
Subject: CVS commit: pkgsrc/mk
Date: Thu, 12 Jan 2006 23:43:57 +0000 (UTC)
Approved: news@gmane.org
Message-ID: <20060112234357.57D3B2DA27@cvs.netbsd.org>
Reply-To: jlam@netbsd.org
NNTP-Posting-Host: main.gmane.org
NNTP-Posting-Date: Thu, 12 Jan 2006 23:44:06 +0000 (UTC)
Original-X-From: bounces-pkgsrc-changes-owner-netbsd-pkgsrc-changes=m.gmane.org@NetBSD.org Fri Jan 13 00:44:04 2006
Return-path: <bounces-pkgsrc-changes-owner-netbsd-pkgsrc-changes=m.gmane.org@NetBSD.org>
Envelope-to: netbsd-pkgsrc-changes@m.gmane.org
Original-Received: from mail.netbsd.org ([204.152.190.11])
	by ciao.gmane.org with esmtp (Exim 4.43)
	id 1ExC6r-00071D-Ft
	for netbsd-pkgsrc-changes@m.gmane.org; Fri, 13 Jan 2006 00:44:01 +0100
Original-Received: by mail.netbsd.org (Postfix, from userid 0)
	id 4BAAA63B276; Thu, 12 Jan 2006 23:43:58 +0000 (UTC)
Original-Received: from cvs.netbsd.org (cvs.netbsd.org [204.152.190.10])
	by mail.netbsd.org (Postfix) with ESMTP id 5C75A63B268
	for <pkgsrc-changes@NetBSD.org>; Thu, 12 Jan 2006 23:43:57 +0000 (UTC)
Original-Received: by cvs.netbsd.org (Postfix, from userid 500)
	id 57D3B2DA27; Thu, 12 Jan 2006 23:43:57 +0000 (UTC)
Original-To: pkgsrc-changes@NetBSD.org
Original-Sender: pkgsrc-changes-owner@NetBSD.org
Xref: news.gmane.org gmane.os.netbsd.devel.pkgsrc.cvs:70268
Archived-At: <http://permalink.gmane.org/gmane.os.netbsd.devel.pkgsrc.cvs/70268>


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

Modified Files:
	pkgsrc/mk: bsd.pkg.mk
	pkgsrc/mk/platform: AIX.mk BSDOS.mk Darwin.mk DragonFly.mk FreeBSD.mk
	    IRIX.mk Interix.mk Linux.mk NetBSD.mk OSF1.mk OpenBSD.mk SunOS.mk
	    UnixWare.mk
Added Files:
	pkgsrc/mk/plist: bsd.plist.mk doc-compress libtool-expand
	    plist-default.awk plist-functions.awk plist-info.awk
	    plist-libtool.awk plist-man.awk plist-subst.awk plist.mk
	    print-plist.mk 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 bsd.pkg.mk 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 (print-plist.mk vs.
	plist.mk).

    (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/foo.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 texinfo.mk 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 bsd.pkg.mk
	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/bsd.pkg.mk
cvs rdiff -r1.21 -r1.22 pkgsrc/mk/platform/AIX.mk pkgsrc/mk/platform/Linux.mk
cvs rdiff -r1.16 -r1.17 pkgsrc/mk/platform/BSDOS.mk
cvs rdiff -r1.15 -r1.16 pkgsrc/mk/platform/Darwin.mk \
    pkgsrc/mk/platform/FreeBSD.mk
cvs rdiff -r1.23 -r1.24 pkgsrc/mk/platform/DragonFly.mk
cvs rdiff -r1.20 -r1.21 pkgsrc/mk/platform/IRIX.mk \
    pkgsrc/mk/platform/OpenBSD.mk pkgsrc/mk/platform/SunOS.mk
cvs rdiff -r1.47 -r1.48 pkgsrc/mk/platform/Interix.mk
cvs rdiff -r1.17 -r1.18 pkgsrc/mk/platform/NetBSD.mk
cvs rdiff -r1.10 -r1.11 pkgsrc/mk/platform/OSF1.mk
cvs rdiff -r1.18 -r1.19 pkgsrc/mk/platform/UnixWare.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/plist/bsd.plist.mk 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/plist.mk \
    pkgsrc/mk/plist/print-plist.mk 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.



--------------080400030007050006030309--