#38280 closed enhancement (fixed)
RFE: add a qmake portgroup
Reported by: | cooljeanius (Eric Gallager) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | Cc: | michaelld (Michael Dickens), mf2k (Frank Schima), NicosPavlov | |
Port: |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
qmake
currently has multiple issues that ports have to work around (as brought up in tickets #38272 and #38250):
qmake
isn't UsingTheRightCompiler (cf. comment:ticket:38250:1)qmake
doesn't handle-arch
flags properly (cf. comment:ticket:38250:2)qmake
doesn't handle the--disable-dependency-tracking
flag properly (cf. comment:ticket:38272:1)
And I'm sure there's other things that could be done with a qmake
portgroup, too.
Attachments (3)
Change History (26)
comment:1 Changed 12 years ago by cooljeanius (Eric Gallager)
comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Type: | defect → enhancement |
---|
comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
Changed 12 years ago by cooljeanius (Eric Gallager)
Attachment: | qmake-0.1.tcl added |
---|
initial attempt at creating a qmake portgroup
comment:5 Changed 12 years ago by cooljeanius (Eric Gallager)
Attached my first try at this, not exactly sure how to go about testing it...
comment:6 follow-up: 7 Changed 12 years ago by michaelld (Michael Dickens)
Good start. I think we'll also want to try to overwrite the options for +universal and +debug, as well as add flags for OBJC and OBJCXX.
To test the file, make sure it is in "dports/_resources/port1.0/group/", then you'll need to modify some Portfile which requires QMake to make use of it, via adding "PortGroup qmake 1.0" somewhere before you need the settings / variables.
comment:7 Changed 12 years ago by cooljeanius (Eric Gallager)
Replying to michaelld@…:
Good start. I think we'll also want to try to overwrite the options for +universal and +debug
What do you mean by "overwrite" here? Just put in blank variants, or are there any specific settings we should be using for these variants?
comment:8 Changed 12 years ago by michaelld (Michael Dickens)
"overwrite" means in this case to set the QMake-specific variable on the ${configure.cmd} line, and hope that they overwrite those from the project's build script. When we set "QMAKE_CC=${configure.cc}", it generally works because projects are not supposed to play with it. But, setting for +debug and +universal is more generic, and hence takes a bit of work: (1) setting the ${configure.cmd} line correctly; and (2) making sure those variables are not set in the project's qmake build scripts.
For example, +debug for MacPorts generally means to install but release and debug versions, and hence IIRC does something like:
if +debug { CONFIG += debug_and_release build_all } else { CONFIG += release }
+universal I think can use:
if +universal then { CONFIG += ${qt_arch_types} }
All of the above need to be on the configure.cmd arguments line, so in quotes appropriately. Then, inside the project we would need to remove references to these variables so that the overwrite is guaranteed to work.
comment:9 Changed 12 years ago by cooljeanius (Eric Gallager)
idk, I'm still kind unclear about all this, so I'll just attach my latest version of the portgroup, and then let you guys make changes as you see fit. (I tested it with qdjango and it works properly with that port at least, btw)
Changed 12 years ago by cooljeanius (Eric Gallager)
Attachment: | qmake-1.0.tcl added |
---|
my latest attempt at the qmake portgroup
comment:11 Changed 12 years ago by NicosPavlov
It seems a hassle to have to modify the project in order to change the references to some variables individually. I made some tests with qmake, and it seems that adding
variant debug description "Enable debug binaries" { configure.pre_args-append "CONFIG+=debug" }
does the trick to enable debug, as "debug" has precedence over "release" when both are invoked. Additionally, it seemed that "debug_and_release" can lead to some issues when building.
Similarly, adding
if {[variant_isset universal]} { pre-configure { configure.pre_args-append "CONFIG+=\"${qt_arch_types}\"" } }
seem to work for universal build.
comment:12 Changed 12 years ago by NicosPavlov
Should the portgroup be committed ? As there have been no additional comments or suggestions for several weeks, would it be safe to assume that it seems satisfactory ?
comment:13 Changed 12 years ago by michaelld (Michael Dickens)
I will have time this coming week to deal with this ticket; just been too busy the last few weeks.
comment:14 Changed 12 years ago by michaelld (Michael Dickens)
Sorry for the delay; it's just been crazy since my last posting here, with required time away to handle multiple personal matters. I should be able to get to this issue this week.
comment:15 Changed 11 years ago by jmroot (Joshua Root)
Component: | base → ports |
---|
comment:16 follow-up: 17 Changed 11 years ago by michaelld (Michael Dickens)
OK; obviously I haven't had time for this, so I'd say for someone else to go ahead and check this in and start using it. I don't know when I will find time for this in the coming weeks.
comment:17 Changed 11 years ago by cooljeanius (Eric Gallager)
Replying to michaelld@…:
OK; obviously I haven't had time for this, so I'd say for someone else to go ahead and check this in and start using it.
I would if I could... (my application for commit access is still pending review...)
comment:18 follow-up: 19 Changed 11 years ago by NicosPavlov
I should be able to finalize the tests and commmit it in the next days.
Unless there are objections, I will make final checks based on the last modifications I proposed, giving the attached file.
Changed 11 years ago by NicosPavlov
Attachment: | qmake-1.0-v2.tcl added |
---|
comment:19 Changed 11 years ago by cooljeanius (Eric Gallager)
Replying to nicos@…:
I should be able to finalize the tests and commmit it in the next days.
Unless there are objections, I will make final checks based on the last modifications I proposed, giving the attached file.
Looks good to me, feel free to go ahead and commit it.
comment:20 Changed 11 years ago by NicosPavlov
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed in r106912.
I made a small change after testing it, in order to ensure that instructions in the Portfile (such as compiler.blacklist) would be taken into account when setting variables in the portgroup.
comment:21 Changed 11 years ago by cooljeanius (Eric Gallager)
Yay! Now to actually use it in all the ports it's appropriate for...
comment:22 follow-up: 23 Changed 11 years ago by mf2k (Frank Schima)
@nicos: Thank you!
@egall: Feel free to open up a single ticket with all such ports. It would be good to know.
comment:23 Changed 11 years ago by cooljeanius (Eric Gallager)
Replying to macsforever2000@…:
@egall: Feel free to open up a single ticket with all such ports. It would be good to know.
OK, #39424
oops this wasn't supposed to be a "defect"