Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2007 20:08:20 +0100
From:      Pietro Cerutti <gahr@gahr.ch>
To:        Wesley Shields <wxs@atarininja.org>
Cc:        Paul Schmehl <pauls@utdallas.edu>, pav@FreeBSD.org, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: Optional patching
Message-ID:  <47696C24.1080600@gahr.ch>
In-Reply-To: <20071219191306.GC36016@atarininja.org>
References:  <4D1AAAB26DADCFB11343F6B3@utd59514.utdallas.edu> <47693FE9.20701@gahr.ch> <41364CD63DE952CCB8602A44@utd59514.utdallas.edu> <20071219191306.GC36016@atarininja.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCFF7CC40D7FCB083997B6593
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Wesley Shields wrote:
> On Wed, Dec 19, 2007 at 01:03:23PM -0600, Paul Schmehl wrote:
>> --On Wednesday, December 19, 2007 16:59:37 +0100 Pietro Cerutti=20
>> <gahr@gahr.ch> wrote:
>>
>>> Paul Schmehl wrote:
>>>> Is there a way to include a patch as an option to a port?  I maintai=
n
>>>> the security/barnyard port.  There's a patch that is necessary for
>>>> barnyard to work correctly on a 64bit system.  I'm wondering if I ca=
n
>>>> use OPTIONS to make this patch optional if the system is 64 bit, but=
 I'm
>>>> not sure what the syntax would be inside the if statement.
>>>>
>>>> .if defined(WITH_64BIT)
>>>> do-patch: patchname
>>>> .endif
>>>
>>> I would do something like (please check the list of 64 bits platforms=
)
>>>
>>> .if ${ARCH} =3D=3D "amd64" || ${ARCH} =3D=3D "ia64" || ${ARCH} =3D=3D=
 "sparc64"
>>> # apply the patch here
>>> .endif
>>>
>>>> I assume the patch would have to be in the filesdir but could not be=

>>>> named "patch-foo" or it would always be applied, correct?
>>>>
>>> Please check the reply from pav@ for this ;-)
>> That brings up an interesting question.  Which would be the preferred =

>> method? To use an OPTION knob?  Or simply apply the patch if the arch =

>> matches?  I'm thinking the latter.  I've tested the former method, and=
 it=20
>> works fine.   Does it matter which method I use?
>=20
> I don't think it matters really, but is probably a matter of personal
> preference.  The only problem with using an option that I see is that i=
f
> the user has no idea if (s)he is on a 64bit platform and turns the
> option off.  It's for this reason I'd suggest using the .if ${ARCH}
> approach.

This would be my argument too.

>=20
> -- WXS


--=20
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp


--------------enigCFF7CC40D7FCB083997B6593
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFHaWwpwMJqmJVx944RCga6AJ9xcM3QUjb7wQeSORR8yiiC+aIuegCg2lzv
pGJ78mG4fOVvqF7W3CPF4J8=
=oj4B
-----END PGP SIGNATURE-----

--------------enigCFF7CC40D7FCB083997B6593--



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