# HG changeset patch # User Michael Goffioul # Date 1374632973 14400 # Node ID 8d294e37ce659e8651245ec8ec39abea3d578ecc # Parent 4a05b335972b6079d33b9c874d4f0f77903a06a0 [MSVC] enable Pango compilation (and bump version to 1.34.1) diff -r 4a05b335972b -r 8d294e37ce65 dist-files.mk --- a/dist-files.mk Tue Jul 23 22:29:33 2013 -0400 +++ b/dist-files.mk Tue Jul 23 22:29:33 2013 -0400 @@ -276,6 +276,7 @@ matio.mk \ mdbtools.mk \ mingw-cairo-1-ssize-t-defined.patch \ + mingw-pango-1-fixes.patch \ mingw-utils-1-portability-fix.patch \ mingw-utils.mk \ mingwrt.mk \ @@ -311,6 +312,7 @@ msvc-netcdf-1.patch \ msvc-nettle-1.patch \ msvc-ncurses-1.patch \ + msvc-pango-1.patch \ msvc-pixman-1.patch \ msvc-pstoedit-1.patch \ msvc-qhull-1.patch \ @@ -388,7 +390,6 @@ openscenegraph.mk \ openssl-1-winsock2.patch \ openssl.mk \ - pango-1-fixes.patch \ pango.mk \ pangomm.mk \ pcre.mk \ diff -r 4a05b335972b -r 8d294e37ce65 index.html --- a/index.html Tue Jul 23 22:29:33 2013 -0400 +++ b/index.html Tue Jul 23 22:29:33 2013 -0400 @@ -2005,7 +2005,7 @@ pango - 1.32.1 + 1.34.1 Pango diff -r 4a05b335972b -r 8d294e37ce65 src/mingw-pango-1-fixes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/mingw-pango-1-fixes.patch Tue Jul 23 22:29:33 2013 -0400 @@ -0,0 +1,176 @@ +This file is part of MXE. +See index.html for further information. + +From 6dc99b57932d52db33413b9f054ef8843f697ec0 Mon Sep 17 00:00:00 2001 +From: Mark Brand +Date: Wed, 29 Sep 2010 00:52:59 +0200 +Subject: [PATCH 1/4] s,DllMain,static _disabled_DllMain, + + +diff --git a/pango/pango-utils.c b/pango/pango-utils.c +index 18ffa26..aac59ab 100644 +--- a/pango/pango-utils.c ++++ b/pango/pango-utils.c +@@ -691,12 +691,12 @@ pango_config_key_get (const char *key) + + #ifdef G_OS_WIN32 + +-/* DllMain function needed to tuck away the DLL handle */ ++/* static _disabled_DllMain function needed to tuck away the DLL handle */ + + static HMODULE pango_dll; /* MT-safe */ + + BOOL WINAPI +-DllMain (HINSTANCE hinstDLL, ++static _disabled_DllMain (HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) + { +-- +1.7.10.4 + + +From e5359406f68e5bb4bd5f1b9516f9d28f41e8b38e Mon Sep 17 00:00:00 2001 +From: Mark Brand +Date: Wed, 29 Sep 2010 00:50:08 +0200 +Subject: [PATCH 2/4] add missing lib to pango.pc for static linking + + +diff --git a/pango.pc.in b/pango.pc.in +index 17a8b7a..16c5981 100644 +--- a/pango.pc.in ++++ b/pango.pc.in +@@ -10,5 +10,5 @@ Description: Internationalized text handling + Version: @VERSION@ + Requires: glib-2.0 gobject-2.0 + Requires.private: gmodule-no-export-2.0 +-Libs: -L${libdir} -lpango-@PANGO_API_VERSION@ @PKGCONFIG_MATH_LIBS@ ++Libs: -L${libdir} -lpango-@PANGO_API_VERSION@ @PKGCONFIG_MATH_LIBS@ -lusp10 + Cflags: -I${includedir}/pango-1.0 +-- +1.7.10.4 + + +From 8a4c71a44d76896fcdb610f50eaa07be3d108c3d Mon Sep 17 00:00:00 2001 +From: Mark Brand +Date: Fri, 15 Jun 2012 16:21:40 +0200 +Subject: [PATCH 3/4] do not force shared for win32 + + +diff --git a/configure.in b/configure.in +index a0e0057..fe1f7fe 100644 +--- a/configure.in ++++ b/configure.in +@@ -142,20 +142,6 @@ AC_CHECK_HEADERS(unistd.h sys/mman.h) + # Win32 stuff + # + +-AC_LIBTOOL_WIN32_DLL +-AM_DISABLE_STATIC +- +-if test "$pango_os_win32" = "yes"; then +- if test x$enable_static = xyes -o x$enable_static = x; then +- AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.]) +- enable_static=no +- fi +- if test x$enable_shared = xno; then +- AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.]) +- fi +- enable_shared=yes +-fi +- + AM_PROG_LIBTOOL + dnl when using libtool 2.x create libtool early, because it's used in configure + m4_ifdef([LT_OUTPUT], [LT_OUTPUT]) +diff --git a/modules/Makefile.am b/modules/Makefile.am +index 73b42f4..19c5a4f 100644 +--- a/modules/Makefile.am ++++ b/modules/Makefile.am +@@ -21,22 +21,7 @@ RUN_QUERY_MODULES_TEST=true + all-local: pango.modules + endif + +-install-data-local: $(top_builddir)/pango/pango-querymodules$(EXEEXT) +- @if $(RUN_QUERY_MODULES_TEST) && test -z "$(DESTDIR)" ; then \ +- echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango \&\& \ +- $(top_builddir)/pango/pango-querymodules$(EXEEXT) \ +- \> $(DESTDIR)$(sysconfdir)/pango/pango.modules ; \ +- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango && \ +- $(top_builddir)/pango/pango-querymodules$(EXEEXT) \ +- > $(DESTDIR)$(sysconfdir)/pango/pango.modules ; \ +- else \ +- echo "***" ; \ +- echo "*** Warning: $(sysconfdir)/pango/pango.modules" ; \ +- echo "*** not created" ; \ +- echo "*** Generate this file on the target system" ; \ +- echo "*** using pango-querymodules" ; \ +- echo "***" ; \ +- fi ++install-data-local: + + uninstall-local: + $(RM) $(DESTDIR)$(sysconfdir)/pango/pango.modules +-- +1.7.10.4 + + +From ed84a78833202e38407f47e1fcd28fa8e612d536 Mon Sep 17 00:00:00 2001 +From: Mark Brand +Date: Mon, 18 Jun 2012 21:36:53 +0200 +Subject: [PATCH 4/4] kill gtk-doc (MXE specific) + + +diff --git a/Makefile.am b/Makefile.am +index 1ac018a..1999723 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,6 +1,6 @@ + ## Process this file with automake to create Makefile.in. + +-SUBDIRS= pango modules pango-view examples docs tools tests build ++SUBDIRS= pango modules pango-view examples tools tests build + + EXTRA_DIST = \ + autogen.sh \ +diff --git a/autogen.sh b/autogen.sh +index bc7c59c..4e1918c 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -7,14 +7,6 @@ test -n "$srcdir" || srcdir=. + olddir=`pwd` + cd "$srcdir" + +-GTKDOCIZE=`which gtkdocize` +-if test -z $GTKDOCIZE; then +- echo "*** No GTK-Doc found, please install it ***" +- exit 1 +-else +- gtkdocize || exit $? +-fi +- + AUTORECONF=`which autoreconf` + if test -z $AUTORECONF; then + echo "*** No autoreconf found, please install it ***" +diff --git a/configure.in b/configure.in +index fe1f7fe..23c4311 100644 +--- a/configure.in ++++ b/configure.in +@@ -568,14 +568,7 @@ dnl ************************** + dnl *** Checks for gtk-doc *** + dnl ************************** + +-if $have_cairo ; then : ; else +- if test x$enable_gtk_doc = xyes ; then +- AC_MSG_WARN([Cairo not present, disabling doc building]) +- enable_gtk_doc=no +- fi +-fi +- +-GTK_DOC_CHECK([1.0]) ++enable_gtk_doc=no + + AC_ARG_ENABLE(man, + AC_HELP_STRING([--enable-man], +-- +1.7.10.4 + diff -r 4a05b335972b -r 8d294e37ce65 src/msvc-pango-1.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/msvc-pango-1.patch Tue Jul 23 22:29:33 2013 -0400 @@ -0,0 +1,60 @@ +diff -ur pango-1.34.1-orig/pango/Makefile.in pango-1.34.1/pango/Makefile.in +--- pango-1.34.1-orig/pango/Makefile.in 2013-05-13 11:34:50 -0400 ++++ pango-1.34.1/pango/Makefile.in 2013-07-22 22:18:27 -0400 +@@ -80,7 +80,7 @@ + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-@PLATFORM_WIN32_TRUE@am__append_1 = -export-symbols $(srcdir)/pango.def -Wl,pango-win32-res.o ++@PLATFORM_WIN32_TRUE@am__append_1 = -export-symbols-regex "xXx" -Wl,$(srcdir)/pango.def -Wl,pango-win32-res.o + @PLATFORM_WIN32_TRUE@am__append_2 = pango-win32-res.o pango.def + @HAVE_CAIRO_FREETYPE_TRUE@am__append_3 = freetype2 + +@@ -88,21 +88,21 @@ + @HAVE_FREETYPE_TRUE@am__append_4 = $(pangoft2_headers) + @HAVE_FREETYPE_TRUE@am__append_5 = libpangoft2-1.0.la + @HAVE_FREETYPE_TRUE@am__append_6 = PangoFT2-1.0.gir +-@PLATFORM_WIN32_TRUE@am__append_7 = -export-symbols $(srcdir)/pangoft2.def -Wl,pangoft2-win32-res.o ++@PLATFORM_WIN32_TRUE@am__append_7 = -export-symbols-regex "xXx" -Wl,$(srcdir)/pangoft2.def -Wl,pangoft2-win32-res.o + @PLATFORM_WIN32_TRUE@am__append_8 = pangoft2-win32-res.o pangoft2.def + + # ------------------- libpangoxft ------------------- + @HAVE_XFT_TRUE@am__append_9 = $(pangoxft_headers) + @HAVE_XFT_TRUE@am__append_10 = libpangoxft-1.0.la + @HAVE_XFT_TRUE@am__append_11 = PangoXft-1.0.gir +-@PLATFORM_WIN32_TRUE@am__append_12 = -export-symbols $(srcdir)/pangoxft.def -Wl,pangoxft-win32-res.o ++@PLATFORM_WIN32_TRUE@am__append_12 = -export-symbols-regex "xXx" -Wl,$(srcdir)/pangoxft.def -Wl,pangoxft-win32-res.o + @PLATFORM_WIN32_TRUE@am__append_13 = pangoxft-win32-res.o pangoxft.def + + # ------------------- libpangocairo ------------------- + @HAVE_CAIRO_TRUE@am__append_14 = $(pangocairo_headers) + @HAVE_CAIRO_TRUE@am__append_15 = libpangocairo-1.0.la + @HAVE_CAIRO_TRUE@am__append_16 = PangoCairo-1.0.gir +-@HAVE_CAIRO_WIN32_TRUE@@PLATFORM_WIN32_TRUE@am__append_17 = -export-symbols $(srcdir)/pangocairo.def -Wl,pangocairo-win32-res.o ++@HAVE_CAIRO_WIN32_TRUE@@PLATFORM_WIN32_TRUE@am__append_17 = -export-symbols-regex "xXx" -Wl,$(srcdir)/pangocairo.def -Wl,pangocairo-win32-res.o + @HAVE_CAIRO_WIN32_TRUE@@PLATFORM_WIN32_TRUE@am__append_18 = pangocairo-win32-res.o pangocairo.def + @HAVE_CAIRO_WIN32_TRUE@am__append_19 = libpangowin32-$(PANGO_API_VERSION).la $(WIN32_LIBS) + @HAVE_CAIRO_WIN32_TRUE@am__append_20 = libpangowin32-$(PANGO_API_VERSION).la +@@ -135,7 +135,7 @@ + # ------------------- libpangowin32 ------------------- + @HAVE_WIN32_TRUE@am__append_31 = pangowin32.h + @HAVE_WIN32_TRUE@am__append_32 = libpangowin32-1.0.la +-@PLATFORM_WIN32_TRUE@am__append_33 = -export-symbols $(srcdir)/pangowin32.def -Wl,pangowin32-win32-res.o ++@PLATFORM_WIN32_TRUE@am__append_33 = -export-symbols-regex "xXx" -Wl,$(srcdir)/pangowin32.def -Wl,pangowin32-win32-res.o + @PLATFORM_WIN32_TRUE@am__append_34 = pangowin32-win32-res.o pangowin32.def + bin_PROGRAMS = pango-querymodules$(EXEEXT) + @HAVE_XFT_TRUE@am__append_35 = libpangoxft-$(PANGO_API_VERSION).la +diff -ur pango-1.34.1-orig/pango-view/viewer-cairo.c pango-1.34.1/pango-view/viewer-cairo.c +--- pango-1.34.1-orig/pango-view/viewer-cairo.c 2012-08-24 15:08:22 -0400 ++++ pango-1.34.1/pango-view/viewer-cairo.c 2013-07-22 22:21:37 -0400 +@@ -76,7 +76,9 @@ + #endif /* HAVE_XFT */ + #endif /* HAVE_CAIRO_XLIB */ + +- ++#if defined (_MSC_VER) && ! defined (strcasecmp) ++# define strcasecmp stricmp ++#endif + + + static cairo_surface_t * diff -r 4a05b335972b -r 8d294e37ce65 src/pango-1-fixes.patch --- a/src/pango-1-fixes.patch Tue Jul 23 22:29:33 2013 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 6dc99b57932d52db33413b9f054ef8843f697ec0 Mon Sep 17 00:00:00 2001 -From: Mark Brand -Date: Wed, 29 Sep 2010 00:52:59 +0200 -Subject: [PATCH 1/4] s,DllMain,static _disabled_DllMain, - - -diff --git a/pango/pango-utils.c b/pango/pango-utils.c -index 18ffa26..aac59ab 100644 ---- a/pango/pango-utils.c -+++ b/pango/pango-utils.c -@@ -691,12 +691,12 @@ pango_config_key_get (const char *key) - - #ifdef G_OS_WIN32 - --/* DllMain function needed to tuck away the DLL handle */ -+/* static _disabled_DllMain function needed to tuck away the DLL handle */ - - static HMODULE pango_dll; /* MT-safe */ - - BOOL WINAPI --DllMain (HINSTANCE hinstDLL, -+static _disabled_DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, - LPVOID lpvReserved) - { --- -1.7.10.4 - - -From e5359406f68e5bb4bd5f1b9516f9d28f41e8b38e Mon Sep 17 00:00:00 2001 -From: Mark Brand -Date: Wed, 29 Sep 2010 00:50:08 +0200 -Subject: [PATCH 2/4] add missing lib to pango.pc for static linking - - -diff --git a/pango.pc.in b/pango.pc.in -index 17a8b7a..16c5981 100644 ---- a/pango.pc.in -+++ b/pango.pc.in -@@ -10,5 +10,5 @@ Description: Internationalized text handling - Version: @VERSION@ - Requires: glib-2.0 gobject-2.0 - Requires.private: gmodule-no-export-2.0 --Libs: -L${libdir} -lpango-@PANGO_API_VERSION@ @PKGCONFIG_MATH_LIBS@ -+Libs: -L${libdir} -lpango-@PANGO_API_VERSION@ @PKGCONFIG_MATH_LIBS@ -lusp10 - Cflags: -I${includedir}/pango-1.0 --- -1.7.10.4 - - -From 8a4c71a44d76896fcdb610f50eaa07be3d108c3d Mon Sep 17 00:00:00 2001 -From: Mark Brand -Date: Fri, 15 Jun 2012 16:21:40 +0200 -Subject: [PATCH 3/4] do not force shared for win32 - - -diff --git a/configure.in b/configure.in -index a0e0057..fe1f7fe 100644 ---- a/configure.in -+++ b/configure.in -@@ -142,20 +142,6 @@ AC_CHECK_HEADERS(unistd.h sys/mman.h) - # Win32 stuff - # - --AC_LIBTOOL_WIN32_DLL --AM_DISABLE_STATIC -- --if test "$pango_os_win32" = "yes"; then -- if test x$enable_static = xyes -o x$enable_static = x; then -- AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.]) -- enable_static=no -- fi -- if test x$enable_shared = xno; then -- AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.]) -- fi -- enable_shared=yes --fi -- - AM_PROG_LIBTOOL - dnl when using libtool 2.x create libtool early, because it's used in configure - m4_ifdef([LT_OUTPUT], [LT_OUTPUT]) -diff --git a/modules/Makefile.am b/modules/Makefile.am -index 73b42f4..19c5a4f 100644 ---- a/modules/Makefile.am -+++ b/modules/Makefile.am -@@ -21,22 +21,7 @@ RUN_QUERY_MODULES_TEST=true - all-local: pango.modules - endif - --install-data-local: $(top_builddir)/pango/pango-querymodules$(EXEEXT) -- @if $(RUN_QUERY_MODULES_TEST) && test -z "$(DESTDIR)" ; then \ -- echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango \&\& \ -- $(top_builddir)/pango/pango-querymodules$(EXEEXT) \ -- \> $(DESTDIR)$(sysconfdir)/pango/pango.modules ; \ -- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pango && \ -- $(top_builddir)/pango/pango-querymodules$(EXEEXT) \ -- > $(DESTDIR)$(sysconfdir)/pango/pango.modules ; \ -- else \ -- echo "***" ; \ -- echo "*** Warning: $(sysconfdir)/pango/pango.modules" ; \ -- echo "*** not created" ; \ -- echo "*** Generate this file on the target system" ; \ -- echo "*** using pango-querymodules" ; \ -- echo "***" ; \ -- fi -+install-data-local: - - uninstall-local: - $(RM) $(DESTDIR)$(sysconfdir)/pango/pango.modules --- -1.7.10.4 - - -From ed84a78833202e38407f47e1fcd28fa8e612d536 Mon Sep 17 00:00:00 2001 -From: Mark Brand -Date: Mon, 18 Jun 2012 21:36:53 +0200 -Subject: [PATCH 4/4] kill gtk-doc (MXE specific) - - -diff --git a/Makefile.am b/Makefile.am -index 1ac018a..1999723 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,6 +1,6 @@ - ## Process this file with automake to create Makefile.in. - --SUBDIRS= pango modules pango-view examples docs tools tests build -+SUBDIRS= pango modules pango-view examples tools tests build - - EXTRA_DIST = \ - autogen.sh \ -diff --git a/autogen.sh b/autogen.sh -index bc7c59c..4e1918c 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -7,14 +7,6 @@ test -n "$srcdir" || srcdir=. - olddir=`pwd` - cd "$srcdir" - --GTKDOCIZE=`which gtkdocize` --if test -z $GTKDOCIZE; then -- echo "*** No GTK-Doc found, please install it ***" -- exit 1 --else -- gtkdocize || exit $? --fi -- - AUTORECONF=`which autoreconf` - if test -z $AUTORECONF; then - echo "*** No autoreconf found, please install it ***" -diff --git a/configure.in b/configure.in -index fe1f7fe..23c4311 100644 ---- a/configure.in -+++ b/configure.in -@@ -568,14 +568,7 @@ dnl ************************** - dnl *** Checks for gtk-doc *** - dnl ************************** - --if $have_cairo ; then : ; else -- if test x$enable_gtk_doc = xyes ; then -- AC_MSG_WARN([Cairo not present, disabling doc building]) -- enable_gtk_doc=no -- fi --fi -- --GTK_DOC_CHECK([1.0]) -+enable_gtk_doc=no - - AC_ARG_ENABLE(man, - AC_HELP_STRING([--enable-man], --- -1.7.10.4 - diff -r 4a05b335972b -r 8d294e37ce65 src/pango.mk --- a/src/pango.mk Tue Jul 23 22:29:33 2013 -0400 +++ b/src/pango.mk Tue Jul 23 22:29:33 2013 -0400 @@ -3,7 +3,7 @@ PKG := pango $(PKG)_IGNORE := -$(PKG)_CHECKSUM := a29a17eae7117a1330aaa7b01795322a6ef966b6 +$(PKG)_CHECKSUM := a6c224424eb3f0dcc231a8000591c05a85df689c $(PKG)_SUBDIR := pango-$($(PKG)_VERSION) $(PKG)_FILE := pango-$($(PKG)_VERSION).tar.xz $(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/pango/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) @@ -17,8 +17,10 @@ endef define $(PKG)_BUILD - rm '$(1)'/docs/Makefile.am - cd '$(1)' && NOCONFIGURE=1 ./autogen.sh + if [ $(MXE_SYSTEM) = mingw ]; then \ + rm '$(1)'/docs/Makefile.am && \ + cd '$(1)' && NOCONFIGURE=1 ./autogen.sh; \ + fi cd '$(1)' && ./configure \ $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ $(ENABLE_SHARED_OR_STATIC) \ @@ -28,6 +30,10 @@ --enable-explicit-deps \ --with-included-modules \ --without-dynamic-modules \ - CXX='$(MXE_CXX)' - $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + CXX='$(MXE_CXX)' \ + PKG_CONFIG='$(MXE_PKG_CONFIG)' \ + PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' \ + && $(CONFIGURE_POST_HOOK) + $(MAKE) -C '$(1)' -j '$(JOBS)' noinst_PROGRAMS= + $(MAKE) -C '$(1)' -j 1 install noinst_PROGRAMS= endef