From pfeifer@dbai.tuwien.ac.at  Sat Jul 26 07:55:44 2003
Return-Path: <pfeifer@dbai.tuwien.ac.at>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2B9EB37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 26 Jul 2003 07:55:44 -0700 (PDT)
Received: from vexpert.dbai.tuwien.ac.at (vexpert.dbai.tuwien.ac.at [128.131.111.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3A10343F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 26 Jul 2003 07:55:43 -0700 (PDT)
	(envelope-from pfeifer@dbai.tuwien.ac.at)
Received: from acrux.dbai.tuwien.ac.at (acrux [128.131.111.60])
	by vexpert.dbai.tuwien.ac.at (Postfix) with ESMTP
	id EA1BD1378D; Sat, 26 Jul 2003 16:55:41 +0200 (CEST)
Received: (from pfeifer@localhost)
	by acrux.dbai.tuwien.ac.at (8.12.8p1/8.12.8/Submit) id h6QEtjZT001509;
	Sat, 26 Jul 2003 16:55:45 +0200 (CEST)
	(envelope-from pfeifer)
Message-Id: <200307261455.h6QEtjZT001509@acrux.dbai.tuwien.ac.at>
Date: Sat, 26 Jul 2003 16:55:45 +0200 (CEST)
From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Add ports infrastructure for info files
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         54883
>Category:       ports
>Synopsis:       Add ports infrastructure for info files
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 26 08:00:15 PDT 2003
>Closed-Date:    Sun Aug 03 18:18:35 PDT 2003
>Last-Modified:  Sun Aug 03 18:18:35 PDT 2003
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
>Environment:
>Description:
	The ports collection has had support for man pages for a long
	time, but lacks direct support for info files (as generated by
	GNU makeinfo).

	This means that for every file, pkg-plist needs to include one
	@exec and one @unexec entry per file, and one or more entries
	for the individual pieces of that file.

	Furthermore, and this is a serious problem since the recent 
	updates of texinfo/makeinfo, one texinfo file may be split
	into different numbers of .info and .info-* files.
	
>How-To-Repeat:
>Fix:
	The patch below adds support for a new entry INFO in ports
	Makefiles that accepts a list of info-files and handles pkg-plist
	fully automatically.

	We can only determine the actual number/names of the
	.info-{1,2,3,...} files _after_ installation, so we cannot
	add the new functionality to the generate-plist target.

	(Given that David O'Brien's similar machinery in the lang/gcc3x
	ports has been tested in the field for a long time, and my tests
	with the cfengine2 port which has info documentations consisting
	both of single and multiple files also worked fine, I hope this
	is acceptable.)

Index: bsd.port.mk
===================================================================
RCS file: /sw/FreeBSD/CVSUP/ports/Mk/bsd.port.mk,v
retrieving revision 1.457
diff -u -3 -p -r1.457 bsd.port.mk
--- bsd.port.mk	22 Jul 2003 03:51:15 -0000	1.457
+++ bsd.port.mk	23 Jul 2003 23:10:07 -0000
@@ -526,6 +526,11 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 #				  is set and NO_INSTALL_MANPAGES is not set, and
 #				  "no" otherwise.
 #
+# Set the following to specify all .info files your port installs.
+#
+# INFO			- A list of .info files (omitting the trailing ".info");
+#				  only one entry per document!
+#
 # Default targets and their behaviors:
 #
 # fetch			- Retrieves ${DISTFILES} (and ${PATCHFILES} if defined)
@@ -3212,7 +3217,7 @@ _INSTALL_SEQ=	install-message check-cate
 			    run-depends lib-depends pre-install pre-install-script \
 				generate-plist check-already-installed
 _INSTALL_SUSEQ= check-umask install-mtree pre-su-install \
-				pre-su-install-script do-install post-install \
+				pre-su-install-script do-install add-plist-info post-install \
 				post-install-script compress-man run-ldconfig fake-pkg \
 				security-check
 _PACKAGE_DEP=	install
@@ -4251,6 +4256,15 @@ generate-plist:

 ${TMPPLIST}:
 	@cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} generate-plist
+
+add-plist-info:
+.for i in ${INFO}
+	@${ECHO_CMD} "@unexec install-info --delete %D/info/$i.info %D/info/dir" \
+		>> ${TMPPLIST}
+	@${LS} ${PREFIX}/info/$i.info* | ${SED} -e s:${PREFIX}/::g >> ${TMPPLIST}
+	@${ECHO_CMD} "@exec install-info %D/info/$i.info %D/info/dir" \
+		>> ${TMPPLIST}
+.endfor

 # Compress (or uncompress) and symlink manpages.
 .if !target(compress-man)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: gerald 
Responsible-Changed-When: Sat Jul 26 08:08:38 PDT 2003 
Responsible-Changed-Why:  
This is portmgr stuff (and Kris will take care of it to help address the 
recent makeinfo "breakage"). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54883 
State-Changed-From-To: open->analyzed 
State-Changed-By: kris 
State-Changed-When: Sun Jul 27 18:00:56 PDT 2003 
State-Changed-Why:  
A modified version of this patch (folded the add-plist-info 
target into generate-plist) is being tested on the current 
package run. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54883 

From: Kris Kennaway <kris@obsecurity.org>
To: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/54883: Add ports infrastructure for info files
Date: Sun, 3 Aug 2003 18:07:03 -0700

 On Mon, Jul 28, 2003 at 03:36:12PM +0200, Gerald Pfeifer wrote:
 > On Sun, 27 Jul 2003, Kris Kennaway wrote:
 > > State-Changed-Why:
 > > A modified version of this patch (folded the add-plist-info
 > > target into generate-plist) is being tested on the current
 > > package run.
 > 
 > Did you also make other changes (such as running generate-plist after
 > do-install) along the way?
 > 
 > If not, I'm afraid the patch won't work with your change for the reasons
 > I had noted in the PR (where "won't work" means that it will pass the
 > current round of testing, as this feature is never used there, but will
 > fail when used).
 > 
 > Or am I missing something?
 
 OK, I hadn't noticed the ls there.  I'm not sure that's the best way
 to obtain the information about which info files were installed, but
 it will do for now.  I restored your original patch and tested it a
 bit more with the plwm port as a test-case.  This port seems to
 install the info files in post-install, which causes the info file to
 fail to register.  This might be possible to work around.
 
 Kris
 
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: kris 
State-Changed-When: Sun Aug 3 18:17:56 PDT 2003 
State-Changed-Why:  
Patch committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54883 
>Unformatted:
