x11-misc/fbdesk: Allow for compiling with GCC 6
authorDavid Seifert <soap@gentoo.org>
Sat, 17 Sep 2016 22:53:56 +0000 (00:53 +0200)
committerDavid Seifert <soap@gentoo.org>
Sat, 17 Sep 2016 22:53:56 +0000 (00:53 +0200)
Gentoo-bug: 594052
* EAPI=6

Package-Manager: portage-2.3.0

x11-misc/fbdesk/fbdesk-1.4.1.ebuild
x11-misc/fbdesk/files/fbdesk-1.4.1-fix-c++14.patch [new file with mode: 0644]
x11-misc/fbdesk/files/fbdesk-1.4.1-libpng14.patch
x11-misc/fbdesk/files/fbdesk-1.4.1-libpng15.patch

index 96060a3e0d3260b04d4d38140422409dd459cc2b..03a79ac28a626f5925aa6384f6f00ee1f11c726f 100644 (file)
@@ -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 (file)
index 0000000..85ee0f9
--- /dev/null
@@ -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);
index 472df8b742e5e6d0bdce6315f54e41c30dfa3833..78e451986d679c92cc2919e310fa71d294a55f85 100644 (file)
@@ -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];
index fbfd9cb09628a6c9cf250b94d648c03a2a771056..8b62653cc0f497e4ee48574ffbc8fce346df157f 100644 (file)
@@ -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() {
  }