* [gentoo-commits] repo/gentoo:master commit in: app-editors/hteditor/files/, app-editors/hteditor/
@ 2018-03-02 10:26 Jeroen Roovers
0 siblings, 0 replies; 3+ messages in thread
From: Jeroen Roovers @ 2018-03-02 10:26 UTC (permalink / raw
To: gentoo-commits
commit: 09b77cdaec0cd7b617c92e936cbec78652157e3a
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 2 10:26:01 2018 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Mar 2 10:26:14 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09b77cda
app-editors/hteditor: Fix building against sys-libs/ncurses[tinfo] (bug #601080).
Package-Manager: Portage-2.3.24, Repoman-2.3.6
app-editors/hteditor/files/hteditor-2.1.0-tinfo.patch | 10 ++++++++++
app-editors/hteditor/hteditor-2.1.0.ebuild | 14 +++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-tinfo.patch b/app-editors/hteditor/files/hteditor-2.1.0-tinfo.patch
new file mode 100644
index 00000000000..556cb93569d
--- /dev/null
+++ b/app-editors/hteditor/files/hteditor-2.1.0-tinfo.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -198,6 +198,7 @@
+ fi
+ HT_LIBS="$HT_LIBS -l$CURSES_LIB"
+ fi
++AC_SEARCH_LIBS(stdscr,tinfo)
+
+ dnl Makefile vars.
+ AC_SUBST(IO_DIR)
diff --git a/app-editors/hteditor/hteditor-2.1.0.ebuild b/app-editors/hteditor/hteditor-2.1.0.ebuild
index a38ef31072d..5e5d0e08308 100644
--- a/app-editors/hteditor/hteditor-2.1.0.ebuild
+++ b/app-editors/hteditor/hteditor-2.1.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
MY_P=${P/editor}
@@ -27,7 +27,15 @@ DOCS=( AUTHORS ChangeLog KNOWNBUGS README TODO )
S=${WORKDIR}/${MY_P}
-PATCHES=("${FILESDIR}"/${P}-gcc-7.patch)
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-7.patch
+ "${FILESDIR}"/${P}-tinfo.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
src_configure() {
econf \
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-editors/hteditor/files/, app-editors/hteditor/
@ 2018-03-21 21:42 Sergei Trofimovich
0 siblings, 0 replies; 3+ messages in thread
From: Sergei Trofimovich @ 2018-03-21 21:42 UTC (permalink / raw
To: gentoo-commits
commit: 9daa45a18156494207a6fd10be4931681c71a890
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 21 21:42:16 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Mar 21 21:42:28 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9daa45a1
app-editors/hteditor: fix build failure on g++-6/powerpc (noticed by iv_)
The patch is proposed upstream as
https://github.com/sebastianbiallas/ht/pull/21
Package-Manager: Portage-2.3.24, Repoman-2.3.6
.../files/hteditor-2.1.0-gcc-6-uchar.patch | 45 ++++++++++++++++++++++
app-editors/hteditor/hteditor-2.1.0.ebuild | 1 +
2 files changed, 46 insertions(+)
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch b/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch
new file mode 100644
index 00000000000..67eaa6e0149
--- /dev/null
+++ b/app-editors/hteditor/files/hteditor-2.1.0-gcc-6-uchar.patch
@@ -0,0 +1,45 @@
+https://github.com/sebastianbiallas/ht/pull/21
+
+From 7ce68c4bca7fd64c0073f1770c6b5761c03174f0 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed, 21 Mar 2018 21:30:31 +0000
+Subject: [PATCH] ht: fix build failure on -funsigned-char platforms
+
+powerpc (and arm) have 'char' == 'unsigned char' by default.
+This causes build failures on c++11:
+
+```
+$ ./configure CFLAGS=-funsigned-char CXXFLAGS=-funsigned-char
+$ make
+
+g++ -DHAVE_CONFIG_H -I. -I./analyser -I./asm -I./info -I./io/posix -I./io -I./output -I./eval -I. -DNOMACROS -pipe -O3 -fomit-frame-pointer -Wall -fsigned-char -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c++14 -Woverloaded-virtual -Wnon-virtual-dtor -funsigned-char -MT htcoffhd.o -MD -MP -MF .deps/htcoffhd.Tpo -c -o htcoffhd.o htcoffhd.cc
+htcoffhd.cc:93:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
+ };
+ ^
+htcoffhd.cc:131:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
+ };
+```
+
+Use 'signed char' explicitly to maintain existing behavior.
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ httag.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/httag.h b/httag.h
+index 7f5da1c..83e5c22 100644
+--- a/httag.h
++++ b/httag.h
+@@ -69,7 +69,7 @@ struct ht_tag_flags {
+ } PACKED;
+
+ struct ht_tag_flags_s {
+- char bitidx;
++ signed char bitidx;
+ const char *desc;
+ } PACKED;
+
+--
+2.16.2
+
diff --git a/app-editors/hteditor/hteditor-2.1.0.ebuild b/app-editors/hteditor/hteditor-2.1.0.ebuild
index 5e5d0e08308..1f5fc5b5ee5 100644
--- a/app-editors/hteditor/hteditor-2.1.0.ebuild
+++ b/app-editors/hteditor/hteditor-2.1.0.ebuild
@@ -30,6 +30,7 @@ S=${WORKDIR}/${MY_P}
PATCHES=(
"${FILESDIR}"/${P}-gcc-7.patch
"${FILESDIR}"/${P}-tinfo.patch
+ "${FILESDIR}"/${P}-gcc-6-uchar.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-editors/hteditor/files/, app-editors/hteditor/
@ 2018-03-21 22:01 Sergei Trofimovich
0 siblings, 0 replies; 3+ messages in thread
From: Sergei Trofimovich @ 2018-03-21 22:01 UTC (permalink / raw
To: gentoo-commits
commit: 3e60f60f4d9cc68dcb998101dc5862ea10258675
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 21 22:00:30 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Mar 21 22:01:04 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e60f60f
app-editors/hteditor: pull format-string fixes, bug #521018
Pulled upstream fix as is:
https://github.com/sebastianbiallas/ht/commit/5839355d67ff822593190473a41512ca19e4280a
Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/521018
Package-Manager: Portage-2.3.24, Repoman-2.3.6
.../files/hteditor-2.1.0-format-security.patch | 57 ++++++++++++++++++++
app-editors/hteditor/hteditor-2.1.0-r1.ebuild | 60 ++++++++++++++++++++++
2 files changed, 117 insertions(+)
diff --git a/app-editors/hteditor/files/hteditor-2.1.0-format-security.patch b/app-editors/hteditor/files/hteditor-2.1.0-format-security.patch
new file mode 100644
index 00000000000..408d1b9b1be
--- /dev/null
+++ b/app-editors/hteditor/files/hteditor-2.1.0-format-security.patch
@@ -0,0 +1,57 @@
+https://bugs.gentoo.org/521018
+
+From 5839355d67ff822593190473a41512ca19e4280a Mon Sep 17 00:00:00 2001
+From: Anton Gladky <gladk@debian.org>
+Date: Wed, 18 Feb 2015 21:20:39 +0100
+Subject: [PATCH] Fix "format not a string" compilation failure
+
+Compilation with the flag -Werror=format-security fails with
+the message:
+
+error: format not a string literal and no format arguments
+
+This patch solves the issue.
+---
+ asm/x86dis.cc | 6 +++---
+ htpal.cc | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/asm/x86dis.cc b/asm/x86dis.cc
+index 0830d9c..bb9028f 100644
+--- a/asm/x86dis.cc
++++ b/asm/x86dis.cc
+@@ -1218,15 +1218,15 @@ void x86dis::str_op(char *opstr, int *opstrlen, x86dis_insn *insn, x86_insn_op *
+ default: {assert(0);}
+ }
+ if (!insn->rexprefix) {
+- sprintf(opstr, x86_regs[j][op->reg]);
++ sprintf(opstr, "%s", x86_regs[j][op->reg]);
+ } else {
+- sprintf(opstr, x86_64regs[j][op->reg]);
++ sprintf(opstr, "%s", x86_64regs[j][op->reg]);
+ }
+ break;
+ }
+ case X86_OPTYPE_SEG:
+ if (x86_segs[op->seg]) {
+- sprintf(opstr, x86_segs[op->seg]);
++ sprintf(opstr, "%s", x86_segs[op->seg]);
+ }
+ break;
+ case X86_OPTYPE_CRX:
+diff --git a/htpal.cc b/htpal.cc
+index 03dea18..3d5f51e 100644
+--- a/htpal.cc
++++ b/htpal.cc
+@@ -307,7 +307,7 @@ void palette_entry::strvalue(char *buf32bytes)
+ text = "normal";
+ }
+ p = tag_make_color(p, 32, VCP(fg, bg));
+- p += sprintf(p, text);
++ p += sprintf(p, "%s", text);
+ p = tag_make_default_color(p, 32);
+ *p = 0;
+ }
+--
+2.16.2
+
diff --git a/app-editors/hteditor/hteditor-2.1.0-r1.ebuild b/app-editors/hteditor/hteditor-2.1.0-r1.ebuild
new file mode 100644
index 00000000000..a1d577aacaf
--- /dev/null
+++ b/app-editors/hteditor/hteditor-2.1.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools toolchain-funcs
+
+MY_P=${P/editor}
+
+DESCRIPTION="A file viewer, editor and analyzer for text, binary, and executable files"
+HOMEPAGE="http://hte.sourceforge.net/ https://github.com/sebastianbiallas/ht/"
+SRC_URI="mirror://sourceforge/hte/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="X"
+
+RDEPEND="sys-libs/ncurses:0=
+ X? ( x11-libs/libX11 )
+ >=dev-libs/lzo-2"
+DEPEND="${RDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+
+DOCS=( AUTHORS ChangeLog KNOWNBUGS README TODO )
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-7.patch
+ "${FILESDIR}"/${P}-tinfo.patch
+ "${FILESDIR}"/${P}-gcc-6-uchar.patch
+ "${FILESDIR}"/${P}-format-security.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable X x11-textmode) \
+ --enable-maintainermode
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
+}
+
+src_install() {
+ #For prefix
+ chmod u+x "${S}/install-sh"
+
+ local HTML_DOCS="doc/*.html"
+ doinfo doc/*.info
+
+ default
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-21 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02 10:26 [gentoo-commits] repo/gentoo:master commit in: app-editors/hteditor/files/, app-editors/hteditor/ Jeroen Roovers
-- strict thread matches above, loose matches on Subject: below --
2018-03-21 21:42 Sergei Trofimovich
2018-03-21 22:01 Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox