aboutsummaryrefslogtreecommitdiff
blob: d8a4bfac9ed527bd17445dfff520e529ca223a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit multilib eutils flag-o-matic

DESCRIPTION="A set of C functions that generate PostScript for publication quality scientific plots"
HOMEPAGE="http://neurovision.berkeley.edu/software/A_Cgraph.html"
SRC_URI="http://neurovision.berkeley.edu/software/${PN}${PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

S="${WORKDIR}"/${PN}/source

src_prepare() {
	epatch "${FILESDIR}"/Makefile.patch
	epatch "${FILESDIR}"/fix-src.patch
}

src_compile() {
	use amd64 && append-flags -fPIC && append-ldflags -fPIC
	emake \
		CC=$(tc-getCC) \
		CCFLAGS="${CFLAGS}" || \
	die "compilation failed"
}

src_install() {
	emake \
		DESTDIR="${D}" \
		LIB_DIR=/usr/$(get_libdir) \
		install || die "install failed"
	dolib.so libcgraph.so.0.0.0 || die
	dosym libcgraph.so.0.0.0 /usr/$(get_libdir)/libcgraph.so.0 || die
	dosym libcgraph.so.0.0.0 /usr/$(get_libdir)/libcgraph.so || die

	dodoc ../docs/*
}