From owner-freebsd-doc@FreeBSD.ORG Mon Aug 18 06:50:28 2003 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E6FB37B42C; Mon, 18 Aug 2003 06:50:20 -0700 (PDT) Received: from arthur.nitro.dk (port324.ds1-khk.adsl.cybercity.dk [212.242.113.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D4BC440F5; Mon, 18 Aug 2003 05:53:46 -0700 (PDT) (envelope-from simon@arthur.nitro.dk) Received: by arthur.nitro.dk (Postfix, from userid 1000) id 9D84610BFA8; Mon, 18 Aug 2003 14:53:44 +0200 (CEST) Date: Mon, 18 Aug 2003 14:53:44 +0200 From: "Simon L. Nielsen" To: Joe Marcus Clarke Message-ID: <20030818125337.GB407@FreeBSD.org> References: <1061069299.54862.34.camel@shumai.marcuscom.com> <20030817110722.GA391@FreeBSD.org> <1061131638.43833.2.camel@shumai.marcuscom.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VrqPEDrXMn8OVzN4" Content-Disposition: inline In-Reply-To: <1061131638.43833.2.camel@shumai.marcuscom.com> User-Agent: Mutt/1.5.4i cc: freebsd-doc@FreeBSD.org Subject: Re: Review of porters-handbook changes X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2003 13:50:30 -0000 --VrqPEDrXMn8OVzN4 Content-Type: multipart/mixed; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2003.08.17 10:47:18 -0400, Joe Marcus Clarke wrote: > On Sun, 2003-08-17 at 07:07, Simon L. Nielsen wrote: > > On 2003.08.16 17:28:19 -0400, Joe Marcus Clarke wrote: > > > Can someone review the attached diff to the porter's handbook? It was > > > submitted by Sergey Matveychuk for some of the recent > > > ports infrastructure changes. It is technically accurate, and I fixe= d a > > > few grammar and spelling nits, but I would like a doc committers take= on > > > it before committing. Also, if one of you would rather commit, that's > > > fine. Thanks! > >=20 > > There are some places where 8 spaces have been used instead of a tab > > (can be fixed by marking the regions and using 'meta-x tabify' in > > emacs'). There are also some end of line white-spaces which should be > > removed. >=20 > I tried to preserve the style of adjacent blocks. To that end, some use > spaces, so I opted for spaces to keep things lined up. OK, I didn't check the rest for the file for style, and the tab/space thing is not that important then. But the end of line whitespace still doesn't need to be there :). It's not crucial to remove it, but there is no reason to have it there. Sorry for being so pedantic about this... I have attached a patch where I have removed the end of line whitespace, and changed the pkg_deinstall reference (see below). > --- doc/en_US.ISO8859-1/books/porters-handbook/book.sgml 17 Aug 2003 09:1= 2:05 -0000 1.320 > +++ doc/en_US.ISO8859-1/books/porters-handbook/book.sgml 17 Aug 2003 14:4= 6:25 -0000 > @@ -4316,6 +4086,19 @@ > > > =20 > + > + <filename>pkg-deinstall</filename> > + > + This script executes when a package is removed. > + > + > + This script will be run twice by pkg_delete. It's better to use "&man.pkg.delete.1;" instead of the command tag since it will create a link to the manual page. --=20 Simon L. Nielsen FreeBSD Documentation Team --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="book.sgml-sln.diff" Content-Transfer-Encoding: quoted-printable --- doc/en_US.ISO8859-1/books/porters-handbook/book.sgml 17 Aug 2003 09:12:= 05 -0000 1.320 +++ doc/en_US.ISO8859-1/books/porters-handbook/book.sgml 17 Aug 2003 14:46:= 25 -0000 @@ -3019,6 +3019,19 @@ =20 + + <makevar>CONFLICTS</makevar> + + If your package cannot coexist with other packages + (because of file conflicts, runtime incompatibility, etc.), + list the other package names in the CONFLICTS + variable. You can use shell globs like * and + ? here. Packages names should be + enumerated the same way they appear in + /var/db/pkg. + + + Building mechanisms =20 @@ -3216,11 +3229,24 @@ =20 Says that the port uses Perl 5 to build and run. - =20 + - PERL + PERL_CONFIGURE + + Configure using Perl's MakeMaker. It implies + USE_PERL5. - =20 + + + + + + + Read only variables + + + + PERL_VERSION =20 @@ -4003,267 +4029,11 @@ Info files =20 - The new version of texinfo (included in 2.2.2-RELEASE and onwa= rd) - contains a utility called install-info to add a= nd - delete entries to the dir file. If your port - installs any info documents, please follow these instructions so y= our - port/package will correctly update the user's - PREFIX/info/dir file. (So= rry - for the length of this section, but is it imperative to weave all = the - info files together. If done correctly, it will produce a - beautiful listing, so please bear with me!) - - First, this is what you (as a porter) need to know: - - &prompt.user; 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. - : ---entry=3DTEXT Insert TEXT as an Info directory entry. - : ---section=3DSEC Put this file's entries in section SEC of the director= y. : - - - This program will not actually install = info - files; it merely inserts or deletes entries in the - dir file. - - - Here's a seven-step procedure to convert ports to use - install-info. - editors/emacs will be used a= s an - example. - - - - Look at the texinfo sources and make a patch to insert - @dircategory and @direntry - statements to files that do not have them. This is part of my - patch: - - --- ./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 - : - - The format should be self-explanatory. Many authors leave= a - dir file in the source tree that contains= all - the entries you need, so look around before you try to write y= our - own. Also, make sure you look into related ports and make the - section names and entry indentations consistent (we recommend = that - all entry text start at the 4th tab stop). - - - Note that you can put only one info entry per file becau= se - of a bug in install-info --delete that - deletes only the first entry if you specify multiple entries= in - the @direntry section. - - - You can give the dir entries to - install-info as arguments - ( and ) inst= ead - of patching the texinfo sources. This probably is not a good - idea for ports because you need to duplicate the same informat= ion - in three places - (Makefile and - @exec/@unexec of - pkg-plist; see below). However, if you h= ave - Japanese (or other multi-byte encoding) info files, you will h= ave - to use the extra arguments to install-info - because makeinfo cannot handle those texinfo - sources. (See Makefile and - pkg-plist of j= apanese/skk - for examples on how to do this). - - - - Go back to the port directory and do a make clean; - make and verify that the info files are regenerated - from the texinfo sources. Since the texinfo sources are newer = than - the info files, they should be rebuilt when you type - make; but many Makefiles - do not include correct dependencies for info files. In - Emacs' case, it was necessary to pa= tch the main - Makefile.in so it would descend into the - man subdirectory to rebuild the info - pages. - - --- ./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 =3D lib-src src -+SUBDIR =3D lib-src src man - - # The makefiles of the directories in $SUBDIR. - SUBDIR_MAKEFILES =3D 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) - - The second hunk was necessary because the default target in - the man subdir is called - info, while the main - Makefile wants to call - all. The installation of the - info info file was also removed because we - already have one with the same name in - /usr/share/info (that patch is not shown - here). - - - - If there is a place in the Makefile t= hat - is installing the dir file, delete it. Y= our - port may not be doing it. Also, remove any commands that are - otherwise mucking around with the dir - file. - - --- ./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)` !=3D `(cd ${infodir} && /bi= n/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); \ - - - - (This step is only necessary if you are modifying an exist= ing - port.) 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 -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v -retrieving revision 1.15 -diff -u -r1.15 pkg-plist ---- pkg-plist 1997/03/04 08:04:00 1.15 -+++ pkg-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 - - - - Add a post-install target to the - Makefile to call - install-info with the installed - info files. (It is no longer necessary to create the - dir file yourself; - install-info automatically creates this - file if it does not exist.) - - Index: Makefile -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -RCS file: /usr/cvs/ports/editors/emacs/Makefile,v -retrieving revision 1.26 -diff -u -r1.26 Makefile ---- Makefile 1996/11/19 13:14:40 1.26 -+++ Makefile 1997/05/20 10:25:09 1.28 -@@ -20,5 +20,8 @@ - post-install: - .for file in emacs-19.34 emacsclient etags ctags b2m - strip ${PREFIX}/bin/${file} - .endfor -+.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> - - - - Edit pkg-plist and add equivalent - @exec statements and also - @unexec for - pkg_delete. - - Index: pkg-plist -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -RCS file: /usr/cvs/ports/editors/emacs/pkg-plist,v -retrieving revision 1.15 -diff -u -r1.15 pkg-plist ---- pkg-plist 1997/03/04 08:04:00 1.15 -+++ pkg-plist 1997/05/20 10:25:12 1.17 -@@ -16,7 +14,14 @@ - man/man1/etags.1.gz - man/man1/ctags.1.gz -+@unexec install-info --delete %D/info/emacs %D/info/dir - : -+@unexec install-info --delete %D/info/ccmode %D/info/dir - info/cl - info/cl-1 -@@ -87,6 +94,18 @@ - info/viper-3 - info/viper-4 -+@exec install-info %D/info/emacs %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 - - - The @unexec install-info --delete - commands have to be listed before the info files themselves = so - they can read the files. Also, the @exec - install-info commands have to be after the info - files and the @exec command that creates = the - the dir file. - - - - - Test and admire y= our - work. :-). Check the - dir file before and after each step. - - + If your package needs to install GNU info files, they should be + listed in the INFO variable (without the traili= ng + .info), and appropriate installation/deinstalla= tion + code will be automaticaly added to the temporary + pkg-plist before package registration. =20 @@ -4316,6 +4086,19 @@ =20 + + <filename>pkg-deinstall</filename> + + This script executes when a package is removed. + + + This script will be run twice by &man.pkg.delete.1;. + The first time as ${SH} pkg-install ${PKG= NAME} + DEINSTALL and the second time as + ${SH} pkg-install ${PKGNAME} POST-DEINSTA= LL. + + + <filename>pkg-req</filename> =20 @@ -4372,13 +4155,13 @@ =20 This substitution (as well as addition of any manual pages) will be done b= etween - the do-install and - post-install targets, by reading from + the pre-install and + do-install targets, by reading from PLIST and writing to TMPPLIST (default: WRKDIR/.PLIST.mktmp). S= o if your port builds PLIST on the fly, do so in or - before do-install. Also, if your port + before pre-install. Also, if your port needs to edit the resulting file, do so in post-install to a file named TMPPLIST. @@ -4424,6 +4207,11 @@ PKGINSTALL ${PKGDIR}/pkg-install + + + + PKGDEINSTALL + ${PKGDIR}/pkg-deinstall =20 --AqsLC8rIMeq19msA-- --VrqPEDrXMn8OVzN4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/QMxRh9pcDSc1mlERAuj3AJ43euf3bjLYZWDPEPMTWEcK52pLrwCgkGIb WEJJny31nT/rPDDpDLFt6+M= =lzkE -----END PGP SIGNATURE----- --VrqPEDrXMn8OVzN4--