Author: roam-guest
Date: 2009-04-14 11:37:10 +0000 (Tue, 14 Apr 2009)
New Revision: 9581

Added:
   packages/branches/xmahjongg/etch/debian/patches/05-feof.patch
   packages/branches/xmahjongg/etch/debian/xmahjongg.desktop
   packages/branches/xmahjongg/etch/debian/xmahjongg.install
Modified:
   packages/branches/xmahjongg/etch/
   packages/branches/xmahjongg/etch/debian/
   packages/branches/xmahjongg/etch/debian/changelog
   packages/branches/xmahjongg/etch/debian/dirs
   packages/branches/xmahjongg/etch/debian/patches/04-gif-read-errors.patch
   packages/branches/xmahjongg/etch/debian/patches/series
   packages/branches/xmahjongg/etch/debian/rules
Log:
Merge lenny/ rev. 9575:
  Merge trunk rev. 9360-9434:
    Add and install a desktop file, slightly modified from #478955.
  ........
    I think this overhauled xmahjongg package is pretty much ready to be
    unleashed upon the unsuspecting world.
  ........
    ARRRRGH!  Score one for well-meant yet not-quite-thought-out patches...
    
    Invert a test so that xmahjongg's GIF library actually manages to
    read GIF images from a memory buffer instead of just skipping
    the rest and segfaulting a couple of steps down the line.
    
    Reported by:        tolimar
    Pointy hat to:      myself
  ........
    My GIF library patches initially meant for the getter functions to
    return the number of bytes actually read (hence an unsigned value),
    but were later changed to let them return a true/false flag.
    This is better served by a plain "int" return type.
  ........
    Update the release timestamp.
  ........
    Fix reading the layout files.
    The problem was that xmahjongg assumed that when fgets() reads a line
    containing the final newline of a file, the file's EOF indicator would
    be set.  However, this seems not to be the case on recent Debian
    versions, so a patch is needed to explicitly distinguish between feof()
    and ferror() *after* the fgets() call.
    
    Closes:             #522740
  ........
    Add svn-bp:tagsUrl property.



Property changes on: packages/branches/xmahjongg/etch
___________________________________________________________________
Modified: svnmerge-integrated
   - /packages/branches/xmahjongg/lenny:1-9567,9570-9574
   + /packages/branches/xmahjongg/lenny:1-9567,9570-9575


Property changes on: packages/branches/xmahjongg/etch/debian
___________________________________________________________________
Added: svn-bp:tagsUrl
   + svn+ssh://svn.debian.org/svn/pkg-games/packages/tags/xmahjongg

Modified: packages/branches/xmahjongg/etch/debian/changelog
===================================================================
--- packages/branches/xmahjongg/etch/debian/changelog   2009-04-14 11:28:16 UTC 
(rev 9580)
+++ packages/branches/xmahjongg/etch/debian/changelog   2009-04-14 11:37:10 UTC 
(rev 9581)
@@ -1,8 +1,12 @@
-xmahjongg (3.7-2) UNRELEASED; urgency=low
+xmahjongg (3.7-3) unstable; urgency=low
 
+  * Unbreak reading layout files.  Closes: #522740
+
+ -- Peter Pentchev <[email protected]>  Mon, 06 Apr 2009 17:35:18 +0300
+
+xmahjongg (3.7-2) unstable; urgency=low
+
   * New maintainer.  Closes: #519355
-  * TODO:
-    - add a desktop file to fix #478955
   * Use quilt for patch management.
   * Regenerate the autotools-related files.
   * Add a watch file.
@@ -26,8 +30,9 @@
       the -Werror flag at the warnings level used
     - fix a couple of const char * warnings
     - teach the GIF library and the layout parser about read errors
+  * Add a desktop file.  Closes: #478955
 
- -- Peter Pentchev <[email protected]>  Tue, 31 Mar 2009 17:19:37 +0300
+ -- Peter Pentchev <[email protected]>  Fri, 03 Apr 2009 14:59:50 +0300
 
 xmahjongg (3.7-1.1) unstable; urgency=high
 

Modified: packages/branches/xmahjongg/etch/debian/dirs
===================================================================
--- packages/branches/xmahjongg/etch/debian/dirs        2009-04-14 11:28:16 UTC 
(rev 9580)
+++ packages/branches/xmahjongg/etch/debian/dirs        2009-04-14 11:37:10 UTC 
(rev 9581)
@@ -1 +1,2 @@
 /usr/games
+/usr/share/applications

Modified: 
packages/branches/xmahjongg/etch/debian/patches/04-gif-read-errors.patch
===================================================================
--- packages/branches/xmahjongg/etch/debian/patches/04-gif-read-errors.patch    
2009-04-14 11:28:16 UTC (rev 9580)
+++ packages/branches/xmahjongg/etch/debian/patches/04-gif-read-errors.patch    
2009-04-14 11:37:10 UTC (rev 9581)
@@ -7,7 +7,7 @@
    int is_eoi;
    uint8_t (*byte_getter)(struct Gif_Reader *);
 -  void (*block_getter)(uint8_t *, uint32_t, struct Gif_Reader *);
