Date: Monday, July 8, 2013 @ 13:01:46
  Author: lcarlier
Revision: 93656

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

Added:
  widelands/repos/community-staging-i686/
  widelands/repos/community-staging-i686/6233_6232.diff
    (from rev 93655, widelands/trunk/6233_6232.diff)
  widelands/repos/community-staging-i686/PKGBUILD
    (from rev 93655, widelands/trunk/PKGBUILD)
  widelands/repos/community-staging-i686/widelands-0.16-libpng15.patch
    (from rev 93655, widelands/trunk/widelands-0.16-libpng15.patch)
  widelands/repos/community-staging-i686/widelands-build15-gcc-4.5-patch
    (from rev 93655, widelands/trunk/widelands-build15-gcc-4.5-patch)
  widelands/repos/community-staging-i686/widelands.desktop
    (from rev 93655, widelands/trunk/widelands.desktop)
  widelands/repos/community-staging-i686/widelands.png
    (from rev 93655, widelands/trunk/widelands.png)
  widelands/repos/community-staging-i686/widelands.sh
    (from rev 93655, widelands/trunk/widelands.sh)
  widelands/repos/community-staging-x86_64/
  widelands/repos/community-staging-x86_64/6233_6232.diff
    (from rev 93655, widelands/trunk/6233_6232.diff)
  widelands/repos/community-staging-x86_64/PKGBUILD
    (from rev 93655, widelands/trunk/PKGBUILD)
  widelands/repos/community-staging-x86_64/widelands-0.16-libpng15.patch
    (from rev 93655, widelands/trunk/widelands-0.16-libpng15.patch)
  widelands/repos/community-staging-x86_64/widelands-build15-gcc-4.5-patch
    (from rev 93655, widelands/trunk/widelands-build15-gcc-4.5-patch)
  widelands/repos/community-staging-x86_64/widelands.desktop
    (from rev 93655, widelands/trunk/widelands.desktop)
  widelands/repos/community-staging-x86_64/widelands.png
    (from rev 93655, widelands/trunk/widelands.png)
  widelands/repos/community-staging-x86_64/widelands.sh
    (from rev 93655, widelands/trunk/widelands.sh)

----------------------------------------------------------+
 community-staging-i686/6233_6232.diff                    |   59 ++++++++++++
 community-staging-i686/PKGBUILD                          |   54 +++++++++++
 community-staging-i686/widelands-0.16-libpng15.patch     |   61 +++++++++++++
 community-staging-i686/widelands-build15-gcc-4.5-patch   |   51 ++++++++++
 community-staging-i686/widelands.desktop                 |    8 +
 community-staging-i686/widelands.sh                      |    3 
 community-staging-x86_64/6233_6232.diff                  |   59 ++++++++++++
 community-staging-x86_64/PKGBUILD                        |   54 +++++++++++
 community-staging-x86_64/widelands-0.16-libpng15.patch   |   61 +++++++++++++
 community-staging-x86_64/widelands-build15-gcc-4.5-patch |   51 ++++++++++
 community-staging-x86_64/widelands.desktop               |    8 +
 community-staging-x86_64/widelands.sh                    |    3 
 12 files changed, 472 insertions(+)

