dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / app-office / sc / sc-7.16-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs
7
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/"
11
12 SLOT="0"
13 LICENSE="public-domain"
14 KEYWORDS="amd64 ppc sparc x86"
15
16 COMMON_DEPEND="
17         >=sys-libs/ncurses-5.2
18 "
19 DEPEND="
20         virtual/pkgconfig
21 "
22 RDEPEND="
23         ${COMMON_DEPEND}
24 "
25
26 PATCHES=(
27         "${FILESDIR}"/${P}-amd64.patch
28         "${FILESDIR}"/${P}-lex-syntax.patch
29         "${FILESDIR}"/${P}-c.patch
30         "${FILESDIR}"/${P}-printf.patch
31 )
32
33 src_prepare() {
34         default
35
36         sed -i \
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" \
44                 Makefile || die
45
46         eapply_user
47 }
48
49 src_compile() {
50         tc-export PKG_CONFIG
51         # no autoconf
52         emake prefix="${D}"/usr
53
54         emake ${PN}.1
55         sed -i -e "s:${D}::g" sc.1 || die
56 }
57
58 src_install() {
59         dodir /usr/bin
60         dodir /usr/$(get_libdir)/sc
61         dodir /usr/share/man/man1
62
63         emake install
64
65         doman sc.1 psc.1
66
67         dodoc CHANGES README tutorial.sc
68         dodoc VMS_NOTES ${P}.lsm TODO SC.MACROS
69 }