Subject: Re: distinfo files for multiple architectures
To: None <mcmahill@mtl.mit.edu>
From: Frederick Bruckman <fb@enteract.com>
List: tech-pkg
Date: 05/08/2001 18:27:23
On Tue, 8 May 2001 mcmahill@mtl.mit.edu wrote:

> > > (patches.i386/patch-aa) SHA1 ......
> > > (patches.sparc/patch-aa) SHA1 ......
> >
> > Multiple "patches" directories, in order to make "distinfo" work?
> > That's... ironic.
>
> actually its multiple "patches" directories in order to make 'make patch'
> work and then the problem is what to do with the different possible
> "patches" directories for the distinfo file, hence the suggestion that we
> specify exactly which patch is the one in question.
>
> I'm more than open to other solutions though.

How about, name them all something that matches "patch-*", like
patch-common-aa, patch-netbsd-ba, patch-solaris-ca, and so on. With
that, the "makepatchsum" target will just work, and it'll work right,
in that the names in "distinfo" will match the actual, committed names
of the files. Select the patches to apply similarly to the way
security/openssl does it (but better)...

.if !target(mps) && !target(makepatchsum) && !target (mdi) || !target(makedistinfo)
PATCHDIR=	${WRKDIR}/.patches
.endif

pre-patch:
        ${MKDIR} ${WRKDIR}/.patches
        @${CP} ${.CURDIR}/patches/patch-common-* ${WRKDIR}/.patches/
.if ${OPSYS} == "NetBSD"
        @${CP} ${.CURDIR}/patches/patch-${OPSYS}-* ${WRKDIR}/.patches/
.endif

For the "patch" target, like the "makepatchsum" target, you don't even
need to trim "-common-" or "-${OPSYS}-" from the filenames (because
they match "patch-*")!


Frederick