Copied: widelands/repos/community-staging-i686/6233_6232.diff (from rev 93655, 
widelands/trunk/6233_6232.diff)
===================================================================
--- community-staging-i686/6233_6232.diff                               (rev 0)
+++ community-staging-i686/6233_6232.diff       2013-07-08 11:01:46 UTC (rev 
93656)
@@ -0,0 +1,59 @@
+=== modified file 'src/graphic/graphic.cc'
+--- src/graphic/graphic.cc     2011-11-30 21:38:37 +0000
++++ src/graphic/graphic.cc     2012-02-19 17:10:12 +0000
+@@ -725,6 +725,18 @@
+       if (!png_ptr)
+               throw wexception("Graphic::save_png: could not create png 
struct");
+ 
++      png_infop info_ptr = png_create_info_struct(png_ptr);
++      if (!info_ptr) {
++              png_destroy_write_struct(&png_ptr, static_cast<png_infopp>(0));
++              throw wexception("Graphic::save_png: could not create png info 
struct");
++      }
++
++      // Set jump for error
++      if (setjmp(png_jmpbuf(png_ptr))) {
++              png_destroy_write_struct(&png_ptr, &info_ptr);
++              throw wexception("Graphic::save_png: Error writing PNG!");
++      }
++
+       //  Set another write function. This is potentially dangerouse because 
the
+       //  flush function is internally called by png_write_end(), this will 
crash
+       //  on newer libpngs. See here:
+@@ -736,35 +748,14 @@
+                sw,
+                &Graphic::m_png_write_function, 
&Graphic::m_png_flush_function);
+ 
+-      png_infop info_ptr = png_create_info_struct(png_ptr);
+-
+-      if (!info_ptr) {
+-              png_destroy_write_struct(&png_ptr, static_cast<png_infopp>(0));
+-              throw wexception("Graphic::save_png: could not create png info 
struct");
+-      }
+-
+-      // Set jump for error
+-      if (setjmp(png_jmpbuf(png_ptr))) {
+-              png_destroy_write_struct(&png_ptr, &info_ptr);
+-              throw wexception("Graphic::save_png: could not set png setjmp");
+-      }
+-
+       // Fill info struct
+       png_set_IHDR
+               (png_ptr, info_ptr, pix.get_w(), pix.get_h(),
+                8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
+                PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+ 
+-      // png_set_strip_16(png_ptr) ;
+-
+       // Start writing
+       png_write_info(png_ptr, info_ptr);
+-
+-      // Strip data down
+-      png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
+-
+-      png_set_packing(png_ptr);
+-
+       {
+               uint32_t surf_w = pix.get_w();
+               uint32_t surf_h = pix.get_h();
+

Copied: widelands/repos/community-staging-i686/PKGBUILD (from rev 93655, 
widelands/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD                             (rev 0)
+++ community-staging-i686/PKGBUILD     2013-07-08 11:01:46 UTC (rev 93656)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Sven-Hendrik Haase <[email protected]>
+# Contributor: Arkham <arkham at archlinux dot us>
+# Contributor: Christoph Zeiler <rabyte*gmail>
+
+pkgname=widelands
+pkgver=17
+_realver=build17
+pkgrel=8
+pkgdesc="A realtime strategy game with emphasis on economy and transport"
+arch=('i686' 'x86_64')
+url="http://widelands.org/";
+license=('GPL')
+depends=('sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'sdl_gfx' 'lua51' 'glew' 
'python2' 'boost-libs')
+makedepends=('cmake' 'boost' 'mesa')
+source=("https://launchpad.net/widelands/build17/build-17/+download/$pkgname-$_realver-src.tar.bz2";
+        $pkgname.desktop
+        $pkgname.png
+        $pkgname.sh)
+md5sums=('bdc9bc0aa631af1aa7fb450507611a58'
+         '15820bf099fd6f16251fe70a75c534bb'
+         '3dfda7e9ca76ca00dd98d745d0ceb328'
+         '7cae50aba5ed0cd2cfeea79124637b46')
+
+build() {
+    cd $srcdir/$pkgname-$_realver-src
+
+    sed -i "1 i #include <unistd.h>" src/main.cc
+    sed -i "/Boost_USE_STATIC_LIBS/d" CMakeLists.txt
+
+    mkdir -p build/compile && cd build/compile
+
+    cmake ../.. -DCMAKE_BUILD_TYPE=Release \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DWL_INSTALL_PREFIX=/usr \
+        -DWL_INSTALL_DATADIR=share/$pkgname \
+        -DWL_INSTALL_BINDIR=bin
+    make
+}
+
+package() {
+    depends=(${depends[@]} 'widelands-data')
+    cd $srcdir/$pkgname-$_realver-src/build/compile
+
+    make DESTDIR="$pkgdir" install
+
+    rm -r 
$pkgdir/usr/share/widelands/{campaigns,fonts,global,locale,maps,music,pics,scripting,sound,tribes,txts,worlds}
+
+    # Install bin, icon and desktop file
+    #install -Dm 755 src/$pkgname $pkgdir/usr/share/$pkgname/$pkgname
+    #install -Dm 755 $srcdir/$pkgname.sh $pkgdir/usr/bin/$pkgname
+    install -Dm644 $srcdir/$pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
+    install -Dm644 $srcdir/$pkgname.desktop 
$pkgdir/usr/share/applications/$pkgname.desktop
+}

Copied: widelands/repos/community-staging-i686/widelands-0.16-libpng15.patch 
(from rev 93655, widelands/trunk/widelands-0.16-libpng15.patch)
===================================================================
--- community-staging-i686/widelands-0.16-libpng15.patch                        
        (rev 0)
+++ community-staging-i686/widelands-0.16-libpng15.patch        2013-07-08 
11:01:46 UTC (rev 93656)
@@ -0,0 +1,61 @@
+--- src/graphic/SDL_mng.cc
++++ src/graphic/SDL_mng.cc
+@@ -276,7 +276,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;
+       }
+@@ -356,9 +356,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 const s = (info_ptr->channels == 4) ? 0 : 8;
++                      int const s = (png_get_channels(png_ptr, info_ptr) == 
4) ? 0 : 8;
+                       Rmask = 0xFF000000 >> s;
+                       Gmask = 0x00FF0000 >> s;
+                       Bmask = 0x0000FF00 >> s;
+@@ -369,7 +369,7 @@
+               SDL_AllocSurface
+                       (SDL_SWSURFACE,
+                        width, height,
+-                       bit_depth * info_ptr->channels,
++                       bit_depth * png_get_channels(png_ptr, info_ptr),
+                        Rmask, Gmask, Bmask, Amask);
+       if (not surface) {
+               SDL_SetError("Out of memory");
+@@ -407,6 +407,9 @@
+       /* read rest of file, get additional chunks in info_ptr - REQUIRED */
+       png_read_end(png_ptr, info_ptr);
+ 
++      png_colorp png_palette;
++      int png_num_palette;
++
+       /* Load the palette, if any */
+       if ((palette = surface->format->palette)) {
+               if (color_type == PNG_COLOR_TYPE_GRAY) {
+@@ -416,12 +419,12 @@
+                               palette->colors[i].g = i;
+                               palette->colors[i].b = i;
+                       }
+-              } else if (info_ptr->num_palette > 0) {
+-                      palette->ncolors = info_ptr->num_palette;
+-                      for (uint32_t 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 if (png_num_palette > 0) {
++                      palette->ncolors = png_num_palette;
++                      for (uint32_t i = 0; i < png_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: widelands/repos/community-staging-i686/widelands-build15-gcc-4.5-patch 
(from rev 93655, widelands/trunk/widelands-build15-gcc-4.5-patch)
===================================================================
--- community-staging-i686/widelands-build15-gcc-4.5-patch                      
        (rev 0)
+++ community-staging-i686/widelands-build15-gcc-4.5-patch      2013-07-08 
11:01:46 UTC (rev 93656)
@@ -0,0 +1,51 @@
+diff -Naur widelands-from/src/editor/ui_menus/editor_main_menu_new_map.cc 
widelands-to/src/editor/ui_menus/editor_main_menu_new_map.cc
+--- widelands-from/src/editor/ui_menus/editor_main_menu_new_map.cc     
2010-04-16 15:41:22.000000000 +0000
++++ widelands-to/src/editor/ui_menus/editor_main_menu_new_map.cc       
2010-07-01 21:15:56.000000000 +0000
+@@ -113,7 +113,7 @@
+                posx, posy, width, height,
+                g_gr->get_picture(PicMod_UI, "pics/but1.png"),
+                &Main_Menu_New_Map::button_clicked, *this, 4,
+-               
Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++               Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+ 
+       posy += height + spacing + spacing + spacing;
+ 
+@@ -142,7 +142,7 @@
+               if (m_currentworld == m_worlds.size())
+                       m_currentworld = 0;
+               m_world->set_title
+-                      
(Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name
++                      
(Widelands::World(m_worlds[m_currentworld].c_str()).get_name
+                               ());
+               break;
+       }
+diff -Naur widelands-from/src/editor/ui_menus/editor_main_menu_random_map.cc 
widelands-to/src/editor/ui_menus/editor_main_menu_random_map.cc
+--- widelands-from/src/editor/ui_menus/editor_main_menu_random_map.cc  
2010-04-16 15:41:22.000000000 +0000
++++ widelands-to/src/editor/ui_menus/editor_main_menu_random_map.cc    
2010-07-01 21:17:39.000000000 +0000
+@@ -272,7 +272,7 @@
+                posx, posy, width, height,
+                g_gr->get_picture(PicMod_UI, "pics/but1.png"),
+                &Main_Menu_New_Random_Map::button_clicked, *this, 8,
+-               
Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++               Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+ 
+       posy += height + spacing + spacing + spacing;
+ 
+@@ -343,7 +343,7 @@
+               if (m_currentworld == m_worlds.size())
+                       m_currentworld = 0;
+               m_world->set_title
+-                      
(Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++                      
(Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+               break;
+       case 9:
+               break;
+@@ -476,7 +476,7 @@
+                       (strcmp(mapInfo.worldName.c_str(), 
m_worlds[m_currentworld].c_str()))
+                       ++m_currentworld;
+               m_world->set_title
+-                      
(Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++                      
(Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+ 
+               button_clicked(-1);  // Update other values in UI as well
+ 

Copied: widelands/repos/community-staging-i686/widelands.desktop (from rev 
93655, widelands/trunk/widelands.desktop)
===================================================================
--- community-staging-i686/widelands.desktop                            (rev 0)
+++ community-staging-i686/widelands.desktop    2013-07-08 11:01:46 UTC (rev 
93656)
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Widelands
+GenericName=Widelands
+Comment=Realtime strategy game
+Icon=widelands
+Exec=widelands
+Type=Application
+Categories=Game;StrategyGame;

Copied: widelands/repos/community-staging-i686/widelands.png (from rev 93655, 
widelands/trunk/widelands.png)
===================================================================
(Binary files differ)

Copied: widelands/repos/community-staging-i686/widelands.sh (from rev 93655, 
widelands/trunk/widelands.sh)
===================================================================
--- community-staging-i686/widelands.sh                         (rev 0)
+++ community-staging-i686/widelands.sh 2013-07-08 11:01:46 UTC (rev 93656)
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /usr/share/widelands
+./widelands $*

Copied: widelands/repos/community-staging-x86_64/6233_6232.diff (from rev 
93655, widelands/trunk/6233_6232.diff)
===================================================================
--- community-staging-x86_64/6233_6232.diff                             (rev 0)
+++ community-staging-x86_64/6233_6232.diff     2013-07-08 11:01:46 UTC (rev 
93656)
@@ -0,0 +1,59 @@
+=== modified file 'src/graphic/graphic.cc'
+--- src/graphic/graphic.cc     2011-11-30 21:38:37 +0000
++++ src/graphic/graphic.cc     2012-02-19 17:10:12 +0000
+@@ -725,6 +725,18 @@
+       if (!png_ptr)
+               throw wexception("Graphic::save_png: could not create png 
struct");
+ 
++      png_infop info_ptr = png_create_info_struct(png_ptr);
++      if (!info_ptr) {
++              png_destroy_write_struct(&png_ptr, static_cast<png_infopp>(0));
++              throw wexception("Graphic::save_png: could not create png info 
struct");
++      }
++
++      // Set jump for error
++      if (setjmp(png_jmpbuf(png_ptr))) {
++              png_destroy_write_struct(&png_ptr, &info_ptr);
++              throw wexception("Graphic::save_png: Error writing PNG!");
++      }
++
+       //  Set another write function. This is potentially dangerouse because 
the
+       //  flush function is internally called by png_write_end(), this will 
crash
+       //  on newer libpngs. See here:
+@@ -736,35 +748,14 @@
+                sw,
+                &Graphic::m_png_write_function, 
&Graphic::m_png_flush_function);
+ 
+-      png_infop info_ptr = png_create_info_struct(png_ptr);
+-
+-      if (!info_ptr) {
+-              png_destroy_write_struct(&png_ptr, static_cast<png_infopp>(0));
+-              throw wexception("Graphic::save_png: could not create png info 
struct");
+-      }
+-
+-      // Set jump for error
+-      if (setjmp(png_jmpbuf(png_ptr))) {
+-              png_destroy_write_struct(&png_ptr, &info_ptr);
+-              throw wexception("Graphic::save_png: could not set png setjmp");
+-      }
+-
+       // Fill info struct
+       png_set_IHDR
+               (png_ptr, info_ptr, pix.get_w(), pix.get_h(),
+                8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
+                PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+ 
+-      // png_set_strip_16(png_ptr) ;
+-
+       // Start writing
+       png_write_info(png_ptr, info_ptr);
+-
+-      // Strip data down
+-      png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
+-
+-      png_set_packing(png_ptr);
+-
+       {
+               uint32_t surf_w = pix.get_w();
+               uint32_t surf_h = pix.get_h();
+

Copied: widelands/repos/community-staging-x86_64/PKGBUILD (from rev 93655, 
widelands/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2013-07-08 11:01:46 UTC (rev 93656)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Sven-Hendrik Haase <[email protected]>
+# Contributor: Arkham <arkham at archlinux dot us>
+# Contributor: Christoph Zeiler <rabyte*gmail>
+
+pkgname=widelands
+pkgver=17
+_realver=build17
+pkgrel=8
+pkgdesc="A realtime strategy game with emphasis on economy and transport"
+arch=('i686' 'x86_64')
+url="http://widelands.org/";
+license=('GPL')
+depends=('sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'sdl_gfx' 'lua51' 'glew' 
'python2' 'boost-libs')
+makedepends=('cmake' 'boost' 'mesa')
+source=("https://launchpad.net/widelands/build17/build-17/+download/$pkgname-$_realver-src.tar.bz2";
+        $pkgname.desktop
+        $pkgname.png
+        $pkgname.sh)
+md5sums=('bdc9bc0aa631af1aa7fb450507611a58'
+         '15820bf099fd6f16251fe70a75c534bb'
+         '3dfda7e9ca76ca00dd98d745d0ceb328'
+         '7cae50aba5ed0cd2cfeea79124637b46')
+
+build() {
+    cd $srcdir/$pkgname-$_realver-src
+
+    sed -i "1 i #include <unistd.h>" src/main.cc
+    sed -i "/Boost_USE_STATIC_LIBS/d" CMakeLists.txt
+
+    mkdir -p build/compile && cd build/compile
+
+    cmake ../.. -DCMAKE_BUILD_TYPE=Release \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DWL_INSTALL_PREFIX=/usr \
+        -DWL_INSTALL_DATADIR=share/$pkgname \
+        -DWL_INSTALL_BINDIR=bin
+    make
+}
+
+package() {
+    depends=(${depends[@]} 'widelands-data')
+    cd $srcdir/$pkgname-$_realver-src/build/compile
+
+    make DESTDIR="$pkgdir" install
+
+    rm -r 
$pkgdir/usr/share/widelands/{campaigns,fonts,global,locale,maps,music,pics,scripting,sound,tribes,txts,worlds}
+
+    # Install bin, icon and desktop file
+    #install -Dm 755 src/$pkgname $pkgdir/usr/share/$pkgname/$pkgname
+    #install -Dm 755 $srcdir/$pkgname.sh $pkgdir/usr/bin/$pkgname
+    install -Dm644 $srcdir/$pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
+    install -Dm644 $srcdir/$pkgname.desktop 
$pkgdir/usr/share/applications/$pkgname.desktop
+}

Copied: widelands/repos/community-staging-x86_64/widelands-0.16-libpng15.patch 
(from rev 93655, widelands/trunk/widelands-0.16-libpng15.patch)
===================================================================
--- community-staging-x86_64/widelands-0.16-libpng15.patch                      
        (rev 0)
+++ community-staging-x86_64/widelands-0.16-libpng15.patch      2013-07-08 
11:01:46 UTC (rev 93656)
@@ -0,0 +1,61 @@
+--- src/graphic/SDL_mng.cc
++++ src/graphic/SDL_mng.cc
+@@ -276,7 +276,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;
+       }
+@@ -356,9 +356,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 const s = (info_ptr->channels == 4) ? 0 : 8;
++                      int const s = (png_get_channels(png_ptr, info_ptr) == 
4) ? 0 : 8;
+                       Rmask = 0xFF000000 >> s;
+                       Gmask = 0x00FF0000 >> s;
+                       Bmask = 0x0000FF00 >> s;
+@@ -369,7 +369,7 @@
+               SDL_AllocSurface
+                       (SDL_SWSURFACE,
+                        width, height,
+-                       bit_depth * info_ptr->channels,
++                       bit_depth * png_get_channels(png_ptr, info_ptr),
+                        Rmask, Gmask, Bmask, Amask);
+       if (not surface) {
+               SDL_SetError("Out of memory");
+@@ -407,6 +407,9 @@
+       /* read rest of file, get additional chunks in info_ptr - REQUIRED */
+       png_read_end(png_ptr, info_ptr);
+ 
++      png_colorp png_palette;
++      int png_num_palette;
++
+       /* Load the palette, if any */
+       if ((palette = surface->format->palette)) {
+               if (color_type == PNG_COLOR_TYPE_GRAY) {
+@@ -416,12 +419,12 @@
+                               palette->colors[i].g = i;
+                               palette->colors[i].b = i;
+                       }
+-              } else if (info_ptr->num_palette > 0) {
+-                      palette->ncolors = info_ptr->num_palette;
+-                      for (uint32_t 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 if (png_num_palette > 0) {
++                      palette->ncolors = png_num_palette;
++                      for (uint32_t i = 0; i < png_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: 
widelands/repos/community-staging-x86_64/widelands-build15-gcc-4.5-patch (from 
rev 93655, widelands/trunk/widelands-build15-gcc-4.5-patch)
===================================================================
--- community-staging-x86_64/widelands-build15-gcc-4.5-patch                    
        (rev 0)
+++ community-staging-x86_64/widelands-build15-gcc-4.5-patch    2013-07-08 
11:01:46 UTC (rev 93656)
@@ -0,0 +1,51 @@
+diff -Naur widelands-from/src/editor/ui_menus/editor_main_menu_new_map.cc 
widelands-to/src/editor/ui_menus/editor_main_menu_new_map.cc
+--- widelands-from/src/editor/ui_menus/editor_main_menu_new_map.cc     
2010-04-16 15:41:22.000000000 +0000
++++ widelands-to/src/editor/ui_menus/editor_main_menu_new_map.cc       
2010-07-01 21:15:56.000000000 +0000
+@@ -113,7 +113,7 @@
+                posx, posy, width, height,
+                g_gr->get_picture(PicMod_UI, "pics/but1.png"),
+                &Main_Menu_New_Map::button_clicked, *this, 4,
+-               
Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++               Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+ 
+       posy += height + spacing + spacing + spacing;
+ 
+@@ -142,7 +142,7 @@
+               if (m_currentworld == m_worlds.size())
+                       m_currentworld = 0;
+               m_world->set_title
+-                      
(Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name
++                      
(Widelands::World(m_worlds[m_currentworld].c_str()).get_name
+                               ());
+               break;
+       }
+diff -Naur widelands-from/src/editor/ui_menus/editor_main_menu_random_map.cc 
widelands-to/src/editor/ui_menus/editor_main_menu_random_map.cc
+--- widelands-from/src/editor/ui_menus/editor_main_menu_random_map.cc  
2010-04-16 15:41:22.000000000 +0000
++++ widelands-to/src/editor/ui_menus/editor_main_menu_random_map.cc    
2010-07-01 21:17:39.000000000 +0000
+@@ -272,7 +272,7 @@
+                posx, posy, width, height,
+                g_gr->get_picture(PicMod_UI, "pics/but1.png"),
+                &Main_Menu_New_Random_Map::button_clicked, *this, 8,
+-               
Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++               Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+ 
+       posy += height + spacing + spacing + spacing;
+ 
+@@ -343,7 +343,7 @@
+               if (m_currentworld == m_worlds.size())
+                       m_currentworld = 0;
+               m_world->set_title
+-                      
(Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++                      
(Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+               break;
+       case 9:
+               break;
+@@ -476,7 +476,7 @@
+                       (strcmp(mapInfo.worldName.c_str(), 
m_worlds[m_currentworld].c_str()))
+                       ++m_currentworld;
+               m_world->set_title
+-                      
(Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++                      
(Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+ 
+               button_clicked(-1);  // Update other values in UI as well
+ 

Copied: widelands/repos/community-staging-x86_64/widelands.desktop (from rev 
93655, widelands/trunk/widelands.desktop)
===================================================================
--- community-staging-x86_64/widelands.desktop                          (rev 0)
+++ community-staging-x86_64/widelands.desktop  2013-07-08 11:01:46 UTC (rev 
93656)
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Widelands
+GenericName=Widelands
+Comment=Realtime strategy game
+Icon=widelands
+Exec=widelands
+Type=Application
+Categories=Game;StrategyGame;

Copied: widelands/repos/community-staging-x86_64/widelands.png (from rev 93655, 
widelands/trunk/widelands.png)
===================================================================
(Binary files differ)

Copied: widelands/repos/community-staging-x86_64/widelands.sh (from rev 93655, 
widelands/trunk/widelands.sh)
===================================================================
--- community-staging-x86_64/widelands.sh                               (rev 0)
+++ community-staging-x86_64/widelands.sh       2013-07-08 11:01:46 UTC (rev 
93656)
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /usr/share/widelands
+./widelands $*

Reply via email to