Re: qt5 pkgconfig woes

Max Horn <[email protected]>
Newsgroups gmane.os.apple.fink.devel
Message-ID <[email protected]>
Hanspeter,

> On 19 Nov 2015, at 16:26, Hanspeter Niederstrasser <[email protected]> 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 <QtCore/QtCore> or just
> <QtCore> ?

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 <QtCore/Qtcore> instances.  For <QtCore> 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
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.