dev-perl/Wx-Scintilla: Fix build with gcc-6, bug 612446
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Mon, 24 Apr 2017 23:24:50 +0000 (01:24 +0200)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Mon, 24 Apr 2017 23:24:50 +0000 (01:24 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

dev-perl/Wx-Scintilla/Manifest
dev-perl/Wx-Scintilla/Wx-Scintilla-0.390.0-r2.ebuild
dev-perl/Wx-Scintilla/files/Wx-Scintilla-0.34-flags.patch [new file with mode: 0644]
dev-perl/Wx-Scintilla/files/Wx-Scintilla-0.39-gcc6.patch [new file with mode: 0644]

index 9fcbda6e9d0d5b0f0bc1afbed9c19e86488278e6..680eb9f3feb5b0301700eca076c8357b17244598 100644 (file)
@@ -1,2 +1 @@
-DIST Wx-Scintilla-0.34-patches.tar.gz 488 SHA256 3ca51b083080d0e1943c24db04251b1a1a8961ded91d18935f850e0004152bd4 SHA512 743468ea05f78f147664bc550ad6f2869db3876085d56f86b245ba568d58dfa50d957da22a29dbe322f10c5f25001d40927fdc19a83f616778e6b6c55e75d98f WHIRLPOOL 22b241121fc202386e81eb774fcfd0e6c686bdcaf3a3af4b5056465c2d35b9c21bc849702b26e4d6e386c7ea424f827c92f41788140a6f75d4c91906f4495813
 DIST Wx-Scintilla-0.39.tar.gz 848565 SHA256 d6d67528a55552bb3fda2a1f22058c6c94a05eaf632dba5331afb3390defe0ea SHA512 d9ecec347c1f1382788e5ed7708b0caf86f2ff87db0fdb2b8fa07460c96b1a7921a9402431105beee61f4627f3694a79db7515ceb76b1ae4fb3f95c807afb4d4 WHIRLPOOL 229c694683e939cc1110171945aa18cddcb989c63e33c032ae755ba878717792d88f9670f968bd989e58c62066d7e8d4035962ae58975970876a6741a8285560
index 58d38d6c224ff842c6907db6c3d2ea04b3d9bd34..b11bb08f1896ba3847bd507c4c446b3a32905cf2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -11,7 +11,6 @@ MODULE_VERSION=0.39
 inherit wxwidgets perl-module
 
 DESCRIPTION="Scintilla source code editing component for wxWidgets"
-SRC_URI+=" https://dev.gentoo.org/~tove/distfiles/dev-perl/${PN}-0.34-patches.tar.gz"
 
 LICENSE+=" HPND"
 SLOT="0"
@@ -29,7 +28,8 @@ DEPEND="${RDEPEND}
 "
 
 PATCHES=(
-       "${WORKDIR}"/${PN}-patches/0.34-flags.patch
+       "${FILESDIR}"/${PN}-0.34-flags.patch
+       "${FILESDIR}"/${PN}-0.39-gcc6.patch
 )
 
 src_configure() {
diff --git a/dev-perl/Wx-Scintilla/files/Wx-Scintilla-0.34-flags.patch b/dev-perl/Wx-Scintilla/files/Wx-Scintilla-0.34-flags.patch
new file mode 100644 (file)
index 0000000..31b669d
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/inc/Module/Build/Scintilla/GTK.pm
++++ b/inc/Module/Build/Scintilla/GTK.pm
+@@ -48,7 +48,6 @@
+               $self->stc_defines,
+               '-c -fPIC',
+               '-o ' . $object_name,
+-              '-O2',
+               '-Wall',
+               $object_name !~ /((Plat|Scintilla)WX|scintilla)\.o/
+               ? '-Wno-missing-braces -Wno-char-subscripts'
+@@ -143,7 +142,7 @@
+               Alien::wxWidgets->link_flags,
+               $Config{lddlflags},
+               '-fPIC -L.',
+-              '-s -o ' . $dll,
++              '-o ' . $dll,
+               'Scintilla.o',
+               '-Lblib/arch/auto/Wx/Scintilla ' . $self->stc_scintilla_link,
+               Alien::wxWidgets->libraries(qw(core base)),
diff --git a/dev-perl/Wx-Scintilla/files/Wx-Scintilla-0.39-gcc6.patch b/dev-perl/Wx-Scintilla/files/Wx-Scintilla-0.39-gcc6.patch
new file mode 100644 (file)
index 0000000..269d1d4
--- /dev/null
@@ -0,0 +1,32 @@
+diff -ruN Wx-Scintilla-0.39.orig/wx-scintilla/src/scintilla/src/Editor.cxx Wx-Scintilla-0.39/wx-scintilla/src/scintilla/src/Editor.cxx
+--- Wx-Scintilla-0.39.orig/wx-scintilla/src/scintilla/src/Editor.cxx   2012-09-04 12:20:46.000000000 +0200
++++ Wx-Scintilla-0.39/wx-scintilla/src/scintilla/src/Editor.cxx        2017-04-25 01:20:51.586427196 +0200
+@@ -11,6 +11,7 @@
+ #include <ctype.h>\r
+ #include <assert.h>\r
+ \r
++#include <cmath>\r
+ #include <string>\r
+ #include <vector>\r
+ #include <map>\r
+@@ -989,7 +990,7 @@
+               // Try to optimise small scrolls\r
+ #ifndef UNDER_CE\r
+               int linesToMove = topLine - topLineNew;\r
+-              bool performBlit = (abs(linesToMove) <= 10) && (paintState == notPainting);\r
++              bool performBlit = (std::abs(linesToMove) <= 10) && (paintState == notPainting);\r
+               willRedrawAll = !performBlit;\r
+ #endif\r
+               SetTopLine(topLineNew);\r
+@@ -5868,9 +5869,9 @@
+ }\r
+ \r
+ static bool Close(Point pt1, Point pt2) {\r
+-      if (abs(pt1.x - pt2.x) > 3)\r
++      if (std::abs(pt1.x - pt2.x) > 3)\r
+               return false;\r
+-      if (abs(pt1.y - pt2.y) > 3)\r
++      if (std::abs(pt1.y - pt2.y) > 3)\r
+               return false;\r
+       return true;\r
+ }\r