Help with QT-based port?

Ryan Schmidt ryandesign at macports.org
Thu Mar 29 08:26:23 PDT 2012


On Mar 29, 2012, at 09:55, Craig Treleaven wrote:
> At 8:47 AM -0500 3/29/12, Ryan Schmidt wrote:
>> On Mar 28, 2012, at 19:14, Craig Treleaven wrote:
>> 
>>> fetch.type          git
>>> 
>>> git.branch          92f7d1f51c
>> 
>> Does the 0.25-rc tarball posted on github not work? This is hundreds of MB and takes a long time to fetch, which happens every time I clean and try again, which is something I do often when troubleshooting and/or developing a port, which makes it hard to work on the port.
> 
> Sorry, I'm branch new to developing a port.  Exactly, what should I do to use the tarball?  I agree that the git clone is quite slow.

Delete the lines in the portfile beginning with version, fetch.type, git.branch. The github portgroup's default is to fetch the tarball from the tag.

Also add the correct checksum lines.


>> I wouldn't think you'd need to specify -m32 everywhere, since MacPorts already sets -arch i386 everywhere for you, which should be the same thing.
> 
> I'm copying the existing build processes.  Eventually, I want to install some optional Perl and Python dependencies and I believe one of them fails in a 64 bit environment.  If I can get 32 bit working, I'll go on and try 64 bit.

Right. But MacPorts manages architectures using -arch flags. By setting "supported_archs i386" you've requested that MacPorts always use -arch i386. If there are any places that are missing these arch flags, you can add them using the [get_canonical_archflags] procedure.


>> It is a problem that the port is building using "gcc" and "g++"; see:
>> 
>> https://trac.macports.org/wiki/UsingTheRightCompiler
> 
> Sorry, I've read the page but I don't understand the problem.  My output includes the following:
> CXX='ccache /usr/bin/g++-4.2'
> CC='ccache /usr/bin/gcc-4.2'
> 
> Is this a problem?

I think you're referring to the part of the output that lists the environment variables MacPorts sets during the configure phase. The problem is that mythtv is ignoring them. You may need to patch mythtv's configure script or Makefiles, or add environment variables at build and/or destroot time.


>> It appears to be compiling its own version of libavcodec. The version that the ffmpeg port provides is not sufficient?
> 
> Correct.  Myth compiles its own version of ffmpeg because there is too much variability in arguments that various versions of ffmpeg accept.  For each major MythTV version, they resync ffmpeg.

Ok. ffmpeg is indeed a fast-moving target. As long as this ffmpeg is self-contained and won't interfere with MacPorts ffmpeg it's ok.


>> Finally, I fail with:
>> 
>> dvdnav/dvdnav.c: In function 'dvdnav_open':
>> dvdnav/dvdnav.c:79: error: 'DVDNAV_SVN_REV' undeclared (first use in this function)
>> dvdnav/dvdnav.c:79: error: (Each undeclared identifier is reported only once
>> dvdnav/dvdnav.c:79: error: for each function it appears in.)
> 
> Strange.

I do actually have the ffmpeg port installed as well. Perhaps it's picking up some parts of that. After done rebuilding qt4-mac, will re-try with ffmpeg deactivated.


>>> *Needs qt4-mac +mysql5.  Takes 1 hour plus to build the dependencies on my quad-core MBP.
>> 
>> Admittedly I have not done this yet. Guess I'd better get started.
> 
> In specifying the port dependency, how does one check that a particular variant is present?

You can't do that in the dependency itself. That's #126:

https://trac.macports.org/ticket/126

So the best you can do is identify some file that qt4-mac +mysql would install (that no other variant of qt4-mac would install), and check for its presence; if it's not there, tell the user to install qt4-mac with the +mysql variant. You can follow the example of the plasmaclient port.


> Also, some more searching suggests that qt ver 4.6.3 might work where the default 4.7.4 doesn't.  How does one get a list of the versions of a port that may be installed?

MacPorts only provides one version of each port, and there is no command to install any other version. MacPorts has qt4-mac 4.7.4 only. It will be upgraded to 4.8.0 once that's available.

If you want to manually install an older version of the qt4-mac port from back when it was version 4.6.3, just to test, see:

https://trac.macports.org/wiki/howto/InstallingOlderPort




More information about the macports-dev mailing list