Best practice for QT applications

Daniel J. Luke dluke at geeklair.net
Wed Jul 2 08:55:30 PDT 2008


On Jul 2, 2008, at 8:44 AM, Olivier Croquette wrote:
> I have just created a new port for qgit:
> https://trac.macports.org/ticket/15820
>
> and I was wondering if there are best practice for QT applications.
>
> They have a similar installation procedure as the GNU tools, but a bit
> different too, and there are several ways to write the portfile.
>
> For example, "qmake" can be called:
>
> - using "system qmake" in the configure { } block
>
> - by setting "configure.cmd" to "qmake"

I would probably do it this way.

> - in the build phase by setting use_configure to "no"

It doesn't matter too much how you implement it, whatever makes the  
most sense to you is probably OK.

> Another topic is the destroot phase. QT applications don't have the  
> same
> layout as GNU applications. Apparently, the rule is to do the
> installation manually, case by case. Is that right?

Probably, since you'll have to get the build output into the right  
place before the install phase happens.

> QT ports would deserve a subchapter in the guide, in:
> http://guide.macports.org/#development.practices

I'm sure the doc group would welcome additions if you want to write  
something up.

> Or even better, portfiles could support qt applications directly
> (something like "use_qt yes" :) )

I don't know that there are enough Qt applications to warrant that  
(and I don't know if there's a good way to generalize what needs to  
happen in destroot or post-destroot so move the pieces to the write  
places).

> What do you think?


If you can think of a way to do it, and submit a patch, it's very  
likely that it will make it into MacPorts.

--
Daniel J. Luke
+========================================================+
| *---------------- dluke at geeklair.net ----------------* |
| *-------------- http://www.geeklair.net -------------* |
+========================================================+
|   Opinions expressed are mine and do not necessarily   |
|          reflect the opinions of my employer.          |
+========================================================+



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.macosforge.org/pipermail/macports-users/attachments/20080702/396879ef/attachment.bin 


More information about the macports-users mailing list