Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 May 1997 02:03:22 -0700 (PDT)
From:      asami@vader.cs.berkeley.edu (Satoshi Asami)
To:        imp@village.org
Cc:        ports@freebsd.org
Subject:   Re: Coping with OS specific patches
Message-ID:  <199705040903.CAA11320@silvia.HIP.Berkeley.EDU>
In-Reply-To: <E0wNqOU-0000ji-00@rover.village.org> (message from Warner Losh on Sat, 03 May 1997 19:47:18 -0600)

next in thread | previous in thread | raw e-mail | index | archive | help
 * 	I think that it may be time for a good, solid mechanism to be
 * put into place to handle things like this.  The FreeBSD project
 * doesn't necessarily need to maintain patches of this nature, but it
 * should, imho, place FreeBSD specific changes that can't be ifdef'd
 * into an OS dependent patch mechanism.  Others can then place their OS
 * specific patches into similar trees.  This can then lead toward being
 * able to co-locate the patches on one machine (say because you want to
 * NFS mount your ports tree).

You know, I was thinking about this too.  In fact, I was thinking of a 
more generic approach -- to make this system orthogonal OS/platform.

 * 	There are some interesting logistical issues with doing
 * something like this.  With the current source code control
 * environment, it would be best if it were in a separate directory.  I'm
 * thinking that patches-${OSNAME} (eg patches-FreeBSD) might not be a
 * bad thing to do.

Yes.  And patches-alpha and such, too.

 * 		     The patches would then be applied in the following
 * order:
 * 	patches/* patches-${OSNAME}/*
 * to make things less ambiguous.  This would allow a parallel tree to be

I'm not sure if this is a good idea.  It maybe work for patches/, but
not for files/ and pkg/.

What I am thinking is, for each <dir> (where <dir> is "patches",
"files" and such), test the existence of

<dir>.${OSNAME}-${ARCH}
<dir>.${ARCH}
<dir>.${OSNAME}
<dir>

and use the first one found.  (The ordering of the second and third
are debatable, of course).

Also, if a file called "Makefile.${...}" is found (where the
${...} takes the same permutation as above), this is to be included as 
the first thing by bsd.port.mk.  That way you can override anything
done in the original Makefile fairly easily.

Comments?

Satoshi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705040903.CAA11320>