[gthumb] Cygwin support for 2.11



commit 406f8d44455fc34000f318ad4eb33f35fa6b3738
Author: Cygwin Ports maintainer <yselkowitz users sourceforge net>
Date:   Wed Jun 30 13:05:08 2010 +0200

    Cygwin support for 2.11
    
    [bug #608115]

 configure.ac                         |    5 ++++-
 data/gthumb.pc.in                    |    2 +-
 extensions/Makefile.am               |    4 ++--
 extensions/file_tools/Makefile.am    |    2 +-
 extensions/flicker/Makefile.am       |    2 +-
 extensions/importer/Makefile.am      |    2 +-
 extensions/jpeg_utils/transupp-62.c  |    5 -----
 extensions/oauth/Makefile.am         |    2 +-
 extensions/picasaweb/Makefile.am     |    2 +-
 extensions/pixbuf_savers/Makefile.am |    2 +-
 extensions/webalbums/Makefile.am     |    2 +-
 gthumb/Makefile.am                   |    7 ++++++-
 gthumb/gth-extensions.c              |   11 +++++++++++
 13 files changed, 31 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1e30b03..7dcf975 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,11 +239,14 @@ AC_MSG_RESULT([$os_win32])
 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
 
 if test "$platform_win32" = "yes" ; then
-	EXTENSION_LIBTOOL_FLAGS='-module -avoid-version -no-undefined -Wl,$(top_builddir)/src/.libs/gthumb.exe.a'
+	EXTENSION_LIBTOOL_FLAGS='-module -avoid-version -no-undefined -Wl,$(top_builddir)/gthumb/.libs/libgthumb.a'
+	GTHUMB_IMPLIB="-lgthumb"
 else
 	EXTENSION_LIBTOOL_FLAGS='-module -avoid-version -disable-static'
+	GTHUMB_IMPLIB=""
 fi
 AC_SUBST(EXTENSION_LIBTOOL_FLAGS)
+AC_SUBST(GTHUMB_IMPLIB)
 
 dnl ===========================================================================
 
diff --git a/data/gthumb.pc.in b/data/gthumb.pc.in
index 9e80dcc..4c28713 100644
--- a/data/gthumb.pc.in
+++ b/data/gthumb.pc.in
@@ -10,5 +10,5 @@ Name: gthumb
 Description: Image viewer and browser
 Version: @VERSION@
 Requires: gtk+-2.0
-Libs: -L${libdir}
+Libs: -L${libdir} @GTHUMB_IMPLIB@
 Cflags: -I${includedir}
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index 96b89f6..d96cfd7 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -10,16 +10,16 @@ SUBDIRS = 			\
 	exiv2_tools		\
 	export_tools		\
 	facebook		\
+	image_viewer		\
 	file_manager		\
 	file_tools		\
 	file_viewer		\
 	gstreamer_utils		\
 	gstreamer_tools		\
 	image_print		\
-	image_viewer		\
-	importer		\
 	jpeg_utils		\
 	image_rotation		\
+	importer		\
 	list_tools		\
 	oauth			\
 	photo_importer		\
diff --git a/extensions/file_tools/Makefile.am b/extensions/file_tools/Makefile.am
index 45cb134..8ec87af 100644
--- a/extensions/file_tools/Makefile.am
+++ b/extensions/file_tools/Makefile.am
@@ -68,7 +68,7 @@ libfile_tools_la_SOURCES = 		\
 
 libfile_tools_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libfile_tools_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
-libfile_tools_la_LIBADD = $(GTHUMB_LIBS)
+libfile_tools_la_LIBADD = $(GTHUMB_LIBS) ../image_viewer/libimage_viewer.la
 libfile_tools_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
 
 extensioninidir = $(extensiondir)
diff --git a/extensions/flicker/Makefile.am b/extensions/flicker/Makefile.am
index fc123fc..65a84c7 100644
--- a/extensions/flicker/Makefile.am
+++ b/extensions/flicker/Makefile.am
@@ -37,7 +37,7 @@ libflicker_la_SOURCES = 			\
 
 libflicker_la_CFLAGS = $(GTHUMB_CFLAGS) $(LIBSOUP_CFLAGS) $(GNOME_KEYRING_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libflicker_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
-libflicker_la_LIBADD = $(GTHUMB_LIBS) $(LIBSOUP_LIBS) $(GNOME_KEYRING_LIBS)
+libflicker_la_LIBADD = $(GTHUMB_LIBS) $(LIBSOUP_LIBS) $(GNOME_KEYRING_LIBS) ../importer/libimporter.la
 libflicker_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
 
 extensioninidir = $(extensiondir)
diff --git a/extensions/importer/Makefile.am b/extensions/importer/Makefile.am
index bc600da..de5095c 100644
--- a/extensions/importer/Makefile.am
+++ b/extensions/importer/Makefile.am
@@ -45,7 +45,7 @@ libimporter_la_SOURCES = 			\
 
 libimporter_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libimporter_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
-libimporter_la_LIBADD = $(GTHUMB_LIBS)
+libimporter_la_LIBADD = $(GTHUMB_LIBS) ../catalogs/libcatalogs.la ../exiv2_tools/libexiv2_tools.la ../image_rotation/libimage_rotation.la
 libimporter_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
 
 extensioninidir = $(extensiondir)
diff --git a/extensions/jpeg_utils/transupp-62.c b/extensions/jpeg_utils/transupp-62.c
index a5f276d..3d15dd2 100644
--- a/extensions/jpeg_utils/transupp-62.c
+++ b/extensions/jpeg_utils/transupp-62.c
@@ -50,11 +50,6 @@
 #define MAX(a, b)  (((a) > (b)) ? (a) : (b))
 #endif
 
-#ifdef __CYGWIN__
-#define height_in_blocks height_in_data_units
-#define width_in_blocks  width_in_data_units
-#endif
-
 
 static long
 jround_up (long a, long b)
diff --git a/extensions/oauth/Makefile.am b/extensions/oauth/Makefile.am
index 836a891..02185d4 100644
--- a/extensions/oauth/Makefile.am
+++ b/extensions/oauth/Makefile.am
@@ -20,7 +20,7 @@ liboauth_la_SOURCES = 				\
 
 liboauth_la_CFLAGS = $(GTHUMB_CFLAGS) $(LIBSOUP_CFLAGS) $(GNOME_KEYRING_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 liboauth_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
-liboauth_la_LIBADD = $(GTHUMB_LIBS) $(JPEG_LIBS) $(GNOME_KEYRING_LIBS)
+liboauth_la_LIBADD = $(GTHUMB_LIBS) $(JPEG_LIBS) $(GNOME_KEYRING_LIBS) $(LIBSOUP_LIBS)
 liboauth_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
 
 extensioninidir = $(extensiondir)
diff --git a/extensions/picasaweb/Makefile.am b/extensions/picasaweb/Makefile.am
index a4fa961..0102de3 100644
--- a/extensions/picasaweb/Makefile.am
+++ b/extensions/picasaweb/Makefile.am
@@ -38,7 +38,7 @@ libpicasaweb_la_SOURCES = 			\
 
 libpicasaweb_la_CFLAGS = $(GTHUMB_CFLAGS) $(LIBSOUP_CFLAGS) $(GNOME_KEYRING_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libpicasaweb_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
-libpicasaweb_la_LIBADD = $(GTHUMB_LIBS) $(LIBSOUP_LIBS) $(GNOME_KEYRING_LIBS)
+libpicasaweb_la_LIBADD = $(GTHUMB_LIBS) $(LIBSOUP_LIBS) $(GNOME_KEYRING_LIBS) ../importer/libimporter.la
 libpicasaweb_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
 
 extensioninidir = $(extensiondir)
diff --git a/extensions/pixbuf_savers/Makefile.am b/extensions/pixbuf_savers/Makefile.am
index 5b8ca14..bfe9f34 100644
--- a/extensions/pixbuf_savers/Makefile.am
+++ b/extensions/pixbuf_savers/Makefile.am
@@ -47,7 +47,7 @@ libpixbuf_savers_la_SOURCES = 	\
 
 libpixbuf_savers_la_CFLAGS = $(GTHUMB_CFLAGS) $(TIFF_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
 libpixbuf_savers_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
-libpixbuf_savers_la_LIBADD = $(GTHUMB_LIBS) $(TIFF_LIBS)
+libpixbuf_savers_la_LIBADD = $(GTHUMB_LIBS) $(TIFF_LIBS) ../jpeg_utils/libjpeg_utils.la
 libpixbuf_savers_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
 
 extensioninidir = $(extensiondir)
diff --git a/extensions/webalbums/Makefile.am b/extensions/webalbums/Makefile.am
index 5c11ead..ebeafe5 100644
--- a/extensions/webalbums/Makefile.am
+++ b/extensions/webalbums/Makefile.am
@@ -34,7 +34,7 @@ endif
 
 libwebalbums_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb -DWEBALBUM_DATADIR=\"$(webalbum_datadir)\"
 libwebalbums_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
-libwebalbums_la_LIBADD = $(GTHUMB_LIBS)
+libwebalbums_la_LIBADD = $(GTHUMB_LIBS) ../image_rotation/libimage_rotation.la
 libwebalbums_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
 
 extensioninidir = $(extensiondir)
diff --git a/gthumb/Makefile.am b/gthumb/Makefile.am
index 8e48bb6..5d9c3c1 100644
--- a/gthumb/Makefile.am
+++ b/gthumb/Makefile.am
@@ -236,7 +236,7 @@ gthumb_SOURCES = 					\
 	$(NULL)
 
 if PLATFORM_WIN32
-gthumb_LDFLAGS = -Wl,--export-all-symbols,--out-implib,.libs/gthumb.exe.a
+gthumb_LDFLAGS = -Wl,--export-all-symbols,--out-implib,.libs/libgthumb.a
 endif
 
 gthumb_LDADD =						\
@@ -335,4 +335,9 @@ EXTRA_DIST = 			\
 dist-hook:
 	cd $(distdir); rm -f $(CLEANFILES)
 
+if PLATFORM_WIN32
+install-exec-hook:
+	$(INSTALL_DATA) .libs/libgthumb.a $(DESTDIR)$(pkglibdir)/libgthumb.a
+endif
+
 -include $(top_srcdir)/git.mk
diff --git a/gthumb/gth-extensions.c b/gthumb/gth-extensions.c
index 99cda77..6a00bb1 100644
--- a/gthumb/gth-extensions.c
+++ b/gthumb/gth-extensions.c
@@ -654,6 +654,17 @@ gth_extension_manager_load_extensions (GthExtensionManager *self)
 
 	g_return_if_fail (GTH_IS_EXTENSION_MANAGER (self));
 
+#ifdef G_PLATFORM_WIN32
+	{
+		char *path;
+
+		path = g_getenv ("PATH");
+		path = g_strconcat (path, G_SEARCHPATH_SEPARATOR_S GTHUMB_EXTENSIONS_DIR, NULL);
+		g_setenv ("PATH", path, TRUE);
+		g_free (path);
+	}
+#endif
+
 	extensions_dir = g_file_new_for_path (GTHUMB_EXTENSIONS_DIR);
 	enumerator = g_file_enumerate_children (extensions_dir, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, NULL, NULL);
 	while ((info = g_file_enumerator_next_file (enumerator, NULL, NULL)) != NULL) {



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