From 70e86cda31510ee7609a8487f34d1b4c049cbc54 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Mon, 21 Feb 2011 20:20:41 +1100 Subject: rename gtk-->gtk2 in preparation for gtk3 --- src/gst-plugins-good.mk | 2 +- src/gtk-1-fixes.patch | 471 ------------------------------------------------ src/gtk-test.c | 29 --- src/gtk.mk | 49 ----- src/gtk2-1-fixes.patch | 471 ++++++++++++++++++++++++++++++++++++++++++++++++ src/gtk2-test.c | 29 +++ src/gtk2.mk | 49 +++++ src/gtkglext.mk | 2 +- src/gtkmm.mk | 2 +- src/gtksourceview.mk | 2 +- src/librsvg.mk | 2 +- 11 files changed, 554 insertions(+), 554 deletions(-) delete mode 100644 src/gtk-1-fixes.patch delete mode 100644 src/gtk-test.c delete mode 100644 src/gtk.mk create mode 100644 src/gtk2-1-fixes.patch create mode 100644 src/gtk2-test.c create mode 100644 src/gtk2.mk diff --git a/src/gst-plugins-good.mk b/src/gst-plugins-good.mk index ad1079e..3420f01 100644 --- a/src/gst-plugins-good.mk +++ b/src/gst-plugins-good.mk @@ -10,7 +10,7 @@ $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_WEBSITE := http://gstreamer.freedesktop.org/ $(PKG)_URL := http://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc glib libxml2 gstreamer gst-plugins-base liboil libshout cairo flac gtk jpeg libpng speex taglib +$(PKG)_DEPS := gcc glib libxml2 gstreamer gst-plugins-base liboil libshout cairo flac gtk2 jpeg libpng speex taglib define $(PKG)_UPDATE wget -q -O- 'http://cgit.freedesktop.org/gstreamer/gst-plugins-good/refs/tags' | \ diff --git a/src/gtk-1-fixes.patch b/src/gtk-1-fixes.patch deleted file mode 100644 index d97f1d9..0000000 --- a/src/gtk-1-fixes.patch +++ /dev/null @@ -1,471 +0,0 @@ -This file is part of mingw-cross-env. -See doc/index.html for further information. - -Contains ad hoc patches for cross building. - -From 1acd5465c0b9f2f612c5904ea7e652475fb3bee6 Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:43:43 +0200 -Subject: [PATCH 01/11] s,DllMain,static _disabled_DllMain, - - -diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c -index 94b7ac7..2c01be6 100644 ---- a/gdk/win32/gdkmain-win32.c -+++ b/gdk/win32/gdkmain-win32.c -@@ -65,7 +65,7 @@ const GOptionEntry _gdk_windowing_args[] = { - }; - - int __stdcall --DllMain (HINSTANCE hinstDLL, -+static _disabled_DllMain (HINSTANCE hinstDLL, - DWORD dwReason, - LPVOID reserved) - { -diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c -index fdf4730..428fd96 100644 ---- a/gtk/gtkmain.c -+++ b/gtk/gtkmain.c -@@ -73,7 +73,7 @@ - static HMODULE gtk_dll; - - BOOL WINAPI --DllMain (HINSTANCE hinstDLL, -+static _disabled_DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, - LPVOID lpvReserved) - { --- -1.7.1 - - -From bc446ce0785954ccf28825554c3074a15b4f4071 Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:46:20 +0200 -Subject: [PATCH 02/11] s,__declspec(dllimport),, - - -diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h -index 506f35d..f40de41 100644 ---- a/gdk/gdktypes.h -+++ b/gdk/gdktypes.h -@@ -41,7 +41,7 @@ - # ifdef GDK_COMPILATION - # define GDKVAR __declspec(dllexport) - # else --# define GDKVAR extern __declspec(dllimport) -+# define GDKVAR extern - # endif - #else - # define GDKVAR extern -diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h -index 2190973..0a1c43c 100644 ---- a/gtk/gtkdebug.h -+++ b/gtk/gtkdebug.h -@@ -66,7 +66,7 @@ typedef enum { - # ifdef GTK_COMPILATION - # define GTKVAR __declspec(dllexport) - # else --# define GTKVAR extern __declspec(dllimport) -+# define GTKVAR extern - # endif - #else - # define GTKVAR extern -diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h -index 21de92e..2c0f94c 100644 ---- a/gtk/gtkmain.h -+++ b/gtk/gtkmain.h -@@ -69,7 +69,7 @@ typedef gint (*GtkKeySnoopFunc) (GtkWidget *grab_widget, - #ifdef GTK_COMPILATION - #define GTKMAIN_C_VAR __declspec(dllexport) - #else --#define GTKMAIN_C_VAR extern __declspec(dllimport) -+#define GTKMAIN_C_VAR extern - #endif - #else - #define GTKMAIN_C_VAR extern -diff --git a/gtk/gtktexttypes.h b/gtk/gtktexttypes.h -index c624aea..b792ea5 100644 ---- a/gtk/gtktexttypes.h -+++ b/gtk/gtktexttypes.h -@@ -46,7 +46,7 @@ typedef struct _GtkTextMarkBody GtkTextMarkBody; - #ifdef GTK_COMPILATION - #define VARIABLE __declspec(dllexport) - #else --#define VARIABLE extern __declspec(dllimport) -+#define VARIABLE extern - #endif - #else - #define VARIABLE extern --- -1.7.1 - - -From 078f0c210e1706b4028907bf55cc55672d5dc7d3 Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 15:03:28 +0200 -Subject: [PATCH 03/11] s,__declspec(dllexport),, - - -diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h -index f40de41..07cfb4e 100644 ---- a/gdk/gdktypes.h -+++ b/gdk/gdktypes.h -@@ -39,7 +39,7 @@ - - #ifdef G_OS_WIN32 - # ifdef GDK_COMPILATION --# define GDKVAR __declspec(dllexport) -+# define GDKVAR - # else - # define GDKVAR extern - # endif -diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h -index 0a1c43c..507ff69 100644 ---- a/gtk/gtkdebug.h -+++ b/gtk/gtkdebug.h -@@ -64,7 +64,7 @@ typedef enum { - - #ifdef G_OS_WIN32 - # ifdef GTK_COMPILATION --# define GTKVAR __declspec(dllexport) -+# define GTKVAR - # else - # define GTKVAR extern - # endif -diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h -index 2c0f94c..9c47b57 100644 ---- a/gtk/gtkmain.h -+++ b/gtk/gtkmain.h -@@ -67,7 +67,7 @@ typedef gint (*GtkKeySnoopFunc) (GtkWidget *grab_widget, - */ - #ifdef G_PLATFORM_WIN32 - #ifdef GTK_COMPILATION --#define GTKMAIN_C_VAR __declspec(dllexport) -+#define GTKMAIN_C_VAR - #else - #define GTKMAIN_C_VAR extern - #endif -diff --git a/gtk/gtktexttypes.h b/gtk/gtktexttypes.h -index b792ea5..f382a64 100644 ---- a/gtk/gtktexttypes.h -+++ b/gtk/gtktexttypes.h -@@ -44,7 +44,7 @@ typedef struct _GtkTextMarkBody GtkTextMarkBody; - - #ifdef G_OS_WIN32 - #ifdef GTK_COMPILATION --#define VARIABLE __declspec(dllexport) -+#define VARIABLE - #else - #define VARIABLE extern - #endif --- -1.7.1 - - -From 69568bc7c8627d117521548192730665a9623b80 Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:17:22 +0200 -Subject: [PATCH 04/11] fix gtk+-2.0.pc.in - - -diff --git a/gtk+-2.0.pc.in b/gtk+-2.0.pc.in -index 46853e1..7f3eb22 100644 ---- a/gtk+-2.0.pc.in -+++ b/gtk+-2.0.pc.in -@@ -11,5 +11,5 @@ Name: GTK+ - Description: GTK+ Graphical UI Library (${target} target) - Version: @VERSION@ - Requires: gdk-${target}-2.0 @GTK_PACKAGES@ --Libs: -L${libdir} -lgtk-${target}-@GTK_API_VERSION@ @GTK_EXTRA_LIBS@ -+Libs: -L${libdir} -lgtk-${target}-@GTK_API_VERSION@ @GTK_DEP_LIBS@ -lwinspool -lcomctl32 -lcomdlg32 - Cflags: -I${includedir}/gtk-2.0 @GTK_EXTRA_CFLAGS@ --- -1.7.1 - - -From 1f60f6943b5c67a199660618e546de5f0faafeef Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:48:31 +0200 -Subject: [PATCH 05/11] disable gtkbuiltincache - - -diff --git a/gtk/Makefile.in b/gtk/Makefile.in -index 39a35c2..89bae23 100644 ---- a/gtk/Makefile.in -+++ b/gtk/Makefile.in -@@ -2872,7 +2872,7 @@ stamp-icons: $(STOCK_ICONS) - ) done \ - && touch stamp-icons - --gtkbuiltincache.h: @REBUILD@ stamp-icons -+_disabled_gtkbuiltincache.h: @REBUILD@ stamp-icons - $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST) - $(gtk_update_icon_cache_program) --force --ignore-theme-index \ - --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \ --- -1.7.1 - - -From e24f3fb7d18d0690dddd1fdb1a629a06d49b4c11 Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:49:50 +0200 -Subject: [PATCH 06/11] disable test-inline-pixbufs.h - - -diff --git a/demos/Makefile.in b/demos/Makefile.in -index 6bffbb8..c866923 100644 ---- a/demos/Makefile.in -+++ b/demos/Makefile.in -@@ -433,7 +433,7 @@ LDADDS = \ - $(GTK_DEP_LIBS) \ - $(MATH_LIB) - --BUILT_SOURCES = test-inline-pixbufs.h -+BUILT_SOURCES = - testpixbuf_DEPENDENCIES = $(DEPS) - testpixbuf_drawable_DEPENDENCIES = $(DEPS) - testpixbuf_save_DEPENDENCIES = $(DEPS) --- -1.7.1 - - -From b34df7c9461a798e9a8202eec886ac5e173da3ea Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:51:04 +0200 -Subject: [PATCH 07/11] permit static building - - -diff --git a/configure b/configure -index f203b13..51e6619 100755 ---- a/configure -+++ b/configure -@@ -4347,9 +4347,9 @@ if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; -- no) enable_static=no ;; -+ no) enable_static=yes ;; - *) -- enable_static=no -+ enable_static=yes - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do -@@ -4362,7 +4362,7 @@ if test "${enable_static+set}" = set; then : - ;; - esac - else -- enable_static=no -+ enable_static=yes - fi - - -@@ -4930,15 +4930,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - if test "$os_win32" = "yes"; then - if test x$enable_static = xyes -o x$enable_static = x; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling static library build, must build as DLL on Windows." >&5 --$as_echo "$as_me: WARNING: Disabling static library build, must build as DLL on Windows." >&2;} -- enable_static=no -+ { $as_echo "(disabled warning)" >&5 -+$as_echo "(disabled warning)" >&2;} -+ enable_static=yes - fi - if test x$enable_shared = xno; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling shared library build, must build as DLL on Windows." >&5 --$as_echo "$as_me: WARNING: Enabling shared library build, must build as DLL on Windows." >&2;} -+ { $as_echo "(disabled warning)" >&5 -+$as_echo "(disabled warning)" >&2;} - fi -- enable_shared=yes -+ enable_shared=no - fi - - enable_win32_dll=yes -@@ -8241,7 +8241,7 @@ done - if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in -- yes) enable_shared=yes ;; -+ yes) enable_shared=no ;; - no) enable_shared=no ;; - *) - enable_shared=no -@@ -8250,14 +8250,14 @@ if test "${enable_shared+set}" = set; then : - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then -- enable_shared=yes -+ enable_shared=no - fi - done - IFS="$lt_save_ifs" - ;; - esac - else -- enable_shared=yes -+ enable_shared=no - fi - - -@@ -11970,7 +11970,7 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } - # are all built from PIC. - case $host_os in - aix3*) -- test "$enable_shared" = yes && enable_static=no -+ test "$enable_shared" = yes && enable_static=yes - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' -@@ -11979,7 +11979,7 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -+ test "$enable_shared" = yes && enable_static=yes - fi - ;; - esac --- -1.7.1 - - -From 831f94ccf7a26662bfc9e8d22b9ae9eaea740bbb Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:53:18 +0200 -Subject: [PATCH 08/11] no -Wl - - -diff --git a/configure b/configure -index 51e6619..8c04264 100755 ---- a/configure -+++ b/configure -@@ -22951,7 +22951,7 @@ fi - fi - - if test "x$gdktarget" = "xwin32"; then -- GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid" -+ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -luuid" - if true; then - USE_WIN32_TRUE= - USE_WIN32_FALSE='#' --- -1.7.1 - - -From 2ec5f9d9ea8d7d80758c5272ff2e94fd0e7856e8 Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:54:15 +0200 -Subject: [PATCH 09/11] gio not gio-unix - - -diff --git a/configure b/configure -index 8c04264..d3e5e21 100755 ---- a/configure -+++ b/configure -@@ -23171,9 +23171,9 @@ fi - CFLAGS="$saved_cflags" - LDFLAGS="$saved_ldflags" - --# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c -+# Pull in gio for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c - if test "x$gdktarget" = "xx11"; then -- GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend" -+ GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend" - else - GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend" - fi --- -1.7.1 - - -From 3e9c211536912bf78c44172b7f6ecd8860887166 Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 14:55:33 +0200 -Subject: [PATCH 10/11] set cross_compiling explicitly to avoid Wine interference - - -diff --git a/configure b/configure -index d3e5e21..7ae7a5d 100755 ---- a/configure -+++ b/configure -@@ -555,7 +555,7 @@ ac_default_prefix=/usr/local - ac_clean_files= - ac_config_libobj_dir=. - LIBOBJS= --cross_compiling=no -+cross_compiling=yes - subdirs= - MFLAGS= - MAKEFLAGS= -@@ -3872,7 +3872,7 @@ $as_echo "$ac_try_echo"; } >&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then -- cross_compiling=no -+ cross_compiling=yes - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes --- -1.7.1 - - -From 01cc2d128be8a19c1434b912e378deae3b1bfcf9 Mon Sep 17 00:00:00 2001 -From: mingw-cross-env -Date: Fri, 24 Sep 2010 15:30:49 +0200 -Subject: [PATCH 11/11] removed duplicate _gtk_marshal_OBJECT__VOID() - - -diff --git a/perf/marshalers.c b/perf/marshalers.c -index f533ab0..0a37ba4 100644 ---- a/perf/marshalers.c -+++ b/perf/marshalers.c -@@ -49,43 +49,6 @@ - #endif /* !G_ENABLE_DEBUG */ - - --/* OBJECT:VOID (./marshalers.list:1) */ --void --_gtk_marshal_OBJECT__VOID (GClosure *closure, -- GValue *return_value G_GNUC_UNUSED, -- guint n_param_values, -- const GValue *param_values, -- gpointer invocation_hint G_GNUC_UNUSED, -- gpointer marshal_data) --{ -- typedef GObject* (*GMarshalFunc_OBJECT__VOID) (gpointer data1, -- gpointer data2); -- register GMarshalFunc_OBJECT__VOID callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; -- GObject* v_return; -- -- g_return_if_fail (return_value != NULL); -- g_return_if_fail (n_param_values == 1); -- -- if (G_CCLOSURE_SWAP_DATA (closure)) -- { -- data1 = closure->data; -- data2 = g_value_peek_pointer (param_values + 0); -- } -- else -- { -- data1 = g_value_peek_pointer (param_values + 0); -- data2 = closure->data; -- } -- callback = (GMarshalFunc_OBJECT__VOID) (marshal_data ? marshal_data : cc->callback); -- -- v_return = callback (data1, -- data2); -- -- g_value_take_object (return_value, v_return); --} -- - /* VOID:ENUM,OBJECT,DOUBLE (./marshalers.list:2) */ - void - _gtk_marshal_VOID__ENUM_OBJECT_DOUBLE (GClosure *closure, --- -1.7.1 - diff --git a/src/gtk-test.c b/src/gtk-test.c deleted file mode 100644 index 75b7460..0000000 --- a/src/gtk-test.c +++ /dev/null @@ -1,29 +0,0 @@ -/* This file is part of mingw-cross-env. */ -/* See doc/index.html for further information. */ - -#include - -int main(int argc, char *argv[]) -{ - GtkWidget* window; - GtkWidget* button; - - gtk_init(&argc, &argv); - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - button = gtk_button_new_with_label("Hello World"); - gtk_container_add(GTK_CONTAINER(window), button); - - g_signal_connect_swapped( - G_OBJECT(button), "clicked", - G_CALLBACK(gtk_widget_destroy), G_OBJECT(window)); - - g_signal_connect( - G_OBJECT(window), "destroy", - G_CALLBACK(gtk_main_quit), NULL); - - gtk_widget_show(button); - gtk_widget_show(window); - gtk_main(); - return 0; -} diff --git a/src/gtk.mk b/src/gtk.mk deleted file mode 100644 index d8fe558..0000000 --- a/src/gtk.mk +++ /dev/null @@ -1,49 +0,0 @@ -# This file is part of mingw-cross-env. -# See doc/index.html for further information. - -# GTK+ -PKG := gtk -$(PKG)_IGNORE := -$(PKG)_VERSION := 2.22.1 -$(PKG)_CHECKSUM := c88d8be4aebd6e59d6ca44d57f6acd18e2be1c08 -$(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 jasper glib atk pango cairo gdk-pixbuf - -define $(PKG)_UPDATE - wget -q -O- 'http://git.gnome.org/browse/gtk+/refs/tags' | \ - grep ']*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ - grep -v '^2\.9' | \ - head -1 -endef - -define $(PKG)_BUILD - cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' \ - --enable-explicit-deps \ - --disable-gdiplus \ - --disable-glibtest \ - --disable-modules \ - --disable-cups \ - --disable-test-print-backend \ - --disable-gtk-doc \ - --disable-man \ - --with-libpng \ - --with-libjpeg \ - --with-libtiff \ - --with-libjasper \ - --with-included-loaders \ - --with-included-immodules \ - --without-x - $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - - '$(TARGET)-gcc' \ - -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gtk.exe' \ - `'$(TARGET)-pkg-config' gtk+-2.0 --cflags --libs` -endef diff --git a/src/gtk2-1-fixes.patch b/src/gtk2-1-fixes.patch new file mode 100644 index 0000000..d97f1d9 --- /dev/null +++ b/src/gtk2-1-fixes.patch @@ -0,0 +1,471 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +Contains ad hoc patches for cross building. + +From 1acd5465c0b9f2f612c5904ea7e652475fb3bee6 Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:43:43 +0200 +Subject: [PATCH 01/11] s,DllMain,static _disabled_DllMain, + + +diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c +index 94b7ac7..2c01be6 100644 +--- a/gdk/win32/gdkmain-win32.c ++++ b/gdk/win32/gdkmain-win32.c +@@ -65,7 +65,7 @@ const GOptionEntry _gdk_windowing_args[] = { + }; + + int __stdcall +-DllMain (HINSTANCE hinstDLL, ++static _disabled_DllMain (HINSTANCE hinstDLL, + DWORD dwReason, + LPVOID reserved) + { +diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c +index fdf4730..428fd96 100644 +--- a/gtk/gtkmain.c ++++ b/gtk/gtkmain.c +@@ -73,7 +73,7 @@ + static HMODULE gtk_dll; + + BOOL WINAPI +-DllMain (HINSTANCE hinstDLL, ++static _disabled_DllMain (HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) + { +-- +1.7.1 + + +From bc446ce0785954ccf28825554c3074a15b4f4071 Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:46:20 +0200 +Subject: [PATCH 02/11] s,__declspec(dllimport),, + + +diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h +index 506f35d..f40de41 100644 +--- a/gdk/gdktypes.h ++++ b/gdk/gdktypes.h +@@ -41,7 +41,7 @@ + # ifdef GDK_COMPILATION + # define GDKVAR __declspec(dllexport) + # else +-# define GDKVAR extern __declspec(dllimport) ++# define GDKVAR extern + # endif + #else + # define GDKVAR extern +diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h +index 2190973..0a1c43c 100644 +--- a/gtk/gtkdebug.h ++++ b/gtk/gtkdebug.h +@@ -66,7 +66,7 @@ typedef enum { + # ifdef GTK_COMPILATION + # define GTKVAR __declspec(dllexport) + # else +-# define GTKVAR extern __declspec(dllimport) ++# define GTKVAR extern + # endif + #else + # define GTKVAR extern +diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h +index 21de92e..2c0f94c 100644 +--- a/gtk/gtkmain.h ++++ b/gtk/gtkmain.h +@@ -69,7 +69,7 @@ typedef gint (*GtkKeySnoopFunc) (GtkWidget *grab_widget, + #ifdef GTK_COMPILATION + #define GTKMAIN_C_VAR __declspec(dllexport) + #else +-#define GTKMAIN_C_VAR extern __declspec(dllimport) ++#define GTKMAIN_C_VAR extern + #endif + #else + #define GTKMAIN_C_VAR extern +diff --git a/gtk/gtktexttypes.h b/gtk/gtktexttypes.h +index c624aea..b792ea5 100644 +--- a/gtk/gtktexttypes.h ++++ b/gtk/gtktexttypes.h +@@ -46,7 +46,7 @@ typedef struct _GtkTextMarkBody GtkTextMarkBody; + #ifdef GTK_COMPILATION + #define VARIABLE __declspec(dllexport) + #else +-#define VARIABLE extern __declspec(dllimport) ++#define VARIABLE extern + #endif + #else + #define VARIABLE extern +-- +1.7.1 + + +From 078f0c210e1706b4028907bf55cc55672d5dc7d3 Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 15:03:28 +0200 +Subject: [PATCH 03/11] s,__declspec(dllexport),, + + +diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h +index f40de41..07cfb4e 100644 +--- a/gdk/gdktypes.h ++++ b/gdk/gdktypes.h +@@ -39,7 +39,7 @@ + + #ifdef G_OS_WIN32 + # ifdef GDK_COMPILATION +-# define GDKVAR __declspec(dllexport) ++# define GDKVAR + # else + # define GDKVAR extern + # endif +diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h +index 0a1c43c..507ff69 100644 +--- a/gtk/gtkdebug.h ++++ b/gtk/gtkdebug.h +@@ -64,7 +64,7 @@ typedef enum { + + #ifdef G_OS_WIN32 + # ifdef GTK_COMPILATION +-# define GTKVAR __declspec(dllexport) ++# define GTKVAR + # else + # define GTKVAR extern + # endif +diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h +index 2c0f94c..9c47b57 100644 +--- a/gtk/gtkmain.h ++++ b/gtk/gtkmain.h +@@ -67,7 +67,7 @@ typedef gint (*GtkKeySnoopFunc) (GtkWidget *grab_widget, + */ + #ifdef G_PLATFORM_WIN32 + #ifdef GTK_COMPILATION +-#define GTKMAIN_C_VAR __declspec(dllexport) ++#define GTKMAIN_C_VAR + #else + #define GTKMAIN_C_VAR extern + #endif +diff --git a/gtk/gtktexttypes.h b/gtk/gtktexttypes.h +index b792ea5..f382a64 100644 +--- a/gtk/gtktexttypes.h ++++ b/gtk/gtktexttypes.h +@@ -44,7 +44,7 @@ typedef struct _GtkTextMarkBody GtkTextMarkBody; + + #ifdef G_OS_WIN32 + #ifdef GTK_COMPILATION +-#define VARIABLE __declspec(dllexport) ++#define VARIABLE + #else + #define VARIABLE extern + #endif +-- +1.7.1 + + +From 69568bc7c8627d117521548192730665a9623b80 Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:17:22 +0200 +Subject: [PATCH 04/11] fix gtk+-2.0.pc.in + + +diff --git a/gtk+-2.0.pc.in b/gtk+-2.0.pc.in +index 46853e1..7f3eb22 100644 +--- a/gtk+-2.0.pc.in ++++ b/gtk+-2.0.pc.in +@@ -11,5 +11,5 @@ Name: GTK+ + Description: GTK+ Graphical UI Library (${target} target) + Version: @VERSION@ + Requires: gdk-${target}-2.0 @GTK_PACKAGES@ +-Libs: -L${libdir} -lgtk-${target}-@GTK_API_VERSION@ @GTK_EXTRA_LIBS@ ++Libs: -L${libdir} -lgtk-${target}-@GTK_API_VERSION@ @GTK_DEP_LIBS@ -lwinspool -lcomctl32 -lcomdlg32 + Cflags: -I${includedir}/gtk-2.0 @GTK_EXTRA_CFLAGS@ +-- +1.7.1 + + +From 1f60f6943b5c67a199660618e546de5f0faafeef Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:48:31 +0200 +Subject: [PATCH 05/11] disable gtkbuiltincache + + +diff --git a/gtk/Makefile.in b/gtk/Makefile.in +index 39a35c2..89bae23 100644 +--- a/gtk/Makefile.in ++++ b/gtk/Makefile.in +@@ -2872,7 +2872,7 @@ stamp-icons: $(STOCK_ICONS) + ) done \ + && touch stamp-icons + +-gtkbuiltincache.h: @REBUILD@ stamp-icons ++_disabled_gtkbuiltincache.h: @REBUILD@ stamp-icons + $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST) + $(gtk_update_icon_cache_program) --force --ignore-theme-index \ + --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \ +-- +1.7.1 + + +From e24f3fb7d18d0690dddd1fdb1a629a06d49b4c11 Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:49:50 +0200 +Subject: [PATCH 06/11] disable test-inline-pixbufs.h + + +diff --git a/demos/Makefile.in b/demos/Makefile.in +index 6bffbb8..c866923 100644 +--- a/demos/Makefile.in ++++ b/demos/Makefile.in +@@ -433,7 +433,7 @@ LDADDS = \ + $(GTK_DEP_LIBS) \ + $(MATH_LIB) + +-BUILT_SOURCES = test-inline-pixbufs.h ++BUILT_SOURCES = + testpixbuf_DEPENDENCIES = $(DEPS) + testpixbuf_drawable_DEPENDENCIES = $(DEPS) + testpixbuf_save_DEPENDENCIES = $(DEPS) +-- +1.7.1 + + +From b34df7c9461a798e9a8202eec886ac5e173da3ea Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:51:04 +0200 +Subject: [PATCH 07/11] permit static building + + +diff --git a/configure b/configure +index f203b13..51e6619 100755 +--- a/configure ++++ b/configure +@@ -4347,9 +4347,9 @@ if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; +- no) enable_static=no ;; ++ no) enable_static=yes ;; + *) +- enable_static=no ++ enable_static=yes + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do +@@ -4362,7 +4362,7 @@ if test "${enable_static+set}" = set; then : + ;; + esac + else +- enable_static=no ++ enable_static=yes + fi + + +@@ -4930,15 +4930,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "$os_win32" = "yes"; then + if test x$enable_static = xyes -o x$enable_static = x; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling static library build, must build as DLL on Windows." >&5 +-$as_echo "$as_me: WARNING: Disabling static library build, must build as DLL on Windows." >&2;} +- enable_static=no ++ { $as_echo "(disabled warning)" >&5 ++$as_echo "(disabled warning)" >&2;} ++ enable_static=yes + fi + if test x$enable_shared = xno; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling shared library build, must build as DLL on Windows." >&5 +-$as_echo "$as_me: WARNING: Enabling shared library build, must build as DLL on Windows." >&2;} ++ { $as_echo "(disabled warning)" >&5 ++$as_echo "(disabled warning)" >&2;} + fi +- enable_shared=yes ++ enable_shared=no + fi + + enable_win32_dll=yes +@@ -8241,7 +8241,7 @@ done + if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in +- yes) enable_shared=yes ;; ++ yes) enable_shared=no ;; + no) enable_shared=no ;; + *) + enable_shared=no +@@ -8250,14 +8250,14 @@ if test "${enable_shared+set}" = set; then : + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then +- enable_shared=yes ++ enable_shared=no + fi + done + IFS="$lt_save_ifs" + ;; + esac + else +- enable_shared=yes ++ enable_shared=no + fi + + +@@ -11970,7 +11970,7 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } + # are all built from PIC. + case $host_os in + aix3*) +- test "$enable_shared" = yes && enable_static=no ++ test "$enable_shared" = yes && enable_static=yes + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' +@@ -11979,7 +11979,7 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then +- test "$enable_shared" = yes && enable_static=no ++ test "$enable_shared" = yes && enable_static=yes + fi + ;; + esac +-- +1.7.1 + + +From 831f94ccf7a26662bfc9e8d22b9ae9eaea740bbb Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:53:18 +0200 +Subject: [PATCH 08/11] no -Wl + + +diff --git a/configure b/configure +index 51e6619..8c04264 100755 +--- a/configure ++++ b/configure +@@ -22951,7 +22951,7 @@ fi + fi + + if test "x$gdktarget" = "xwin32"; then +- GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid" ++ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -luuid" + if true; then + USE_WIN32_TRUE= + USE_WIN32_FALSE='#' +-- +1.7.1 + + +From 2ec5f9d9ea8d7d80758c5272ff2e94fd0e7856e8 Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:54:15 +0200 +Subject: [PATCH 09/11] gio not gio-unix + + +diff --git a/configure b/configure +index 8c04264..d3e5e21 100755 +--- a/configure ++++ b/configure +@@ -23171,9 +23171,9 @@ fi + CFLAGS="$saved_cflags" + LDFLAGS="$saved_ldflags" + +-# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c ++# Pull in gio for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c + if test "x$gdktarget" = "xx11"; then +- GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend" ++ GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend" + else + GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend" + fi +-- +1.7.1 + + +From 3e9c211536912bf78c44172b7f6ecd8860887166 Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 14:55:33 +0200 +Subject: [PATCH 10/11] set cross_compiling explicitly to avoid Wine interference + + +diff --git a/configure b/configure +index d3e5e21..7ae7a5d 100755 +--- a/configure ++++ b/configure +@@ -555,7 +555,7 @@ ac_default_prefix=/usr/local + ac_clean_files= + ac_config_libobj_dir=. + LIBOBJS= +-cross_compiling=no ++cross_compiling=yes + subdirs= + MFLAGS= + MAKEFLAGS= +@@ -3872,7 +3872,7 @@ $as_echo "$ac_try_echo"; } >&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then +- cross_compiling=no ++ cross_compiling=yes + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes +-- +1.7.1 + + +From 01cc2d128be8a19c1434b912e378deae3b1bfcf9 Mon Sep 17 00:00:00 2001 +From: mingw-cross-env +Date: Fri, 24 Sep 2010 15:30:49 +0200 +Subject: [PATCH 11/11] removed duplicate _gtk_marshal_OBJECT__VOID() + + +diff --git a/perf/marshalers.c b/perf/marshalers.c +index f533ab0..0a37ba4 100644 +--- a/perf/marshalers.c ++++ b/perf/marshalers.c +@@ -49,43 +49,6 @@ + #endif /* !G_ENABLE_DEBUG */ + + +-/* OBJECT:VOID (./marshalers.list:1) */ +-void +-_gtk_marshal_OBJECT__VOID (GClosure *closure, +- GValue *return_value G_GNUC_UNUSED, +- guint n_param_values, +- const GValue *param_values, +- gpointer invocation_hint G_GNUC_UNUSED, +- gpointer marshal_data) +-{ +- typedef GObject* (*GMarshalFunc_OBJECT__VOID) (gpointer data1, +- gpointer data2); +- register GMarshalFunc_OBJECT__VOID callback; +- register GCClosure *cc = (GCClosure*) closure; +- register gpointer data1, data2; +- GObject* v_return; +- +- g_return_if_fail (return_value != NULL); +- g_return_if_fail (n_param_values == 1); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- data1 = closure->data; +- data2 = g_value_peek_pointer (param_values + 0); +- } +- else +- { +- data1 = g_value_peek_pointer (param_values + 0); +- data2 = closure->data; +- } +- callback = (GMarshalFunc_OBJECT__VOID) (marshal_data ? marshal_data : cc->callback); +- +- v_return = callback (data1, +- data2); +- +- g_value_take_object (return_value, v_return); +-} +- + /* VOID:ENUM,OBJECT,DOUBLE (./marshalers.list:2) */ + void + _gtk_marshal_VOID__ENUM_OBJECT_DOUBLE (GClosure *closure, +-- +1.7.1 + diff --git a/src/gtk2-test.c b/src/gtk2-test.c new file mode 100644 index 0000000..75b7460 --- /dev/null +++ b/src/gtk2-test.c @@ -0,0 +1,29 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include + +int main(int argc, char *argv[]) +{ + GtkWidget* window; + GtkWidget* button; + + gtk_init(&argc, &argv); + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + button = gtk_button_new_with_label("Hello World"); + gtk_container_add(GTK_CONTAINER(window), button); + + g_signal_connect_swapped( + G_OBJECT(button), "clicked", + G_CALLBACK(gtk_widget_destroy), G_OBJECT(window)); + + g_signal_connect( + G_OBJECT(window), "destroy", + G_CALLBACK(gtk_main_quit), NULL); + + gtk_widget_show(button); + gtk_widget_show(window); + gtk_main(); + return 0; +} diff --git a/src/gtk2.mk b/src/gtk2.mk new file mode 100644 index 0000000..8946b6c --- /dev/null +++ b/src/gtk2.mk @@ -0,0 +1,49 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +# GTK+ +PKG := gtk2 +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.22.1 +$(PKG)_CHECKSUM := c88d8be4aebd6e59d6ca44d57f6acd18e2be1c08 +$(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 jasper glib atk pango cairo gdk-pixbuf + +define $(PKG)_UPDATE + wget -q -O- 'http://git.gnome.org/browse/gtk+/refs/tags' | \ + grep ']*>\([2]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ + grep -v '^2\.9' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --host='$(TARGET)' \ + --disable-shared \ + --prefix='$(PREFIX)/$(TARGET)' \ + --enable-explicit-deps \ + --disable-gdiplus \ + --disable-glibtest \ + --disable-modules \ + --disable-cups \ + --disable-test-print-backend \ + --disable-gtk-doc \ + --disable-man \ + --with-libpng \ + --with-libjpeg \ + --with-libtiff \ + --with-libjasper \ + --with-included-loaders \ + --with-included-immodules \ + --without-x + $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gtk2.exe' \ + `'$(TARGET)-pkg-config' gtk+-2.0 --cflags --libs` +endef diff --git a/src/gtkglext.mk b/src/gtkglext.mk index 8a8acd7..9260d42 100644 --- a/src/gtkglext.mk +++ b/src/gtkglext.mk @@ -10,7 +10,7 @@ $(PKG)_SUBDIR := gtkglext-$($(PKG)_VERSION) $(PKG)_FILE := gtkglext-$($(PKG)_VERSION).tar.gz $(PKG)_WEBSITE := http://gtkglext.sourceforge.net/ $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/gtkglext/gtkglext/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc gtk +$(PKG)_DEPS := gcc gtk2 define $(PKG)_UPDATE wget -q -O- 'http://git.gnome.org/cgit/gtkglext/refs/tags' | \ diff --git a/src/gtkmm.mk b/src/gtkmm.mk index d6d6c7d..b2f141a 100644 --- a/src/gtkmm.mk +++ b/src/gtkmm.mk @@ -10,7 +10,7 @@ $(PKG)_SUBDIR := gtkmm-$($(PKG)_VERSION) $(PKG)_FILE := gtkmm-$($(PKG)_VERSION).tar.bz2 $(PKG)_WEBSITE := http://www.gtkmm.org/ $(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtkmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) -$(PKG)_DEPS := gcc gtk libsigc++ pangomm cairomm atkmm +$(PKG)_DEPS := gcc gtk2 libsigc++ pangomm cairomm atkmm define $(PKG)_UPDATE wget -q -O- 'http://git.gnome.org/browse/gtkmm/refs/tags' | \ diff --git a/src/gtksourceview.mk b/src/gtksourceview.mk index d8937f7..ac6f48f 100644 --- a/src/gtksourceview.mk +++ b/src/gtksourceview.mk @@ -10,7 +10,7 @@ $(PKG)_SUBDIR := gtksourceview-$($(PKG)_VERSION) $(PKG)_FILE := gtksourceview-$($(PKG)_VERSION).tar.bz2 $(PKG)_WEBSITE := http://projects.gnome.org/gtksourceview/ $(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtksourceview/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) -$(PKG)_DEPS := gcc gtk libxml2 +$(PKG)_DEPS := gcc gtk2 libxml2 define $(PKG)_UPDATE wget -q -O- 'http://git.gnome.org/browse/gtksourceview/refs/tags' | \ diff --git a/src/librsvg.mk b/src/librsvg.mk index bcfb509..96b82e3 100644 --- a/src/librsvg.mk +++ b/src/librsvg.mk @@ -10,7 +10,7 @@ $(PKG)_SUBDIR := librsvg-$($(PKG)_VERSION) $(PKG)_FILE := librsvg-$($(PKG)_VERSION).tar.bz2 $(PKG)_WEBSITE := http://librsvg.sourceforge.net/ $(PKG)_URL := http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) -$(PKG)_DEPS := gcc glib libgsf cairo pango gtk libcroco +$(PKG)_DEPS := gcc glib libgsf cairo pango gtk2 libcroco define $(PKG)_UPDATE wget -q -O- 'http://git.gnome.org/browse/librsvg/refs/tags' | \ -- cgit v0.12