changeset 3165:e19ca43b6edd

[MSVC] enable Gdk-Pixbuf compilation (and bump version to 2.28.2)
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 22 Jul 2013 11:50:11 -0400
parents 1c7c6c090223
children b52db21b9dcd
files dist-files.mk index.html src/gdk-pixbuf-1-fixes.patch src/gdk-pixbuf.mk src/msvc-gdk-pixbuf-1.patch
diffstat 5 files changed, 76 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Sun Jul 21 23:33:12 2013 -0400
+++ b/dist-files.mk	Mon Jul 22 11:50:11 2013 -0400
@@ -288,6 +288,7 @@
   msvc-fltk-1.patch \
   msvc-fontconfig-1.patch \
   msvc-gcab-1.patch \
+  msvc-gdk-pixbuf-1.patch \
   msvc-gettext-1.patch \
   msvc-glib-1.patch \
   msvc-gnutls-1.patch \
--- a/index.html	Sun Jul 21 23:33:12 2013 -0400
+++ b/index.html	Mon Jul 22 11:50:11 2013 -0400
@@ -1230,7 +1230,7 @@
     </tr>
     <tr>
         <td id="gdk-pixbuf-package">gdk-pixbuf</td>
-        <td id="gdk-pixbuf-version">2.26.4</td>
+        <td id="gdk-pixbuf-version">2.28.2</td>
         <td id="gdk-pixbuf-website"><a href="http://www.gdk-pixbuf.org/">GDK-pixbuf</a></td>
     </tr>
     <tr>
--- a/src/gdk-pixbuf-1-fixes.patch	Sun Jul 21 23:33:12 2013 -0400
+++ b/src/gdk-pixbuf-1-fixes.patch	Mon Jul 22 11:50:11 2013 -0400
@@ -13,7 +13,7 @@
 index 411ceb6..64db155 100644
 --- a/gdk-pixbuf/gdk-pixbuf-io.c
 +++ b/gdk-pixbuf/gdk-pixbuf-io.c
-@@ -230,12 +230,12 @@ get_file_formats (void)
+@@ -207,12 +207,16 @@ get_file_formats (void)
  
  #ifdef G_OS_WIN32
  
@@ -23,8 +23,11 @@
  static HMODULE gdk_pixbuf_dll;
  
  BOOL WINAPI
