Date: Monday, April 29, 2013 @ 19:12:06
  Author: bpiotrowski
Revision: 183941

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  tuxpuck/repos/staging-i686/
  tuxpuck/repos/staging-i686/PKGBUILD
    (from rev 183940, tuxpuck/trunk/PKGBUILD)
  tuxpuck/repos/staging-i686/tuxpuck-0.8.2-ldflags.patch
    (from rev 183940, tuxpuck/trunk/tuxpuck-0.8.2-ldflags.patch)
  tuxpuck/repos/staging-i686/tuxpuck-0.8.2-libpng15.patch
    (from rev 183940, tuxpuck/trunk/tuxpuck-0.8.2-libpng15.patch)
  tuxpuck/repos/staging-x86_64/
  tuxpuck/repos/staging-x86_64/PKGBUILD
    (from rev 183940, tuxpuck/trunk/PKGBUILD)
  tuxpuck/repos/staging-x86_64/tuxpuck-0.8.2-ldflags.patch
    (from rev 183940, tuxpuck/trunk/tuxpuck-0.8.2-ldflags.patch)
  tuxpuck/repos/staging-x86_64/tuxpuck-0.8.2-libpng15.patch
    (from rev 183940, tuxpuck/trunk/tuxpuck-0.8.2-libpng15.patch)

---------------------------------------------+
 staging-i686/PKGBUILD                       |   41 ++++++++++++++++
 staging-i686/tuxpuck-0.8.2-ldflags.patch    |   11 ++++
 staging-i686/tuxpuck-0.8.2-libpng15.patch   |   63 ++++++++++++++++++++++++++
 staging-x86_64/PKGBUILD                     |   41 ++++++++++++++++
 staging-x86_64/tuxpuck-0.8.2-ldflags.patch  |   11 ++++
 staging-x86_64/tuxpuck-0.8.2-libpng15.patch |   63 ++++++++++++++++++++++++++
 6 files changed, 230 insertions(+)

