summaryrefslogtreecommitdiff
path: root/x11-misc/fbdesk/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-misc/fbdesk/files
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-misc/fbdesk/files')
-rw-r--r--x11-misc/fbdesk/files/fbdesk-1.4.1-fix-c++14.patch22
-rw-r--r--x11-misc/fbdesk/files/fbdesk-1.4.1-gcc-4.3.patch156
-rw-r--r--x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch11
-rw-r--r--x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch145
4 files changed, 334 insertions, 0 deletions
diff --git a/x11-misc/fbdesk/files/fbdesk-1.4.1-fix-c++14.patch b/x11-misc/fbdesk/files/fbdesk-1.4.1-fix-c++14.patch
new file mode 100644
index 000000000000..85ee0f94567e
--- /dev/null
+++ b/x11-misc/fbdesk/files/fbdesk-1.4.1-fix-c++14.patch
@@ -0,0 +1,22 @@
+Fix building with C++14, which errors out due to bool -> T* conversions
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594052
+
+--- a/src/FbTk/Image.cc
++++ b/src/FbTk/Image.cc
+@@ -85,14 +85,14 @@
+
+
+ if (filename == "")
+- return false;
++ return NULL;
+
+ // determine file ending
+ std::string extension(StringUtil::toUpper(StringUtil::findExtension(filename)));
+
+ // valid handle?
+ if (s_image_map.find(extension) == s_image_map.end())
+- return false;
++ return NULL;
+
+ // load file
+ PixmapWithMask *pm = s_image_map[extension]->load(filename, screen_num);
diff --git a/x11-misc/fbdesk/files/fbdesk-1.4.1-gcc-4.3.patch b/x11-misc/fbdesk/files/fbdesk-1.4.1-gcc-4.3.patch
new file mode 100644
index 000000000000..97c0b31678af
--- /dev/null
+++ b/x11-misc/fbdesk/files/fbdesk-1.4.1-gcc-4.3.patch
@@ -0,0 +1,156 @@
+--- a/src/FbDesk.cc
++++ b/src/FbDesk.cc
+@@ -37,10 +37,11 @@
+ #include <iostream>
+ #include <fstream>
+ #include <algorithm>
+ #include <unistd.h>
+ #include <cstdio>
++#include <cstring>
+
+ using namespace std;
+ using namespace FbTk;
+
+
+--- a/src/FbTk/FbPixmap.cc
++++ b/src/FbTk/FbPixmap.cc
+@@ -28,10 +28,11 @@
+
+ #include <X11/Xutil.h>
+ #include <X11/Xatom.h>
+ #include <iostream>
+ #include <string>
++#include <cstring>
+
+ using namespace std;
+
+ namespace FbTk {
+
+--- a/src/FbTk/KeyUtil.cc
++++ b/src/FbTk/KeyUtil.cc
+@@ -23,10 +23,11 @@
+
+ #include "KeyUtil.hh"
+ #include "App.hh"
+
+ #include <string>
++#include <cstring>
+
+ namespace {
+
+ struct t_modlist{
+ char *str;
+--- a/src/FbTk/StringUtil.cc
++++ b/src/FbTk/StringUtil.cc
+@@ -47,10 +47,11 @@
+
+
+ #include <memory>
+ #include <algorithm>
+ #include <string>
++#include <cstring>
+
+ using std::string;
+ using std::transform;
+
+ namespace FbTk {
+--- a/src/FbTk/TextBox.cc
++++ b/src/FbTk/TextBox.cc
+@@ -34,10 +34,11 @@
+ #endif
+ #include <X11/keysym.h>
+ #include <X11/Xutil.h>
+
+ #include <iostream>
++#include <cstdlib>
+
+ namespace FbTk {
+
+ TextBox::TextBox(int screen_num,
+ const Font &font, const std::string &text):
+--- a/src/FbTk/TextureRender.cc
++++ b/src/FbTk/TextureRender.cc
+@@ -31,10 +31,11 @@
+ #include "FbPixmap.hh"
+ #include "GContext.hh"
+
+ #include <iostream>
+ #include <string>
++#include <cstring>
+ #ifdef HAVE_CSTDIO
+ #include <cstdio>
+ #else
+ #include <stdio.h>
+ #endif
+--- a/src/FbTk/Theme.cc
++++ b/src/FbTk/Theme.cc
+@@ -34,10 +34,11 @@
+ #else
+ #include <stdio.h>
+ #endif
+ #include <memory>
+ #include <iostream>
++#include <algorithm>
+
+ using namespace std;
+
+ namespace FbTk {
+
+--- a/src/FbTk/ThemeItems.cc
++++ b/src/FbTk/ThemeItems.cc
+@@ -46,10 +46,12 @@
+ #include <stdio.h>
+ #endif
+
+ #include <iostream>
+ #include <memory>
++#include <cstdlib>
++#include <cstring>
+
+ namespace FbTk {
+
+ using std::string;
+ using std::cerr;
+--- a/src/FbTk/XFontImp.cc
++++ b/src/FbTk/XFontImp.cc
+@@ -26,10 +26,11 @@
+ #include "GContext.hh"
+ #include "FbPixmap.hh"
+
+ #include <X11/Xutil.h>
+
++#include <cstdlib>
+ #include <iostream>
+ #include <new>
+ #ifdef HAVE_CSTDIO
+ #include <cstdio>
+ #else
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -21,14 +21,16 @@
+
+ #include "App.hh"
+ #include "FbDesk.hh"
+ #include "version.h"
+
++#include <cstdlib>
+ #include <iostream>
+ #include <stdexcept>
+ #include <signal.h>
+ #include <sys/wait.h>
++#include <cstring>
+
+ using namespace std;
+
+ /// handles system signals
+ void signalhandler(int sig) {
+--- a/src/FbTk/ImagePNG.cc
++++ b/src/FbTk/ImagePNG.cc
+@@ -30,6 +30,7 @@
+ #include <png.h>
+ #include <cstdio>
+ #include <iostream>
++#include <cstring>
+ using namespace std;
+
+ namespace {
diff --git a/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch b/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch
new file mode 100644
index 000000000000..78e451986d67
--- /dev/null
+++ b/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch
@@ -0,0 +1,11 @@
+--- a/src/FbTk/ImagePNG.cc
++++ b/src/FbTk/ImagePNG.cc
+@@ -88,7 +88,7 @@
+ // check header
+ unsigned char tag[4];
+ fread(tag, 1, 4, fp);
+- if (!png_check_sig(tag, 4)) {
++ if (png_sig_cmp(tag, 0, 4)) {
+ fclose(fp);
+ return 0;
+ }
diff --git a/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch b/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch
new file mode 100644
index 000000000000..8b62653cc0f4
--- /dev/null
+++ b/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch
@@ -0,0 +1,145 @@
+This patch is from netbsd pkgsrc
+
+ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/x11/fbdesk/patches
+
+--- a/src/FbTk/ImagePNG.cc
++++ b/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);