From owner-freebsd-ports@FreeBSD.ORG Mon Nov 21 23:17:51 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B914E106566B for ; Mon, 21 Nov 2011 23:17:51 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 20F728FC13 for ; Mon, 21 Nov 2011 23:17:50 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id pALNHYiN022547 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 21 Nov 2011 23:17:41 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.4.1 smtp.infracaninophile.co.uk pALNHYiN022547 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1321917461; bh=g+WB/5YBNZH+6K/0BgZ92cg6K6VRYShaklc4FT+RZDs=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=w54qTWrtIYCEWFADpTZgCzhjGkOnS7K+K1mD+dQVH/fqf2UTmAQmw/llRy7F+XwSu I7QSHM+D/xxYUGir7X9P/3whhmiijHQXPtX6RhE8SAaVhVoiawdVADH9dqLH7JP97m l51JjnkXoZUgSfORWt8pVA4IcMChyFZ9a5GnnRKc= Message-ID: <4ECADC06.3020403@infracaninophile.co.uk> Date: Mon, 21 Nov 2011 23:17:26 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Be=F1at_Gonzalez_Etxepare?= 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> In-Reply-To: <20111121232133.9cf7269a.bbtruk@users.sourceforge.net> X-Enigmail-Version: 1.3.3 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCDF9529E2315FE1A2EFB599F" X-Virus-Scanned: clamav-milter 0.97.3 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: sam@cassiba.com, freebsd-ports@freebsd.org Subject: Re: Slave ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2011 23:17:51 -0000 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--