Subject: Heads up! New texinfo handling framework in pkgsrc
To: None <email@example.com>
From: Stoned Elipot <firstname.lastname@example.org>
Date: 02/18/2002 16:23:12
I have committed a new framework for dealing with info files, makeinfo and
install-info commands in the NetBSD Packages Collections.
I converted all required packages to this framework.
I went trough extensive tests but errors may have slipped trough. Thanks in
advance for your help and patience in catching them.
A new section (10.24) was added in pkgsrc/Packages.txt to explain why and how
this framework was introduced. I enclose it here for your convenience.
10.24 Packages providing info files
Some packages install info files or use the makeinfo or install-info
commands. In such cases, the makefile fragment mk/texinfo.mk should be included
in the package Makefile before the inclusion of mk/bsd.pkg.mk.
Newer versions of texinfo (version 4 and above) are, unfortunately,
incompatible, at the command line level, from previous versions and some
extensions were introduced in the TeXinfo macro set. So the package creator
should ensure that the correct binaries are selected, rather than relying on
the contents of the PATH variable in the shell.
The main info directory file needs to be updated to reflect the installation
of the info files. Some package's installation process take care of this
for you. Otherwise the NetBSD Packages Collection has an INFO_FILES
definition which can be used to do this. Simply use the
definition in the package Makefile, where "ident.info" is the name of the info
file which installs an info dir entry.
A package creator should also take care that the package build and
install process uses correct version of the makeinfo and install-info commands.
Some Makefiles and configure scripts from recent software packages include the
pathnames to the makeinfo and install-info commands. Unfortunately, older
software packages tend not to do this, and, should this be the case, further
action is required of the package creator.
The mk/texinfo.mk makefile fragment will ensure that proper makeinfo and
install-info commands are available on the system as well as help to the
configure and build process of the package to use known binaries for these
If a minimum version of makeinfo and install-info commands are required
define TEXINFO_REQD in the package's Makefile to this mininum version.
If a package is not well behaved (i.e. it does not pick MAKEINFO or
INSTALL_INFO in the environment at configure or build time) you should
- whatever is more appropriate:
a) patch the package files so MAKEINFO or INSTALL_INFO are picked from the
environment at configure or build time and get used instead of
relying on makeinfo or install-info being accessible in PATH;
b) put TEXINFO_OVERRIDE=YES in the package Makefile to let some
sed manipulation on some packages source files (see mk/texinfo.mk content).
Some statistics about the modifications I made:
- 144 packages were modified of which:
- 113 packages mostly or only needed to include ../../mk/texinfo.mk in their
Makefile and to have their PLIST adjusted (install-info replaced by
- 29 packages needed the TEXINFO_OVERRIDE "switch"
- 1 package was marked requiring a minimum GNU TeXinfo tools version with
TEXINFO_REQD, this figure is expected to grow...
- 7 packages ended up with brand new or tuned patch files.
- a couple of package Makefiles were tuned about the usage of INFO_FILES
and/or the usage of the makeinfo command
Hum... I may have made some mistakes in these statistics, but the general
trend looks ok.
The best way to check if a new or existing package conform to this framework is:
1) move aside any makeinfo and install-info commands in a directory not
picked up by PATH
2) adjusting _INSTALL_INFO in pkgsrc/mk/texinfo.mk to the temporary location
of install-info (it is assumed that makeinfo lives in the same directory)
3) try to build *and* install the package.
4) fix the package if step 3 failed
Of course with some habit these steps are not required, a package creator
could pick up with the things to watch for and take appropriate course.
These things can be reduce to: do not let the build or install process
of a package pick up by itself the makeinfo or install-info commands pathnames
or relying on them being accessible in PATH.
You know who to blame if something goes wrong... ;)