Subject: Re: pkg/30663
To: None <jonb@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org>
From: Peter Schuller <peter.schuller@infidyne.com>
List: pkgsrc-bugs
Date: 07/30/2005 15:02:02
The following reply was made to PR pkg/30663; it has been noted by GNATS.

From: Peter Schuller <peter.schuller@infidyne.com>
To: Jon Buller <jon@bullers.net>
Cc: jonb@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: pkg/30663
Date: Sat, 30 Jul 2005 17:00:10 +0200

 > Actually, if you look at the makefile, you will see that it tries
 > to work on asdf-install, it just doesn't actually do much.  I
 > somehow missed the cvs add command to add the patch to insert the
 > @GTAR@ string in the target file.  The distinfo file did have the
 > new patch checksum though...
 
 Ah, sorry about that. I only looked at the resulting Makefile and
 in patches/, not at actualy cvs diff. I missed the ${SED}.
 
 > I did it that way because I haven't made too many packages before,
 > I had 3 or 4 files that needed that kind of treatment (the others
 > needing @PREFIX@) and I had examples of the way I did it that I
 > knew would work.  (Well, would have worked if I had done the patch
 > file right...)
 
 I don't have much experience in this area either. I pretty much just
 remembered I had seen a SUBST in some other package's Makefile,
 grepped my way to an example and used that. Looking at it again now
 I realized I completely broke style since the already existing
 substitutions for sbcl used the other method.
 
 > The only examples I saw of SUBST only patched a single file.  Does
 > this scale to multiple files with multiple different substitutions?
 > I assume so, but I thought it better to commit something that I
 > understood, rather than something I thought might work and I got
 > lucky with in a few simple tests.
 
 As I understand it you can add any number of substitutions with
 arbitrary names, each one for a different file, as long as you
 add the name of each to SUBST_CLASSES. But then I don't know how
 name clashes are handled (if at all).
 
 I don't know what the general consensus is; my opinion would probably
 be that a combination would be "cleanest". That is, use a nice @GTAR@
 (and @PREFIX@ etc) tag patched in using patchfiles, and then use SUBST
 to actually perform the substitutions. This being only because the use
 of SUBST is more explicit (it would be possible for an automated tool
 to pick it up for example). But for all I know SUBST may have been
 deprecated (anybody want to provide enlightenment as to what is the
 'preferred' method in pkgsrc, for future reference?).
 
 In any case, ASDF-INSTALL is no longer broken - thanks :)
 
 -- 
 / Peter Schuller, InfiDyne Technologies HB
 
 PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
 Key retrieval: Send an E-Mail to getpgpkey@scode.org
 E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org