aboutsummaryrefslogtreecommitdiff
blob: 7e0e71a6218fd83a0baa640709d93d6963289ec8 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/gl2ps/gl2ps-1.3.3.ebuild,v 1.1 2009/04/07 18:41:50 bicatali Exp $

EAPI=2
inherit eutils toolchain-funcs

DESCRIPTION="OpenGL to PostScript printing library"
HOMEPAGE="http://www.geuz.org/gl2ps/"
SRC_URI="http://geuz.org/${PN}/src/${P}.tgz"
LICENSE="LGPL-2"
SLOT="0"
IUSE="doc"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"

RDEPEND="virtual/glut"
DEPEND="${RDEPEND}"

src_compile() {
	$(tc-getCC) ${CFLAGS} -fPIC -c gl2ps.c -o gl2ps.o \
		|| die "compiling gl2ps failed"
	$(tc-getCC) -shared ${LDFLAGS} -Wl,-soname,libgl2ps.so.1 \
		gl2ps.o -o libgl2ps.so.1 -lm -lGL -lGLU -lglut \
		|| die "linking libgl2ps failed"
}

src_install () {
	dolib.so libgl2ps.so.1 || die
	dosym libgl2ps.so.1 /usr/$(get_libdir)/libgl2ps.so
	insinto /usr/include
	doins gl2ps.h || die
	dodoc TODO
	insinto /usr/share/doc/${PF}
	if use doc; then
		doins gl2psTest* *.pdf || die
	fi
}