[fbdesk] 1.4.1-12

Andreas Bierfert awjb at fedoraproject.org
Thu Jul 26 17:39:28 UTC 2012


commit f2e9142f808cffdd10cc224d8588baf0039e729c
Author: Andreas Bierfert <andreas.bierfert at lowlatency.de>
Date:   Thu Jul 26 19:39:24 2012 +0200

    1.4.1-12
    
    - fix build with libpng 1.5 (#843218)
    - pull some external patches

 10-gcc4.3-fixes.patch           |  144 ++++++++++++++++++++++++++++++++++++++
 20-include-header-cassert.patch |   38 ++++++++++
 40-option-v.patch               |   30 ++++++++
 fbdesk-libpng15.patch           |  145 +++++++++++++++++++++++++++++++++++++++
 fbdesk.spec                     |   22 +++++-
 5 files changed, 376 insertions(+), 3 deletions(-)
---
diff --git a/10-gcc4.3-fixes.patch b/10-gcc4.3-fixes.patch
new file mode 100644
index 0000000..a6d4856
--- /dev/null
+++ b/10-gcc4.3-fixes.patch
@@ -0,0 +1,144 @@
+From edbb58b0deb8028778a2c178840eb2d4f0612d5d Mon Sep 17 00:00:00 2001
+From: Jari Aalto <jari.aalto at cante.net>
+Date: Tue, 22 Dec 2009 11:35:10 +0200
+Subject: [PATCH] Gcc 4.3 fixes
+
+Signed-off-by: Jari Aalto <jari.aalto at cante.net>
+---
+ src/FbDesk.cc             |    1 +
+ src/FbTk/FbPixmap.cc      |    1 +
+ src/FbTk/KeyUtil.cc       |    1 +
+ src/FbTk/StringUtil.cc    |    1 +
+ src/FbTk/TextBox.cc       |    1 +
+ src/FbTk/TextureRender.cc |    1 +
+ src/FbTk/Theme.cc         |    1 +
+ src/FbTk/ThemeItems.cc    |    2 ++
+ src/FbTk/XFontImp.cc      |    1 +
+ src/main.cc               |    2 ++
+ 10 files changed, 12 insertions(+), 0 deletions(-)
+
+diff --git a/src/FbDesk.cc b/src/FbDesk.cc
+index 8c9dfda..4502ef5 100644
+--- a/src/FbDesk.cc
++++ b/src/FbDesk.cc
+@@ -39,6 +39,7 @@
+ #include <algorithm>
+ #include <unistd.h>
+ #include <cstdio>
++#include <cstring>
+ 
+ using namespace std;
+ using namespace FbTk;
+diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
+index 0b6b70d..1dcc6ef 100644
+--- a/src/FbTk/FbPixmap.cc
++++ b/src/FbTk/FbPixmap.cc
+@@ -30,6 +30,7 @@
+ #include <X11/Xatom.h>
+ #include <iostream>
+ #include <string>
++#include <cstring>
+ 
+ using namespace std;
+ 
+diff --git a/src/FbTk/KeyUtil.cc b/src/FbTk/KeyUtil.cc
+index 6b331bc..72137ee 100644
+--- a/src/FbTk/KeyUtil.cc
++++ b/src/FbTk/KeyUtil.cc
+@@ -25,6 +25,7 @@
+ #include "App.hh"
+ 
+ #include <string>
++#include <cstring>
+ 
+ namespace {
+ 
+diff --git a/src/FbTk/StringUtil.cc b/src/FbTk/StringUtil.cc
+index 8a01170..6f9227a 100644
+--- a/src/FbTk/StringUtil.cc
++++ b/src/FbTk/StringUtil.cc
+@@ -49,6 +49,7 @@
+ #include <memory>
+ #include <algorithm>
+ #include <string>
++#include <cstring>
+ 
+ using std::string;
+ using std::transform;
+diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc
+index a6688fc..e45346a 100644
+--- a/src/FbTk/TextBox.cc
++++ b/src/FbTk/TextBox.cc
+@@ -36,6 +36,7 @@
+ #include <X11/Xutil.h>
+ 
+ #include <iostream>
++#include <cstdlib>
+ 
+ namespace FbTk {
+ 
+diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
+index 5a2e8b7..01de680 100644
+--- a/src/FbTk/TextureRender.cc
++++ b/src/FbTk/TextureRender.cc
+@@ -33,6 +33,7 @@
+ 
+ #include <iostream>
+ #include <string>
++#include <cstring>
+ #ifdef HAVE_CSTDIO
+   #include <cstdio>
+ #else
+diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
+index 98b1324..d87c33d 100644
+--- a/src/FbTk/Theme.cc
++++ b/src/FbTk/Theme.cc
+@@ -36,6 +36,7 @@
+ #endif
+ #include <memory>
+ #include <iostream>
++#include <algorithm>
+ 
+ using namespace std;
+ 
+diff --git a/src/FbTk/ThemeItems.cc b/src/FbTk/ThemeItems.cc
+index 81da65d..24d937e 100644
+--- a/src/FbTk/ThemeItems.cc
++++ b/src/FbTk/ThemeItems.cc
+@@ -48,6 +48,8 @@
+ 
+ #include <iostream>
+ #include <memory>
++#include <cstdlib>
++#include <cstring>
+ 
+ namespace FbTk {
+ 
+diff --git a/src/FbTk/XFontImp.cc b/src/FbTk/XFontImp.cc
+index 4ff8f96..95a691e 100644
+--- a/src/FbTk/XFontImp.cc
++++ b/src/FbTk/XFontImp.cc
+@@ -28,6 +28,7 @@
+ 
+ #include <X11/Xutil.h>
+ 
++#include <cstdlib>
+ #include <iostream>
+ #include <new>
+ #ifdef HAVE_CSTDIO
+diff --git a/src/main.cc b/src/main.cc
+index 4866e5d..8fcc354 100644
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -23,6 +23,8 @@
+ #include "FbDesk.hh"
+ #include "version.h"
+ 
++#include <cstdlib>
++#include <cstring>
+ #include <iostream>
+ #include <stdexcept>
+ #include <signal.h>
+-- 
+1.6.5
+
diff --git a/20-include-header-cassert.patch b/20-include-header-cassert.patch
new file mode 100644
index 0000000..632d491
--- /dev/null
+++ b/20-include-header-cassert.patch
@@ -0,0 +1,38 @@
+From 5c367266f2f2616b35bf7eb799d4e1aa1464fd8e Mon Sep 17 00:00:00 2001
+From: Jari Aalto <jari.aalto at cante.net>
+Date: Tue, 22 Dec 2009 11:36:00 +0200
+Subject: [PATCH] Addd assert.h header
+
+Signed-off-by: Jari Aalto <jari.aalto at cante.net>
+---
+ src/Icon.cc       |    1 +
+ src/InputField.cc |    1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/Icon.cc b/src/Icon.cc
+index 49719f9..469e1a7 100644
+--- a/src/Icon.cc
++++ b/src/Icon.cc
+@@ -47,6 +47,7 @@
+ #endif // HAVE_SHAPE
+ 
+ #include <iostream>
++#include <cassert>
+ using namespace std;
+ 
+ namespace FbDesk {
+diff --git a/src/InputField.cc b/src/InputField.cc
+index b98e3e3..b77e5ec 100644
+--- a/src/InputField.cc
++++ b/src/InputField.cc
+@@ -27,6 +27,7 @@
+ #include <X11/Xutil.h>
+ #include <X11/keysym.h>
+ #include <assert.h>
++#include <cassert>
+ 
+ namespace {
+ 
+-- 
+1.6.5
+
diff --git a/40-option-v.patch b/40-option-v.patch
new file mode 100644
index 0000000..998cb57
--- /dev/null
+++ b/40-option-v.patch
@@ -0,0 +1,30 @@
+From dcd1eee161feae38c8c60b338b5dddf4ac93dd82 Mon Sep 17 00:00:00 2001
+From: Jari Aalto <jari.aalto at cante.net>
+Date: Tue, 27 Sep 2011 23:56:04 +0300
+Subject: [PATCH] src/main.cc: Correct -v option
+Organization: Private
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+
+Signed-off-by: Jari Aalto <jari.aalto at cante.net>
+---
+ src/main.cc |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/main.cc b/src/main.cc
+index 4866e5d..faa561e 100644
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -73,7 +73,7 @@ int main(int argc, char **argv) try {
+         } else if (strcmp("-rc", argv[i]) == 0 && // resource file
+                    i + 1 < argc) {
+             resource_filename = argv[++i];
+-        } if (strcmp("-v", argv[i]) == 0) {
++        } else if (strcmp("-v", argv[i]) == 0) {
+             cout<<"FbDesk "<<FBDESK_VERSION<<" Copyright (c) 2003-2006 Henrik Kinnunen"<<endl;
+             exit(0);
+         } else {
+-- 
+1.7.6.3
+
diff --git a/fbdesk-libpng15.patch b/fbdesk-libpng15.patch
new file mode 100644
index 0000000..fbfd9cb
--- /dev/null
+++ b/fbdesk-libpng15.patch
@@ -0,0 +1,145 @@
+This patch is from netbsd pkgsrc
+
+ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/x11/fbdesk/patches
+
+--- src/FbTk/ImagePNG.cc
++++ src/FbTk/ImagePNG.cc
+@@ -76,6 +76,8 @@ ImagePNG::~ImagePNG() {
+ }
+ 
+ PixmapWithMask *ImagePNG::load(const std::string &filename, int screen_num) const {
++    int pixel_depth;
++    int rowbytes;
+     if (filename.empty())
+         return 0;
+ #ifdef DEBUG
+@@ -102,7 +104,7 @@ PixmapWithMask *ImagePNG::load(const std
+         return 0;
+     }
+ 
+-    if (setjmp(png.png()->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png.png()))) {
+         fclose(fp);
+         return 0;
+     }
+@@ -115,12 +117,14 @@ PixmapWithMask *ImagePNG::load(const std
+     png_get_IHDR(png.png(), png.info(), &w, &h,
+                  &bit_depth, &color_type,
+                  &interlace_type, 0, 0);
++    pixel_depth = bit_depth * png_get_channels(png.png(), png.info());
++    rowbytes = png_get_rowbytes(png.png(), png.info());
+ #ifdef DEBUG    
+-    cerr<<png.info()->width<<", "<<png.info()->height<<endl;
+-    cerr<<"bit_depth = "<<(int)png.info()->bit_depth<<endl;
+-    cerr<<"bytes per pixel = "<<((int)png.info()->bit_depth>>3)<<endl;
+-    cerr<<"pixel depth = "<<(int)png.info()->pixel_depth<<endl;
+-    cerr<<"rowbytes = "<<png.info()->rowbytes<<endl;
++    cerr<<png_get_image_width(png.png(), png.info())<<", "<<png_get_image_height(png.png(), png.info())<<endl;
++    cerr<<"bit_depth = "<<(int)png_get_bit_depth(png.png(),png.info())<<endl;
++    cerr<<"bytes per pixel = "<<((int)png_get_bit_depth(png.png(), png.info())>>3)<<endl;
++    cerr<<"pixel depth = "<<pixel_depth<<endl;
++    cerr<<"rowbytes = "<<rowbytes<<endl;
+     cerr<<"Color type = ";
+     switch (color_type) {
+     case PNG_COLOR_TYPE_GRAY:
+@@ -146,7 +150,7 @@ PixmapWithMask *ImagePNG::load(const std
+     // convert to rgb
+     if (color_type == PNG_COLOR_TYPE_PALETTE && bit_depth <= 8) {
+         png_set_expand(png.png());
+-        png.info()->pixel_depth = 8;
++        pixel_depth = 8;
+     }
+     // convert to rgb
+     if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
+@@ -158,7 +162,7 @@ PixmapWithMask *ImagePNG::load(const std
+     if (color_type == PNG_COLOR_TYPE_GRAY ||
+         color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+         png_set_gray_to_rgb(png.png());
+-        png.info()->pixel_depth = 8;
++        pixel_depth = 8;
+         color_type = PNG_COLOR_TYPE_RGB;
+     }
+ 
+@@ -170,23 +174,23 @@ PixmapWithMask *ImagePNG::load(const std
+     // expand to 4 bytes
+     if (bit_depth == 8 && color_type == PNG_COLOR_TYPE_RGB) {
+         png_set_filler(png.png(), 0, PNG_FILLER_AFTER);
+-        png.info()->rowbytes = png.info()->width * 4;
+-        png.info()->pixel_depth = 32;
++        rowbytes = png_get_image_width(png.png(), png.info()) * 4;
++        pixel_depth = 32;
+     }
+     
+-    if (png.info()->pixel_depth == 4 ||
+-        png.info()->pixel_depth == 8)
++    if (pixel_depth == 4 ||
++        pixel_depth == 8)
+         return 0;
+ 
+     // create memory to hold rows
+-    png_bytep *row_pointers = new (nothrow) png_bytep[png.info()->height];
++    png_bytep *row_pointers = new (nothrow) png_bytep[png_get_image_height(png.png(), png.info())];
+     if (row_pointers == 0) {
+         fclose(fp);
+         return 0;
+     }
+ 
+-    for (unsigned int row = 0; row < png.info()->height; ++row) {
+-        row_pointers[row] = new png_byte[png.info()->rowbytes];
++    for (unsigned int row = 0; row < png_get_image_height(png.png(), png.info()); ++row) {
++        row_pointers[row] = new png_byte[rowbytes];
+     }
+ 
+     // get transparent pixel
+@@ -214,31 +218,31 @@ PixmapWithMask *ImagePNG::load(const std
+     fclose(fp);
+ 
+     // clear linear memory
+-    char *data = new char[png.info()->rowbytes * png.info()->height];
+-    for (int offset=0, y = 0; y < png.info()->height; y++) {
+-        for (int x = 0; x < png.info()->rowbytes; x++, offset++) {
++    char *data = new char[rowbytes * png_get_image_height(png.png(), png.info())];
++    for (int offset=0, y = 0; y < png_get_image_height(png.png(), png.info()); y++) {
++        for (int x = 0; x < rowbytes; x++, offset++) {
+             data[offset] = row_pointers[y][x];
+         }
+     }
+ 
+-    FbTk::Surface *srf = new (nothrow) FbTk::Surface(png.info()->width, png.info()->height,
+-                                                     png.info()->pixel_depth);
++    FbTk::Surface *srf = new (nothrow) FbTk::Surface(png_get_image_width(png.png(), png.info()), png_get_image_height(png.png(), png.info()),
++                                                     pixel_depth);
+ 
+     if (srf == 0)
+         return 0;
+ 
+ 
+     // finaly copy data to surface
+-    switch (png.info()->pixel_depth) {
++    switch (pixel_depth) {
+     case 16:
+         convert16to32(data, *srf);
+         break;
+     case 24:
+     case 32:
+-        memcpy(srf->data(), data, png.info()->height * png.info()->rowbytes);
++        memcpy(srf->data(), data, png_get_image_height(png.png(), png.info()) * rowbytes);
+         break;
+     default:
+-        cerr<<"ImagePNG: Can't convert from "<<(int)png.info()->pixel_depth<<" to 32bpp."<<endl;
++        cerr<<"ImagePNG: Can't convert from "<<pixel_depth<<" to 32bpp."<<endl;
+         break;
+     }
+     
+@@ -264,9 +268,9 @@ PixmapWithMask *ImagePNG::load(const std
+         long i = 0x44332211;
+         unsigned char* a = (unsigned char*) &i;
+         bool big_endian = (*a != 0x11);
+-        int alphacolor = ((png.info()->channels != 4) ? 0xFF000000 : 0);
++        int alphacolor = ((png_get_channels(png.png(), png.info()) != 4) ? 0xFF000000 : 0);
+         if (big_endian) {
+-            int shift = ((png.info()->channels == 4) ? 0 : 8);
++            int shift = ((png_get_channels(png.png(), png.info()) == 4) ? 0 : 8);
+             alphacolor = (0xFF >> shift);    
+         }
+         screen_surf.setColorKey(alphacolor, true);
diff --git a/fbdesk.spec b/fbdesk.spec
index 2e3ac48..0937a6a 100644
--- a/fbdesk.spec
+++ b/fbdesk.spec
@@ -1,6 +1,6 @@
 Name:           fbdesk
 Version:        1.4.1
-Release:        11%{?dist}
+Release:        12%{?dist}
 
 Summary:        Icon Manager for Fluxbox
 
@@ -8,7 +8,15 @@ Group:          User Interface/Desktops
 License:        MIT
 URL:            http://fluxbox.sourceforge.net/fbdesk/
 Source0:        http://fluxbox.sourceforge.net/download/fbdesk-1.4.1.tar.gz
-Patch1:         %{name}-gcc43.patch
+
+# http://packages.debian.org/wheezy/fbdesk
+Patch10:        10-gcc4.3-fixes.patch
+Patch11:        20-include-header-cassert.patch
+Patch12:        40-option-v.patch
+
+# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch?revision=1.1
+Patch20:        fbdesk-libpng15.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildRequires:  freetype-devel
 BuildRequires:  libpng-devel
@@ -27,7 +35,10 @@ Fluxbox desktop.
 
 %prep
 %setup -q
-%patch1 -p1 -b .gcc43
+%patch10 -p1 -b .gcc43
+%patch11 -p1 -b .cassert
+%patch12 -p1
+%patch20 -b libpng15
 
 %build
 %configure --x-includes=%{_includedir} --x-libraries=%{_libdir}
@@ -52,6 +63,11 @@ Fluxbox desktop.
 
 
 %changelog
+* Thu Jul 26 2012 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
+- 1.4.1-12
+- fix build with libpng 1.5 (#843218)
+- pull some external patches
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.1-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list