summaryrefslogtreecommitdiff
blob: bb283e1521c31f0a04aa9d3c6ae167cf9cac2db7 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-sci/epix/epix-0.8.8a.ebuild,v 1.8 2004/06/24 21:57:51 agriffis Exp $

DESCRIPTION="2- and 3-D plotter for creating images (to be used in LaTeX)"
HOMEPAGE="http://mathcs.holycross.edu/~ahwang/current/ePiX.html"

SRC_URI="http://mathcs.holycross.edu/~ahwang/software/${P}_src.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"

IUSE=""
DEPEND="app-shells/bash"


src_unpack() {
	unpack ${A}
	cd ${S}

	# Some sedding to get things installed in the proper places.

	mv Makefile ${T}
	sed -e "s:CXX=g++:CXX=${CXX}:" \
		-e "s:CFLAGS=-c -Wall:CFLAGS=-c -Wall ${CFLAGS}:" \
		-e "s:prefix=/usr/local:prefix=${D}/usr:" \
		-e "s:share/epix:share/${P}:" \
		-e "s:/man/man1:/share/man/man1:" \
			${T}/Makefile > Makefile

	mv helpfiles.sh ${T}
	sed -e "s:\${EPIX_SHAREDIR}/epix:\${EPIX_SHAREDIR}/${P}:" \
			${T}/helpfiles.sh > helpfiles.sh
	chmod a+x helpfiles.sh

	mv pre-install.sh ${T}
	sed -e "s:man man/man1 share:share share/man share/man/man1:" \
		-e "s:share/epix:share/${P}:g" \
			${T}/pre-install.sh > pre-install.sh
	chmod a+x pre-install.sh

	mv -f prepix ${T}
	sed -e "s:^INSTALL_DIR.*:INSTALL_DIR=/usr:" \
		${T}/prepix > prepix
	chmod a+x prepix
}

src_compile() {
	emake || die
	emake contrib ||die
}

src_install() {
	make install || die
}