diff options
author | 2014-03-11 09:33:51 +0000 | |
---|---|---|
committer | 2014-03-11 09:33:51 +0000 | |
commit | 7226d62c29e2a1fbab1b852a5c2f68d8eea64816 (patch) | |
tree | 19a8bc521ede013a054c6065b1e68f35f0ab1893 /app-editors | |
parent | Stable for x86, wrt bug #504100 (diff) | |
download | gentoo-2-7226d62c29e2a1fbab1b852a5c2f68d8eea64816.tar.gz gentoo-2-7226d62c29e2a1fbab1b852a5c2f68d8eea64816.tar.bz2 gentoo-2-7226d62c29e2a1fbab1b852a5c2f68d8eea64816.zip |
Fix some compiler warnings. Inherit readme.gentoo.eclass.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/teco/ChangeLog | 10 | ||||
-rw-r--r-- | app-editors/teco/files/teco-warnings.patch | 47 | ||||
-rw-r--r-- | app-editors/teco/teco-1.00-r4.ebuild | 66 |
3 files changed, 121 insertions, 2 deletions
diff --git a/app-editors/teco/ChangeLog b/app-editors/teco/ChangeLog index 40f4f6019d94..6ca315c51b51 100644 --- a/app-editors/teco/ChangeLog +++ b/app-editors/teco/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-editors/teco -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/teco/ChangeLog,v 1.26 2013/02/28 17:56:16 ulm Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-editors/teco/ChangeLog,v 1.27 2014/03/11 09:33:51 ulm Exp $ + +*teco-1.00-r4 (11 Mar 2014) + + 11 Mar 2014; Ulrich Müller <ulm@gentoo.org> +teco-1.00-r4.ebuild, + +files/teco-warnings.patch: + Fix some compiler warnings. Inherit readme.gentoo.eclass. 28 Feb 2013; Ulrich Müller <ulm@gentoo.org> teco-1.00-r3.ebuild: Fix build failure with separate tinfo library. diff --git a/app-editors/teco/files/teco-warnings.patch b/app-editors/teco/files/teco-warnings.patch new file mode 100644 index 000000000000..f8bbfbfff181 --- /dev/null +++ b/app-editors/teco/files/teco-warnings.patch @@ -0,0 +1,47 @@ +Include stdlib.h for exit(3). +Fix conflicting type for malloc(3). +Avoid casting pointers from/to int. + +--- teco-orig/te_defs.h ++++ teco/te_defs.h +@@ -6,6 +6,7 @@ + /* version for multiple buffers 04/19/89 11.25 */ + + #include <stdio.h> ++#include <stdlib.h> + #include <ctype.h> + #include <setjmp.h> + +--- teco-orig/te_rdcmd.c ++++ teco/te_rdcmd.c +@@ -94,7 +94,8 @@ + qreg[i].f = cbuf.f; /* put the old command string in its place */ + if (qreg[i].f) qreg[i].f->b = (struct buffcell *) &qreg[i]; + qreg[i].z = cbuf.z; +- cbuf.f = (struct buffcell *) (cbuf.z = 0); /* no old command string */ ++ cbuf.f = NULL; /* no old command string */ ++ cbuf.z = 0; + err = 0; /* no previous error */ + goto restart; + } +--- teco-orig/te_utils.c ++++ teco/te_utils.c +@@ -13,7 +13,6 @@ + + struct buffcell *get_bcell() + { +- char *malloc(); + struct buffcell *p; + int i; + +--- teco-orig/te_window.c ++++ teco/te_window.c +@@ -1051,7 +1051,7 @@ + pp->c = loc % CELLSIZE; + pp->dot = loc; + } +- return( (int) pb0->f); ++ return(pb0->f != NULL); + } + + /* routine to move N lines (back, forward, or 0) */ diff --git a/app-editors/teco/teco-1.00-r4.ebuild b/app-editors/teco/teco-1.00-r4.ebuild new file mode 100644 index 000000000000..6ce65829a313 --- /dev/null +++ b/app-editors/teco/teco-1.00-r4.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-editors/teco/teco-1.00-r4.ebuild,v 1.1 2014/03/11 09:33:51 ulm Exp $ + +EAPI=5 + +inherit eutils toolchain-funcs flag-o-matic readme.gentoo + +DESCRIPTION="Classic TECO editor, Predecessor to EMACS" +HOMEPAGE="http://www.ibiblio.org/pub/linux/apps/editors/tty/ http://www.ibiblio.org/pub/academic/computer-science/history/pdp-11/teco" +SRC_URI="http://www.ibiblio.org/pub/linux/apps/editors/tty/teco.tar.gz + doc? ( mirror://gentoo/tecolore.txt.gz + mirror://gentoo/tech.txt.gz + mirror://gentoo/teco.doc.gz + mirror://gentoo/tecoprog.doc.gz )" + +LICENSE="freedist" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="doc" + +RDEPEND="sys-libs/ncurses" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}" + +src_unpack() { + unpack teco.tar.gz + if use doc; then + mkdir doc + cd doc || die + unpack tecolore.txt.gz tech.txt.gz teco.doc.gz tecoprog.doc.gz + fi +} + +src_prepare() { + local pkg_config=$("$(tc-getPKG_CONFIG)" --libs ncurses) + sed -i -e "s:\$(CC):& \$(LDFLAGS):;s:-ltermcap:${pkg_config}:" \ + Makefile || die + # bug 103257 + epatch "${FILESDIR}"/${PN}-double-free.diff + epatch "${FILESDIR}"/${PN}-gcc4.patch + epatch "${FILESDIR}"/${PN}-warnings.patch +} + +src_compile() { + append-flags -ansi + append-cppflags -D_POSIX_SOURCE + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_install() { + dobin te + doman te.1 + dodoc sample.tecorc sample.tecorc2 READ.ME MANIFEST + if use doc; then + cd doc + dodoc tecolore.txt tech.txt teco.doc tecoprog.doc + fi + + DOC_CONTENTS="The TECO binary is called te. + \nSample configurations and documentation are available + in /usr/share/doc/${PF}/." + readme.gentoo_create_doc +} |