Proposal: drop the hard dependency on mingw32-gettext from mingw32-glib2
by Erik van Pienbroek
Hi,
Recently I was browsing the upstream GTK website and I noticed that
upstream has used a special trick to build the Win32 binaries for GLib.
In order to make the dependency on gettext a soft one they used a small
static wrapper library called libproxy-intl [1]. With this wrapper
library the GLib DLL doesn't depend directly anymore on libintl-8.dll
(from mingw32-gettext). The wrapper library makes the hard dependency a
runtime one. This means that if libintl-8.dll is bundled with the
application then gettext translations will be used, otherwise nothing
gets translated.
I'd like to propose that we apply this change as well in our Fedora
MinGW toolchain.
Such a change consists of the following smaller changes:
- Bundle the libproxy-intl code (1 .c file and 1 .h file) in
the mingw32-gettext srpm as additional source files
- Compile the libproxy-intl code with these 2 instructions:
%{_mingw32_cc} -c libintl.c -o libintl.o -I.
%{_mingw32_ar} rc libintl.a libintl.o
- Replace the files libintl.{a,.dll.a,.la} generated by the
gettext compilation with the libintl.a file from libproxy-intl.
This makes any binary which tries to link against mingw32-gettext
using '-lintl' have a soft-dependency on libintl.
After this a simple rebuild of mingw32-glib2 should be sufficient enough
to make mingw32-gettext a soft dependency.
Next to glib2 there are also some other packages which have a hard
dependency on libintl-8.dll:
$ repoquery --whatrequires 'mingw32(libintl-8.dll)'
mingw32-atk-0:1.32.0-1.fc14.noarch
mingw32-gdk-pixbuf-0:2.22.0-1.fc14.noarch
mingw32-glib2-0:2.26.0-1.fc14.noarch
mingw32-gnutls-0:2.6.4-3.fc13.noarch
mingw32-gtk-vnc-0:0.4.1-1.fc14.noarch
mingw32-gtk2-0:2.22.0-1.fc14.noarch
mingw32-gtkhtml3-0:3.32.0-1.fc14.noarch
mingw32-gvnc-0:0.4.1-1.fc14.noarch
mingw32-hunspell-0:1.2.8-11.fc12.noarch
mingw32-libglade2-0:2.6.4-4.fc12.noarch
mingw32-libidn-0:1.14-5.fc12.noarch
Most of these packages (if not all) don't use gettext directly, but get
linked against gettext because of it being mentioned in glib2's
pkgconfig and .la files. A rebuild should be sufficient to replace the
hard dependencies on those packages by soft ones. However, in order to
prevent the libproxy-intl functions from being exported in other DLL's
(as mentioned on [1]) I think it's better drop the reference to libintl
from glib2's pkgconfig and .la files. As most of the packages mentioned
above don't use gettext directly, but the GLib gettext functions to
handle translations this shouldn't cause any major problems.
As the glib2 headers depend on the libintl.h header a 'Requires:
mingw32-gettext' also needs to be added to the mingw32-glib2 package.
I already applied these changes in a testing repository for a generic
cross compiler framework (coming soon!) [2][3] and it works fine there.
Another thing GTK upstream has done in their Win32 binaries is using
win-iconv instead of GNU iconv. I just put up a review request for
mingw32-win-iconv at [4]. Could somebody please review that package?
Does everybody agree to these changes?
Kind regards,
Erik van Pienbroek
[1]: http://www.gtk.org/download-windows.html
[2]: http://svn.openftd.org/svn/fedora_cross
[3]: http://svn.openftd.org/viewvc/Fedora%20Cross%20Compiler%
20Framework/
[4]: https://bugzilla.redhat.com/show_bug.cgi?id=642208
13 years, 1 month
[Bug 673784] Rename Request: mingw32-filesystem -> mingw-filesystem - Cross compiler base filesystem and environment
by Red Hat Bugzilla
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=673784
Michael Cronenworth <mike(a)cchtml.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flag| |fedora-review+
--- Comment #29 from Michael Cronenworth <mike(a)cchtml.com> 2011-05-06 11:48:32 EDT ---
Scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3054732
Rpmlint:
$ rpmlint mingw-filesystem mingw-filesystem-scripts mingw32-filesystem
mingw64-filesystem
mingw-filesystem.noarch: W: obsolete-not-provided cross-filesystem
mingw-filesystem.noarch: W: no-documentation
mingw-filesystem-scripts.noarch: W: obsolete-not-provided
cross-filesystem-scripts
mingw-filesystem-scripts.noarch: W: only-non-binary-in-usr-lib
mingw-filesystem-scripts.noarch: E: incorrect-fsf-address
/usr/libexec/mingw-scripts
mingw32-filesystem.noarch: W: no-documentation
mingw32-filesystem.noarch: W: dangling-symlink /usr/bin/mingw32-qmake-qt4
/usr/libexec/mingw-scripts
mingw32-filesystem.noarch: W: dangling-symlink /usr/bin/mingw32-cmake
/usr/libexec/mingw-scripts
mingw32-filesystem.noarch: W: dangling-symlink /usr/bin/mingw32-configure
/usr/libexec/mingw-scripts
mingw32-filesystem.noarch: W: dangling-symlink
/usr/bin/i686-w64-mingw32-pkg-config /usr/libexec/mingw-scripts
mingw32-filesystem.noarch: W: dangling-symlink /usr/bin/mingw32-pkg-config
/usr/libexec/mingw-scripts
mingw32-filesystem.noarch: W: dangling-symlink /usr/bin/mingw32-make
/usr/libexec/mingw-scripts
mingw32-filesystem.noarch: W: no-manual-page-for-binary mingw32-make
mingw32-filesystem.noarch: W: no-manual-page-for-binary
i686-w64-mingw32-pkg-config
mingw32-filesystem.noarch: W: no-manual-page-for-binary mingw32-qmake-qt4
mingw32-filesystem.noarch: W: no-manual-page-for-binary mingw32-cmake
mingw32-filesystem.noarch: W: no-manual-page-for-binary mingw32-configure
mingw32-filesystem.noarch: W: no-manual-page-for-binary mingw32-pkg-config
mingw64-filesystem.noarch: W: no-documentation
mingw64-filesystem.noarch: W: dangling-symlink /usr/bin/mingw64-qmake-qt4
/usr/libexec/mingw-scripts
mingw64-filesystem.noarch: W: dangling-symlink /usr/bin/mingw64-configure
/usr/libexec/mingw-scripts
mingw64-filesystem.noarch: W: dangling-symlink /usr/bin/mingw64-make
/usr/libexec/mingw-scripts
mingw64-filesystem.noarch: W: dangling-symlink /usr/bin/mingw64-pkg-config
/usr/libexec/mingw-scripts
mingw64-filesystem.noarch: W: dangling-symlink /usr/bin/mingw64-cmake
/usr/libexec/mingw-scripts
mingw64-filesystem.noarch: W: dangling-symlink
/usr/bin/x86_64-w64-mingw32-pkg-config /usr/libexec/mingw-scripts
mingw64-filesystem.noarch: W: no-manual-page-for-binary mingw64-pkg-config
mingw64-filesystem.noarch: W: no-manual-page-for-binary mingw64-make
mingw64-filesystem.noarch: W: no-manual-page-for-binary
x86_64-w64-mingw32-pkg-config
mingw64-filesystem.noarch: W: no-manual-page-for-binary mingw64-qmake-qt4
mingw64-filesystem.noarch: W: no-manual-page-for-binary mingw64-cmake
mingw64-filesystem.noarch: W: no-manual-page-for-binary mingw64-configure
4 packages and 0 specfiles checked; 1 errors, 30 warnings.
Looks like there's still one FSF address issue. The man pages are obvious dupes
of native tools so they aren't required. It looks good to me.
APPROVED
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
13 years, 1 month