Date: Mon, 21 Nov 2011 23:17:26 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: =?ISO-8859-1?Q?Be=F1at_Gonzalez_Etxepare?= <bbtruk@users.sourceforge.net> Cc: sam@cassiba.com, freebsd-ports@freebsd.org Subject: Re: Slave ports Message-ID: <4ECADC06.3020403@infracaninophile.co.uk> In-Reply-To: <20111121232133.9cf7269a.bbtruk@users.sourceforge.net> References: <20111108180947.288e9a42.bbtruk@users.sourceforge.net> <4EB9771C.5080006@cassiba.com> <20111119234758.e4a46127.bbtruk@users.sourceforge.net> <4EC8C71B.4070405@infracaninophile.co.uk> <20111121232133.9cf7269a.bbtruk@users.sourceforge.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCDF9529E2315FE1A2EFB599F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 21/11/2011 22:21, Be=F1at Gonzalez Etxepare wrote: >> This works, but has an important deficiency: >> >=20 >> > * If the user already has lazarus (of any variety) installed, tha= t >> > would generally fulfil the dependency requirement irrespective >> > of which toolkit option was chosen when building Double >> > Commander. Unless there is some sort of detectable filename >> > change in lazarus depending on the toolkit, you can't tell the >> > difference. > This part I don't know if I understand correctly... do slave ports act > as if they were the same port? so although lazarus-qt is listed as > dependency an installed lazarus-gtk2 fulfills the requirement? In that > case, using the above mentioned file (lazbuild.cfg) would be enough > to differentiate them? Or it has to be different in the filename, not > its contents? Lets suppose you want the gtk2 version of lazarus, and lets further suppose that the two slave ports discussed previously have been created. You would write dependency lines in the port Makefile eg. like this: BUILD_DEPENDS =3D lazarus:${PORTSDIR}/editors/lazarus-gtk2 This says "test and see if there is an executable on $PATH called 'lazarus'. If not, install the editors/lazarus-gtk2 port. This is fine if no variant of lazarus is already installed: lazarus-gtk2 will be built and installed and everything is happy. However, suppose the user had already come along and installed lazarus-qt4? What happens then? Well, lazarus-qt4 also installs a binary executable called 'lazarus'. The ports system will find this and go 'hey, everything I need to build this port is already installed' and plough heedlessly on with compiling Double Commander. Eventually either the compilation will break, or even worse: you'll end up with a Double Commander installed that falls over when you try and run it. This only affects building from ports -- if you install a .pkg, then the dependency checking is done on what other packages are installed. The fact that the dependency resolution is done by checking on the existence of an executable means that you aren't tied to installing everything from ports. You can in principle compile various components by hand, and the ports should be able to conform to that. This is an example of the unix philosophy of enabling you to do clever things by not preventing you from doing stupid ones. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigCDF9529E2315FE1A2EFB599F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7K3A0ACgkQ8Mjk52CukIw/qACfVMJ+0aprjxuNRys1U9ilev83 HJEAninQqLCl9Sd7l6H/0PC0bWzFRVhT =rozc -----END PGP SIGNATURE----- --------------enigCDF9529E2315FE1A2EFB599F--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ECADC06.3020403>