[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Proposed SIG: Windows MinGW cross-compiler SIG

Op dinsdag 08-07-2008 om 16:13 uur [tijdzone +0100], schreef Richard
W.M. Jones:
> I think it's reasonable to have a 'sample' spec file snippet for
> existing maintainers to use & modify when they feel they want to add
> MinGW support.  I'll give it a go with some existing libraries to see
> what they would look like.

First of all, great initiative!
This sure looks interesting for me, because the packages I develop also
need to run on Win32 environments and I hate to keep rebooting.

I've just read your draft packaging guidelines and I think there also
should be a pkg-config specific part. A lot of libraries use pkg-config
nowadays. In order to prevent autoconf/configure scripts from using the
host system headers and libraries, some additional preparation is

The man-page of pkg-config says the following with regard to overriding
the default search path:

"By default, pkg-config looks in the directory prefix/lib/pkgconfig for
these files; it will also look in the colon-separated (on Windows,
semicolon-separated) list of directories specified by the
PKG_CONFIG_PATH environment variable."

So if a mingw package requires a library which uses pkg-config, the spec
file should contain 'PKG_CONFIG_PATH=
%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig' right before
calling the ./configure script.

However, there's still another potential problem: according to the
man-page of pkg-config, the default path (prefix/lib/pkgconfig) is also
searched, which still can lead to conflicts. Maybe it is an idea to
patch pkg-config so that depending on some environment variable the
default path isn't searched.


Erik van Pienbroek

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]