> 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?

_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to