summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2009-07-12 09:56:10 +0000
committerAlin Năstac <mrness@gentoo.org>2009-07-12 09:56:10 +0000
commit0feefd0d02ad9c5ee19623b4f76bdedb98cd29d3 (patch)
treefb1f53ae814d87b9f18729bd8c7dd622801eb1e8 /app-mobilephone/yaps
parentalpha/sparc stable wrt #271889 (diff)
downloadgentoo-2-0feefd0d02ad9c5ee19623b4f76bdedb98cd29d3.tar.gz
gentoo-2-0feefd0d02ad9c5ee19623b4f76bdedb98cd29d3.tar.bz2
gentoo-2-0feefd0d02ad9c5ee19623b4f76bdedb98cd29d3.zip
Migrate to EAPI 2. Fix compile errors when built against glibc-2.10 (#276191).
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'app-mobilephone/yaps')
-rw-r--r--app-mobilephone/yaps/ChangeLog10
-rw-r--r--app-mobilephone/yaps/files/yaps-0.96-getline-rename.patch69
-rw-r--r--app-mobilephone/yaps/yaps-0.96-r4.ebuild86
3 files changed, 163 insertions, 2 deletions
diff --git a/app-mobilephone/yaps/ChangeLog b/app-mobilephone/yaps/ChangeLog
index fe929e9576d6..d91862ddffa3 100644
--- a/app-mobilephone/yaps/ChangeLog
+++ b/app-mobilephone/yaps/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-mobilephone/yaps
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/yaps/ChangeLog,v 1.21 2008/10/27 01:58:52 sbriesen Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/yaps/ChangeLog,v 1.22 2009/07/12 09:56:10 mrness Exp $
+
+*yaps-0.96-r4 (12 Jul 2009)
+
+ 12 Jul 2009; Alin Năstac <mrness@gentoo.org>
+ +files/yaps-0.96-getline-rename.patch, +yaps-0.96-r4.ebuild:
+ Migrate to EAPI 2. Fix compile errors when built against glibc-2.10 (#276191).
*yaps-0.96-r3 (27 Oct 2008)
diff --git a/app-mobilephone/yaps/files/yaps-0.96-getline-rename.patch b/app-mobilephone/yaps/files/yaps-0.96-getline-rename.patch
new file mode 100644
index 000000000000..9613abc73ebd
--- /dev/null
+++ b/app-mobilephone/yaps/files/yaps-0.96-getline-rename.patch
@@ -0,0 +1,69 @@
+diff -Nru yaps-0.96.orig/cfg.c yaps-0.96/cfg.c
+--- yaps-0.96.orig/cfg.c 1997-06-11 14:05:34.000000000 +0200
++++ yaps-0.96/cfg.c 2009-07-12 11:32:02.000000000 +0200
+@@ -203,7 +203,7 @@
+ fcur -> fp = fp;
+ fcur -> up = NULL;
+ while (fcur) {
+- while (gline = getline (fcur -> fp, True)) {
++ while (gline = my_getline (fcur -> fp, True)) {
+ for (line = gline; isspace (*line); ++line)
+ ;
+ if ((! *line) || (*line == '#')) {
+@@ -279,7 +279,7 @@
+ done = False;
+ siz = 0;
+ len = 0;
+- while (ptr = getline (fcur -> fp, False)) {
++ while (ptr = my_getline (fcur -> fp, False)) {
+ if ((*ptr != '}') || *(ptr + 1)) {
+ plen = strlen (ptr);
+ if (len + plen + 2 >= siz) {
+diff -Nru yaps-0.96.orig/cv.c yaps-0.96/cv.c
+--- yaps-0.96.orig/cv.c 1997-06-03 20:43:52.000000000 +0200
++++ yaps-0.96/cv.c 2009-07-12 11:31:44.000000000 +0200
+@@ -151,7 +151,7 @@
+ MCHK (c);
+ if ((! c) || (! (fp = fopen (fname, "r"))))
+ return -1;
+- while (line = getline (fp, True)) {
++ while (line = my_getline (fp, True)) {
+ for (sp = line; isspace (*sp); ++sp)
+ ;
+ if (*sp && (*sp != '#')) {
+diff -Nru yaps-0.96.orig/pager.h yaps-0.96/pager.h
+--- yaps-0.96.orig/pager.h 1997-06-12 13:59:28.000000000 +0200
++++ yaps-0.96/pager.h 2009-07-12 11:31:33.000000000 +0200
+@@ -67,7 +67,7 @@
+ /*{{{ utility */
+ extern char *skip (char *str);
+ extern char *skipch (char *str, char ch);
+-extern char *getline (FILE *fp, Bool cont);
++extern char *my_getline (FILE *fp, Bool cont);
+ extern int verbose_out (char *, ...);
+ /*}}}*/
+ /*{{{ string handling */
+diff -Nru yaps-0.96.orig/util.c yaps-0.96/util.c
+--- yaps-0.96.orig/util.c 1997-05-31 19:20:40.000000000 +0200
++++ yaps-0.96/util.c 2009-07-12 11:31:49.000000000 +0200
+@@ -36,7 +36,7 @@
+ }
+
+ char *
+-getline (FILE *fp, Bool cont)
++my_getline (FILE *fp, Bool cont)
+ {
+ char *buf;
+ int size;
+diff -Nru yaps-0.96.orig/yaps.c yaps-0.96/yaps.c
+--- yaps-0.96.orig/yaps.c 1997-06-14 12:25:56.000000000 +0200
++++ yaps-0.96/yaps.c 2009-07-12 11:31:39.000000000 +0200
+@@ -1177,7 +1177,7 @@
+ fprintf (stderr, "Unable to open message file %s for reading\n", mfile);
+ return NULL;
+ }
+- while (ptr = getline (fp, False)) {
++ while (ptr = my_getline (fp, False)) {
+ sav = skip (ptr);
+ if (*ptr && *sav) {
+ if (rcnt + 2 >= rsiz) {
diff --git a/app-mobilephone/yaps/yaps-0.96-r4.ebuild b/app-mobilephone/yaps/yaps-0.96-r4.ebuild
new file mode 100644
index 000000000000..e4c366c282d3
--- /dev/null
+++ b/app-mobilephone/yaps/yaps-0.96-r4.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/yaps/yaps-0.96-r4.ebuild,v 1.1 2009/07/12 09:56:10 mrness Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Yet Another Pager Software (optional with CAPI support)"
+HOMEPAGE="ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/machines/"
+SRC_URI="capi? ( ftp://ftp.melware.net/capi4yaps/${P}.c4.tgz )
+ !capi? ( ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/machines/${P}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="capi lua slang unicode"
+
+RDEPEND="capi? ( net-dialup/capi4k-utils )
+ slang? ( >=sys-libs/slang-1.4 )
+ lua? ( dev-lang/lua )"
+DEPEND="${RDEPEND}
+ !capi? ( sys-apps/sed )
+ lua? ( dev-util/pkgconfig )"
+
+pkg_setup() {
+ if ! use capi; then
+ ewarn
+ ewarn "You are now compiling some *very* old and unmaintained stuff!"
+ ewarn
+ ewarn "YAPS with CAPI 2.0 support is actively maintained, but needs"
+ ewarn "net-dialup/capi4k-utils installed. But I advice you to use"
+ ewarn "this version, since it can still be used with an ordinary"
+ ewarn "modem (that's what you probably wanted). So just add 'capi'"
+ ewarn "to your USE flags to get the new and maintained version."
+ ewarn
+ ebeep
+ fi
+}
+
+src_prepare() {
+ use capi && mv -f "${S}.c4" "${S}"
+ cd "${S}"
+
+ # apply patches
+ epatch "${FILESDIR}/${P}-gentoo.diff"
+ epatch "${FILESDIR}/${P}-getline-rename.patch"
+
+ # fix compile warning
+ use capi || \
+ sed -i -e 's:^\(.*\)\(<stdlib.h>\):\1\2\n\1<string.h>:g' scr.c
+
+ # if specified, convert all relevant files from latin1 to UTF-8
+ if use unicode; then
+ for i in yaps.doc; do
+ einfo "Converting '${i}' to UTF-8"
+ iconv -f latin1 -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
+ done
+ fi
+}
+
+src_compile() {
+ local myconf=""
+ use lua && myconf="${myconf} LUA=True"
+ use slang && myconf="${myconf} SLANG=True"
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" CFLAGS="${CFLAGS}" ${myconf} || die "emake failed"
+}
+
+src_install() {
+ dobin yaps
+ insinto /etc
+ doins yaps.rc
+ keepdir /usr/lib/yaps
+ doman yaps.1
+ dohtml yaps.html
+ dodoc BUGREPORT COPYRIGHT README yaps.lsm yaps.doc
+ newdoc contrib/README README.contrib
+ insinto /usr/share/doc/${PF}/contrib
+ doins contrib/{m2y.pl,tap.sl}
+}
+
+pkg_postinst() {
+ elog
+ elog "Please edit /etc/yaps.rc to suit your needs."
+ elog
+}