Date: Fri, 30 Aug 2002 13:56:04 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Tetsurou Okazaki <okazaki@FreeBSD.org> Cc: Mathieu Arnold <mat@mat.cc>, FreeBSD-ports@FreeBSD.org Subject: Re: patching and OSVERSION Message-ID: <20020830205604.GB60683@xor.obsecurity.org> In-Reply-To: <84fzx294r8.wl%okazaki@FreeBSD.org> References: <12031515.1030297102@sauron> <84fzx294r8.wl%okazaki@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--H1spWtNR+x+ondvy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 26, 2002 at 03:23:40AM +0900, Tetsurou Okazaki wrote: > At Sun, 25 Aug 2002 17:38:22 +0200, > Mathieu Arnold wrote: > >=20 > > I was looking at a port which requires different patches, say : > >=20 > > use patch-1 whatever the version is > >=20 > > .if ${OSVERSION} >=3D 460000 > > also use patch-2 > > .endif > >=20 > > and after looking at the porter's handbook, I could not find out how to= do > > it (the patches are in the files subdirectory). >=20 > In such a case, place conditional patches by file name like > files/extra-patch-FOO, and use EXTRA_PATCHES as below. >=20 > .if ${OSVERSION} >=3D 460000 > EXTRA_PATCHES+=3D ${PATCHDIR}/extra-patch-FOO > .endif It's probably cleaner if you make the patch always apply, but have the patch itself test ${OSVERSION}/__FreeBSD_version to conditionally enable to relevant code. This way, the patch can also be submitted back to the software developers. Kris --H1spWtNR+x+ondvy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9b9vjWry0BWjoQKURAlgYAKDbDzEQANcKALv7rSOrPTxC9YTvyACdGJko Xa3c/I1Mim35dcBqNj4Qa90= =gyh5 -----END PGP SIGNATURE----- --H1spWtNR+x+ondvy-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020830205604.GB60683>