expecting a user to use `port select` from a Portfile (re: Qt 5 support on OS X 10.6)

Chris Jones jonesc at hep.phy.cam.ac.uk
Fri Mar 27 04:33:28 PDT 2015


On 27/03/15 11:05, René J.V. Bertin wrote:
> Hello,
>
> I've managed to get Qt 5.3 to build on OS X 10.6 and adapt my qt5-mac-devel Portfile for that. No small feat, as this is not officially supported by Digia. Main issue here: the system compilers on 10.6 (*gcc-4.2, and clang from Xcode 3.2 as well as Xcode 4.2) are incapable of building Qt 5.3 and care must thus be taken not to use them accidentally.
>
> This requires a modern version of clang, and in order to avoid ending up with a hard-wired clang version dependency my current approach instructs the user to use `port select` (or equivalent). The actual requirement is to have a modern compiler in the path (I've only tested with clang because that's what Qt 5.3 builds with on supported OS X versions). My own requirement is that there be no version information in the compiler name, in order to avoid said hard-wired dependencies and unnecessary rebuilds.
>
> I caught flak on my trac ticket for "requiring" port select, despite IMHO conforming to its intended use, i.e. user convenience. This requirement takes the form of testing for ${prefix}/bin/clang{,++} and aborting with instructions if those items are missing. Those would normally be one-time instructions, of course.
>
> What other approaches are there? I can only see a few
>
> - Change the rewriting of several Qt build script/config files so that they don't contain a full path to ${prefix}/bin/clang{,++}, presume that ${prefix}/bin will always and reliably be first in the path, and cross eyes, fingers and toes that everything builds correctly. Qt and Qt applications alike.
>
> - Hack the build system even more in order to provide a Qt-specific equivalent for the port select mechanism.
>
> - Drop the idea of supporting OS X 10.6 in an official port

How does requiring 'port select' to have been run work with the 
buildbots, where this cannot be done ? Personally, I agree with the 
comments that this is not something you should be requiring.

IMHO, if upstream have 'officially' dropped support for OSX10.6, then 
this is not something MacPorts ports should second guess, so my 
preference would be for the 3rd option, just drop support. This is what 
I did with the root6 port, which had a similar issue.

cheers Chris

>
> If I'm missing something obvious and more elegant than asking the user to use `port select` I'd love to hear about it, but as things stand I think it's the best compromise that doesn't even violate official dogma.
>
> BTW, it would also be about time to publish this port (and qt4-mac) so that more users can start installing and testing Qt4 and Qt5 applications alongside.
>
> The current port directory: https://trac.macports.org/attachment/ticket/46536/port%3Dqt5-mac-devel.tar.bz2
>
> R.
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-dev
>



More information about the macports-dev mailing list