Copied: tuxpuck/repos/staging-i686/PKGBUILD (from rev 183940, 
tuxpuck/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD                               (rev 0)
+++ staging-i686/PKGBUILD       2013-04-29 17:12:06 UTC (rev 183941)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tp...@archlinux.org>
+
+pkgname=tuxpuck
+pkgver=0.8.2
+pkgrel=6
+pkgdesc="Airhockey with tux"
+arch=('i686' 'x86_64')
+url="http://home.no.net/munsuun/tuxpuck/";
+license=('GPL2')
+depends=('libjpeg' 'sdl' 'libpng' 'libvorbis')
+makedepends=('freetype2')
+options=('!makeflags')
+source=("http://ftp.de.debian.org/debian/pool/main/t/${pkgname}/${pkgname}_$pkgver.orig.tar.gz";
+        'tuxpuck-0.8.2-ldflags.patch'
+        'tuxpuck-0.8.2-libpng15.patch')
+md5sums=('fc839abc2b1f3eafae397e1ed6487079'
+         'cb914d211bf3f519b7700fda180612b0'
+         'a4da530d670a0c30ac0840aab1db0dca')
+
+build() {
+  cd $srcdir/$pkgname-$pkgver
+
+  sed -i 's|usr/man|usr/share/man|' Makefile
+  sed -i -e 's/-Werror//' \
+         -e '/^CC/d' \
+         Makefile \
+         utils/Makefile \
+         data/Makefile
+
+  patch -Np0 -i "${srcdir}/tuxpuck-0.8.2-ldflags.patch"
+  patch -Np0 -i "${srcdir}/tuxpuck-0.8.2-libpng15.patch"
+
+  make
+}
+
+package() {
+  cd $srcdir/$pkgname-$pkgver
+
+  make DESTDIR=$pkgdir install
+}

Copied: tuxpuck/repos/staging-i686/tuxpuck-0.8.2-ldflags.patch (from rev 
183940, tuxpuck/trunk/tuxpuck-0.8.2-ldflags.patch)
===================================================================
--- staging-i686/tuxpuck-0.8.2-ldflags.patch                            (rev 0)
+++ staging-i686/tuxpuck-0.8.2-ldflags.patch    2013-04-29 17:12:06 UTC (rev 
183941)
@@ -0,0 +1,11 @@
+--- Makefile.old       2010-10-05 10:34:57.000000000 +0200
++++ Makefile   2010-10-05 10:35:28.000000000 +0200
+@@ -20,7 +20,7 @@
+ 
+ $(NAME) : $(OBJS)
+       cd data; $(MAKE)
+-      $(CC) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \
++      $(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` 
-lm -lpng \
+       -ljpeg -lz -lvorbisfile -lvorbis -logg -o $(NAME)
+ 
+ w32icon.o : data/icons/tuxpuck.ico

Copied: tuxpuck/repos/staging-i686/tuxpuck-0.8.2-libpng15.patch (from rev 
183940, tuxpuck/trunk/tuxpuck-0.8.2-libpng15.patch)
===================================================================
--- staging-i686/tuxpuck-0.8.2-libpng15.patch                           (rev 0)
+++ staging-i686/tuxpuck-0.8.2-libpng15.patch   2013-04-29 17:12:06 UTC (rev 
183941)
@@ -0,0 +1,63 @@
+--- png.c.old  2011-09-14 16:25:54.415338149 +0200
++++ png.c      2011-09-14 17:41:02.190803110 +0200
+@@ -38,6 +38,8 @@
+   png_color_16 *transv;
+   SDL_RWops *src = NULL;
+   Uint32 size;
++  int num_palette;
++  png_colorp png_palette;
+ 
+   memcpy(&size, data, sizeof(Uint32));
+   if (memcounter)
+@@ -74,7 +76,7 @@
+    * the normal method of doing things with libpng).  REQUIRED unless you
+    * set up your own error handlers in png_create_read_struct() earlier.
+    */
+-  if (setjmp(png_ptr->jmpbuf)) {
++  if (setjmp(png_jmpbuf(png_ptr))) {
+     SDL_SetError("Error reading the PNG file.");
+     goto done;
+   }
+@@ -142,9 +144,9 @@
+       Rmask = 0x000000FF;
+       Gmask = 0x0000FF00;
+       Bmask = 0x00FF0000;
+-      Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
++      Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0;
+     } else {
+-      int s = (info_ptr->channels == 4) ? 0 : 8;
++      int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8;
+       Rmask = 0xFF000000 >> s;
+       Gmask = 0x00FF0000 >> s;
+       Bmask = 0x0000FF00 >> s;
+@@ -152,7 +154,7 @@
+     }
+   }
+   surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
+-                           bit_depth * info_ptr->channels, Rmask, Gmask,
++                           bit_depth * png_get_channels(png_ptr, info_ptr), 
Rmask, Gmask,
+                            Bmask, Amask);
+   if (surface == NULL) {
+     SDL_SetError("Out of memory");
+@@ -197,12 +199,15 @@
+       palette->colors[i].g = i;
+       palette->colors[i].b = i;
+       }
+-    } else if (info_ptr->num_palette > 0) {
+-      palette->ncolors = info_ptr->num_palette;
+-      for (i = 0; i < info_ptr->num_palette; ++i) {
+-      palette->colors[i].b = info_ptr->palette[i].blue;
+-      palette->colors[i].g = info_ptr->palette[i].green;
+-      palette->colors[i].r = info_ptr->palette[i].red;
++    } else {
++      png_get_PLTE(png_ptr, info_ptr, &png_palette, &num_palette);
++      if (num_palette > 0) {
++        palette->ncolors = num_palette;
++      for (i = 0; i < num_palette; ++i) {
++        palette->colors[i].b = png_palette[i].blue;
++        palette->colors[i].g = png_palette[i].green;
++        palette->colors[i].r = png_palette[i].red;
++      }
+       }
+     }
+   }

Copied: tuxpuck/repos/staging-x86_64/PKGBUILD (from rev 183940, 
tuxpuck/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD                             (rev 0)
+++ staging-x86_64/PKGBUILD     2013-04-29 17:12:06 UTC (rev 183941)
@@ -0,0 +1,41 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tp...@archlinux.org>
+
+pkgname=tuxpuck
+pkgver=0.8.2
+pkgrel=6
+pkgdesc="Airhockey with tux"
+arch=('i686' 'x86_64')
+url="http://home.no.net/munsuun/tuxpuck/";
+license=('GPL2')
+depends=('libjpeg' 'sdl' 'libpng' 'libvorbis')
+makedepends=('freetype2')
+options=('!makeflags')
+source=("http://ftp.de.debian.org/debian/pool/main/t/${pkgname}/${pkgname}_$pkgver.orig.tar.gz";
+        'tuxpuck-0.8.2-ldflags.patch'
+        'tuxpuck-0.8.2-libpng15.patch')
+md5sums=('fc839abc2b1f3eafae397e1ed6487079'
+         'cb914d211bf3f519b7700fda180612b0'
+         'a4da530d670a0c30ac0840aab1db0dca')
+
+build() {
+  cd $srcdir/$pkgname-$pkgver
+
+  sed -i 's|usr/man|usr/share/man|' Makefile
+  sed -i -e 's/-Werror//' \
+         -e '/^CC/d' \
+         Makefile \
+         utils/Makefile \
+         data/Makefile
+
+  patch -Np0 -i "${srcdir}/tuxpuck-0.8.2-ldflags.patch"
+  patch -Np0 -i "${srcdir}/tuxpuck-0.8.2-libpng15.patch"
+
+  make
+}
+
+package() {
+  cd $srcdir/$pkgname-$pkgver
+
+  make DESTDIR=$pkgdir install
+}

Copied: tuxpuck/repos/staging-x86_64/tuxpuck-0.8.2-ldflags.patch (from rev 
183940, tuxpuck/trunk/tuxpuck-0.8.2-ldflags.patch)
===================================================================
--- staging-x86_64/tuxpuck-0.8.2-ldflags.patch                          (rev 0)
+++ staging-x86_64/tuxpuck-0.8.2-ldflags.patch  2013-04-29 17:12:06 UTC (rev 
183941)
@@ -0,0 +1,11 @@
+--- Makefile.old       2010-10-05 10:34:57.000000000 +0200
++++ Makefile   2010-10-05 10:35:28.000000000 +0200
+@@ -20,7 +20,7 @@
+ 
+ $(NAME) : $(OBJS)
+       cd data; $(MAKE)
+-      $(CC) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \
++      $(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` 
-lm -lpng \
+       -ljpeg -lz -lvorbisfile -lvorbis -logg -o $(NAME)
+ 
+ w32icon.o : data/icons/tuxpuck.ico

Copied: tuxpuck/repos/staging-x86_64/tuxpuck-0.8.2-libpng15.patch (from rev 
183940, tuxpuck/trunk/tuxpuck-0.8.2-libpng15.patch)
===================================================================
--- staging-x86_64/tuxpuck-0.8.2-libpng15.patch                         (rev 0)
+++ staging-x86_64/tuxpuck-0.8.2-libpng15.patch 2013-04-29 17:12:06 UTC (rev 
183941)
@@ -0,0 +1,63 @@
+--- png.c.old  2011-09-14 16:25:54.415338149 +0200
++++ png.c      2011-09-14 17:41:02.190803110 +0200
+@@ -38,6 +38,8 @@
+   png_color_16 *transv;
+   SDL_RWops *src = NULL;
+   Uint32 size;
++  int num_palette;
++  png_colorp png_palette;
+ 
+   memcpy(&size, data, sizeof(Uint32));
+   if (memcounter)
+@@ -74,7 +76,7 @@
+    * the normal method of doing things with libpng).  REQUIRED unless you
+    * set up your own error handlers in png_create_read_struct() earlier.
+    */
+-  if (setjmp(png_ptr->jmpbuf)) {
++  if (setjmp(png_jmpbuf(png_ptr))) {
+     SDL_SetError("Error reading the PNG file.");
+     goto done;
+   }
+@@ -142,9 +144,9 @@
+       Rmask = 0x000000FF;
+       Gmask = 0x0000FF00;
+       Bmask = 0x00FF0000;
+-      Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
++      Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0;
+     } else {
+-      int s = (info_ptr->channels == 4) ? 0 : 8;
++      int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8;
+       Rmask = 0xFF000000 >> s;
+       Gmask = 0x00FF0000 >> s;
+       Bmask = 0x0000FF00 >> s;
+@@ -152,7 +154,7 @@
+     }
+   }
+   surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
+-                           bit_depth * info_ptr->channels, Rmask, Gmask,
++                           bit_depth * png_get_channels(png_ptr, info_ptr), 
Rmask, Gmask,
+                            Bmask, Amask);
+   if (surface == NULL) {
+     SDL_SetError("Out of memory");
+@@ -197,12 +199,15 @@
+       palette->colors[i].g = i;
+       palette->colors[i].b = i;
+       }
+-    } else if (info_ptr->num_palette > 0) {
+-      palette->ncolors = info_ptr->num_palette;
+-      for (i = 0; i < info_ptr->num_palette; ++i) {
+-      palette->colors[i].b = info_ptr->palette[i].blue;
+-      palette->colors[i].g = info_ptr->palette[i].green;
+-      palette->colors[i].r = info_ptr->palette[i].red;
++    } else {
++      png_get_PLTE(png_ptr, info_ptr, &png_palette, &num_palette);
++      if (num_palette > 0) {
++        palette->ncolors = num_palette;
++      for (i = 0; i < num_palette; ++i) {
++        palette->colors[i].b = png_palette[i].blue;
++        palette->colors[i].g = png_palette[i].green;
++        palette->colors[i].r = png_palette[i].red;
++      }
+       }
+     }
+   }

Reply via email to