* [gentoo-commits] repo/gentoo:master commit in: app-editors/fte/, app-editors/fte/files/
@ 2016-10-01 20:11 David Seifert
0 siblings, 0 replies; only message in thread
From: David Seifert @ 2016-10-01 20:11 UTC (permalink / raw
To: gentoo-commits
commit: 0917103442096f6487409686fcfa29440587e040
Author: Kacper KoĆodziej <kacper <AT> kolodziej <DOT> in>
AuthorDate: Sun Sep 25 16:20:10 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Oct 1 20:11:13 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09171034
app-editors/fte: fix cpp14 compilation errors; bug #595048
Change config generating Perl script to cast int literals to char in default
config file to avoid narrowing conversions.
Closes: https://github.com/gentoo/gentoo/pull/2411
Signed-off-by: David Seifert <soap <AT> gentoo.org>
app-editors/fte/files/fte-cpp14.patch | 17 +++++++++++++++++
app-editors/fte/fte-20051115-r3.ebuild | 3 ++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/app-editors/fte/files/fte-cpp14.patch b/app-editors/fte/files/fte-cpp14.patch
new file mode 100644
index 00000000..bea83b6
--- /dev/null
+++ b/app-editors/fte/files/fte-cpp14.patch
@@ -0,0 +1,17 @@
+Fix C++14 compilation errors. Add casting int literals to char in config
+generator to avoid narrowing conversions.
+Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=595048
+
+--- a/src/mkdefcfg.pl
++++ b/src/mkdefcfg.pl
+@@ -24,8 +24,8 @@
+
+ @c = split(//, $buf);
+ for ($i = 0; $i < $len; $i++) {
+- $out .= sprintf("0x%02X", ord($c[$i]));
+- if ($n++ % 10) {
++ $out .= sprintf("(char)0x%02X", ord($c[$i]));
++ if ($n++ % 5) {
+ $out .= ", ";
+ } else {
+ $out .= ",\n";
diff --git a/app-editors/fte/fte-20051115-r3.ebuild b/app-editors/fte/fte-20051115-r3.ebuild
index 4f8ff93..9818594 100644
--- a/app-editors/fte/fte-20051115-r3.ebuild
+++ b/app-editors/fte/fte-20051115-r3.ebuild
@@ -47,7 +47,8 @@ src_prepare() {
"${FILESDIR}"/fte-gcc34 \
"${FILESDIR}"/${PN}-new_keyword.patch \
"${FILESDIR}"/${PN}-slang.patch \
- "${FILESDIR}"/${PN}-interix.patch
+ "${FILESDIR}"/${PN}-interix.patch \
+ "${FILESDIR}"/${PN}-cpp14.patch # bug #595048
[[ -e /usr/include/linux/keyboard.h ]] && \
sed /usr/include/linux/keyboard.h -e '/wait.h/d' > src/hacked_keyboard.h
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-01 20:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-01 20:11 [gentoo-commits] repo/gentoo:master commit in: app-editors/fte/, app-editors/fte/files/ David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox