From owner-freebsd-ports Fri Aug 30 13:56: 8 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C99E937B400; Fri, 30 Aug 2002 13:56:05 -0700 (PDT) Received: from obsecurity.dyndns.org (adsl-64-165-226-146.dsl.lsan03.pacbell.net [64.165.226.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id E317A43E3B; Fri, 30 Aug 2002 13:56:04 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 8EAA866D83; Fri, 30 Aug 2002 13:56:04 -0700 (PDT) Date: Fri, 30 Aug 2002 13:56:04 -0700 From: Kris Kennaway To: Tetsurou Okazaki Cc: Mathieu Arnold , FreeBSD-ports@FreeBSD.org Subject: Re: patching and OSVERSION Message-ID: <20020830205604.GB60683@xor.obsecurity.org> References: <12031515.1030297102@sauron> <84fzx294r8.wl%okazaki@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H1spWtNR+x+ondvy" Content-Disposition: inline In-Reply-To: <84fzx294r8.wl%okazaki@FreeBSD.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --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