Subject: pkg/20450: patch to add pkgsrc option to force depends of gtexinfo
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 02/20/2003 11:56:09
>Number:         20450
>Category:       pkg
>Synopsis:       patch to add pkgsrc option to force depends of gtexinfo
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 20 11:57:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
Using packages on different (or changed) machines may not have required
install-info.

For example, built gmake on a machine that had valid install-info,
so gtexinfo was not a DEPENDS. Then installing gmake on another system
caused:

 sh: /usr/bin/install-info: No such file or directory
 pkg_add: command '/usr/bin/install-info /usr/info/make.info
 /usr/info/dir' failed

>How-To-Repeat:
	
>Fix:
This fix adds a DEPENDS_TEXINFO setting which forces the gtexinfo dependency.
Example, after used:
===> Registering installation for gmake-3.80nb1
gmake-3.80nb1 requires installed package gettext-lib-0.11.5
gmake-3.80nb1 requires installed package gtexinfo-4.5

Index: mk/bsd.pkg.defaults.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.defaults.mk,v
retrieving revision 1.130
diff -b -u -r1.130 bsd.pkg.defaults.mk
--- mk/bsd.pkg.defaults.mk	2003/02/16 23:56:12	1.130
+++ mk/bsd.pkg.defaults.mk	2003/02/20 19:40:06
@@ -572,6 +572,12 @@
 # Possible: YES, NO
 # Default: NO
 
+#DEPENDS_TEXINFO=
+# Used for mk/texinfo.mk to force the dependency of gtexinfo
+# even if build system already includes good install-info.
+# Possible: defined or not defined
+# Default: not defined
+
 DT_LAYOUT?= US
 # Used by dt package to specify the keyboard layout.
 # Possible: US, FI, FR, GER, DV
Index: mk/texinfo.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/texinfo.mk,v
retrieving revision 1.9
diff -b -u -r1.9 texinfo.mk
--- mk/texinfo.mk	2003/02/13 18:51:55	1.9
+++ mk/texinfo.mk	2003/02/20 19:40:06
@@ -2,9 +2,18 @@
 #
 # This Makefile fragment is included by packages that provide info files.
 #
+# Optionally define:
+#
+# DEPENDS_TEXINFO	force use and dependency of gtexinfo
 
 .if !defined(TEXINFO_MK)
 TEXINFO_MK=	# defined
+
+.include "../../mk/bsd.prefs.mk"
+
+.if defined(DEPENDS_TEXINFO)
+_NEED_TEXINFO=  # defined
+.endif
 
 # Does the system have the GNU texinfo tools and if yes, what version are they?
 _INSTALL_INFO=
>Release-Note:
>Audit-Trail:
>Unformatted: