tags 370822 + patch thanks Dear Andreas,
I have rolled the above provided hints/patches from Barry and Peter into the package, and provided you a single patch with this mail. By applying this patch after checking it, all you would need to do is to bump the version number and test the package. For me, it works. Do let me know if you need me to test something more. HTH. Let's get rid of this RC bug! :-) Kumar -- Kumar Appaiah
diff -Nru --exclude changelog xteddy-2.1/debian/control xteddy-2.1/debian/control --- xteddy-2.1/debian/control 2009-03-01 00:54:11.000000000 -0600 +++ xteddy-2.1/debian/control 2009-03-01 00:54:12.000000000 -0600 @@ -4,7 +4,7 @@ Maintainer: Debian Games Team <pkg-games-de...@lists.alioth.debian.org> Uploaders: Andreas Tille <ti...@debian.org> DM-Upload-Allowed: yes -Build-Depends: debhelper (>= 6.0.7), imlib11-dev (>= 1.9.14-16), quilt +Build-Depends: debhelper (>= 6.0.7), libimlib2-dev, quilt, automake1.4 Standards-Version: 3.8.0 Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/xteddy/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/xteddy/?op=log diff -Nru --exclude changelog xteddy-2.1/debian/patches/10_makefile.in.patches xteddy-2.1/debian/patches/10_makefile.in.patches --- xteddy-2.1/debian/patches/10_makefile.in.patches 2009-03-01 00:54:11.000000000 -0600 +++ xteddy-2.1/debian/patches/10_makefile.in.patches 2009-03-01 00:54:12.000000000 -0600 @@ -1,5 +1,16 @@ ---- xteddy-2.1.orig/Makefile.in -+++ xteddy-2.1/Makefile.in +Index: xteddy-2.1/Makefile.in +=================================================================== +--- xteddy-2.1.orig/Makefile.in 2009-03-01 00:38:14.000000000 -0600 ++++ xteddy-2.1/Makefile.in 2009-03-01 00:38:28.000000000 -0600 +@@ -74,7 +74,7 @@ + bin_PROGRAMS = xteddy + + xteddy_SOURCES = xteddy.c +-LIBS = `imlib-config --libs` ++LIBS = `imlib2-config --libs` + man_MANS = xteddy.6 + bin_SCRIPTS = xtoys xteddy_test + @@ -117,6 +117,7 @@ TAR = tar @@ -132,8 +143,10 @@ # Tell versions [3.59,3.63) of GNU make to not export all variables. ---- xteddy-2.1.orig/html/Makefile.in -+++ xteddy-2.1/html/Makefile.in +Index: xteddy-2.1/html/Makefile.in +=================================================================== +--- xteddy-2.1.orig/html/Makefile.in 2009-03-01 00:38:14.000000000 -0600 ++++ xteddy-2.1/html/Makefile.in 2009-03-01 00:38:21.000000000 -0600 @@ -87,9 +87,9 @@ all: all-redirect .SUFFIXES: @@ -158,8 +171,10 @@ $(mkinstalldirs) $(distdir)/images @for file in $(DISTFILES); do \ d=$(srcdir); \ ---- xteddy-2.1.orig/images/Makefile.in -+++ xteddy-2.1/images/Makefile.in +Index: xteddy-2.1/images/Makefile.in +=================================================================== +--- xteddy-2.1.orig/images/Makefile.in 2009-03-01 00:38:14.000000000 -0600 ++++ xteddy-2.1/images/Makefile.in 2009-03-01 00:38:21.000000000 -0600 @@ -91,9 +91,9 @@ all: all-redirect .SUFFIXES: diff -Nru --exclude changelog xteddy-2.1/debian/patches/30_makefile.am.patches xteddy-2.1/debian/patches/30_makefile.am.patches --- xteddy-2.1/debian/patches/30_makefile.am.patches 1969-12-31 18:00:00.000000000 -0600 +++ xteddy-2.1/debian/patches/30_makefile.am.patches 2009-03-01 00:54:12.000000000 -0600 @@ -0,0 +1,16 @@ +This patch fixes xteddy's build system to use Imlib2 instead of the +deprecated imlib11. + +Index: xteddy-2.1/Makefile.am +=================================================================== +--- xteddy-2.1.orig/Makefile.am 2009-03-01 00:40:18.000000000 -0600 ++++ xteddy-2.1/Makefile.am 2009-03-01 00:40:22.000000000 -0600 +@@ -3,7 +3,7 @@ + bin_PROGRAMS = xteddy + + xteddy_SOURCES = xteddy.c +-LIBS = `imlib-config --libs` ++LIBS = `imlib2-config --libs` + man_MANS = xteddy.6 + bin_SCRIPTS = xtoys xteddy_test + diff -Nru --exclude changelog xteddy-2.1/debian/patches/40_xteddy.c_imlib2.patch xteddy-2.1/debian/patches/40_xteddy.c_imlib2.patch --- xteddy-2.1/debian/patches/40_xteddy.c_imlib2.patch 1969-12-31 18:00:00.000000000 -0600 +++ xteddy-2.1/debian/patches/40_xteddy.c_imlib2.patch 2009-03-01 00:54:12.000000000 -0600 @@ -0,0 +1,146 @@ +Patch from Peter De Wachter <pdewa...@gmail.com> to allow xteddy to function with Imlib2. + +--- a/xteddy.c ++++ b/xteddy.c +@@ -28,7 +28,7 @@ + #include <X11/extensions/shape.h> + #include <X11/cursorfont.h> + +-#include <Imlib.h> ++#include <Imlib2.h> + + #include <ctype.h> + #include <stdio.h> +@@ -130,9 +130,11 @@ int main(int argc, char **argv) + { + /* Display, window and gc manipulation variables */ + Window win; ++ Pixmap pm_image, pm_mask; + XSetWindowAttributes setwinattr; + unsigned long valuemask, inputmask; +- int x, y, geomflags, xw, xh; ++ int x, y, geomflags; ++ unsigned int xw, xh; + unsigned int border_width = 0; + unsigned int display_width, display_height; + XSizeHints size_hints; +@@ -158,8 +160,8 @@ int main(int argc, char **argv) + int offs_x, offs_y, new_x, new_y, tmp_x, tmp_y; + unsigned int tmp_mask; + +- ImlibData *id; +- ImlibImage *im; ++ Imlib_Image *im; ++ int im_width, im_height; + + /* Determine program name */ + if ((progname = strrchr(argv[0],'/')) == NULL) +@@ -232,33 +234,51 @@ int main(int argc, char **argv) + display_width = DisplayWidth(display, screen_num); + display_height = DisplayHeight(display, screen_num); + +- if ( !(id=Imlib_init(display)) ) return -1; ++ /* set the maximum number of colors to allocate for 8bpp and less to 128 */ ++ imlib_set_color_usage(128); ++ /* dither for depths < 24bpp */ ++ imlib_context_set_dither(1); ++ /* set the display, visual and colormap we are using */ ++ imlib_context_set_display(display); ++ imlib_context_set_visual(DefaultVisual(display, DefaultScreen(display))); ++ imlib_context_set_colormap(DefaultColormap(display, DefaultScreen(display))); ++ + if ( !(file = InitTeddy(teddy)) ) { + fprintf(stderr, "Can not find any image with name '%s'.\n", teddy); + return -1; + } +- if ( !(im=Imlib_load_image(id, file)) ) { ++ if ( !(im=imlib_load_image_immediately(file)) ) { + fprintf(stderr, "Most probably, the file '%s' is not a valid image.\n", teddy); + return -1; + } ++ imlib_context_set_image(im); ++ im_width = imlib_image_get_width(); ++ im_height = imlib_image_get_height(); + /* Set the window position according to user preferences */ + if (geomflags & XNegative) +- x = display_width - im->rgb_width + x; ++ x = display_width - im_width + x; + if (geomflags & YNegative) +- y = display_height - im->rgb_height + y; ++ y = display_height - im_height + y; + /* Clip against bounds to stay on the screen */ + if (x<0) x=0; +- if (x > display_width - im->rgb_width) x = display_width - im->rgb_width; ++ if (x > display_width - im_width) x = display_width - im_width; + if (y<0) y=0; +- if (y > display_height - im->rgb_height) y = display_height - im->rgb_height; ++ if (y > display_height - im_height) y = display_height - im_height; + + /* Create the main window */ + win = XCreateSimpleWindow(display, DefaultRootWindow(display), +- x,y,im->rgb_width,im->rgb_height,border_width, ++ x,y,im_width,im_height,border_width, + BlackPixel(display,screen_num), + WhitePixel(display,screen_num)); + XSelectInput(display,win,StructureNotifyMask); +- Imlib_apply_image(id,im,win); ++ ++ imlib_context_set_drawable(win); ++ imlib_render_pixmaps_for_whole_image(&pm_image, &pm_mask); ++ XSetWindowBackgroundPixmap(display, win, pm_image); ++ XShapeCombineMask(display, win, ShapeBounding, 0, 0, pm_mask, ShapeSet); ++ XFreePixmap(display, pm_image); ++ XFreePixmap(display, pm_mask); ++ imlib_free_image_and_decache(); + + basewin = win; + +@@ -272,15 +292,14 @@ int main(int argc, char **argv) + XChangeWindowAttributes(display, win, valuemask, &setwinattr); + + /* Report size hints and other stuff to the window manager */ +- size_hints.min_width = im->rgb_width; /* Don't allow any resizing */ +- size_hints.min_height = im->rgb_height; +- size_hints.max_width = im->rgb_width; +- size_hints.max_height = im->rgb_height; ++ size_hints.min_width = im_width; /* Don't allow any resizing */ ++ size_hints.min_height = im_height; ++ size_hints.max_width = im_width; ++ size_hints.max_height = im_height; + size_hints.flags = PPosition | PSize | PMinSize | PMaxSize; + if (XStringListToTextProperty(&(teddy), 1, &windowName) == 0) + { + (void) fprintf(stderr, "%s: structure allocation for windowName failed.\n", progname); +- Imlib_kill_image(id, im); + return -1; + } + wm_hints.initial_state = NormalState; +@@ -309,20 +328,6 @@ int main(int argc, char **argv) + XNextEvent(display, &report); + switch(report.type) + { +- case Expose: +- if (report.xexpose.count != 0) +- break; +- else +- { +- /* No drawing needed - the background pixmap */ +- /* is handled automatically by the X server */ +- } +- break; +- case ConfigureNotify: +- /* Window has been resized */ +- Imlib_apply_image(id,im,win); +- XSync(display,False); +- break; + case ReparentNotify: + /* Window was reparented by the window manager */ + if (!use_wm) +@@ -382,7 +387,6 @@ int main(int argc, char **argv) + { + if (allow_quit) + { +- Imlib_kill_image(id, im); + XCloseDisplay(display); + return 0; + } diff -Nru --exclude changelog xteddy-2.1/debian/patches/series xteddy-2.1/debian/patches/series --- xteddy-2.1/debian/patches/series 2009-03-01 00:54:11.000000000 -0600 +++ xteddy-2.1/debian/patches/series 2009-03-01 00:54:12.000000000 -0600 @@ -1,2 +1,4 @@ 10_makefile.in.patches 20_xteddy-nocursor.patch +30_makefile.am.patches +40_xteddy.c_imlib2.patch
signature.asc
Description: Digital signature