Skip to content

Commit

Permalink
x11-misc/fbdesk: Allow for compiling with GCC 6
Browse files Browse the repository at this point in the history
Gentoo-bug: 594052
* EAPI=6

Package-Manager: portage-2.3.0
  • Loading branch information
SoapGentoo committed Sep 17, 2016
1 parent b04670c commit 8695c00
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 16 deletions.
21 changes: 9 additions & 12 deletions x11-misc/fbdesk/fbdesk-1.4.1.ebuild
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
inherit eutils
EAPI=6

DESCRIPTION="fluxbox-util application that creates and manage icons on your Fluxbox desktop"
HOMEPAGE="http://fluxbox.sourceforge.net/fbdesk/"
Expand All @@ -20,18 +19,16 @@ RDEPEND="x11-libs/libX11
x11-libs/libXrender
x11-libs/libXft
media-libs/imlib2[X]
png? ( media-libs/libpng )"
png? ( media-libs/libpng:0= )"
DEPEND="${RDEPEND}
x11-proto/xproto"

DOCS=( AUTHORS ChangeLog README )

src_prepare() {
epatch \
"${FILESDIR}"/${P}-gcc-4.3.patch \
"${FILESDIR}"/${P}-libpng14.patch \
"${FILESDIR}"/${P}-libpng15.patch
}
PATCHES=(
"${FILESDIR}/${P}-gcc-4.3.patch"
"${FILESDIR}/${P}-libpng14.patch"
"${FILESDIR}/${P}-libpng15.patch"
"${FILESDIR}/${P}-fix-c++14.patch"
)

src_configure() {
econf \
Expand Down
22 changes: 22 additions & 0 deletions x11-misc/fbdesk/files/fbdesk-1.4.1-fix-c++14.patch
Original file line number Diff line number Diff line change
@@ -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);
4 changes: 2 additions & 2 deletions x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- src/FbTk/ImagePNG.cc
+++ src/FbTk/ImagePNG.cc
--- a/src/FbTk/ImagePNG.cc
+++ b/src/FbTk/ImagePNG.cc
@@ -88,7 +88,7 @@
// check header
unsigned char tag[4];
Expand Down
4 changes: 2 additions & 2 deletions x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ 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
--- a/src/FbTk/ImagePNG.cc
+++ b/src/FbTk/ImagePNG.cc
@@ -76,6 +76,8 @@ ImagePNG::~ImagePNG() {
}

Expand Down

0 comments on commit 8695c00

Please sign in to comment.