head	1.8;
access;
symbols
	pkgsrc-2013Q2:1.8.0.38
	pkgsrc-2013Q2-base:1.8
	pkgsrc-2012Q4:1.8.0.36
	pkgsrc-2012Q4-base:1.8
	pkgsrc-2011Q4:1.8.0.34
	pkgsrc-2011Q4-base:1.8
	pkgsrc-2011Q2:1.8.0.32
	pkgsrc-2011Q2-base:1.8
	pkgsrc-2009Q4:1.8.0.30
	pkgsrc-2009Q4-base:1.8
	pkgsrc-2008Q4:1.8.0.28
	pkgsrc-2008Q4-base:1.8
	pkgsrc-2008Q3:1.8.0.26
	pkgsrc-2008Q3-base:1.8
	cube-native-xorg:1.8.0.24
	cube-native-xorg-base:1.8
	pkgsrc-2008Q2:1.8.0.22
	pkgsrc-2008Q2-base:1.8
	pkgsrc-2008Q1:1.8.0.20
	pkgsrc-2008Q1-base:1.8
	pkgsrc-2007Q4:1.8.0.18
	pkgsrc-2007Q4-base:1.8
	pkgsrc-2007Q3:1.8.0.16
	pkgsrc-2007Q3-base:1.8
	pkgsrc-2007Q2:1.8.0.14
	pkgsrc-2007Q2-base:1.8
	pkgsrc-2007Q1:1.8.0.12
	pkgsrc-2007Q1-base:1.8
	jlam-pkgviews:1.8.0.10
	jlam-pkgviews-base:1.8
	pkgsrc-2006Q4:1.8.0.8
	pkgsrc-2006Q4-base:1.8
	pkgsrc-2006Q3:1.8.0.6
	pkgsrc-2006Q3-base:1.8
	pkgsrc-2006Q2:1.8.0.4
	pkgsrc-2006Q2-base:1.8
	tv-derecurse-eol:1.7
	pkgsrc-2006Q1:1.8.0.2
	pkgsrc-2006Q1-base:1.8
	pkgsrc-2005Q4:1.7.0.20
	pkgsrc-2005Q4-base:1.7
	pkgsrc-2005Q3:1.7.0.18
	pkgsrc-2005Q3-base:1.7
	pkgsrc-2005Q2:1.7.0.16
	pkgsrc-2005Q2-base:1.7
	tv-derecurse-merge:1.7
	pkgsrc-2005Q1:1.7.0.14
	pkgsrc-2005Q1-base:1.7
	pkgsrc-2004Q4:1.7.0.12
	pkgsrc-2004Q4-base:1.7
	tv-derecurse:1.7.0.10
	tv-derecurse-base:1.7
	pkgsrc-2004Q3:1.7.0.8
	pkgsrc-2004Q3-base:1.7
	pkgsrc-2004Q2:1.7.0.6
	pkgsrc-2004Q2-base:1.7
	pkgsrc-2004Q1:1.7.0.4
	pkgsrc-2004Q1-base:1.7
	pkgsrc-2003Q4:1.7.0.2
	pkgsrc-2003Q4-base:1.7
	pkgviews-base:1.3
	pkgviews-mk:1.3.0.4
	pkgviews:1.3.0.2
	pkgviews-mk-base:1.4;
locks; strict;
comment	@# @;


1.8
date	2006.03.09.00.20.27;	author jlam;	state dead;
branches;
next	1.7;

1.7
date	2003.11.23.07.03.07;	author jlam;	state Exp;
branches
	1.7.10.1;
next	1.6;

1.6
date	2003.09.27.14.53.46;	author seb;	state Exp;
branches;
next	1.5;

1.5
date	2003.09.02.07.00.08;	author jlam;	state Exp;
branches;
next	1.4;

1.4
date	2003.08.22.18.17.03;	author seb;	state Exp;
branches;
next	1.3;

1.3
date	2003.06.25.22.45.14;	author seb;	state Exp;
branches
	1.3.2.1
	1.3.4.1;
next	1.2;

1.2
date	2003.06.25.20.51.25;	author seb;	state Exp;
branches;
next	1.1;

1.1
date	2003.06.19.21.41.15;	author seb;	state Exp;
branches;
next	;

1.7.10.1
date	2006.06.07.15.25.39;	author tv;	state dead;
branches;
next	;

1.3.2.1
date	2003.06.25.22.45.14;	author seb;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2003.06.25.22.45.15;	author seb;	state Exp;
branches;
next	;

1.3.4.1
date	2003.07.24.23.45.10;	author jlam;	state Exp;
branches;
next	1.3.4.2;

