commit:     31b8c1b407969b492d514cc694edaf1d497344e9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  1 03:14:01 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov  1 03:14:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31b8c1b4

media-gfx/cellwriter: fix build with gcc 10

Bug: https://bugs.gentoo.org/707182
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/cellwriter/cellwriter-1.3.6.ebuild       | 17 ++++++++-------
 .../files/cellwriter-1.3.6-fno-common.patch        | 25 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 8 deletions(-)

diff --git a/media-gfx/cellwriter/cellwriter-1.3.6.ebuild 
b/media-gfx/cellwriter/cellwriter-1.3.6.ebuild
index 467dc084c96..d7a4e31afd0 100644
--- a/media-gfx/cellwriter/cellwriter-1.3.6.ebuild
+++ b/media-gfx/cellwriter/cellwriter-1.3.6.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
-inherit xdg-utils
+EAPI=7
+
+inherit xdg
 
 DESCRIPTION="Grid-entry natural handwriting input panel"
 HOMEPAGE="http://risujin.org/cellwriter/";
@@ -11,22 +12,22 @@ 
SRC_URI="https://github.com/risujin/cellwriter/archive/${PV}.tar.gz -> ${P}.tar.
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86"
-IUSE=""
 
+BDEPEND="virtual/pkgconfig"
 RDEPEND="x11-libs/gtk+:2
        x11-libs/libX11
        x11-libs/libXtst"
 DEPEND="${RDEPEND}
-       virtual/pkgconfig
        x11-base/xorg-proto"
 
 DOCS="AUTHORS ChangeLog README TODO" # NEWS is no-op
 
+PATCHES=(
+       "${FILESDIR}/${PN}-1.3.6-fno-common.patch"
+)
+
 src_prepare() {
        default
 
        sed -i -e '/Encoding/d' ${PN}.desktop || die
 }
-
-pkg_postinst() { xdg_icon_cache_update; }
-pkg_postrm() { xdg_icon_cache_update; }

diff --git a/media-gfx/cellwriter/files/cellwriter-1.3.6-fno-common.patch 
b/media-gfx/cellwriter/files/cellwriter-1.3.6-fno-common.patch
new file mode 100644
index 00000000000..54f03533972
--- /dev/null
+++ b/media-gfx/cellwriter/files/cellwriter-1.3.6-fno-common.patch
@@ -0,0 +1,25 @@
+https://sources.debian.org/patches/cellwriter/1.3.6-2/fix_ftbfs.patch/
+https://bugs.gentoo.org/707182
+--- a/src/options.c
++++ b/src/options.c
+@@ -26,9 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fi
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-/* preprocess.c */
+-int ignore_stroke_dir, ignore_stroke_num;
+-
+ /* cellwidget.c */
+ extern int cell_width, cell_height, cell_cols_pref, cell_rows_pref,
+            train_on_input, right_to_left, keyboard_enabled, xinput_enabled;
+--- a/src/recognize.c
++++ b/src/recognize.c
+@@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fi
+ #include "recognize.h"
+ 
+ /* preprocess.c */
+-int prep_examined;
++extern int prep_examined;
+ 
+ void engine_prep(void);
+ 

Reply via email to