commit:     8695c00fa2a0ae559b1b27c2b886eabac1500aee
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 17 22:53:56 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Sep 17 22:53:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8695c00f

x11-misc/fbdesk: Allow for compiling with GCC 6

Gentoo-bug: 594052
* EAPI=6

Package-Manager: portage-2.3.0

 x11-misc/fbdesk/fbdesk-1.4.1.ebuild                | 21 +++++++++------------
 x11-misc/fbdesk/files/fbdesk-1.4.1-fix-c++14.patch | 22 ++++++++++++++++++++++
 x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch  |  4 ++--
 x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch  |  4 ++--
 4 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/x11-misc/fbdesk/fbdesk-1.4.1.ebuild 
b/x11-misc/fbdesk/fbdesk-1.4.1.ebuild
index 96060a3..03a79ac 100644
--- a/x11-misc/fbdesk/fbdesk-1.4.1.ebuild
+++ b/x11-misc/fbdesk/fbdesk-1.4.1.ebuild
@@ -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/";
@@ -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 \

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 00000000..85ee0f9
--- /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-libpng14.patch 
b/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch
index 472df8b..78e4519 100644
--- a/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch
+++ b/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch
@@ -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];

diff --git a/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch 
b/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch
index fbfd9cb..8b62653 100644
--- a/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch
+++ b/x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch
@@ -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() {
  }
  

Reply via email to