1.3.4.2
date	2003.07.30.10.12.11;	author jlam;	state Exp;
branches;
next	1.3.4.3;

1.3.4.3
date	2003.08.23.09.45.56;	author jlam;	state Exp;
branches;
next	1.3.4.4;

1.3.4.4
date	2003.08.25.05.08.22;	author jlam;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Reimplement the info-file handling so that we use an +INFO_FILES
scriptlet to manage the info-file registration.  The new scriptlet's
template is install/info-files.  Remove obsolete texinfo.mk and
install/install-info.

No changes to package Makefiles are necessary -- the re-implementation
is internal to pkgsrc infrastructure.
@
text
@# $NetBSD: install-info,v 1.7 2003/11/23 07:03:07 jlam Exp $
#
# Handle registration of Info files; used by texinfo.mk.
#

INFO_FILES="@@INFO_FILES@@"
INSTALL_INFO="@@INSTALL_INFO@@"
INFO_DIR="@@INFO_DIR@@"

case ${STAGE} in
VIEW-INSTALL)
	if [ -f ${PKG_PREFIX}/${INFO_DIR}/dir ]; then
		_nentries="`${GREP} -c '^\*' ${PKG_PREFIX}/${INFO_DIR}/dir 2>/dev/null`"
		if [ x"${_nentries}" != x -a "${_nentries}" -lt 1 ]; then
			${RM} ${PKG_PREFIX}/${INFO_DIR}/dir
		fi

	fi
	for f in ${INFO_FILES}; do
		${INSTALL_INFO} --delete --info-dir=${PKG_PREFIX}/${INFO_DIR} \
		   ${PKG_PREFIX}/${INFO_DIR}/${f} 1>/dev/null 2>&1
		${INSTALL_INFO} --info-dir=${PKG_PREFIX}/${INFO_DIR} \
		   ${PKG_PREFIX}/${INFO_DIR}/${f}
	done
	;;

VIEW-DEINSTALL)
	for f in ${INFO_FILES}; do
		${INSTALL_INFO} --delete --info-dir=${PKG_PREFIX}/${INFO_DIR} \
		   ${PKG_PREFIX}/${INFO_DIR}/${f} 1>/dev/null 2>&1
	done
	_nentries="`${GREP} -c '^\*' ${PKG_PREFIX}/${INFO_DIR}/dir 2>/dev/null`"
	if [ x"${_nentries}" != x -a "${_nentries}" -le 1 ]; then
		${RM} ${PKG_PREFIX}/${INFO_DIR}/dir
	fi
	;;
esac
@


1.7
log
@Add some whitespace.
@
text
@d1 1
a1 1
# $NetBSD: install-info,v 1.6 2003/09/27 14:53:46 seb Exp $
@


1.7.10.1
log
@EOL the tv-derecurse branch; it has become too outdated.  The last live
revision can be fetched at the tv-derecurse-eol tag.
@
text
@d1 1
a1 1
# $NetBSD: install-info,v 1.7 2003/11/23 07:03:07 jlam Exp $
@


1.6
log
@Add CVS signature. Noted by reed@@.
@
text
@d1 1
a1 1
# $NetBSD$
d26 1
@


1.5
log
@Merge pkgviews-mk branch into the HEAD by running:

	cd pkgsrc/mk
	cvs update -Pd -A
	cvs update -Pd -j pkgviews-mk-base -j pkgviews-mk
@
text
@d1 1
a1 1
# $NetBSD
@


1.4
log
@Try to deal with empty or "corrupted" Info directory file:  if the
file exist when installing a package and it does not contain  at
least one line starting with '*' then remove it and let install-info
create a new one.

This should address PR pkg/22555 from reed@@.
@
text
@d11 1
a11 1
POST-INSTALL)
d26 1
a26 1
DEINSTALL)
@


1.3
log
@Better error handling.
@
text
@d12 7
@


1.3.2.1
log
@file install-info was added on branch pkgviews on 2003-06-25 22:45:15 +0000
@
text
@d1 29
@


1.3.2.2
log
@Better error handling.
@
text
@a0 29
# $NetBSD
#
# Handle registration of Info files; used by texinfo.mk.
#

INFO_FILES="@@INFO_FILES@@"
INSTALL_INFO="@@INSTALL_INFO@@"
INFO_DIR="@@INFO_DIR@@"

