Date: Wed, 21 May 1997 01:29:58 -0700 (PDT) From: asami@vader.cs.berkeley.edu (Satoshi Asami) To: ports@freebsd.org Subject: new info system Message-ID: <199705210829.BAA06909@silvia.HIP.Berkeley.EDU>
next in thread | raw e-mail | index | archive | help
Seems like nobody is interested in updating ports to use the new info system now available in 2.2.2 as well as -current. It's really nice to be able to add/delete entries to the info/dir file from ports/ packages, can you guys please see what you can do about your ports? ;) This is what you (as a porter) need to know: === ## install-info --help install-info [OPTION]... [INFO-FILE [DIR-FILE]] Install INFO-FILE in the Info directory file DIR-FILE. Options: --delete Delete existing entries in INFO-FILE; don't insert any new entries. : === Note that this program will NOT actually install info files; it merely inserts or deletes entries in the dir file. Here's my five-step procedure to convert ports to use install-info. I will use editors/emacs for an example. (1) Look at the texinfo sources and make a patch to insert appropriate entries. This is a patch for editors/emacs: ======= --- ./man/vip.texi.org Fri Jun 16 15:31:11 1995 +++ ./man/vip.texi Tue May 20 01:28:33 1997 @@ -2,6 +2,10 @@ @setfilename ../info/vip @settitle VIP +@dircategory The Emacs editor and associated tools +@direntry +* VIP: (vip). A VI-emulation for Emacs. +@end direntry @iftex @finalout --- ./man/emacs.texi.org Mon Aug 19 21:15:12 1996 +++ ./man/emacs.texi Tue May 20 01:20:11 1997 @@ -49,6 +49,11 @@ @settitle GNU Emacs Manual @setfilename ../info/emacs @synindex pg cp +@dircategory The Emacs editor and associated tools +@direntry +* Emacs: (emacs). The extensible self-documenting text editor. +@end direntry + @c @c in general, keep the following line commented out, unless doing a @c copy of this manual that will be published. the manual should go --- ./man/viper.texi.org Wed Aug 7 10:59:45 1996 +++ ./man/viper.texi Tue May 20 01:29:17 1997 @@ -4,6 +4,10 @@ \input texinfo @setfilename ../info/viper +@dircategory The Emacs editor and associated tools +@direntry +* VIPER: (viper). The new VI-emulation mode in Emacs-19.29. +@end direntry @iftex @finalout --- ./man/forms.texi.org Sat Mar 23 06:42:27 1996 +++ ./man/forms.texi Tue May 20 01:22:37 1997 @@ -9,6 +9,11 @@ @syncodeindex vr cp @syncodeindex fn cp @syncodeindex ky cp +@dircategory The Emacs editor and associated tools +@direntry +* Forms: (forms). Emacs package for editing data bases + by filling in forms. +@end direntry @iftex @finalout @setchapternewpage odd --- ./man/gnus.texi.org Wed Jun 26 14:49:29 1996 +++ ./man/gnus.texi Tue May 20 01:23:15 1997 @@ -5,6 +5,11 @@ @synindex fn cp @synindex vr cp @synindex pg cp +@dircategory The Emacs editor and associated tools +@direntry +* GNUS: (gnus). The news reader GNUS. +@end direntry + @iftex @finalout @end iftex --- ./man/mh-e.texi.org Sun Aug 4 00:00:29 1996 +++ ./man/mh-e.texi Tue May 20 01:23:49 1997 @@ -4,6 +4,10 @@ @setfilename ../info/mh-e @settitle mh-e @c %**end of header +@dircategory The Emacs editor and associated tools +@direntry +* MH-E: (mh-e). Emacs interface to the MH mail system. +@end direntry @setchapternewpage odd --- ./man/cl.texi.org Mon Apr 15 21:36:53 1996 +++ ./man/cl.texi Tue May 20 01:24:18 1997 @@ -2,6 +2,12 @@ @setfilename ../info/cl @settitle Common Lisp Extensions +@dircategory The Emacs editor and associated tools +@direntry +* CL: (cl). Partial Common Lisp support for Emacs Lisp. +@end direntry + + @iftex @finalout @end iftex --- ./man/sc.texi.org Thu Jan 4 12:55:23 1996 +++ ./man/sc.texi Tue May 20 01:25:13 1997 @@ -3,6 +3,12 @@ @comment %**start of header (This is for running Texinfo on a region.) @setfilename ../info/sc @settitle Supercite Version 3.1 User's Manual +@dircategory The Emacs editor and associated tools +@direntry +* SC: (sc). Supercite lets you cite parts of messages you're + replying to, in flexible ways. +@end direntry + @iftex @finalout @end iftex --- ./man/dired-x.texi.org Thu Jan 4 12:54:19 1996 +++ ./man/dired-x.texi Tue May 20 01:25:55 1997 @@ -18,6 +18,11 @@ @setfilename ../info/dired-x @c dired-x.el REVISION NUMBER @settitle Dired Extra Version 2 User's Manual +@dircategory The Emacs editor and associated tools +@direntry +* Dired-X: (dired-x). Dired Extra Features. +@end direntry + @iftex @finalout @end iftex --- ./man/ediff.texi.org Fri Jun 21 20:00:04 1996 +++ ./man/ediff.texi Tue May 20 01:26:29 1997 @@ -10,6 +10,10 @@ @synindex vr cp @synindex fn cp @synindex pg cp +@dircategory The Emacs editor and associated tools +@direntry +* Ediff: (ediff). A comprehensive visual interface to diff & patch. +@end direntry @iftex @finalout @end iftex --- ./man/cc-mode.texi.org Sun Aug 4 21:56:21 1996 +++ ./man/cc-mode.texi Tue May 20 01:27:18 1997 @@ -9,6 +9,12 @@ @settitle CC-MODE Version 4 Documentation @footnotestyle end +@dircategory The Emacs editor and associated tools +@direntry +* CC mode: (ccmode). The GNU Emacs mode for editing C, C++, Objective-C + and Java code. +@end direntry + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @comment @setchapternewpage odd !! we don't want blank pages !! @comment %**end of header (This is for running Texinfo on a region) ======= The format should be self-explanatory. There is usually a "dir" file lying around in the source tree that contains all the entries you need, so look before you try to write your own entry. Note that since there is a bug in "install-info --delete" that only deletes the first of a bunch if you specify more than one entry in the @direntry section (although addition works), you need to put these all in separate files. Also, make sure that the info files are generated from the texinfo sources. ======= --- ./Makefile.in.org Mon Aug 19 21:12:19 1996 +++ ./Makefile.in Tue Apr 15 00:15:28 1997 @@ -184,7 +184,7 @@ # Subdirectories to make recursively. `lisp' is not included # because the compiled lisp files are part of the distribution # and you cannot remake them without installing Emacs first. -SUBDIR = lib-src src +SUBDIR = lib-src src man # The makefiles of the directories in $SUBDIR. SUBDIR_MAKEFILES = lib-src/Makefile man/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile --- ./man/Makefile.in.org Thu Jun 27 15:27:19 1996 +++ ./man/Makefile.in Tue Apr 15 00:29:52 1997 @@ -66,6 +66,7 @@ ${srcdir}/gnu1.texi \ ${srcdir}/glossary.texi +all: info info: $(INFO_TARGETS) dvi: $(DVI_TARGETS) ======= I needed the second hunk to make sure "make all" called from the parent Makefile works in man/Makefile. I also deleted the installation of the "info" info file because we already have one with the same name in /usr/share/info (that patch is not shown here). Note that you can give the info dir entries to install-info as arguments instead of patching the texinfo sources. I do not think it is a good idea for ports because you need to duplicate the same information in several places (probably Makefile and @exec/@unexec of PLIST -- see below). However, if you have a Japanese (or other multibyte encoding) info files, you have to use the extra arguments to install-info because makeinfo can't handle those texinfo sources. Oh well. (See editors/mule/{Makefile,pkg/PLIST} for examples on how to do this). (2) Find the place in the source (Makefile) that it is installing the dir file and delete it. ======= --- ./Makefile.in.org Mon Aug 19 21:12:19 1996 +++ ./Makefile.in Mon Apr 14 23:38:07 1997 @@ -368,14 +368,8 @@ if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ then \ (cd ${infodir}; \ - if [ -f dir ]; then \ - if [ ! -f dir.old ]; then mv -f dir dir.old; \ - else mv -f dir dir.bak; fi; \ - fi; \ cd ${srcdir}/info ; \ - (cd $${thisdir}; ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir); \ - (cd $${thisdir}; chmod a+r ${infodir}/dir); \ for f in ccmode* cl* dired-x* ediff* emacs* forms* gnus* info* message* mh-e* sc* vip*; do \ (cd $${thisdir}; \ ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \ chmod a+r ${infodir}/$$f); \ @@ -426,7 +424,7 @@ esac ; \ fi ; \ done ======= (3) Take a look at pkg/PLIST and delete anything that is trying to patch up info/dir. They may be in pkg/INSTALL or some other file, so search extensively. ======= Index: pkg/PLIST =================================================================== RCS file: /usr/cvs/ports/editors/emacs/pkg/PLIST,v retrieving revision 1.15 diff -u -r1.15 PLIST --- PLIST 1997/03/04 08:04:00 1.15 +++ PLIST 1997/04/15 06:32:12 @@ -15,9 +15,6 @@ man/man1/emacs.1.gz man/man1/etags.1.gz man/man1/ctags.1.gz -@unexec cp %D/info/dir %D/info/dir.bak -info/dir -@unexec cp %D/info/dir.bak %D/info/dir info/cl info/cl-1 info/cl-2 ====== (4) Add a post-install target to the Makefile to create a dir file if it is not there. Also, call install-info with the installed info file[s]. ======= Index: Makefile =================================================================== RCS file: /usr/cvs/ports/editors/emacs/Makefile,v retrieving revision 1.26 retrieving revision 1.28 diff -u -r1.26 -r1.28 --- Makefile 1996/11/19 13:14:40 1.26 +++ Makefile 1997/05/20 10:25:09 1.28 @@ -18,8 +18,14 @@ MAN1= emacs.1 etags.1 ctags.1 post-install: .for file in emacs-19.34 emacsclient etags ctags b2m strip ${PREFIX}/bin/${file} .endfor + if [ ! -f ${PREFIX}/info/dir ]; then \ + sed -ne '1,/Menu:/p' /usr/share/info/dir > ${PREFIX}/info/dir; \ + fi +.for info in emacs vip viper forms gnus mh-e cl sc dired-x ediff ccmode + install-info ${PREFIX}/info/${info} ${PREFIX}/info/dir +.endfor .include <bsd.port.mk> ======= Do not use anything other than /usr/share/info/dir and the above command to create a new info file. In fact, I'd add the first three lines of the above patch to bsd.port.mk if you (the porter) wouldn't have to do it in pkg/PLIST by yourself anyway. (5) Edit pkg/PLIST and add equivalent @exec statements and also @unexec for pkg_delete. You do not need to delete info/dir with @unexec. ======= Index: pkg/PLIST =================================================================== RCS file: /usr/cvs/ports/editors/emacs/pkg/PLIST,v retrieving revision 1.15 retrieving revision 1.17 diff -u -r1.15 -r1.17 --- PLIST 1997/03/04 08:04:00 1.15 +++ PLIST 1997/05/20 10:25:12 1.17 @@ -15,9 +15,17 @@ man/man1/emacs.1.gz man/man1/etags.1.gz man/man1/ctags.1.gz -@unexec cp %D/info/dir %D/info/dir.bak -info/dir -@unexec cp %D/info/dir.bak %D/info/dir +@unexec install-info --delete %D/info/emacs %D/info/dir +@unexec install-info --delete %D/info/vip %D/info/dir +@unexec install-info --delete %D/info/viper %D/info/dir +@unexec install-info --delete %D/info/forms %D/info/dir +@unexec install-info --delete %D/info/gnus %D/info/dir +@unexec install-info --delete %D/info/mh-e %D/info/dir +@unexec install-info --delete %D/info/cl %D/info/dir +@unexec install-info --delete %D/info/sc %D/info/dir +@unexec install-info --delete %D/info/dired-x %D/info/dir +@unexec install-info --delete %D/info/ediff %D/info/dir +@unexec install-info --delete %D/info/ccmode %D/info/dir info/cl info/cl-1 info/cl-2 @@ -87,6 +94,18 @@ info/viper-2 info/viper-3 info/viper-4 +@exec [ -f %D/info/dir ] || sed -ne '1,/Menu:/p' /usr/share/info/dir > %D/info/dir +@exec install-info %D/info/emacs %D/info/dir +@exec install-info %D/info/vip %D/info/dir +@exec install-info %D/info/viper %D/info/dir +@exec install-info %D/info/forms %D/info/dir +@exec install-info %D/info/gnus %D/info/dir +@exec install-info %D/info/mh-e %D/info/dir +@exec install-info %D/info/cl %D/info/dir +@exec install-info %D/info/sc %D/info/dir +@exec install-info %D/info/dired-x %D/info/dir +@exec install-info %D/info/ediff %D/info/dir +@exec install-info %D/info/ccmode %D/info/dir libexec/emacs/19.34/i386--freebsd/cvtmail libexec/emacs/19.34/i386--freebsd/digest-doc libexec/emacs/19.34/i386--freebsd/emacsserver ======= Note that the "@unexec install-info --delete" commands have to be before the deletion of the actual info file, so they can read the files. So far I've finished editors/emacs and all the mule ports. Please help me on others (especially teTeX, which even has an open PR (3102) for spamming the user's dir file). Satoshi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705210829.BAA06909>