-+  uint32_t (*block_getter)(uint8_t *, uint32_t, struct Gif_Reader *);
++  int (*block_getter)(uint8_t *, uint32_t, struct Gif_Reader *);
    uint32_t (*offseter)(struct Gif_Reader *);
    int (*eofer)(struct Gif_Reader *);
    
@@ -16,7 +16,7 @@
  }
  
 -static void
-+uint32_t
++int
  file_block_getter(uint8_t *p, uint32_t s, Gif_Reader *grr)
  {
 -  fread(p, 1, s, grr->f);
@@ -29,13 +29,13 @@
  }
  
 -static void
-+static uint32_t
++static int
  record_block_getter(uint8_t *p, uint32_t s, Gif_Reader *grr)
  {
 -  if (s > grr->w) s = grr->w;
 +  int res;
 +  res = (s <= grr->w);
-+  if (res)
++  if (!res)
 +    s = grr->w;
    memcpy(p, grr->v, s);
    grr->w -= s, grr->v += s;

Copied: packages/branches/xmahjongg/etch/debian/patches/05-feof.patch (from rev 
9575, packages/branches/xmahjongg/lenny/debian/patches/05-feof.patch)
===================================================================
--- packages/branches/xmahjongg/etch/debian/patches/05-feof.patch               
                (rev 0)
+++ packages/branches/xmahjongg/etch/debian/patches/05-feof.patch       
2009-04-14 11:37:10 UTC (rev 9581)
@@ -0,0 +1,24 @@
+Do not break if fgets() detects EOF when invoked *at* EOF instead of
+setting the EOF flag at the end of the previous invocation, after
+the final newline has been read.
+
+--- a/src/game.cc
++++ b/src/game.cc
+@@ -498,7 +498,7 @@
+   while (!feof(f)) {
+     buffer[0] = 0;
+     if (fgets(buffer, BUFSIZ, f) == NULL)
+-      return false;
++      return feof(f)? true: false;
+     int r, c, l;
+     if (sscanf(buffer, " %d %d %d", &r, &c, &l) == 3)
+       if (!place_tile(r+2, c+2, l))
+@@ -527,7 +527,7 @@
+     for (int r = 0; r < 16 && !feof(f); r++) {
+       buf[0] = 0;
+       if (fgets(buf, BUFSIZ, f) == NULL)
+-      return false;
++      return feof(f)? true: false;
+       for (int c = 0; c < TILE_COLS - 3 && buf[c] && !isspace(buf[c]); c++)
+       if (buf[c] == '1') {
+         if (!place_tile(r + 2, c + 2, l))

Modified: packages/branches/xmahjongg/etch/debian/patches/series
===================================================================
--- packages/branches/xmahjongg/etch/debian/patches/series      2009-04-14 
11:28:16 UTC (rev 9580)
+++ packages/branches/xmahjongg/etch/debian/patches/series      2009-04-14 
11:37:10 UTC (rev 9581)
@@ -2,3 +2,4 @@
 02-manpage-typo.patch
 03-compiler-warnings.patch
 04-gif-read-errors.patch
+05-feof.patch

Modified: packages/branches/xmahjongg/etch/debian/rules
===================================================================
--- packages/branches/xmahjongg/etch/debian/rules       2009-04-14 11:28:16 UTC 
(rev 9580)
+++ packages/branches/xmahjongg/etch/debian/rules       2009-04-14 11:37:10 UTC 
(rev 9581)
@@ -63,6 +63,7 @@
 #      dh_testversion
        dh_testdir
        dh_testroot
+       dh_install
        dh_installdocs
        dh_installexamples
        dh_installmenu
@@ -72,6 +73,7 @@
        dh_installman
 #      dh_undocumented
        dh_installchangelogs 
+       dh_desktop
        dh_strip
        dh_compress
        dh_fixperms

Copied: packages/branches/xmahjongg/etch/debian/xmahjongg.desktop (from rev 
9575, packages/branches/xmahjongg/lenny/debian/xmahjongg.desktop)
===================================================================
--- packages/branches/xmahjongg/etch/debian/xmahjongg.desktop                   
        (rev 0)
+++ packages/branches/xmahjongg/etch/debian/xmahjongg.desktop   2009-04-14 
11:37:10 UTC (rev 9581)
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=xmahjongg
+Name[bg_BG.UTF-8]=Маджонг (xmahjongg)
+GenericName=
+Comment=A colorful solitaire Mah Jongg game
+Comment[bg_BG.UTF-8]=Премахване на купчина плочки чрез групирането им по двойки
+Icon=
+Exec=/usr/games/xmahjongg
+Terminal=false
+Categories=Game;CardGame;

Copied: packages/branches/xmahjongg/etch/debian/xmahjongg.install (from rev 
9575, packages/branches/xmahjongg/lenny/debian/xmahjongg.install)
===================================================================
--- packages/branches/xmahjongg/etch/debian/xmahjongg.install                   
        (rev 0)
+++ packages/branches/xmahjongg/etch/debian/xmahjongg.install   2009-04-14 
11:37:10 UTC (rev 9581)
@@ -0,0 +1 @@
+debian/xmahjongg.desktop       usr/share/applications


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to