summaryrefslogtreecommitdiff
blob: ebd3b900dfde5ad4d411b996be1f31c098f33025 (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-2010 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.2 2010/09/16 17:33:01 scarabeus 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="media-libs/freeglut"
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
}