case ${STAGE} in
POST-INSTALL)
	for f in ${INFO_FILES}; do
		${INSTALL_INFO} --delete --info-dir=${PKG_PREFIX}/${INFO_DIR} \
		   ${PKG_PREFIX}/${INFO_DIR}/${f} 1>/dev/null 2>&1
		${INSTALL_INFO} --info-dir=${PKG_PREFIX}/${INFO_DIR} \
		   ${PKG_PREFIX}/${INFO_DIR}/${f}
	done
	;;
DEINSTALL)
	for f in ${INFO_FILES}; do
		${INSTALL_INFO} --delete --info-dir=${PKG_PREFIX}/${INFO_DIR} \
		   ${PKG_PREFIX}/${INFO_DIR}/${f} 1>/dev/null 2>&1
	done
	_nentries="`${GREP} -c '^\*' ${PKG_PREFIX}/${INFO_DIR}/dir 2>/dev/null`"
	if [ x"${_nentries}" != x -a "${_nentries}" -le 1 ]; then
		${RM} ${PKG_PREFIX}/${INFO_DIR}/dir
	fi
	;;
esac
@


1.3.4.1
log
@Teach the bsd.pkg.install.mk framework about the VIEW-INSTALL and
VIEW-DEINSTALL actions.  Info file handling and shell registration now
occur at VIEW-{INSTALL,DEINSTALL} time.  Config file handling continues to
be done at POST-INSTALL and at DEINSTALL time.

For non-depoted packages (packages that have PKG_INSTALLATION_TYPE set to
"overwrite"), the DEINSTALL action is automatically preceded by the
VIEW-DEINSTALL action, and the POST-INSTALL action is automatically
succeeded by the VIEW-INSTALL action.  This allows the new scripts to work
with "overwrite" packages.
@
text
@d11 1
a11 1
VIEW-INSTALL)
d19 1
a19 1
VIEW-DEINSTALL)
@


1.3.4.2
log
@Do the info/dir file manipulation in the depot directory too.  This makes
the depoted package a bit more standalone.
@
text
@d11 1
a11 1
POST-INSTALL|VIEW-INSTALL)
d19 1
a19 1
VIEW-DEINSTALL|DEINSTALL)
@


1.3.4.3
log
@Sync to HEAD.
@
text
@a11 7
	if [ -f ${PKG_PREFIX}/${INFO_DIR}/dir ]; then
		_nentries="`${GREP} -c '^\*' ${PKG_PREFIX}/${INFO_DIR}/dir 2>/dev/null`"
		if [ x"${_nentries}" != x -a "${_nentries}" -lt 1 ]; then
			${RM} ${PKG_PREFIX}/${INFO_DIR}/dir
		fi

	fi
@


1.3.4.4
log
@Don't do the info file handling at POST-INSTALL and DEINSTALL times,
instead reserving it for when adding to or deleting from a view.  This
prevents dir files from overwriting each other if we move a depoted package
directly into a view directory.
@
text
@d11 1
a11 1
VIEW-INSTALL)
d26 1
a26 1
VIEW-DEINSTALL)
@


1.2
log
@At DEINSTALL time after un-registering info files from the Info
directory file remove it if it is empty i.e. if it contains only one
menu/entry line i.e. only one line starting with '*'.

This allow INFO_DIR to be set to a package specific directory while
not registering in the PLIST the Info directory file (${INFOR_DIR}/dir).

Registering such an Info directory file in the PLIST is not really
possible as a md5 signature of it holding the registered info entries
would be stored in PKG_DBDIR. At deinstall time this signature would not be
matched because the DEINSTALL script would have modified it by
un-registering the info files from it. Hence the package removal would
be reported as incomplete...

You are probably right if this looks like a hack to you...
@
text
@d24 2
a25 2
	_nentries="`${GREP} -c '^\*' ${PKG_PREFIX}/${INFO_DIR}/dir`"
	if [ "${_nentries}" -le 1 ]; then
@


1.1
log
@Introduce a new framework to handle info files, install-info and
makeinfo commands.

The goal of the new framework is twofold:
        - reduce the number of '@@exec' and '@@unexec' in PLIST by
using INSTALL/DEINSTALL scripts to handle entries addition/removal
Info directory file.
        - achieve lighter dependencies by avoiding unnecessary run-time
dependency on the gtexinfo package and if needed with the help of the
standalone install-info command provided by the recently imported package
pkgtools/pkg_install-info.

A package must be sightly updated to use this new framework and
must define the variable USE_NEW_TEXINFO. This variable will
be removed from the pkgsrc tree when all package would have been
updated.

For details see section 10.24 of Packages.txt, comments in
mk/{texinfo.mk,buildlink2/bsd.buildlink2.mk} and upcoming mail to
<tech-pkg at netbsd dot org>.
@
text
@d24 4
@

