[pango] build: move usp10 before gdi32



commit 0fc06306063d8f3c8bd1e0d371eeb35ba9a9ea64
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sat Apr 7 06:33:43 2018 +0200

    build: move usp10 before gdi32
    
    Without this pango on mingw64 tries to lookup up the Script* functions
    in gdi32 and fails. It already fails at the build stage because the
    introspection dump crashes with a missing entry point error.
    
    Moving usp10 before gdi32 makes things work.
    
    This might be related to the warning in the uniscribe docs:
    "Important Starting with Windows 8: To maintain the ability to run on
    Windows 7, a module that uses Uniscribe must specify Usp10.lib
    before gdi32.lib in its library list."
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795045

 pango/Makefile.am |    2 +-
 pango/meson.build |    4 +++-
 pangowin32.pc.in  |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/pango/Makefile.am b/pango/Makefile.am
index 0ce8435..b360533 100644
--- a/pango/Makefile.am
+++ b/pango/Makefile.am
@@ -393,7 +393,7 @@ libpangowin32_1_0_la_LDFLAGS = $(LIBRARY_LIBTOOL_OPTIONS)
 libpangowin32_1_0_la_LIBADD =                  \
        libpango-$(PANGO_API_VERSION).la        \
        $(GLIB_LIBS)                            \
-       -lgdi32 -lusp10
+       -lusp10 -lgdi32
 libpangowin32_1_0_la_DEPENDENCIES =            \
        libpango-$(PANGO_API_VERSION).la
 libpangowin32_1_0_la_SOURCES = \
diff --git a/pango/meson.build b/pango/meson.build
index 3312d72..25b939f 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -304,10 +304,12 @@ if host_system == 'windows'
     'pangowin32-shape.c',
   ]
 
+  # usp10 needs to be before gdi32
+  # see https://bugzilla.gnome.org/show_bug.cgi?id=795045#c0
   pangowin32_deps = pango_deps + [
     libpango_dep,
-    cc.find_library('gdi32'),
     cc.find_library('usp10'),
+    cc.find_library('gdi32'),
   ]
 
   pangowin32_rc = configure_file(
diff --git a/pangowin32.pc.in b/pangowin32.pc.in
index 4c9b879..34ea6a3 100644
--- a/pangowin32.pc.in
+++ b/pangowin32.pc.in
@@ -8,5 +8,5 @@ Description: Win32 GDI font support for Pango
 Version: @VERSION@
 Requires: pango
 Libs: -L${libdir} -lpangowin32-@PANGO_API_VERSION@
-Libs.private: -lgdi32 -lusp10
+Libs.private: -lusp10 -lgdi32
 Cflags: -I${includedir}/pango-1.0


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