1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs
8 DESCRIPTION="Spreadsheet Calculator"
9 SRC_URI="ftp://ibiblio.org/pub/Linux/apps/financial/spreadsheet/${P}.tar.gz"
10 HOMEPAGE="http://ibiblio.org/pub/Linux/apps/financial/spreadsheet/"
13 LICENSE="public-domain"
14 KEYWORDS="amd64 ppc sparc x86"
17 >=sys-libs/ncurses-5.2
27 "${FILESDIR}"/${P}-amd64.patch
28 "${FILESDIR}"/${P}-lex-syntax.patch
29 "${FILESDIR}"/${P}-c.patch
30 "${FILESDIR}"/${P}-printf.patch
37 -e "/^prefix=/ s:/usr:${D}/usr:" \
38 -e "/^MANDIR=/ s:${prefix}/man:${prefix}/share/man:" \
39 -e "/^LIBDIR=/ s:${prefix}/lib:${prefix}/$(get_libdir):" \
40 -e '/^LIB=/s|-lncurses|$(shell ${PKG_CONFIG} --libs ncurses)|g' \
41 -e "/^CC=/ s:gcc:$(tc-getCC):" \
42 -e "/^CFLAGS/ s:=-DSYSV3 -O2 -pipe:+=-DSYSV3:" \
43 -e "/strip/ s:^:#:g" \
52 emake prefix="${D}"/usr
55 sed -i -e "s:${D}::g" sc.1 || die
60 dodir /usr/$(get_libdir)/sc
61 dodir /usr/share/man/man1
67 dodoc CHANGES README tutorial.sc
68 dodoc VMS_NOTES ${P}.lsm TODO SC.MACROS