[Fink-devel] qt5 pkgconfig woes
Hi there, so I was trying to update wireshark to 2.0.0, which means finally bitting the bullet and using qt5 for it. Turns out the pkgconfig .pc files for qt5 are all broken ?! They contain this: Libs: -F${libdir} '-Wl,-framework,QtCore ' Cflags: -I${included}/QtCore -I${includedir} But those Cflags are wrong, as /sw/lib/qt5-mac/include/ does not contain QtFOO directories (where FOO = Core, GUI, MacExtras, ...) The easiest fix I can think of is to augment all those packages to add symlinks from %p/lib/qt5-mac/include/QtNAME to %p/lib/qt5-mac/lib/QtNAME.framework/Headers Any concerns or comments on that? Better ideas? (And while I am complaining about Qt5: I guess "we" should update it to 5.5.1 one of those days *cough* the meaning of "we" in that sentence is another question, I guess I mean "somebody other than me, somebody who has a generous soul"... ;-) Cheers, Max -- ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net List archive: http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] qt5 pkgconfig woes
On Thu, November 19, 2015 5:57 am, Max Horn wrote: > Hi there, > > so I was trying to update wireshark to 2.0.0, which means finally bitting > the bullet and using qt5 for it. Turns out the pkgconfig .pc files for qt5 > are all broken ?! They contain this: > > Libs: -F${libdir} '-Wl,-framework,QtCore ' > Cflags: -I${included}/QtCore -I${includedir} > > But those Cflags are wrong, as > /sw/lib/qt5-mac/include/ > does not contain QtFOO directories (where FOO = Core, GUI, MacExtras, ...) > > The easiest fix I can think of is to augment all those packages to add > symlinks from > %p/lib/qt5-mac/include/QtNAME > to > %p/lib/qt5-mac/lib/QtNAME.framework/Headers Better solution is to fix the .pc files to have the correct Cflags pointing to the correct headers dir (otherwise packages will get stuck on expecting the symlink). How does Wireshark #include headers? #include or just ? If I remember -I and -F usage correctly, "Cflags: -F/sw/lib/qt5-mac/lib" should be sufficient for instances. For uses, it'll probably have to be appended with "-I/sw/lib/qt5-mac/lib/QtCore.framework/Headers" as well. Hanspeter -- More agile than a turtle, stronger than a mouse, nobler than a lettuce -- ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net List archive: http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel
Re: [Fink-devel] qt5 pkgconfig woes
Hanspeter, > On 19 Nov 2015, at 16:26, Hanspeter Niederstrasser> wrote: > > On Thu, November 19, 2015 5:57 am, Max Horn wrote: > [...] > Better solution is to fix the .pc files to have the correct Cflags > pointing to the correct headers dir Maybe, but (a) I have no idea how the .pc files are created, so I would have to use sed or perl to change the files after installation, and (b) I am not sure that would be enough (see below): > (otherwise packages will get stuck on > expecting the symlink). Not sure what you mean with that...? These are only build time requirements, used only by the preprocessor...? > > How does Wireshark #include headers? #include or just > ? Wireshark uses the latter form. But Qt itself uses the former. Hence: > > If I remember -I and -F usage correctly, "Cflags: -F/sw/lib/qt5-mac/lib" > should be sufficient for instances. For uses, > it'll probably have to be appended with > "-I/sw/lib/qt5-mac/lib/QtCore.framework/Headers" as well. Since both uses occur, we'd have to do both. Anyway, for the time being, I am working around it in my package like this: export PKG_CONFIG_PATH=$QT_PATH/lib/pkgconfig:$PKG_CONFIG_PATH export PATH="$QT_PATH/bin:$PATH" QT_LIBS="-F$QT_PATH/lib" QT_CPPFLAGS="-F$QT_PATH/lib" for fw in QtCore QtGui QtWidgets QtPrintSupport QtMacExtras QtMultimedia ; do QT_LIBS="$QT_LIBS -framework $fw" QT_CPPFLAGS="$QT_CPPFLAGS -I$QT_PATH/lib/$fw.framework/Headers" done export LIBS="$LIBS $QT_LIBS" export CPPFLAGS="$CPPFLAGS $QT_CPPFLAGS" It seems Gnuplot is doing something similar. Cheers, Max -- ___ Fink-devel mailing list Fink-devel@lists.sourceforge.net List archive: http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel