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

Bug#478405: RFS: QA upload of imlib 1.9.15-7



Chris Lamb wrote:

> The .dsc may be found here:
> 
>    http://chris-lamb.co.uk/debian/qa/imlib_1.9.15-7.dsc

Just uploaded an updated version on some advice on IRC by pusling (regarding
some hunks reversing each other). Attaching the updated debdiff.


Regards,

-- 
Chris Lamb, UK                                       chris@chris-lamb.co.uk
                                                            GPG: 0x634F9A20
diff -Nru imlib-1.9.15/configure.in imlib-1.9.15/configure.in
--- imlib-1.9.15/configure.in	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/configure.in	2008-05-18 02:29:27.000000000 +0100
@@ -139,7 +139,6 @@
   CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
   GX_LIBS="$GTK_LIBS"
 fi
-AC_SUBST(GX_LIBS)
 
 CPPFLAGS="$CPPFLAGS -I$includedir -I$prefix/include"
 
@@ -197,7 +196,7 @@
     AC_MSG_RESULT(no)
     no_xshm=yes
   else
-    if test -f "$x_includes/X11/extensions/XShm.h" || test -f "/usr/include/X11/extensions/XShm.h"; then
+    if test -f "$x_includes/X11/extensions/XShm.h"; then
       AC_MSG_RESULT(yes)
       AC_DEFINE(HAVE_XSHM_H, 1, [ ])
     else
diff -Nru imlib-1.9.15/debian/448360.diff imlib-1.9.15/debian/448360.diff
--- imlib-1.9.15/debian/448360.diff	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/448360.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,92 +0,0 @@
-diff -up -ru imlib-1.9.15.orig/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
---- imlib-1.9.15.orig/gdk_imlib/misc.c	2002-03-04 18:06:32.000000000 +0100
-+++ imlib-1.9.15/gdk_imlib/misc.c	2007-10-28 14:00:04.000000000 +0100
-@@ -674,6 +674,10 @@ gdk_imlib_init_params(GdkImlibInitParams
-   visual = gdk_rgb_get_visual();
-   id->x.visual = GDK_VISUAL_XVISUAL(visual);	/* the visual type */
-   id->x.depth = visual->depth;	/* the depth of the screen in bpp */
-+
-+  id->x.shm = 0;
-+  id->x.shmp = 0;
-+  id->max_shm = 0;
- #ifdef HAVE_SHM
-   if (XShmQueryExtension(id->x.disp))
-     {
-@@ -689,17 +693,14 @@ gdk_imlib_init_params(GdkImlibInitParams
- 	      id->x.last_xim = NULL;
- 	      id->x.last_sxim = NULL;
- 	      id->max_shm = 0x7fffffff;
--	      if (XShmPixmapFormat(id->x.disp) == ZPixmap)
-+	      if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
-+		  (pm == True))
- 		id->x.shmp = 1;
- 	    }
- 	}
-     }
--  else
- #endif
--    {
--      id->x.shm = 0;
--      id->x.shmp = 0;
--    }
-+
-   id->cache.on_image = 0;
-   id->cache.size_image = 0;
-   id->cache.num_image = 0;
-@@ -935,8 +936,8 @@ gdk_imlib_init_params(GdkImlibInitParams
- 	}
-       if (p->flags & PARAMS_SHAREDPIXMAPS)
- 	{
--	  if (id->x.shm)
--	    id->x.shmp = p->sharedpixmaps;
-+	  if (!p->sharedpixmaps)
-+	    id->x.shmp = 0;
- 	}
-       if (p->flags & PARAMS_PALETTEOVERRIDE)
- 	override = p->paletteoverride;
-diff -up -ru imlib-1.9.15.orig/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
---- imlib-1.9.15.orig/Imlib/misc.c	2004-09-21 02:22:59.000000000 +0200
-+++ imlib-1.9.15/Imlib/misc.c	2007-10-28 14:00:23.000000000 +0100
-@@ -675,6 +675,10 @@ Imlib_init_with_params(Display * disp, I
-   id->x.root = DefaultRootWindow(disp);		/* the root window id */
-   id->x.visual = DefaultVisual(disp, id->x.screen);	/* the visual type */
-   id->x.depth = DefaultDepth(disp, id->x.screen);	/* the depth of the screen in bpp */
-+
-+  id->x.shm = 0;
-+  id->x.shmp = 0;
-+  id->max_shm = 0;
- #ifdef HAVE_SHM
-   if (XShmQueryExtension(id->x.disp))
-     {
-@@ -690,17 +694,14 @@ Imlib_init_with_params(Display * disp, I
- 	      id->x.last_xim = NULL;
- 	      id->x.last_sxim = NULL;
- 	      id->max_shm = 0x7fffffff;
--	      if (XShmPixmapFormat(id->x.disp) == ZPixmap)
-+	      if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
-+		   (pm == True)))
- 		id->x.shmp = 1;
- 	    }
- 	}
-     }
--  else
- #endif
--    {
--      id->x.shm = 0;
--      id->x.shmp = 0;
--    }
-+
-   id->cache.on_image = 0;
-   id->cache.size_image = 0;
-   id->cache.num_image = 0;
-@@ -952,8 +953,8 @@ Imlib_init_with_params(Display * disp, I
- 	}
-       if (p->flags & PARAMS_SHAREDPIXMAPS)
- 	{
--	  if (id->x.shm)
--	    id->x.shmp = p->sharedpixmaps;
-+	  if (!p->sharedpixmaps)
-+	    id->x.shmp = 0;
- 	}
-       if (p->flags & PARAMS_PALETTEOVERRIDE)
- 	override = p->paletteoverride;
diff -Nru imlib-1.9.15/debian/bpp16-CVE-2007-3568.patch imlib-1.9.15/debian/bpp16-CVE-2007-3568.patch
--- imlib-1.9.15/debian/bpp16-CVE-2007-3568.patch	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/bpp16-CVE-2007-3568.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- Imlib/load.c.orig	2007-08-13 23:06:20.000000000 -0300
-+++ Imlib/load.c	2007-08-13 23:06:51.000000000 -0300
-@@ -645,7 +645,7 @@
-   planes = (int)word;
-   fread(&word, 2, 1, file);
-   bpp = (int)word;
--  if (bpp != 1 && bpp != 4 && bpp != 8 && bpp && 16 && bpp != 24 && bpp != 32)
-+  if (bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32)
-     {
-       fprintf(stderr, "IMLIB ERROR: unknown bitdepth in file\n");
-       return NULL;
diff -Nru imlib-1.9.15/debian/changelog imlib-1.9.15/debian/changelog
--- imlib-1.9.15/debian/changelog	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/changelog	2008-05-18 02:29:27.000000000 +0100
@@ -1,3 +1,16 @@
+imlib (1.9.15-7) unstable; urgency=medium
+
+  * QA upload.
+  * Fix bashism in debian/rules (Closes: #478405)
+  * Move to quilt patch system
+    - Move debian/*.{patch,diff} to debian/patches
+    - Add applied patches to debian/patches/series
+    - Add Build-Depends on quilt
+  * Delete debian/.cvsignore
+  * Cosmetic changes to debian/rules
+
+ -- Chris Lamb <chris@chris-lamb.co.uk>  Sat, 17 May 2008 23:28:16 +0100
+
 imlib (1.9.15-6) unstable; urgency=low
 
   * QA upload.
diff -Nru imlib-1.9.15/debian/config-quoting.patch imlib-1.9.15/debian/config-quoting.patch
--- imlib-1.9.15/debian/config-quoting.patch	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/config-quoting.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,79 +0,0 @@
-Index: configure.in
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/configure.in,v
-retrieving revision 1.1.1.4
-retrieving revision 1.7
-diff -u -b -B -r1.1.1.4 -r1.7
---- configure.in	22 Mar 2002 14:51:24 -0000	1.1.1.4
-+++ configure.in	7 Jul 2002 00:59:28 -0000	1.7
-@@ -230,42 +233,41 @@
- 
- dnl Test for libtiff
- AC_CHECK_LIB(tiff, TIFFReadScanline,
--  AC_CHECK_HEADER(tiffio.h,
--    TIFFLIBS="-ltiff"
--    SUPPORT_LIBS="$SUPPORT_LIBS -ltiff"; AC_DEFINE(HAVE_LIBTIFF),
--    AC_MSG_ERROR(*** TIFF header files not found ***)),
--  AC_CHECK_LIB(tiff, TIFFWriteScanline,
--    AC_CHECK_HEADER(tiffio.h,
--      TIFFLIBS="-ltiff -ljpeg -lz"
--      SUPPORT_LIBS="$SUPPORT_LIBS -ltiff -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF),
--      AC_MSG_ERROR(*** TIFF header files not found ***)),
--    AC_CHECK_LIB(tiff34, TIFFFlushData,
--      AC_CHECK_HEADER(tiffio.h,
--        TIFFLIBS="-ltiff34 -ljpeg -lz"
--        SUPPORT_LIBS="$SUPPORT_LIBS -ltiff34 -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF),
--        AC_MSG_ERROR(*** TIFF header files not found ***)),
--    AC_MSG_ERROR(*** TIFF library not found ***), -ljpeg -lz $GX_LIBS), -ljpeg -lz $GX_LIBS), $GX_LIBS)
-+  [AC_CHECK_HEADER(tiffio.h,
-+    [TIFFLIBS="-ltiff"
-+    SUPPORT_LIBS="$SUPPORT_LIBS -ltiff"; AC_DEFINE(HAVE_LIBTIFF)],
-+    [AC_MSG_ERROR(*** TIFF header files not found ***)])],
-+  [AC_CHECK_LIB(tiff, TIFFWriteScanline,
-+    [AC_CHECK_HEADER(tiffio.h,
-+      [TIFFLIBS="-ltiff -ljpeg -lz"
-+       SUPPORT_LIBS="$SUPPORT_LIBS -ltiff -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF)],
-+      [AC_MSG_ERROR(*** TIFF header files not found ***)])],
-+    [AC_CHECK_LIB(tiff34, TIFFFlushData,
-+      [AC_CHECK_HEADER(tiffio.h,
-+        [TIFFLIBS="-ltiff34 -ljpeg -lz"
-+         SUPPORT_LIBS="$SUPPORT_LIBS -ltiff34 -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF)],
-+        [AC_MSG_ERROR(*** TIFF header files not found ***)])],
-+    [AC_MSG_ERROR(*** TIFF library not found ***)], -ljpeg -lz $GX_LIBS)], -ljpeg -lz $GX_LIBS)], $GX_LIBS)
- 
- 
- AC_CHECK_HEADER(gif_lib.h,
--  AC_CHECK_LIB(ungif, DGifOpenFileName,
--    GIFLIBS="-lungif"
--    SUPPORT_LIBS="$SUPPORT_LIBS -lungif"; AC_DEFINE(HAVE_LIBGIF),
--    AC_CHECK_LIB(gif, DGifOpenFileName,
--      GIFLIBS="-lgif"
-+  [AC_CHECK_LIB(ungif, DGifOpenFileName,
-+    [GIFLIBS="-lungif"
-+     SUPPORT_LIBS="$SUPPORT_LIBS -lungif"; AC_DEFINE(HAVE_LIBGIF)],
-+    [AC_CHECK_LIB(gif, DGifOpenFileName,
-+      [GIFLIBS="-lgif"
-       SUPPORT_LIBS="$SUPPORT_LIBS -lgif"
--      AC_DEFINE(HAVE_LIBGIF),
--      AC_SUBST(GIFLIBS)
--      AC_MSG_ERROR(*** GIF library file not found ***), 
--      $GX_LIBS),
--    $GX_LIBS),
--  AC_MSG_ERROR(*** GIF header not found ***))
-+       AC_DEFINE(HAVE_LIBGIF)],
-+      [AC_MSG_ERROR(*** GIF library file not found ***)], 
-+      $GX_LIBS)],
-+    $GX_LIBS)],
-+  [AC_MSG_ERROR(*** GIF header not found ***)])
- 
- AC_CHECK_LIB(png, png_read_info,
--  AC_CHECK_HEADER(png.h,
-+  [AC_CHECK_HEADER(png.h,
-     png_ok=yes,
--    png_ok=no),
--  AC_MSG_ERROR(*** PNG library not found ***), -lz -lm $GX_LIBS)
-+    png_ok=no)],
-+  [AC_MSG_ERROR(*** PNG library not found ***)], -lz -lm $GX_LIBS)
- if test "$png_ok" = yes; then
-   AC_MSG_CHECKING([for png_structp in png.h])
-   AC_TRY_COMPILE([#include <png.h>],
diff -Nru imlib-1.9.15/debian/control imlib-1.9.15/debian/control
--- imlib-1.9.15/debian/control	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/control	2008-05-18 02:29:27.000000000 +0100
@@ -1,5 +1,5 @@
 Source: imlib
-Build-Depends: debhelper (>= 5), libglib1.2-dev, libgtk1.2-dev, libjpeg62-dev, libpng12-dev, libtiff4-dev, libgif-dev, zlib1g-dev, libx11-dev, libxext-dev, x-dev, libsm-dev, libice-dev
+Build-Depends: debhelper (>= 5), quilt, libglib1.2-dev, libgtk1.2-dev, libjpeg62-dev, libpng12-dev, libtiff4-dev, libgif-dev, zlib1g-dev, libx11-dev, libxext-dev, x-dev, libsm-dev, libice-dev
 Build-Conflicts: libpng2-dev
 Section: graphics
 Priority: optional
@@ -67,4 +67,3 @@
 Description: compatibility package for gdk-imlib11
  Gdk-Imlib is a low-level gdk interface for gtk programmers. This package
  masquerades as the older version of the gdk-imlib11 package.
-
diff -Nru imlib-1.9.15/debian/.cvsignore imlib-1.9.15/debian/.cvsignore
--- imlib-1.9.15/debian/.cvsignore	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/.cvsignore	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-files
-*.debhelper
-*.substvars
-gdk-imlib-dev
-gdk-imlib1
-imlib-base
-imlib-dev
-imlib-progs
-imlib1
-tmp
-
diff -Nru imlib-1.9.15/debian/fallback-doc.patch imlib-1.9.15/debian/fallback-doc.patch
--- imlib-1.9.15/debian/fallback-doc.patch	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/fallback-doc.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-Index: Imlib/load.c
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/Imlib/load.c,v
-retrieving revision 1.1.1.4
-retrieving revision 1.4
-diff -u -b -B -r1.1.1.4 -r1.4
---- Imlib/load.c	22 Mar 2002 14:43:04 -0000	1.1.1.4
-+++ Imlib/load.c	25 Mar 2002 03:58:42 -0000	1.4
-@@ -1789,6 +1789,7 @@
-     {
-       fprintf(stderr, "IMLIB ERROR: Cannot load image: %s\n"
-       		      "All fallbacks failed.\n", fil);
-+      fprintf(stderr, "See /usr/share/doc/imlib1/README.fallback.\n");
-       return NULL;
-     }
-     
-Index: Imlib/save.c
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/Imlib/save.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.3
-diff -u -b -B -r1.1.1.2 -r1.3
---- Imlib/save.c	4 Mar 2002 16:51:35 -0000	1.1.1.2
-+++ Imlib/save.c	15 Mar 2002 00:43:48 -0000	1.3
-@@ -550,6 +550,7 @@
- #endif
-   fprintf(stderr, "IMLIB ERROR: Cannot save image: %s\n", file);
-   fprintf(stderr, "All fallbacks failed.\n");
-+  fprintf(stderr, "See /usr/share/doc/imlib1/README.fallback.\n");
- 
-   return 0;
- }
-Index: gdk_imlib/load.c
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/gdk_imlib/load.c,v
-retrieving revision 1.1.1.3
-retrieving revision 1.4
-diff -u -b -B -r1.1.1.3 -r1.4
---- gdk_imlib/load.c	22 Mar 2002 14:43:29 -0000	1.1.1.3
-+++ gdk_imlib/load.c	25 Mar 2002 03:58:42 -0000	1.4
-@@ -292,6 +292,7 @@
-     {
-       fprintf(stderr, "gdk_imlib ERROR: Cannot load image: %s\n"
-                       "All fallbacks failed.\n", file);
-+      fprintf(stderr, "See /usr/share/doc/gdk-imlib1/README.fallback.\n");
-       return NULL;
-     }
-     
-Index: gdk_imlib/save.c
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/gdk_imlib/save.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.3
-diff -u -b -B -r1.1.1.2 -r1.3
---- gdk_imlib/save.c	4 Mar 2002 16:58:40 -0000	1.1.1.2
-+++ gdk_imlib/save.c	15 Mar 2002 00:43:48 -0000	1.3
-@@ -168,6 +168,7 @@
- #endif
-   fprintf(stderr, "gdk_imlib ERROR: Cannot save image: %s\n", file);
-   fprintf(stderr, "All fallbacks failed.\n");
-+  fprintf(stderr, "See /usr/share/doc/gdk-imlib1/README.fallback.\n");
- 
-   return 0;
- }
diff -Nru imlib-1.9.15/debian/gxlibs.patch imlib-1.9.15/debian/gxlibs.patch
--- imlib-1.9.15/debian/gxlibs.patch	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/gxlibs.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-Index: configure.in
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/configure.in,v
-retrieving revision 1.1.1.4
-retrieving revision 1.7
-diff -u -b -B -r1.1.1.4 -r1.7
---- configure.in	22 Mar 2002 14:51:24 -0000	1.1.1.4
-+++ configure.in	7 Jul 2002 00:59:28 -0000	1.7
-@@ -138,7 +140,8 @@
-   CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
-   GX_LIBS="$GTK_LIBS"
- fi
-+AC_SUBST(GX_LIBS)
- 
- CPPFLAGS="$CPPFLAGS -I$includedir -I$prefix/include"
- 
-Index: gdk_imlib/Makefile.am
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/gdk_imlib/Makefile.am,v
-retrieving revision 1.1.1.4
-retrieving revision 1.5
-diff -u -b -B -r1.1.1.4 -r1.5
---- gdk_imlib/Makefile.am	25 Mar 2002 16:45:24 -0000	1.1.1.4
-+++ gdk_imlib/Makefile.am	7 Jul 2002 00:59:29 -0000	1.5
-@@ -82,11 +88,10 @@
- 
- 
- libgdk_imlib_la_LDFLAGS = -version-info 10:14:9
--libgdk_imlib_la_LIBADD = $(GMODULE_LIBS) $(X_PRE_LIBS) \
--			 $(X_LIBS) $(X_EXTRA_LIBS)
--
-+libgdk_imlib_la_LIBADD = $(GX_LIBS)
- 
- include_HEADERS = gdk_imlib.h gdk_imlib_private.h gdk_imlib_types.h
- 
- 
- 
diff -Nru imlib-1.9.15/debian/moduledir.patch imlib-1.9.15/debian/moduledir.patch
--- imlib-1.9.15/debian/moduledir.patch	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/moduledir.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-Index: gdk_imlib/Makefile.am
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/gdk_imlib/Makefile.am,v
-retrieving revision 1.1.1.4
-retrieving revision 1.5
-diff -u -b -B -r1.1.1.4 -r1.5
---- gdk_imlib/Makefile.am	25 Mar 2002 16:45:24 -0000	1.1.1.4
-+++ gdk_imlib/Makefile.am	7 Jul 2002 00:59:29 -0000	1.5
-@@ -1,5 +1,12 @@
- common_ldflags = -avoid-version
- 
-+# The modules for loading/saving the various graphics formats
-+# are located in $(moduledir).  Default it to libdir for backwards
-+# compatibility.
-+#
-+moduledir = $(libdir)
-+
-+
- libimlib_gif_la_SOURCES = io-gif.c
- libimlib_gif_la_LDFLAGS = $(common_ldflags)
- libimlib_gif_la_LIBADD  = $(GIFLIBS) libgdk_imlib.la
-@@ -65,9 +72,8 @@
- 
- endif
- 
--lib_LTLIBRARIES = \
--	libgdk_imlib.la		\
--	$(DYNAMIC_LIBS)
-+lib_LTLIBRARIES = libgdk_imlib.la
-+module_LTLIBRARIES = $(DYNAMIC_LIBS)
- 
- libgdk_imlib_la_SOURCES =	\
- 	cache.c      		\
-@@ -82,9 +88,10 @@
- 
- 
- DEFS =  -DSYSTEM_IMRC=\"$(sysconfdir)/imrc\" \
--	-DIMLIB_LIB=\""$(libdir)"\" -DSYSCONFDIR=\"$(sysconfdir)\"
-+	-DIMLIB_LIB=\"$(moduledir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
- 
- INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. \
- 	$(GTK_CFLAGS) $(X_CFLAGS) $(GMODULE_FLAGS) 
diff -Nru imlib-1.9.15/debian/palfile-buffer.patch imlib-1.9.15/debian/palfile-buffer.patch
--- imlib-1.9.15/debian/palfile-buffer.patch	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/palfile-buffer.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-Index: Imlib/misc.c
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/Imlib/misc.c,v
-retrieving revision 1.1.1.2
-retrieving revision 1.2
-diff -u -b -B -r1.1.1.2 -r1.2
---- Imlib/misc.c	3 Sep 2001 06:39:08 -0000	1.1.1.2
-+++ Imlib/misc.c	19 May 2002 22:09:50 -0000	1.2
-@@ -932,8 +932,11 @@
-     {
-       if (p->flags & PARAMS_VISUALID)
- 	vis = p->visualid;
--      if (p->flags & PARAMS_PALETTEFILE)
--	strcpy(palfile, p->palettefile);
-+      if (p->flags & PARAMS_PALETTEFILE) {
-+	  if (palfile)
-+	      free(palfile);
-+	  palfile = strdup(p->palettefile);
-+      }
-       if (p->flags & PARAMS_SHAREDMEM)
- 	{
- 	  if (!p->sharedmem)
diff -Nru imlib-1.9.15/debian/patches/445914.patch imlib-1.9.15/debian/patches/445914.patch
--- imlib-1.9.15/debian/patches/445914.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/445914.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,46 @@
+
+Fixes #445914.
+
+ -- Chris Lamb <chris@chris-lamb.co.uk>  Sun, 18 May 2008 02:11:57 +0100
+
+--- imlib-1.9.15.orig/gdk_imlib/misc.c
++++ imlib-1.9.15/gdk_imlib/misc.c
+@@ -455,6 +455,8 @@
+ 	      if (xvir[i].depth > max)
+ 		max = xvir[i].depth;
+ 	    }
++	  if (max > 24)
++	    max = 24;
+ 	  if (max > 8)
+ 	    {
+ 	      id->x.depth = max;
+@@ -1004,6 +1006,8 @@
+ 	      if (xvir[i].depth > max)
+ 		max = xvir[i].depth;
+ 	    }
++	  if (max > 24)
++	    max = 24;
+ 	  if (max > 8)
+ 	    {
+ 	      id->x.depth = max;
+--- imlib-1.9.15.orig/Imlib/misc.c
++++ imlib-1.9.15/Imlib/misc.c
+@@ -423,6 +423,8 @@
+ 	      if (xvir[i].depth > max)
+ 		max = xvir[i].depth;
+ 	    }
++	  if (max > 24)
++	    max = 24;
+ 	  if (max > 8)
+ 	    {
+ 	      id->x.depth = max;
+@@ -1026,6 +1028,8 @@
+ 	      if (xvir[i].depth > max)
+ 		max = xvir[i].depth;
+ 	    }
++	  if (max > 24)
++	    max = 24;
+ 	  if (max > 8)
+ 	    {
+ 	      id->x.depth = max;
+
diff -Nru imlib-1.9.15/debian/patches/448360.patch imlib-1.9.15/debian/patches/448360.patch
--- imlib-1.9.15/debian/patches/448360.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/448360.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,95 @@
+
+Fixes #448360.
+
+ -- Chris Lamb <chris@chris-lamb.co.uk>  Sun, 18 May 2008 02:11:57 +0100
+
+--- imlib-1.9.15.orig/gdk_imlib/misc.c	2008-05-18 01:47:54.000000000 +0100
++++ imlib-1.9.15/gdk_imlib/misc.c	2008-05-18 02:14:13.000000000 +0100
+@@ -676,6 +674,10 @@
+   visual = gdk_rgb_get_visual();
+   id->x.visual = GDK_VISUAL_XVISUAL(visual);	/* the visual type */
+   id->x.depth = visual->depth;	/* the depth of the screen in bpp */
++
++  id->x.shm = 0;
++  id->x.shmp = 0;
++  id->max_shm = 0;
+ #ifdef HAVE_SHM
+   if (XShmQueryExtension(id->x.disp))
+     {
+@@ -691,17 +693,14 @@
+ 	      id->x.last_xim = NULL;
+ 	      id->x.last_sxim = NULL;
+ 	      id->max_shm = 0x7fffffff;
+-	      if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++	      if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
++		  (pm == True))
+ 		id->x.shmp = 1;
+ 	    }
+ 	}
+     }
+-  else
+ #endif
+-    {
+-      id->x.shm = 0;
+-      id->x.shmp = 0;
+-    }
++
+   id->cache.on_image = 0;
+   id->cache.size_image = 0;
+   id->cache.num_image = 0;
+@@ -937,8 +936,8 @@
+ 	}
+       if (p->flags & PARAMS_SHAREDPIXMAPS)
+ 	{
+-	  if (id->x.shm)
+-	    id->x.shmp = p->sharedpixmaps;
++	  if (!p->sharedpixmaps)
++	    id->x.shmp = 0;
+ 	}
+       if (p->flags & PARAMS_PALETTEOVERRIDE)
+ 	override = p->paletteoverride;
+--- imlib-1.9.15.orig/Imlib/misc.c	2008-05-18 01:47:54.000000000 +0100
++++ imlib-1.9.15/Imlib/misc.c	2008-05-18 02:14:13.000000000 +0100
+@@ -677,6 +675,10 @@
+   id->x.root = DefaultRootWindow(disp);		/* the root window id */
+   id->x.visual = DefaultVisual(disp, id->x.screen);	/* the visual type */
+   id->x.depth = DefaultDepth(disp, id->x.screen);	/* the depth of the screen in bpp */
++
++  id->x.shm = 0;
++  id->x.shmp = 0;
++  id->max_shm = 0;
+ #ifdef HAVE_SHM
+   if (XShmQueryExtension(id->x.disp))
+     {
+@@ -692,17 +694,14 @@
+ 	      id->x.last_xim = NULL;
+ 	      id->x.last_sxim = NULL;
+ 	      id->max_shm = 0x7fffffff;
+-	      if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++	      if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
++		   (pm == True)))
+ 		id->x.shmp = 1;
+ 	    }
+ 	}
+     }
+-  else
+ #endif
+-    {
+-      id->x.shm = 0;
+-      id->x.shmp = 0;
+-    }
++
+   id->cache.on_image = 0;
+   id->cache.size_image = 0;
+   id->cache.num_image = 0;
+@@ -954,8 +953,8 @@
+ 	}
+       if (p->flags & PARAMS_SHAREDPIXMAPS)
+ 	{
+-	  if (id->x.shm)
+-	    id->x.shmp = p->sharedpixmaps;
++	  if (!p->sharedpixmaps)
++	    id->x.shmp = 0;
+ 	}
+       if (p->flags & PARAMS_PALETTEOVERRIDE)
+ 	override = p->paletteoverride;
diff -Nru imlib-1.9.15/debian/patches/bpp16-CVE-2007-3568.patch imlib-1.9.15/debian/patches/bpp16-CVE-2007-3568.patch
--- imlib-1.9.15/debian/patches/bpp16-CVE-2007-3568.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/bpp16-CVE-2007-3568.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,16 @@
+
+Fixes #437708.
+
+ -- Chris Lamb <chris@chris-lamb.co.uk>  Sun, 18 May 2008 02:11:57 +0100
+
+--- imlib/Imlib/load.c.orig	2007-08-13 23:06:20.000000000 -0300
++++ imlib/Imlib/load.c	2007-08-13 23:06:51.000000000 -0300
+@@ -645,7 +645,7 @@
+   planes = (int)word;
+   fread(&word, 2, 1, file);
+   bpp = (int)word;
+-  if (bpp != 1 && bpp != 4 && bpp != 8 && bpp && 16 && bpp != 24 && bpp != 32)
++  if (bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32)
+     {
+       fprintf(stderr, "IMLIB ERROR: unknown bitdepth in file\n");
+       return NULL;
diff -Nru imlib-1.9.15/debian/patches/config-quoting.patch imlib-1.9.15/debian/patches/config-quoting.patch
--- imlib-1.9.15/debian/patches/config-quoting.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/config-quoting.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,73 @@
+--- imlib/configure.in	22 Mar 2002 14:51:24 -0000	1.1.1.4
++++ imlib/configure.in	7 Jul 2002 00:59:28 -0000	1.7
+@@ -230,42 +233,41 @@
+ 
+ dnl Test for libtiff
+ AC_CHECK_LIB(tiff, TIFFReadScanline,
+-  AC_CHECK_HEADER(tiffio.h,
+-    TIFFLIBS="-ltiff"
+-    SUPPORT_LIBS="$SUPPORT_LIBS -ltiff"; AC_DEFINE(HAVE_LIBTIFF),
+-    AC_MSG_ERROR(*** TIFF header files not found ***)),
+-  AC_CHECK_LIB(tiff, TIFFWriteScanline,
+-    AC_CHECK_HEADER(tiffio.h,
+-      TIFFLIBS="-ltiff -ljpeg -lz"
+-      SUPPORT_LIBS="$SUPPORT_LIBS -ltiff -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF),
+-      AC_MSG_ERROR(*** TIFF header files not found ***)),
+-    AC_CHECK_LIB(tiff34, TIFFFlushData,
+-      AC_CHECK_HEADER(tiffio.h,
+-        TIFFLIBS="-ltiff34 -ljpeg -lz"
+-        SUPPORT_LIBS="$SUPPORT_LIBS -ltiff34 -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF),
+-        AC_MSG_ERROR(*** TIFF header files not found ***)),
+-    AC_MSG_ERROR(*** TIFF library not found ***), -ljpeg -lz $GX_LIBS), -ljpeg -lz $GX_LIBS), $GX_LIBS)
++  [AC_CHECK_HEADER(tiffio.h,
++    [TIFFLIBS="-ltiff"
++    SUPPORT_LIBS="$SUPPORT_LIBS -ltiff"; AC_DEFINE(HAVE_LIBTIFF)],
++    [AC_MSG_ERROR(*** TIFF header files not found ***)])],
++  [AC_CHECK_LIB(tiff, TIFFWriteScanline,
++    [AC_CHECK_HEADER(tiffio.h,
++      [TIFFLIBS="-ltiff -ljpeg -lz"
++       SUPPORT_LIBS="$SUPPORT_LIBS -ltiff -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF)],
++      [AC_MSG_ERROR(*** TIFF header files not found ***)])],
++    [AC_CHECK_LIB(tiff34, TIFFFlushData,
++      [AC_CHECK_HEADER(tiffio.h,
++        [TIFFLIBS="-ltiff34 -ljpeg -lz"
++         SUPPORT_LIBS="$SUPPORT_LIBS -ltiff34 -ljpeg -lz"; AC_DEFINE(HAVE_LIBTIFF)],
++        [AC_MSG_ERROR(*** TIFF header files not found ***)])],
++    [AC_MSG_ERROR(*** TIFF library not found ***)], -ljpeg -lz $GX_LIBS)], -ljpeg -lz $GX_LIBS)], $GX_LIBS)
+ 
+ 
+ AC_CHECK_HEADER(gif_lib.h,
+-  AC_CHECK_LIB(ungif, DGifOpenFileName,
+-    GIFLIBS="-lungif"
+-    SUPPORT_LIBS="$SUPPORT_LIBS -lungif"; AC_DEFINE(HAVE_LIBGIF),
+-    AC_CHECK_LIB(gif, DGifOpenFileName,
+-      GIFLIBS="-lgif"
++  [AC_CHECK_LIB(ungif, DGifOpenFileName,
++    [GIFLIBS="-lungif"
++     SUPPORT_LIBS="$SUPPORT_LIBS -lungif"; AC_DEFINE(HAVE_LIBGIF)],
++    [AC_CHECK_LIB(gif, DGifOpenFileName,
++      [GIFLIBS="-lgif"
+       SUPPORT_LIBS="$SUPPORT_LIBS -lgif"
+-      AC_DEFINE(HAVE_LIBGIF),
+-      AC_SUBST(GIFLIBS)
+-      AC_MSG_ERROR(*** GIF library file not found ***), 
+-      $GX_LIBS),
+-    $GX_LIBS),
+-  AC_MSG_ERROR(*** GIF header not found ***))
++       AC_DEFINE(HAVE_LIBGIF)],
++      [AC_MSG_ERROR(*** GIF library file not found ***)], 
++      $GX_LIBS)],
++    $GX_LIBS)],
++  [AC_MSG_ERROR(*** GIF header not found ***)])
+ 
+ AC_CHECK_LIB(png, png_read_info,
+-  AC_CHECK_HEADER(png.h,
++  [AC_CHECK_HEADER(png.h,
+     png_ok=yes,
+-    png_ok=no),
+-  AC_MSG_ERROR(*** PNG library not found ***), -lz -lm $GX_LIBS)
++    png_ok=no)],
++  [AC_MSG_ERROR(*** PNG library not found ***)], -lz -lm $GX_LIBS)
+ if test "$png_ok" = yes; then
+   AC_MSG_CHECKING([for png_structp in png.h])
+   AC_TRY_COMPILE([#include <png.h>],
diff -Nru imlib-1.9.15/debian/patches/fallback-doc.patch imlib-1.9.15/debian/patches/fallback-doc.patch
--- imlib-1.9.15/debian/patches/fallback-doc.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/fallback-doc.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,40 @@
+--- Imlib/load.c	22 Mar 2002 14:43:04 -0000	1.1.1.4
++++ Imlib/load.c	25 Mar 2002 03:58:42 -0000	1.4
+@@ -1789,6 +1789,7 @@
+     {
+       fprintf(stderr, "IMLIB ERROR: Cannot load image: %s\n"
+       		      "All fallbacks failed.\n", fil);
++      fprintf(stderr, "See /usr/share/doc/imlib1/README.fallback.\n");
+       return NULL;
+     }
+     
+--- Imlib/save.c	4 Mar 2002 16:51:35 -0000	1.1.1.2
++++ Imlib/save.c	15 Mar 2002 00:43:48 -0000	1.3
+@@ -550,6 +550,7 @@
+ #endif
+   fprintf(stderr, "IMLIB ERROR: Cannot save image: %s\n", file);
+   fprintf(stderr, "All fallbacks failed.\n");
++  fprintf(stderr, "See /usr/share/doc/imlib1/README.fallback.\n");
+ 
+   return 0;
+ }
+--- gdk_imlib/load.c	22 Mar 2002 14:43:29 -0000	1.1.1.3
++++ gdk_imlib/load.c	25 Mar 2002 03:58:42 -0000	1.4
+@@ -292,6 +292,7 @@
+     {
+       fprintf(stderr, "gdk_imlib ERROR: Cannot load image: %s\n"
+                       "All fallbacks failed.\n", file);
++      fprintf(stderr, "See /usr/share/doc/gdk-imlib1/README.fallback.\n");
+       return NULL;
+     }
+     
+--- gdk_imlib/save.c	4 Mar 2002 16:58:40 -0000	1.1.1.2
++++ gdk_imlib/save.c	15 Mar 2002 00:43:48 -0000	1.3
+@@ -168,6 +168,7 @@
+ #endif
+   fprintf(stderr, "gdk_imlib ERROR: Cannot save image: %s\n", file);
+   fprintf(stderr, "All fallbacks failed.\n");
++  fprintf(stderr, "See /usr/share/doc/gdk-imlib1/README.fallback.\n");
+ 
+   return 0;
+ }
diff -Nru imlib-1.9.15/debian/patches/gdk-makefile imlib-1.9.15/debian/patches/gdk-makefile
--- imlib-1.9.15/debian/patches/gdk-makefile	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/gdk-makefile	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,30 @@
+--- imlib-1.9.15.orig/gdk_imlib/Makefile.am
++++ imlib-1.9.15/gdk_imlib/Makefile.am
+@@ -15,7 +15,7 @@
+ libimlib_jpeg_la_LIBADD  = $(JPEGLIBS) libgdk_imlib.la
+ 
+ libimlib_png_la_SOURCES = io-png.c
+-libimlib_png_la_LDFLAGS = $(common_ldflags)
++libimlib_png_la_LDFLAGS = $(common_ldflags) -lglib
+ libimlib_png_la_LIBADD  = $(PNGLIBS) libgdk_imlib.la
+ 
+ libimlib_tiff_la_SOURCES = io-tiff.c
+@@ -31,7 +31,7 @@
+ libimlib_bmp_la_LIBADD = libgdk_imlib.la
+ 
+ libimlib_xpm_la_SOURCES = io-xpm.c
+-libimlib_xpm_la_LDFLAGS = $(common_ldflags)
++libimlib_xpm_la_LDFLAGS = $(common_ldflags) -lX11
+ libimlib_xpm_la_LIBADD = libgdk_imlib.la
+ 
+ libimlib_ppm_la_SOURCES = io-ppm.c
+@@ -86,7 +86,7 @@
+ 	modules.c
+ 
+ 
+-libgdk_imlib_la_LDFLAGS = -version-info 10:15:9
++libgdk_imlib_la_LDFLAGS = -version-info 10:15:8
+ libgdk_imlib_la_LIBADD = $(GX_LIBS)
+ 
+ 
+
diff -Nru imlib-1.9.15/debian/patches/gmodule.patch imlib-1.9.15/debian/patches/gmodule.patch
--- imlib-1.9.15/debian/patches/gmodule.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/gmodule.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,734 @@
+--- imlib-1.9.15.orig/gdk_imlib/local-hack-gmodule/gmodule-dl.c
++++ imlib-1.9.15/gdk_imlib/local-hack-gmodule/gmodule-dl.c
+@@ -0,0 +1,158 @@
++/* GMODULE - GLIB wrapper code for dynamic module loading
++ * Copyright (C) 1998, 2000 Tim Janik
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++/*
++ * Modified by the GLib Team and others 1997-1999.  See the AUTHORS
++ * file for a list of people on the GLib Team.  See the ChangeLog
++ * files for a list of changes.  These files are distributed with
++ * GLib at ftp://ftp.gtk.org/pub/gtk/. 
++ */
++
++/* 
++ * MT safe
++ */
++
++#include <dlfcn.h>
++
++/* Perl includes <nlist.h> and <link.h> instead of <dlfcn.h> on some systmes? */
++
++
++/* dlerror() is not implemented on all systems
++ */
++#ifndef	LOCAL_HACK_G_MODULE_HAVE_DLERROR
++#  ifdef __NetBSD__
++#    define dlerror()	g_strerror (errno)
++#  else /* !__NetBSD__ */
++/* could we rely on errno's state here? */
++#    define dlerror()	"unknown dl-error"
++#  endif /* !__NetBSD__ */
++#endif	/* LOCAL_HACK_G_MODULE_HAVE_DLERROR */
++
++/* some flags are missing on some systems, so we provide
++ * harmless defaults.
++ * The Perl sources say, RTLD_LAZY needs to be defined as (1),
++ * at least for Solaris 1.
++ *
++ * Mandatory:
++ * RTLD_LAZY   - resolve undefined symbols as code from the dynamic library
++ *		 is executed.
++ * RTLD_NOW    - resolve all undefined symbols before dlopen returns, and fail
++ *		 if this cannot be done.
++ * Optionally:
++ * RTLD_GLOBAL - the external symbols defined in the library will be made
++ *		 available to subsequently loaded libraries.
++ */
++#ifndef	RTLD_LAZY
++#define	RTLD_LAZY	1
++#endif	/* RTLD_LAZY */
++#ifndef	RTLD_NOW
++#define	RTLD_NOW	0
++#endif	/* RTLD_NOW */
++/* some systems (OSF1 V5.0) have broken RTLD_GLOBAL linkage */
++#ifdef LOCAL_HACK_G_MODULE_BROKEN_RTLD_GLOBAL
++#undef  RTLD_GLOBAL
++#endif /* LOCAL_HACK_G_MODULE_BROKEN_RTLD_GLOBAL */
++#ifndef	RTLD_GLOBAL
++#define	RTLD_GLOBAL	0
++#endif	/* RTLD_GLOBAL */
++
++
++/* --- functions --- */
++static gchar*
++fetch_dlerror (void)
++{
++  gchar *msg = dlerror ();
++
++  /* make sure we always return an error message != NULL */
++
++  return msg ? msg : "unknown dl-error";
++}
++
++static gpointer
++_local_hack_g_module_open (const gchar *file_name,
++		gboolean     bind_lazy)
++{
++  gpointer handle;
++  
++  handle = dlopen (file_name, (bind_lazy ? RTLD_LAZY : RTLD_NOW));
++  if (!handle)
++    local_hack_g_module_set_error (fetch_dlerror ());
++  
++  return handle;
++}
++
++static gpointer
++_local_hack_g_module_self (void)
++{
++  gpointer handle;
++  
++  /* to query symbols from the program itself, special link options
++   * are required on some systems.
++   */
++  
++  handle = dlopen (NULL, RTLD_LAZY);
++  if (!handle)
++    local_hack_g_module_set_error (fetch_dlerror ());
++  
++  return handle;
++}
++
++static void
++_local_hack_g_module_close (gpointer handle,
++		 gboolean is_unref)
++{
++  /* are there any systems out there that have dlopen()/dlclose()
++   * without a reference count implementation?
++   */
++  is_unref |= 1;
++  
++  if (is_unref)
++    {
++      if (dlclose (handle) != 0)
++	local_hack_g_module_set_error (fetch_dlerror ());
++    }
++}
++
++static gpointer
++_local_hack_g_module_symbol (gpointer     handle,
++		  const gchar *symbol_name)
++{
++  gpointer p;
++  
++  p = dlsym (handle, symbol_name);
++  if (!p)
++    local_hack_g_module_set_error (fetch_dlerror ());
++  
++  return p;
++}
++
++static gchar*
++_local_hack_g_module_build_path (const gchar *directory,
++		      const gchar *module_name)
++{
++  if (directory && *directory) {
++    if (strncmp (module_name, "lib", 3) == 0)
++      return g_strconcat (directory, "/", module_name, NULL);
++    else
++      return g_strconcat (directory, "/lib", module_name, ".so", NULL);
++  } else if (strncmp (module_name, "lib", 3) == 0)
++    return g_strdup (module_name);
++  else
++    return g_strconcat ("lib", module_name, ".so", NULL);
++}
+--- imlib-1.9.15.orig/gdk_imlib/local-hack-gmodule/gmodule-local.h
++++ imlib-1.9.15/gdk_imlib/local-hack-gmodule/gmodule-local.h
+@@ -0,0 +1,100 @@
++/* GMODULE - GLIB wrapper code for dynamic module loading
++ * Copyright (C) 1998 Tim Janik
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++/*
++ * Modified by the GLib Team and others 1997-1999.  See the AUTHORS
++ * file for a list of people on the GLib Team.  See the ChangeLog
++ * files for a list of changes.  These files are distributed with
++ * GLib at ftp://ftp.gtk.org/pub/gtk/. 
++ */
++
++#ifndef __GMODULE_H__
++#define __GMODULE_H__
++
++#include <glib.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
++/* exporting and importing functions, this is special cased
++ * to feature Windows dll stubs.
++ */
++#define	LOCAL_HACK_G_MODULE_IMPORT		extern
++#ifdef NATIVE_WIN32
++#  define	LOCAL_HACK_G_MODULE_EXPORT		__declspec(dllexport)
++#else /* !NATIVE_WIN32 */
++#  define	LOCAL_HACK_G_MODULE_EXPORT
++#endif /* !NATIVE_WIN32 */
++
++typedef enum
++{
++  LOCAL_HACK_G_MODULE_BIND_LAZY	= 1 << 0,
++  LOCAL_HACK_G_MODULE_BIND_MASK	= 0x01
++} LocalHackGModuleFlags;
++
++typedef	struct _LocalHackGModule			 LocalHackGModule;
++typedef const gchar* (*LocalHackGModuleCheckInit) (LocalHackGModule	*module);
++typedef void	     (*LocalHackGModuleUnload)	 (LocalHackGModule	*module);
++
++/* return TRUE if dynamic module loading is supported */
++gboolean	local_hack_g_module_supported	   (void);
++
++/* open a module `file_name' and return handle, which is NULL on error */
++LocalHackGModule*	local_hack_g_module_open		   (const gchar		*file_name,
++					    LocalHackGModuleFlags	 flags);
++
++/* close a previously opened module, returns TRUE on success */
++gboolean	local_hack_g_module_close		   (LocalHackGModule		*module);
++
++/* make a module resident so local_hack_g_module_close on it will be ignored */
++void		local_hack_g_module_make_resident	   (LocalHackGModule		*module);
++
++/* query the last module error as a string */
++gchar*		local_hack_g_module_error		   (void);
++
++/* retrive a symbol pointer from `module', returns TRUE on success */
++gboolean	local_hack_g_module_symbol		   (LocalHackGModule		*module,
++					    const gchar		*symbol_name,
++					    gpointer		*symbol);
++
++/* retrive the file name from an existing module */
++gchar*		local_hack_g_module_name		   (LocalHackGModule		*module);
++
++
++/* Build the actual file name containing a module. `directory' is the
++ * directory where the module file is supposed to be, or NULL or empty
++ * in which case it should either be in the current directory or, on
++ * some operating systems, in some standard place, for instance on the
++ * PATH. Hence, to be absoultely sure to get the correct module,
++ * always pass in a directory. The file name consists of the directory,
++ * if supplied, and `module_name' suitably decorated accoring to
++ * the operating system's conventions (for instance lib*.so or *.dll).
++ *
++ * No checks are made that the file exists, or is of correct type.
++ */
++gchar*		local_hack_g_module_build_path	  (const gchar		*directory,
++					   const gchar		*module_name);
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++
++#endif /* __GMODULE_H__ */
+--- imlib-1.9.15.orig/gdk_imlib/local-hack-gmodule/gmoduleconf.h
++++ imlib-1.9.15/gdk_imlib/local-hack-gmodule/gmoduleconf.h
+@@ -0,0 +1,45 @@
++/* GMODULE - GLIB wrapper code for dynamic module loading
++ * Copyright (C) 1998 Tim Janik
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++#ifndef __LOCAL_HACK_G_MODULE_CONF_H__
++#define __LOCAL_HACK_G_MODULE_CONF_H__
++
++
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
++
++#define	LOCAL_HACK_G_MODULE_IMPL_NONE	0
++#define	LOCAL_HACK_G_MODULE_IMPL_DL	1
++#define	LOCAL_HACK_G_MODULE_IMPL_DLD	2
++#define	LOCAL_HACK_G_MODULE_IMPL_WIN32	3
++
++#define	LOCAL_HACK_G_MODULE_IMPL		LOCAL_HACK_G_MODULE_IMPL_DL
++#undef	LOCAL_HACK_G_MODULE_HAVE_DLERROR
++#if	(1)
++#define	LOCAL_HACK_G_MODULE_HAVE_DLERROR
++#endif
++
++
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
++
++
++#endif /* __LOCAL_HACK_G_MODULE_CONF_H__ */
+--- imlib-1.9.15.orig/gdk_imlib/local-hack-gmodule/gmodule-local.c
++++ imlib-1.9.15/gdk_imlib/local-hack-gmodule/gmodule-local.c
+@@ -0,0 +1,418 @@
++/* GMODULE - GLIB wrapper code for dynamic module loading
++ * Copyright (C) 1998 Tim Janik
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++/*
++ * Modified by the GLib Team and others 1997-1999.  See the AUTHORS
++ * file for a list of people on the GLib Team.  See the ChangeLog
++ * files for a list of changes.  These files are distributed with
++ * GLib at ftp://ftp.gtk.org/pub/gtk/. 
++ */
++
++/* 
++ * MT safe
++ */
++
++#include	"gmodule-local.h"
++#include	"gmoduleconf.h"
++#include	<errno.h>
++#include	<string.h>
++
++
++/* We maintain a list of modules, so we can reference count them.
++ * That's needed because some platforms don't support refernce counts on
++ * modules e.g. the shl_* implementation of HP-UX
++ * (http://www.stat.umn.edu/~luke/xls/projects/dlbasics/dlbasics.html).
++ * Also, the module for the program itself is kept seperatedly for
++ * faster access and because it has special semantics.
++ */
++
++
++/* --- structures --- */
++struct _LocalHackGModule
++{
++  gchar	*file_name;
++  gpointer handle;
++  guint ref_count : 31;
++  guint is_resident : 1;
++  LocalHackGModuleUnload unload;
++  LocalHackGModule *next;
++};
++
++
++/* --- prototypes --- */
++static gpointer		_local_hack_g_module_open		(const gchar	*file_name,
++						 gboolean	 bind_lazy);
++static void		_local_hack_g_module_close		(gpointer	 handle,
++						 gboolean	 is_unref);
++static gpointer		_local_hack_g_module_self		(void);
++static gpointer		_local_hack_g_module_symbol	(gpointer	 handle,
++						 const gchar	*symbol_name);
++static gchar*		_local_hack_g_module_build_path	(const gchar	*directory,
++						 const gchar	*module_name);
++static inline void	local_hack_g_module_set_error	(const gchar	*error);
++static inline LocalHackGModule*	local_hack_g_module_find_by_handle (gpointer	 handle);
++static inline LocalHackGModule*	local_hack_g_module_find_by_name	(const gchar	*name);
++
++
++/* --- variables --- */
++G_LOCK_DEFINE_STATIC (LocalHackGModule);
++static LocalHackGModule	     *modules = NULL;
++static LocalHackGModule	     *main_module = NULL;
++static GStaticPrivate module_error_private = G_STATIC_PRIVATE_INIT;
++
++
++/* --- inline functions --- */
++static inline LocalHackGModule*
++local_hack_g_module_find_by_handle (gpointer handle)
++{
++  LocalHackGModule *module;
++  LocalHackGModule *retval = NULL;
++  
++  G_LOCK (LocalHackGModule);
++  if (main_module && main_module->handle == handle)
++    retval = main_module;
++  else
++    for (module = modules; module; module = module->next)
++      if (handle == module->handle)
++	{
++	  retval = module;
++	  break;
++	}
++  G_UNLOCK (LocalHackGModule);
++
++  return retval;
++}
++
++static inline LocalHackGModule*
++local_hack_g_module_find_by_name (const gchar *name)
++{
++  LocalHackGModule *module;
++  LocalHackGModule *retval = NULL;
++  
++  G_LOCK (LocalHackGModule);
++  for (module = modules; module; module = module->next)
++    if (strcmp (name, module->file_name) == 0)
++	{
++	  retval = module;
++	  break;
++	}
++  G_UNLOCK (LocalHackGModule);
++
++  return retval;
++}
++
++static inline void
++local_hack_g_module_set_error (const gchar *error)
++{
++  g_static_private_set (&module_error_private, g_strdup (error), g_free);
++  errno = 0;
++}
++
++
++/* --- include platform specifc code --- */
++#define	SUPPORT_OR_RETURN(rv)	{ local_hack_g_module_set_error (NULL); }
++#if	(LOCAL_HACK_G_MODULE_IMPL == LOCAL_HACK_G_MODULE_IMPL_DL)
++#include "gmodule-dl.c"
++#elif	(LOCAL_HACK_G_MODULE_IMPL == LOCAL_HACK_G_MODULE_IMPL_DLD)
++#include "gmodule-dld.c"
++#elif	(LOCAL_HACK_G_MODULE_IMPL == LOCAL_HACK_G_MODULE_IMPL_WIN32)
++#include "gmodule-win32.c"
++#else
++#undef	SUPPORT_OR_RETURN
++#define	SUPPORT_OR_RETURN(rv)	{ local_hack_g_module_set_error ("dynamic modules are " \
++                                              "not supported by this system"); return rv; }
++static gpointer
++_local_hack_g_module_open (const gchar	*file_name,
++		gboolean	 bind_lazy)
++{
++  return NULL;
++}
++static void
++_local_hack_g_module_close	(gpointer	 handle,
++		 gboolean	 is_unref)
++{
++}
++static gpointer
++_local_hack_g_module_self (void)
++{
++  return NULL;
++}
++static gpointer
++_local_hack_g_module_symbol (gpointer	 handle,
++		  const gchar	*symbol_name)
++{
++  return NULL;
++}
++static gchar*
++_local_hack_g_module_build_path (const gchar *directory,
++		      const gchar *module_name)
++{
++  return NULL;
++}
++#endif	/* no implementation */
++
++#if defined (NATIVE_WIN32) && defined (__LCC__)
++int __stdcall 
++LibMain (void         *hinstDll,
++	 unsigned long dwReason,
++	 void         *reserved)
++{
++  return 1;
++}
++#endif /* NATIVE_WIN32 && __LCC__ */
++
++
++/* --- functions --- */
++gboolean
++local_hack_g_module_supported (void)
++{
++  SUPPORT_OR_RETURN (FALSE);
++  
++  return TRUE;
++}
++
++LocalHackGModule*
++local_hack_g_module_open (const gchar    *file_name,
++	       LocalHackGModuleFlags    flags)
++{
++  LocalHackGModule *module;
++  gpointer handle;
++  
++  SUPPORT_OR_RETURN (NULL);
++  
++  if (!file_name)
++    {      
++      G_LOCK (LocalHackGModule);
++      if (!main_module)
++	{
++	  handle = _local_hack_g_module_self ();
++	  if (handle)
++	    {
++	      main_module = g_new (LocalHackGModule, 1);
++	      main_module->file_name = NULL;
++	      main_module->handle = handle;
++	      main_module->ref_count = 1;
++	      main_module->is_resident = TRUE;
++	      main_module->unload = NULL;
++	      main_module->next = NULL;
++	    }
++	}
++      G_UNLOCK (LocalHackGModule);
++
++      return main_module;
++    }
++  
++  /* we first search the module list by name */
++  module = local_hack_g_module_find_by_name (file_name);
++  if (module)
++    {
++      module->ref_count++;
++      
++      return module;
++    }
++  
++  /* open the module */
++  handle = _local_hack_g_module_open (file_name, (flags & LOCAL_HACK_G_MODULE_BIND_LAZY) != 0);
++  if (handle)
++    {
++      gchar *saved_error;
++      LocalHackGModuleCheckInit check_init;
++      const gchar *check_failed = NULL;
++      
++      /* search the module list by handle, since file names are not unique */
++      module = local_hack_g_module_find_by_handle (handle);
++      if (module)
++	{
++	  _local_hack_g_module_close (module->handle, TRUE);
++	  module->ref_count++;
++	  local_hack_g_module_set_error (NULL);
++	  
++	  return module;
++	}
++      
++      saved_error = g_strdup (local_hack_g_module_error ());
++      local_hack_g_module_set_error (NULL);
++      
++      module = g_new (LocalHackGModule, 1);
++      module->file_name = g_strdup (file_name);
++      module->handle = handle;
++      module->ref_count = 1;
++      module->is_resident = FALSE;
++      module->unload = NULL;
++      G_LOCK (LocalHackGModule);
++      module->next = modules;
++      modules = module;
++      G_UNLOCK (LocalHackGModule);
++      
++      /* check initialization */
++      if (local_hack_g_module_symbol (module, "local_hack_g_module_check_init", (gpointer) &check_init))
++	check_failed = check_init (module);
++      
++      /* we don't call unload() if the initialization check failed. */
++      if (!check_failed)
++	local_hack_g_module_symbol (module, "local_hack_g_module_unload", (gpointer) &module->unload);
++      
++      if (check_failed)
++	{
++	  gchar *error;
++
++	  error = g_strconcat ("LocalHackGModule initialization check failed: ", check_failed, NULL);
++	  local_hack_g_module_close (module);
++	  module = NULL;
++	  local_hack_g_module_set_error (error);
++	  g_free (error);
++	}
++      else
++	local_hack_g_module_set_error (saved_error);
++
++      g_free (saved_error);
++    }
++  
++  return module;
++}
++
++gboolean
++local_hack_g_module_close (LocalHackGModule	       *module)
++{
++  SUPPORT_OR_RETURN (FALSE);
++  
++  g_return_val_if_fail (module != NULL, FALSE);
++  g_return_val_if_fail (module->ref_count > 0, FALSE);
++  
++  module->ref_count--;
++  
++  if (!module->ref_count && !module->is_resident && module->unload)
++    {
++      LocalHackGModuleUnload unload;
++
++      unload = module->unload;
++      module->unload = NULL;
++      unload (module);
++    }
++
++  if (!module->ref_count && !module->is_resident)
++    {
++      LocalHackGModule *last;
++      LocalHackGModule *node;
++      
++      last = NULL;
++      
++      G_LOCK (LocalHackGModule);
++      node = modules;
++      while (node)
++	{
++	  if (node == module)
++	    {
++	      if (last)
++		last->next = node->next;
++	      else
++		modules = node->next;
++	      break;
++	    }
++	  last = node;
++	  node = last->next;
++	}
++      module->next = NULL;
++      G_UNLOCK (LocalHackGModule);
++      
++      _local_hack_g_module_close (module->handle, FALSE);
++      g_free (module->file_name);
++      
++      g_free (module);
++    }
++  
++  return local_hack_g_module_error() == NULL;
++}
++
++void
++local_hack_g_module_make_resident (LocalHackGModule *module)
++{
++  g_return_if_fail (module != NULL);
++
++  module->is_resident = TRUE;
++}
++
++gchar*
++local_hack_g_module_error (void)
++{
++  return g_static_private_get (&module_error_private);
++}
++
++gboolean
++local_hack_g_module_symbol (LocalHackGModule	*module,
++		 const gchar	*symbol_name,
++		 gpointer	*symbol)
++{
++  gchar *module_error;
++
++  if (symbol)
++    *symbol = NULL;
++  SUPPORT_OR_RETURN (FALSE);
++  
++  g_return_val_if_fail (module != NULL, FALSE);
++  g_return_val_if_fail (symbol_name != NULL, FALSE);
++  g_return_val_if_fail (symbol != NULL, FALSE);
++  
++#ifdef	LOCAL_HACK_G_MODULE_NEED_USCORE
++  {
++    gchar *name;
++
++    name = g_strconcat ("_", symbol_name, NULL);
++    *symbol = _local_hack_g_module_symbol (module->handle, name);
++    g_free (name);
++  }
++#else	/* !LOCAL_HACK_G_MODULE_NEED_USCORE */
++  *symbol = _local_hack_g_module_symbol (module->handle, symbol_name);
++#endif	/* !LOCAL_HACK_G_MODULE_NEED_USCORE */
++  
++  module_error = local_hack_g_module_error ();
++  if (module_error)
++    {
++      gchar *error;
++
++      error = g_strconcat ("`", symbol_name, "': ", module_error, NULL);
++      local_hack_g_module_set_error (error);
++      g_free (error);
++      *symbol = NULL;
++
++      return FALSE;
++    }
++  
++  return TRUE;
++}
++
++gchar*
++local_hack_g_module_name (LocalHackGModule *module)
++{
++  g_return_val_if_fail (module != NULL, NULL);
++  
++  if (module == main_module)
++    return "main";
++  
++  return module->file_name;
++}
++
++gchar*
++local_hack_g_module_build_path (const gchar *directory,
++		     const gchar *module_name)
++{
++  g_return_val_if_fail (module_name != NULL, NULL);
++  
++  return _local_hack_g_module_build_path (directory, module_name);
++}
+
diff -Nru imlib-1.9.15/debian/patches/gxlibs.patch imlib-1.9.15/debian/patches/gxlibs.patch
--- imlib-1.9.15/debian/patches/gxlibs.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/gxlibs.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,11 @@
+--- imlibs/configure.in	22 Mar 2002 14:51:24 -0000	1.1.1.4
++++ imlibs/configure.in	7 Jul 2002 00:59:28 -0000	1.7
+@@ -138,7 +140,8 @@
+   CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
+   GX_LIBS="$GTK_LIBS"
+ fi
++AC_SUBST(GX_LIBS)
+ 
+ CPPFLAGS="$CPPFLAGS -I$includedir -I$prefix/include"
+ 
+===================================================================
diff -Nru imlib-1.9.15/debian/patches/imlib-config.patch imlib-1.9.15/debian/patches/imlib-config.patch
--- imlib-1.9.15/debian/patches/imlib-config.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/imlib-config.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,28 @@
+--- imlib-1.9.15.orig/imlib-config.in
++++ imlib-1.9.15/imlib-config.in
+@@ -49,21 +49,21 @@
+       if test @includedir@ != /usr/include ; then
+         includes=-I@includedir@
+       fi
+-      echo $includes @X_CFLAGS@ 
++      echo $includes
+       ;;
+     --cflags-gdk)
+       if test @includedir@ != /usr/include ; then
+         includes=-I@includedir@
+       fi
+-      echo `@GTK_CONFIG@ --cflags` $includes @X_CFLAGS@
++      echo `@GTK_CONFIG@ --cflags` $includes
+       ;;
+     --libs)
+       libdirs=-L@libdir@
+-      echo $libdirs -lImlib @LDFLAGS@ $gx_libs @X_LIBS@ @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
++      echo $libdirs -lImlib 
+       ;;
+     --libs-gdk)
+       libdirs=-L@libdir@
+-      echo $libdirs -lgdk_imlib$gdk_gx_libs `@GTK_CONFIG@ --libs` $gdk_libs
++      echo $libdirs -lgdk_imlib
+       ;;
+     *)
+       echo "${usage}" 1>&2
diff -Nru imlib-1.9.15/debian/patches/imlib-m4.patch imlib-1.9.15/debian/patches/imlib-m4.patch
--- imlib-1.9.15/debian/patches/imlib-m4.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/imlib-m4.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,32 @@
+--- imlib-1.9.15.orig/imlib.m4
++++ imlib-1.9.15/imlib.m4
+@@ -6,7 +6,7 @@
+ dnl AM_PATH_IMLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for IMLIB, and define IMLIB_CFLAGS and IMLIB_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_IMLIB,
++AC_DEFUN([AM_PATH_IMLIB],
+ [dnl 
+ dnl Get the cflags and libraries from the imlib-config script
+ dnl
+@@ -164,7 +164,7 @@
+ ])
+ 
+ # Check for gdk-imlib
+-AC_DEFUN(AM_PATH_GDK_IMLIB,
++AC_DEFUN([AM_PATH_GDK_IMLIB],
+ [dnl 
+ dnl Get the cflags and libraries from the imlib-config script
+ dnl
+@@ -291,8 +291,8 @@
+           LIBS="$ac_save_LIBS"
+        fi
+      fi
+-     IMLIB_CFLAGS=""
+-     IMLIB_LIBS=""
++     GDK_IMLIB_CFLAGS=""
++     GDK_IMLIB_LIBS=""
+      ifelse([$3], , :, [$3])
+   fi
+   AC_SUBST(GDK_IMLIB_CFLAGS)
+
diff -Nru imlib-1.9.15/debian/patches/link-against-x11.patch imlib-1.9.15/debian/patches/link-against-x11.patch
--- imlib-1.9.15/debian/patches/link-against-x11.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/link-against-x11.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,16 @@
+--- imlib-1.9.15.orig/Imlib/Makefile.am
++++ imlib-1.9.15/Imlib/Makefile.am
+@@ -30,10 +30,10 @@
+ 	save.c		\
+ 	snprintf.c
+ 
+-libImlib_la_LDFLAGS    = -version-info 10:15:9
++libImlib_la_LDFLAGS    = -version-info 11:0:0
+ #libImlib_la_LDDADD     = $(SUPPORT_LIBS)
+ libImlib_la_LIBADD     = $(SUPPORT_LIBS) $(X_PRE_LIBS) \
+-			 $(X_LIBS) $(X_EXTRA_LIBS)
++			 $(X_LIBS) $(X_EXTRA_LIBS) -lX11
+ 
+ DEFS =  -DSYSTEM_IMRC=\"$(sysconfdir)/imrc\" \
+ 	-DSYSCONFDIR=\"$(sysconfdir)\"
+
diff -Nru imlib-1.9.15/debian/patches/moduledir.patch imlib-1.9.15/debian/patches/moduledir.patch
--- imlib-1.9.15/debian/patches/moduledir.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/moduledir.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,42 @@
+Index: gdk_imlib/Makefile.am
+===================================================================
+RCS file: /home/steve/lib/cvs/debian/imlib/gdk_imlib/Makefile.am,v
+retrieving revision 1.1.1.4
+retrieving revision 1.5
+diff -u -b -B -r1.1.1.4 -r1.5
+--- gdk_imlib/Makefile.am	25 Mar 2002 16:45:24 -0000	1.1.1.4
++++ gdk_imlib/Makefile.am	7 Jul 2002 00:59:29 -0000	1.5
+@@ -1,5 +1,12 @@
+ common_ldflags = -avoid-version
+ 
++# The modules for loading/saving the various graphics formats
++# are located in $(moduledir).  Default it to libdir for backwards
++# compatibility.
++#
++moduledir = $(libdir)
++
++
+ libimlib_gif_la_SOURCES = io-gif.c
+ libimlib_gif_la_LDFLAGS = $(common_ldflags)
+ libimlib_gif_la_LIBADD  = $(GIFLIBS) libgdk_imlib.la
+@@ -65,9 +72,8 @@
+ 
+ endif
+ 
+-lib_LTLIBRARIES = \
+-	libgdk_imlib.la		\
+-	$(DYNAMIC_LIBS)
++lib_LTLIBRARIES = libgdk_imlib.la
++module_LTLIBRARIES = $(DYNAMIC_LIBS)
+ 
+ libgdk_imlib_la_SOURCES =	\
+ 	cache.c      		\
+@@ -82,9 +88,10 @@
+ 
+ 
+ DEFS =  -DSYSTEM_IMRC=\"$(sysconfdir)/imrc\" \
+-	-DIMLIB_LIB=\""$(libdir)"\" -DSYSCONFDIR=\"$(sysconfdir)\"
++	-DIMLIB_LIB=\"$(moduledir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
+ 
+ INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. \
+ 	$(GTK_CFLAGS) $(X_CFLAGS) $(GMODULE_FLAGS) 
diff -Nru imlib-1.9.15/debian/patches/palfile-buffer.patch imlib-1.9.15/debian/patches/palfile-buffer.patch
--- imlib-1.9.15/debian/patches/palfile-buffer.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/palfile-buffer.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,22 @@
+Index: Imlib/misc.c
+===================================================================
+RCS file: /home/steve/lib/cvs/debian/imlib/Imlib/misc.c,v
+retrieving revision 1.1.1.2
+retrieving revision 1.2
+diff -u -b -B -r1.1.1.2 -r1.2
+--- Imlib/misc.c	3 Sep 2001 06:39:08 -0000	1.1.1.2
++++ Imlib/misc.c	19 May 2002 22:09:50 -0000	1.2
+@@ -932,8 +932,11 @@
+     {
+       if (p->flags & PARAMS_VISUALID)
+ 	vis = p->visualid;
+-      if (p->flags & PARAMS_PALETTEFILE)
+-	strcpy(palfile, p->palettefile);
++      if (p->flags & PARAMS_PALETTEFILE) {
++	  if (palfile)
++	      free(palfile);
++	  palfile = strdup(p->palettefile);
++      }
+       if (p->flags & PARAMS_SHAREDMEM)
+ 	{
+ 	  if (!p->sharedmem)
diff -Nru imlib-1.9.15/debian/patches/search-system-include-for-xshm.patch imlib-1.9.15/debian/patches/search-system-include-for-xshm.patch
--- imlib-1.9.15/debian/patches/search-system-include-for-xshm.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/search-system-include-for-xshm.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,12 @@
+--- imlib-1.9.15.orig/configure.in
++++ imlib-1.9.15/configure.in
+@@ -197,7 +197,7 @@
+     AC_MSG_RESULT(no)
+     no_xshm=yes
+   else
+-    if test -f "$x_includes/X11/extensions/XShm.h"; then
++    if test -f "$x_includes/X11/extensions/XShm.h" || test -f "/usr/include/X11/extensions/XShm.h"; then
+       AC_MSG_RESULT(yes)
+       AC_DEFINE(HAVE_XSHM_H, 1, [ ])
+     else
+
diff -Nru imlib-1.9.15/debian/patches/series imlib-1.9.15/debian/patches/series
--- imlib-1.9.15/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/series	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,10 @@
+bpp16-CVE-2007-3568.patch
+search-system-include-for-xshm.patch
+link-against-x11.patch
+imlib-m4.patch
+imlib-config.patch
+445914.patch
+448360.patch
+gxlibs.patch
+gmodule.patch
+gdk-makefile
diff -Nru imlib-1.9.15/debian/patches/t-load.patch imlib-1.9.15/debian/patches/t-load.patch
--- imlib-1.9.15/debian/patches/t-load.patch	1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/debian/patches/t-load.patch	2008-05-18 02:29:27.000000000 +0100
@@ -0,0 +1,107 @@
+Index: Imlib/Makefile.am
+===================================================================
+RCS file: /home/steve/lib/cvs/debian/imlib/Imlib/Makefile.am,v
+retrieving revision 1.1.1.4
+diff -u -b -B -r1.1.1.4 Makefile.am
+--- Imlib/Makefile.am	22 Mar 2002 14:43:04 -0000	1.1.1.4
++++ Imlib/Makefile.am	7 Jul 2002 16:12:56 -0000
+@@ -39,3 +38,8 @@
+ 	-DSYSCONFDIR=\"$(sysconfdir)\"
+ 
+ INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. $(X_CFLAGS)
++
++
++noinst_PROGRAMS = t-load
++
++t_load_LDADD = libImlib.la
+Index: Imlib/t-load.c
+===================================================================
+RCS file: Imlib/t-load.c
+diff -N Imlib/t-load.c
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ Imlib/t-load.c	25 Mar 2002 03:58:42 -0000	1.1
+@@ -0,0 +1,38 @@
++#include <stdio.h>
++#include "Imlib.h"
++
++
++int
++main( int ac, char* av[] )
++{
++    Display *disp;
++    ImlibData *id;
++    XSetWindowAttributes attr;
++    Window win;
++    ImlibImage *img;
++    Pixmap p,m;
++    int w,h;
++     
++    /* Be nice and tell the user if they don't, to provide a file as an arg */
++    if (ac != 2) {
++	fprintf( stderr, "usage: %s filename\n", av[0] );
++	return 33;
++    }
++
++    /* Connect to the default Xserver */
++    disp = XOpenDisplay(NULL);
++
++    /* Immediately afterwards Intitialise Imlib */
++    id = Imlib_init(disp);
++
++    /* Load the image specified as the first argument */
++    img = Imlib_load_image(id,av[1]);
++
++
++    if ( img == NULL ) {
++	fprintf( stderr, "failed to load file '%s'.\n", av[1] );
++	return 1;
++    }
++
++    return 0;
++}
+Index: gdk_imlib/Makefile.am
+===================================================================
+RCS file: /home/steve/lib/cvs/debian/imlib/gdk_imlib/Makefile.am,v
+retrieving revision 1.1.1.4
+retrieving revision 1.5
+diff -u -b -B -r1.1.1.4 -r1.5
+--- gdk_imlib/Makefile.am	25 Mar 2002 16:45:24 -0000	1.1.1.4
++++ gdk_imlib/Makefile.am	7 Jul 2002 00:59:29 -0000	1.5
+@@ -82,1 +88,7 @@
+ 
++# These programs are built only to check that the plugin
++# libs have correct library information.
++
++check_PROGRAMS = t-load
++
++t_load_LDADD = libgdk_imlib.la
+Index: gdk_imlib/t-load.c
+===================================================================
+RCS file: gdk_imlib/t-load.c
+diff -N gdk_imlib/t-load.c
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ gdk_imlib/t-load.c	25 Mar 2002 03:58:42 -0000	1.2
+@@ -0,0 +1,23 @@
++#include <stdio.h>
++#include "gdk_imlib.h"
++
++
++int
++main( int ac, char* av[] )
++{
++    GdkImlibImage* img;
++
++    if (ac != 2) {
++	fprintf( stderr, "usage: %s filename\n", av[0] );
++	return 33;
++    }
++
++    img = gdk_imlib_load_image( av[1] );
++
++    if ( img == NULL ) {
++	fprintf( stderr, "failed to load file '%s'.\n", av[1] );
++	return 1;
++    }
++
++    return 0;
++}
diff -Nru imlib-1.9.15/debian/rules imlib-1.9.15/debian/rules
--- imlib-1.9.15/debian/rules	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/rules	2008-05-18 02:29:27.000000000 +0100
@@ -1,8 +1,6 @@
 #!/usr/bin/make -f
-#
-# Adapted from /usr/share/doc/debhelper/examples/rules.multi2
-# This version is for a multibinary package. It also allows you to build any
-# of the binary packages independantly, via binary-<package> targets.
+
+include /usr/share/quilt/quilt.make
 
 # Uncomment this to turn on verbose mode. 
 #export DH_VERBOSE=1
@@ -10,7 +8,6 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
-
 export CFLAGS = -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -19,7 +16,6 @@
 CFLAGS += -O3
 endif
 
-
 # Suppress accidental execution of the auto-* tools, c.f.
 # http://lists.debian.org/debian-devel/2001/debian-devel-200111/msg01416.html
 no_auto_tools = ACLOCAL="`pwd`/missing aclocal" \
@@ -29,8 +25,7 @@
 
 make_flags = moduledir=/usr/lib/gdk-imlib2 $(no_auto_tools)
 
-
-build: build-stamp
+build: $(QUILT_STAMPFN) build-stamp
 build-stamp:
 	dh_testdir
 	./configure --prefix=/usr --with-gtk-prefix=/usr \
@@ -41,7 +36,7 @@
 
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
@@ -77,7 +72,9 @@
 	dh_install -pgdk-imlib11 --autodest debian/tmp/usr/lib/gdk-imlib2/libimlib*.so
 
 	# GDK developer package
-	dh_install -pgdk-imlib11-dev --autodest debian/tmp/usr/lib/libgdk_imlib.{a,la,so}
+	dh_install -pgdk-imlib11-dev --autodest debian/tmp/usr/lib/libgdk_imlib.a
+	dh_install -pgdk-imlib11-dev --autodest debian/tmp/usr/lib/libgdk_imlib.la
+	dh_install -pgdk-imlib11-dev --autodest debian/tmp/usr/lib/libgdk_imlib.so
 	dh_install -pgdk-imlib11-dev --autodest debian/tmp/usr/include/gdk_imlib*
 	dh_install -pgdk-imlib11-dev --autodest debian/tmp/usr/lib/pkgconfig/imlibgdk.pc
 
@@ -101,7 +98,6 @@
 binary-common:
 	dh_testdir
 	dh_testroot
-#	dh_installdebconf
 	dh_installdocs -A debian/README.Debian
 	dh_installexamples
 	dh_installmenu
diff -Nru imlib-1.9.15/debian/t-load.patch imlib-1.9.15/debian/t-load.patch
--- imlib-1.9.15/debian/t-load.patch	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/debian/t-load.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,107 +0,0 @@
-Index: Imlib/Makefile.am
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/Imlib/Makefile.am,v
-retrieving revision 1.1.1.4
-diff -u -b -B -r1.1.1.4 Makefile.am
---- Imlib/Makefile.am	22 Mar 2002 14:43:04 -0000	1.1.1.4
-+++ Imlib/Makefile.am	7 Jul 2002 16:12:56 -0000
-@@ -39,3 +38,8 @@
- 	-DSYSCONFDIR=\"$(sysconfdir)\"
- 
- INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. $(X_CFLAGS)
-+
-+
-+noinst_PROGRAMS = t-load
-+
-+t_load_LDADD = libImlib.la
-Index: Imlib/t-load.c
-===================================================================
-RCS file: Imlib/t-load.c
-diff -N Imlib/t-load.c
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ Imlib/t-load.c	25 Mar 2002 03:58:42 -0000	1.1
-@@ -0,0 +1,38 @@
-+#include <stdio.h>
-+#include "Imlib.h"
-+
-+
-+int
-+main( int ac, char* av[] )
-+{
-+    Display *disp;
-+    ImlibData *id;
-+    XSetWindowAttributes attr;
-+    Window win;
-+    ImlibImage *img;
-+    Pixmap p,m;
-+    int w,h;
-+     
-+    /* Be nice and tell the user if they don't, to provide a file as an arg */
-+    if (ac != 2) {
-+	fprintf( stderr, "usage: %s filename\n", av[0] );
-+	return 33;
-+    }
-+
-+    /* Connect to the default Xserver */
-+    disp = XOpenDisplay(NULL);
-+
-+    /* Immediately afterwards Intitialise Imlib */
-+    id = Imlib_init(disp);
-+
-+    /* Load the image specified as the first argument */
-+    img = Imlib_load_image(id,av[1]);
-+
-+
-+    if ( img == NULL ) {
-+	fprintf( stderr, "failed to load file '%s'.\n", av[1] );
-+	return 1;
-+    }
-+
-+    return 0;
-+}
-Index: gdk_imlib/Makefile.am
-===================================================================
-RCS file: /home/steve/lib/cvs/debian/imlib/gdk_imlib/Makefile.am,v
-retrieving revision 1.1.1.4
-retrieving revision 1.5
-diff -u -b -B -r1.1.1.4 -r1.5
---- gdk_imlib/Makefile.am	25 Mar 2002 16:45:24 -0000	1.1.1.4
-+++ gdk_imlib/Makefile.am	7 Jul 2002 00:59:29 -0000	1.5
-@@ -82,1 +88,7 @@
- 
-+# These programs are built only to check that the plugin
-+# libs have correct library information.
-+
-+check_PROGRAMS = t-load
-+
-+t_load_LDADD = libgdk_imlib.la
-Index: gdk_imlib/t-load.c
-===================================================================
-RCS file: gdk_imlib/t-load.c
-diff -N gdk_imlib/t-load.c
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ gdk_imlib/t-load.c	25 Mar 2002 03:58:42 -0000	1.2
-@@ -0,0 +1,23 @@
-+#include <stdio.h>
-+#include "gdk_imlib.h"
-+
-+
-+int
-+main( int ac, char* av[] )
-+{
-+    GdkImlibImage* img;
-+
-+    if (ac != 2) {
-+	fprintf( stderr, "usage: %s filename\n", av[0] );
-+	return 33;
-+    }
-+
-+    img = gdk_imlib_load_image( av[1] );
-+
-+    if ( img == NULL ) {
-+	fprintf( stderr, "failed to load file '%s'.\n", av[1] );
-+	return 1;
-+    }
-+
-+    return 0;
-+}
diff -Nru imlib-1.9.15/gdk_imlib/local-hack-gmodule/.cvsignore imlib-1.9.15/gdk_imlib/local-hack-gmodule/.cvsignore
--- imlib-1.9.15/gdk_imlib/local-hack-gmodule/.cvsignore	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/gdk_imlib/local-hack-gmodule/.cvsignore	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-Makefile orig
diff -Nru imlib-1.9.15/gdk_imlib/Makefile.am imlib-1.9.15/gdk_imlib/Makefile.am
--- imlib-1.9.15/gdk_imlib/Makefile.am	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/gdk_imlib/Makefile.am	2004-09-23 01:41:59.000000000 +0100
@@ -15,7 +15,7 @@
 libimlib_jpeg_la_LIBADD  = $(JPEGLIBS) libgdk_imlib.la
 
 libimlib_png_la_SOURCES = io-png.c
-libimlib_png_la_LDFLAGS = $(common_ldflags) -lglib
+libimlib_png_la_LDFLAGS = $(common_ldflags)
 libimlib_png_la_LIBADD  = $(PNGLIBS) libgdk_imlib.la
 
 libimlib_tiff_la_SOURCES = io-tiff.c
@@ -31,7 +31,7 @@
 libimlib_bmp_la_LIBADD = libgdk_imlib.la
 
 libimlib_xpm_la_SOURCES = io-xpm.c
-libimlib_xpm_la_LDFLAGS = $(common_ldflags) -lX11
+libimlib_xpm_la_LDFLAGS = $(common_ldflags)
 libimlib_xpm_la_LIBADD = libgdk_imlib.la
 
 libimlib_ppm_la_SOURCES = io-ppm.c
@@ -86,7 +86,7 @@
 	modules.c
 
 
-libgdk_imlib_la_LDFLAGS = -version-info 10:15:8
+libgdk_imlib_la_LDFLAGS = -version-info 10:15:9
 libgdk_imlib_la_LIBADD = $(GX_LIBS)
 
 
diff -Nru imlib-1.9.15/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
--- imlib-1.9.15/gdk_imlib/misc.c	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/gdk_imlib/misc.c	2002-03-04 17:06:32.000000000 +0000
@@ -455,8 +455,6 @@
 	      if (xvir[i].depth > max)
 		max = xvir[i].depth;
 	    }
-	  if (max > 24)
-	    max = 24;
 	  if (max > 8)
 	    {
 	      id->x.depth = max;
@@ -676,10 +674,6 @@
   visual = gdk_rgb_get_visual();
   id->x.visual = GDK_VISUAL_XVISUAL(visual);	/* the visual type */
   id->x.depth = visual->depth;	/* the depth of the screen in bpp */
-
-  id->x.shm = 0;
-  id->x.shmp = 0;
-  id->max_shm = 0;
 #ifdef HAVE_SHM
   if (XShmQueryExtension(id->x.disp))
     {
@@ -695,14 +689,17 @@
 	      id->x.last_xim = NULL;
 	      id->x.last_sxim = NULL;
 	      id->max_shm = 0x7fffffff;
-	      if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
-		  (pm == True))
+	      if (XShmPixmapFormat(id->x.disp) == ZPixmap)
 		id->x.shmp = 1;
 	    }
 	}
     }
+  else
 #endif
-
+    {
+      id->x.shm = 0;
+      id->x.shmp = 0;
+    }
   id->cache.on_image = 0;
   id->cache.size_image = 0;
   id->cache.num_image = 0;
@@ -938,8 +935,8 @@
 	}
       if (p->flags & PARAMS_SHAREDPIXMAPS)
 	{
-	  if (!p->sharedpixmaps)
-	    id->x.shmp = 0;
+	  if (id->x.shm)
+	    id->x.shmp = p->sharedpixmaps;
 	}
       if (p->flags & PARAMS_PALETTEOVERRIDE)
 	override = p->paletteoverride;
@@ -1007,8 +1004,6 @@
 	      if (xvir[i].depth > max)
 		max = xvir[i].depth;
 	    }
-	  if (max > 24)
-	    max = 24;
 	  if (max > 8)
 	    {
 	      id->x.depth = max;
diff -Nru imlib-1.9.15/Imlib/load.c imlib-1.9.15/Imlib/load.c
--- imlib-1.9.15/Imlib/load.c	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/Imlib/load.c	2004-09-21 01:23:20.000000000 +0100
@@ -645,7 +645,7 @@
   planes = (int)word;
   fread(&word, 2, 1, file);
   bpp = (int)word;
-  if (bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32)
+  if (bpp != 1 && bpp != 4 && bpp != 8 && bpp && 16 && bpp != 24 && bpp != 32)
     {
       fprintf(stderr, "IMLIB ERROR: unknown bitdepth in file\n");
       return NULL;
diff -Nru imlib-1.9.15/Imlib/Makefile.am imlib-1.9.15/Imlib/Makefile.am
--- imlib-1.9.15/Imlib/Makefile.am	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/Imlib/Makefile.am	2004-09-21 01:22:59.000000000 +0100
@@ -30,10 +30,10 @@
 	save.c		\
 	snprintf.c
 
-libImlib_la_LDFLAGS    = -version-info 11:0:0
+libImlib_la_LDFLAGS    = -version-info 10:15:9
 #libImlib_la_LDDADD     = $(SUPPORT_LIBS)
 libImlib_la_LIBADD     = $(SUPPORT_LIBS) $(X_PRE_LIBS) \
-			 $(X_LIBS) $(X_EXTRA_LIBS) -lX11
+			 $(X_LIBS) $(X_EXTRA_LIBS)
 
 DEFS =  -DSYSTEM_IMRC=\"$(sysconfdir)/imrc\" \
 	-DSYSCONFDIR=\"$(sysconfdir)\"
diff -Nru imlib-1.9.15/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
--- imlib-1.9.15/Imlib/misc.c	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/Imlib/misc.c	2004-09-21 01:22:59.000000000 +0100
@@ -423,8 +423,6 @@
 	      if (xvir[i].depth > max)
 		max = xvir[i].depth;
 	    }
-	  if (max > 24)
-	    max = 24;
 	  if (max > 8)
 	    {
 	      id->x.depth = max;
@@ -677,10 +675,6 @@
   id->x.root = DefaultRootWindow(disp);		/* the root window id */
   id->x.visual = DefaultVisual(disp, id->x.screen);	/* the visual type */
   id->x.depth = DefaultDepth(disp, id->x.screen);	/* the depth of the screen in bpp */
-
-  id->x.shm = 0;
-  id->x.shmp = 0;
-  id->max_shm = 0;
 #ifdef HAVE_SHM
   if (XShmQueryExtension(id->x.disp))
     {
@@ -696,14 +690,17 @@
 	      id->x.last_xim = NULL;
 	      id->x.last_sxim = NULL;
 	      id->max_shm = 0x7fffffff;
-	      if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
-		   (pm == True)))
+	      if (XShmPixmapFormat(id->x.disp) == ZPixmap)
 		id->x.shmp = 1;
 	    }
 	}
     }
+  else
 #endif
-
+    {
+      id->x.shm = 0;
+      id->x.shmp = 0;
+    }
   id->cache.on_image = 0;
   id->cache.size_image = 0;
   id->cache.num_image = 0;
@@ -955,8 +952,8 @@
 	}
       if (p->flags & PARAMS_SHAREDPIXMAPS)
 	{
-	  if (!p->sharedpixmaps)
-	    id->x.shmp = 0;
+	  if (id->x.shm)
+	    id->x.shmp = p->sharedpixmaps;
 	}
       if (p->flags & PARAMS_PALETTEOVERRIDE)
 	override = p->paletteoverride;
@@ -1029,8 +1026,6 @@
 	      if (xvir[i].depth > max)
 		max = xvir[i].depth;
 	    }
-	  if (max > 24)
-	    max = 24;
 	  if (max > 8)
 	    {
 	      id->x.depth = max;
diff -Nru imlib-1.9.15/imlib-config.in imlib-1.9.15/imlib-config.in
--- imlib-1.9.15/imlib-config.in	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/imlib-config.in	2004-08-27 17:03:11.000000000 +0100
@@ -49,21 +49,21 @@
       if test @includedir@ != /usr/include ; then
         includes=-I@includedir@
       fi
-      echo $includes
+      echo $includes @X_CFLAGS@ 
       ;;
     --cflags-gdk)
       if test @includedir@ != /usr/include ; then
         includes=-I@includedir@
       fi
-      echo `@GTK_CONFIG@ --cflags` $includes
+      echo `@GTK_CONFIG@ --cflags` $includes @X_CFLAGS@
       ;;
     --libs)
       libdirs=-L@libdir@
-      echo $libdirs -lImlib 
+      echo $libdirs -lImlib @LDFLAGS@ $gx_libs @X_LIBS@ @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
       ;;
     --libs-gdk)
       libdirs=-L@libdir@
-      echo $libdirs -lgdk_imlib
+      echo $libdirs -lgdk_imlib$gdk_gx_libs `@GTK_CONFIG@ --libs` $gdk_libs
       ;;
     *)
       echo "${usage}" 1>&2
diff -Nru imlib-1.9.15/imlib.m4 imlib-1.9.15/imlib.m4
--- imlib-1.9.15/imlib.m4	2008-05-18 02:29:26.000000000 +0100
+++ imlib-1.9.15/imlib.m4	2004-08-27 17:03:11.000000000 +0100
@@ -6,7 +6,7 @@
 dnl AM_PATH_IMLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 dnl Test for IMLIB, and define IMLIB_CFLAGS and IMLIB_LIBS
 dnl
-AC_DEFUN([AM_PATH_IMLIB],
+AC_DEFUN(AM_PATH_IMLIB,
 [dnl 
 dnl Get the cflags and libraries from the imlib-config script
 dnl
@@ -164,7 +164,7 @@
 ])
 
 # Check for gdk-imlib
-AC_DEFUN([AM_PATH_GDK_IMLIB],
+AC_DEFUN(AM_PATH_GDK_IMLIB,
 [dnl 
 dnl Get the cflags and libraries from the imlib-config script
 dnl
@@ -291,8 +291,8 @@
           LIBS="$ac_save_LIBS"
        fi
      fi
-     GDK_IMLIB_CFLAGS=""
-     GDK_IMLIB_LIBS=""
+     IMLIB_CFLAGS=""
+     IMLIB_LIBS=""
      ifelse([$3], , :, [$3])
   fi
   AC_SUBST(GDK_IMLIB_CFLAGS)

Attachment: signature.asc
Description: PGP signature


Reply to: