Summary: | sys-libs/zlib-1.2.6 on mingw32: two pkg-config files, bad pkg-config file, missing dll import lib | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nathan Phillip Brink (binki) (RETIRED) <binki> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge--info.txt
zlib-1.2.6.ebuild-mingw32.patch zlib-1.2.6-mingw32-destdir.patch |
Created attachment 304691 [details, diff]
zlib-1.2.6.ebuild-mingw32.patch
Created attachment 304693 [details, diff] zlib-1.2.6-mingw32-destdir.patch Pull pending: https://github.com/madler/zlib/pull/5 (In reply to comment #2) > Created attachment 304693 [details, diff] [details, diff] > zlib-1.2.6-mingw32-destdir.patch > > Pull pending: https://github.com/madler/zlib/pull/5 And pulled into https://github.com/madler/zlib/tree/develop if it's fixed in upstream, the i'm inclined to just wait for 1.2.7 to be released |
Created attachment 304689 [details] emerge--info.txt There are some improvements regarding mingw32 support in zlib-1.2.6. These are found in changes to win32/Makefile.gcc: 1. The import lib is installed as libz.dll.a instead of libzdll.a. This allows `gcc -static -o app app.o -lz' and `gcc -o app app.o -lz' to both work instead of requiring -lzdll when linking against the DLL. 2. The mingw32 Makefile now installs zlib.pc itself. However, each of these has some issues: 1. When compiling with USE=-static-libs, an `rm *.{l,}a' sort of command is run in src_install(). This does properly kill the mingw32 static libz.a, but it also kills the import lib named libz.dll.a. This makes it impossible to link anything against -lz at all (unless if you want to pull out dlltool, which is not something buildsystems will be doing). 2. The win32/Makefile.gcc does not have DESTDIR support, so when it performs substitutions into zlib.pc, the paths end up with ${D} in them. Thus, one gets output like: binkidesky zlib # mingw32-pkg-config --libs zlib -L/usr/mingw32/usr/mingw32/tmp/portage/sys-libs/zlib-1.2.6/image//usr/lib -lz Secondly, the mingw32 Makefile installs the .pc file into $(libdir)/pkgconfig while the ebuild itself installs it into $(datadir)/pkgconfig. And I have patches :-).