# This file is part of mingw-cross-env. # See doc/index.html for further information. # GTK+ PKG := gtk3 $(PKG)_IGNORE := $(PKG)_VERSION := 3.0.1 $(PKG)_CHECKSUM := 422831c108a1869c1275609dc42629055471cc2b $(PKG)_SUBDIR := gtk+-$($(PKG)_VERSION) $(PKG)_FILE := gtk+-$($(PKG)_VERSION).tar.bz2 $(PKG)_WEBSITE := http://www.gtk.org/ $(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtk+/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc gettext libpng jpeg tiff glib atk pango cairo gdk-pixbuf define $(PKG)_UPDATE wget -q -O- 'http://git.gnome.org/browse/gtk+/refs/tags' | \ grep ']*>\([3]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ head -1 endef define $(PKG)_BUILD # [PATCH 01/11] s,DllMain,static _disabled_DllMain, $(SED) -i 's,DllMain,static _disabled_DllMain,' '$(1)/gdk/win32/gdkmain-win32.c' $(SED) -i 's,DllMain,static _disabled_DllMain,' '$(1)/gtk/gtkmain.c' # [PATCH 02/11] s,__declspec(dllimport),, # [PATCH 03/11] s,__declspec(dllexport),, # no longer required # [PATCH 04/11] fix gtk+-2.0.pc.in $(SED) -i 's,^\(Libs:.*\)@GTK_EXTRA_LIBS@,\1@GTK_DEP_LIBS@ -lwinspool -lcomctl32 -lcomdlg32,' '$(1)/gtk+-3.0.pc.in' # [PATCH 05/11] disable gtkbuiltincache $(SED) -i 's,^\(gtkbuiltincache\.h:\),_disabled_\1,' '$(1)/gtk/Makefile.in' # [PATCH 06/11] disable test-inline-pixbufs.h $(SED) -i 's,\(BUILT_SOURCES.*=.*\)test-inline-pixbufs.h,\1,' '$(1)/demos/Makefile.in' # [PATCH 07/11] permit static building $(SED) -i 's,"[^"]*must build as DLL[^"]*","(disabled warning)",' '$(1)/configure' $(SED) -i 's,enable_static=no,enable_static=yes,g' '$(1)/configure' $(SED) -i 's,enable_shared=yes,enable_shared=no,g' '$(1)/configure' # [PATCH 08/11] no -Wl $(SED) -i 's/-Wl,-luuid/-luuid/' '$(1)/configure' # [PATCH 09/11] gio not gio-unix # no longer required # [PATCH 10/11] set cross_compiling explicitly to avoid Wine interference $(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/configure' # [PATCH 11/11] removed duplicate _gtk_marshal_OBJECT__VOID() # no longer required cd '$(1)' && ./configure \ --host='$(TARGET)' \ --disable-shared \ --prefix='$(PREFIX)/$(TARGET)' \ --enable-explicit-deps \ --disable-glibtest \ --disable-modules \ --disable-cups \ --disable-test-print-backend \ --disable-schemas-compile \ --disable-introspection \ --disable-gtk-doc \ --disable-gtk-doc-html \ --disable-gtk-doc-pdf \ --disable-man \ --with-included-immodules \ --without-x \ GLIB_COMPILE_SCHEMAS='$(PREFIX)/$(TARGET)/bin/glib-compile-schemas' $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic -mwindows \ '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gtk3.exe' \ `'$(TARGET)-pkg-config' gtk+-3.0 --cflags --libs` endef