QT4-mac 32 bit Quartz Carbon

Craig Treleaven ctreleaven at cogeco.ca
Mon Mar 26 05:58:40 PDT 2012


At 10:43 PM -0500 3/25/12, Ryan Schmidt wrote:
>On Mar 25, 2012, at 11:05, Craig Treleaven wrote:
>
>>  I want to install QT4-mac as using Quartz, which is the default variant,
>
>Right. So you don't need to do anything special; just install 
>qt4-mac and you'll get quartz.
>
>>  even though my Mac is 64 bit (early 2011 MBP).
>
>The bitness of your Mac has no bearing on this discussion. I did not 
>understand why you wrote "32 bit" in the subject line of this email. 
>On 64-bit Macs running Snow Leopard or later, MacPorts ports will 
>build 64-bit if possible, and with qt4-mac (as with most other 
>ports) it is possible.
>
>>  The command I used was:
>>
>>>  $ sudo port -v install qt4-mac +mysql -sqlite2
>>
>>  It seems that MacPorts determined the machine architecture and 
>>overrode the default variant resulting in QT4-mac using Coca. 
>>Snippet from the configure output is:
>>
>>>  Build type:    macx-g++
>>>  Architecture:  macosx ( x86_64 )
>>>  Using framework: Cocoa
>
>According to "port variants qt4-mac", the quartz variant "Build(s 
>qt4-mac) for Native OSX Quartz GUI, not X11". So this variant has to 
>do with how the GUI is displayed -- either with OSX native elements 
>(quartz) or with X11 elements.
>
>Cocoa is always used on OSX. Cocoa does not relate directly to the GUI.

I should have been more clear.  QT would say "Using framework: 
Quartz" if building 32 bit.  I know this is possible--the current 
(non-MacPorts) build process for MythTV can build QT using 
32-bit/Quartz*.  I'm trying to develop a port for MythTV and I want 
to replicate a known-working config as much as possible.  In MythTV, 
it uses Quartz if QT supports it.  Otherwise, it uses OpenGL which 
I've never done and has only been supported on Myth for Mac for 
shorter time.

The existing MythTV build script (perl) includes the following:

># We set 32-bit mode via environment variables.
># The messier alternative would be to tweak all the configure arguments.
>if ( $OPT{'m32'} )
>{
>     &Verbose('Forcing 32-bit mode');
>     $ENV{'CFLAGS'}    .= ' -m32';
>     $ENV{'CPPFLAGS'}  .= ' -m32';
>     $ENV{'CXXFLAGS'}  .= ' -m32';
>     $ENV{'ECXXFLAGS'} .= ' -m32';  # MythTV configure
>     $ENV{'LDFLAGS'}   .= ' -m32';
>}

I think this is the magic that causes everything to build 32 bit.  Is 
there some way to do the same with MacPorts?

Craig
* Based on my rudimentary understanding, I think both QT and MythTV 
mean "Carbon" when they say "Quartz".


More information about the macports-users mailing list