From owner-freebsd-ports@FreeBSD.ORG Mon Nov 21 22:21:39 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 5703C106564A for ; Mon, 21 Nov 2011 22:21:39 +0000 (UTC) (envelope-from bbtruk@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id D80F98FC0A for ; Mon, 21 Nov 2011 22:21:38 +0000 (UTC) Received: by eyd10 with SMTP id 10so8355813eyd.13 for ; Mon, 21 Nov 2011 14:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :x-mailer:mime-version:content-type:content-transfer-encoding; bh=WvMrUwD6BXVeKfLZAwQS/mUMFOOS9M99HZE10m5VOe8=; b=nkpHqjd0TiWX5o/LNZGAUSDAsf9CPSgSd2tBHHvzyrCEezKoGU7+KB9WMC7XzCpnzq jnw3FK/nk33RSzeZo8Qz7huSb0zqEvfXSudkNjLcz6gtQ8YjlKZa3/dKgChNVnTCB5bF p5c29O3lCJFDIxRW82EuKKVEH96yS2XID1luQ= Received: by 10.180.85.4 with SMTP id d4mr1250527wiz.19.1321914097821; Mon, 21 Nov 2011 14:21:37 -0800 (PST) Received: from ss-benat.saindua.dyndns.org (221.85-86-7.dynamic.clientes.euskaltel.es. [85.86.7.221]) by mx.google.com with ESMTPS id y3sm5774875wiy.3.2011.11.21.14.21.36 (version=SSLv3 cipher=OTHER); Mon, 21 Nov 2011 14:21:36 -0800 (PST) Sender: Benat Gonzalez Etxepare Date: Mon, 21 Nov 2011 23:21:33 +0100 From: =?ISO-8859-1?Q?Be=F1at?= Gonzalez Etxepare To: Matthew Seaman Message-Id: <20111121232133.9cf7269a.bbtruk@users.sourceforge.net> In-Reply-To: <4EC8C71B.4070405@infracaninophile.co.uk> References: <20111108180947.288e9a42.bbtruk@users.sourceforge.net> <4EB9771C.5080006@cassiba.com> <20111119234758.e4a46127.bbtruk@users.sourceforge.net> <4EC8C71B.4070405@infracaninophile.co.uk> X-Mailer: Sylpheed Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 22:21:39 -0000 > It might be tempting to just use the OPTIONS result from editors/ > lazarus directly, but you can't guarantee that editors/lazarus has > been installed at the point you run this options dialogue Thanks, I see clearly now why what I was trying to do was wrong and should be avoided. Using the following code would solve my initial problem of getting the toolkit used by Lazarus; .if exists(${LOCALBASE}/etc/lazbuild.cfg) .include "${LOCALBASE}/etc/lazbuild.cfg" .endif (FYI lazbuild.cfg file contains the following): # Current lazarus interface LCL_PLATFORM=gtk2 But, as dependency, that file won't get installed before the first part of my Makefile gets processed, so it is useless in that case. At least I don't think there is any method to re-read my Makefile after dependencies get installed. Also, I don't know if including an external file like this is an approved practice or not. So everything comes down to using the first method you mention; create lazarus-qt and lazarus-gtk2 slave ports and select the right one with an options setting from my port. > This works, but has an important deficiency: > > * If the user already has lazarus (of any variety) installed, that > 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?