Tue 07 Jan 2014 02:12:48 PM UTC, original submission:
When attempting to build Octave with the GUI enabled using Homebrew, the build fails for two reasons:
1) Qt is packaged as a framework, not a set of shared libraries.
2) the framework is installed in /usr/local/Cellar/qt/4.8.5, not in the system framework locations.
A simple patch to configure.ac, supplied here, can solve this first problem. If you examine it, you'll see that it modifies the use of PKG-CONFIG on darwin*) platforms so that it can grab not just the -L and -l linker arguments, but the -F and -framework arguments as well, for QT_LDFLAGS and QT_LIBS. I strove to design this patch so that it leaves non-Mac platforms unaffected altogether, and still works for cases where Qt is made available using libraries instead of frameworks.
However, this still fails, because libtool does not process -F properly, which is necessary to address the second problem. I manually patched the libtool that is generated by the configure script, and that patch is also included here. However, because libtool is generated by configure, I do not know if it is possible for this patch to be applied to the source at all.
I do understand that, in theory, Homebrew can just apply these patches during the compilation process. I wanted to offer them here however in case you might wish to ensure that this scenario can succeed without Homebrew.
|