--DllMain (HINSTANCE hinstDLL,
++#ifdef DLL_EXPORT
+ DllMain (HINSTANCE hinstDLL,
++#else
 +gdkpixbuf_DllMain (HINSTANCE hinstDLL,
++#endif
           DWORD     fdwReason,
           LPVOID    lpvReserved)
  {
--- a/src/gdk-pixbuf.mk	Sun Jul 21 23:33:12 2013 -0400
+++ b/src/gdk-pixbuf.mk	Mon Jul 22 11:50:11 2013 -0400
@@ -3,11 +3,14 @@
 
 PKG             := gdk-pixbuf
 $(PKG)_IGNORE   :=
-$(PKG)_CHECKSUM := 434dfac552fff8bc77bc2dca0e6ed8c268f8880d
+$(PKG)_CHECKSUM := 9876d0a20f592f8fb2a52d4a86ec43d607661beb
 $(PKG)_SUBDIR   := gdk-pixbuf-$($(PKG)_VERSION)
 $(PKG)_FILE     := gdk-pixbuf-$($(PKG)_VERSION).tar.xz
 $(PKG)_URL      := http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
-$(PKG)_DEPS     := glib libpng jpeg tiff jasper libiconv
+$(PKG)_DEPS     := glib libpng jasper libiconv
+ifneq ($(MXE_SYSTEM),msvc)
+    $(PKG)_DEPS += jpeg tiff
+endif
 
 define $(PKG)_UPDATE
     $(WGET) -q -O- 'http://git.gnome.org/browse/gdk-pixbuf/refs/tags' | \
@@ -17,14 +20,22 @@
     head -1
 endef
 
+$(PKG)_EXTRA_CONFIGURE_OPTIONS :=
+ifneq ($(MXE_SYSTEM),msvc)
+    $(PKG)_EXTRA_CONFIGURE_OPTIONS += --without-gdiplus
+endif
+
 define $(PKG)_BUILD
-    cd '$(1)' && autoreconf && ./configure \
+    cd '$(1)' && autoreconf -I '$(HOST_PREFIX)/share/aclocal' && ./configure \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
         $(ENABLE_SHARED_OR_STATIC) \
         --prefix='$(HOST_PREFIX)' \
         --disable-modules \
         --with-included-loaders \
-        --without-gdiplus \
-        LIBS="`'$(MXE_PKG_CONFIG)' --libs libtiff-4`"
+        --with-libjasper \
+        $($(PKG)_EXTRA_CONFIGURE_OPTIONS) \
+	PKG_CONFIG='$(MXE_PKG_CONFIG)' \
+	PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' \
+	&& $(CONFIGURE_POST_HOOK)
     $(MAKE) -C '$(1)' -j '$(JOBS)' install
 endef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/msvc-gdk-pixbuf-1.patch	Mon Jul 22 11:50:11 2013 -0400
@@ -0,0 +1,53 @@
+diff -ur gdk-pixbuf-2.28.2-orig/configure.ac gdk-pixbuf-2.28.2/configure.ac
+--- gdk-pixbuf-2.28.2-orig/configure.ac	2013-07-22 11:33:34 -0400
++++ gdk-pixbuf-2.28.2/configure.ac	2013-07-22 11:33:50 -0400
+@@ -633,7 +633,7 @@
+ 
+ dnl Test for libjasper
+   if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
+-    AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg -lm)
++    AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
+   fi
+ 
+   if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
+diff -ur gdk-pixbuf-2.28.2-orig/gdk-pixbuf/Makefile.am gdk-pixbuf-2.28.2/gdk-pixbuf/Makefile.am
+--- gdk-pixbuf-2.28.2-orig/gdk-pixbuf/Makefile.am	2013-01-19 13:54:09 -0500
++++ gdk-pixbuf-2.28.2/gdk-pixbuf/Makefile.am	2013-07-22 11:35:26 -0400
+@@ -11,7 +11,7 @@
+ 
+ if OS_WIN32
+ gdk_pixbuf_def = gdk_pixbuf.def
+-gdk_pixbuf_symbols = -export-symbols $(srcdir)/gdk_pixbuf.def
++gdk_pixbuf_symbols = -export-symbols-regex "xXx" -Wl,$(srcdir)/gdk_pixbuf.def
+ 
+ gdk_pixbuf_win32_res = gdk_pixbuf-win32-res.o
+ gdk_pixbuf_win32_res_ldflag = -Wl,gdk_pixbuf-win32-res.o
+@@ -207,8 +207,8 @@
+ # MinGW doesn't come with any import library for gdiplus.dll, so
+ # create a partial one that's enough for our use.
+ 
+-libgdiplus = libgdiplus.dll.a
+-gdiplus_ldflag = -Wl,$(libgdiplus)
++#libgdiplus = libgdiplus.dll.a
++gdiplus_ldflag = -lgdiplus
+ 
+ libgdiplus.dll.a: gdiplus.def
+ 	$(AM_V_GEN)$(DLLTOOL) --kill-at --dllname gdiplus.dll --input-def $(srcdir)/gdiplus.def --output-lib $@
+@@ -756,7 +756,7 @@
+ # that makes the install target for the loader libraries a dependency on
+ # install-data-am, and not install-exec-am. We need to ensure this gets run
+ # after the libraries are installed in their final locations.
+-install-data-hook: install-ms-lib install-def-file
++install-data-hook: install-def-file
+ 	@if $(RUN_QUERY_LOADER_TEST) ; then \
+ 	  $(mkinstalldirs) $(DESTDIR)$(libdir)/gdk-pixbuf-2.0/$(GDK_PIXBUF_BINARY_VERSION) ; \
+ 	  $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders$(EXEEXT) > $(DESTDIR)$(libdir)/gdk-pixbuf-2.0/$(GDK_PIXBUF_BINARY_VERSION)/loaders.cache ; \
+@@ -769,7 +769,7 @@
+ 	  echo "***" ; \
+ 	fi
+ 
+-uninstall-local: uninstall-ms-lib uninstall-def-file
++uninstall-local: uninstall-def-file
+ 	rm -f $(DESTDIR)$(libdir)/gdk-pixbuf-2.0/$(GDK_PIXBUF_BINARY_VERSION)/loaders.cache
+ 
+ if CROSS_COMPILING