Date: Sat, 6 Oct 2012 10:13:41 +0200 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Doug Hardie <bc979@lafn.org> Cc: FreeBSD-PORTS <freebsd-ports@FreeBSD.org> Subject: Re: New Port Options Message-ID: <20121006081341.GC30675@ithaqua.etoilebsd.net> In-Reply-To: <6B7F31C1-0A5C-4B65-AC5B-BCCE21817692@lafn.org> References: <6B7F31C1-0A5C-4B65-AC5B-BCCE21817692@lafn.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--adJ1OR3c6QgCpb/j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 05, 2012 at 10:01:45PM -0700, Doug Hardie wrote: > I just converted a port over to the new options structure and have a few = observations. I have not been involved in any of the discussions about the= structure as I didn't have the time to get involved. However, a couple th= ings came to mind during the process: >=20 > 1. The Port handbook is actually quite good in the information it provid= es. However, it does presume that you know a few things about the port str= ucture that are probably common knowledge to anyone involved with it, but n= ot to those of us who just "use" it. The first update I made to the Makefi= le cause a slew of make errors that were pretty much useless. They meant n= othing to me. My first thought was that somehow I had munged one of the in= cludes and managed to include some random file rather than the right one. >=20 > My second idea was that I had typed the option names wrong, but that didn= 't seem to fit with the error messages either. After quite a while of read= ing the handbook, I noticed that in the PORT_OPTIONS clause you have to pre= cede the option name with a M. That is not at all obvious and is easily mi= ssed. Why an M is also baffling. I am sure there is a reason other then it= just won't work otherwise. The M is because of make(1) syntax >=20 > 2. The syntax for a conditional expression for an option that is selecte= d is completely different from that for an option that is not selected. Th= at is just weird. The use of {} for one and () for the other again must ha= ve some reason other than it just won't work otherwise. No clue is given i= n the handbook. >=20 My first proposition for syntax was: =2Eif !empty(PORT_OPTIONS:MFOO) =2Eendif and =2Eif empty(PORT_OPTIONS:MFOO) =2Eendif Lots of people stated they prefered the concise version: =2Eif ${PORT_OPTIONS:MFOO} =2Eendif the reverse of this one can be: =2Eif !${PORT_OPTIONS:MFOO} =2Eendif instead of empty() if you prefer some maintainers uses it. > 3. The examples are a bit difficult to distinguish between {} and (). I= had to look quite a few times before I figured that out. >=20 > 4. The handbook shows for submitting a change to a port the use of a reg= ular diff. My recollection is that the last time a unified diff was reques= ted so that things like the file names show. >=20 > I only maintain one port so the effort to make the changes would have bee= n quite minor for additional ports. Its really not that big a change from = the maintainer's point of view.____________________________________________= ___ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" --adJ1OR3c6QgCpb/j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBv6DUACgkQ8kTtMUmk6EzBJgCbBUTx9zE1sPZGaGPASu5U4LM0 xH0AoIICcg0B+/D93v+zayzxfFIgBNgS =qBU0 -----END PGP SIGNATURE----- --adJ1OR3c6QgCpb/j--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121006081341.GC30675>