summaryrefslogtreecommitdiff
blob: e1bf61e1d04e059d539e503e177bef7e725808ee (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-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-libs/liborigin/liborigin-20070115.ebuild,v 1.2 2007/05/06 14:34:13 carlo Exp $

inherit toolchain-funcs multilib

DESCRIPTION="A library for reading OriginLab OPJ project files"
SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
HOMEPAGE="http://sourceforge.net/projects/liborigin/"

LICENSE="GPL-2"
KEYWORDS="~x86 ~amd64"

SLOT="0"
IUSE=""

DEPEND="!<sci-visualization/labplot-1.5.1.6"
RESTRICT="test"

src_compile() {
	# the Makefile.LINUX is very basic, and *both* (and the only) "action" lines
	# need to be adjusted. It is easier to simply build stuff in a proper way
	# directly here.
	$(tc-getCXX) \
		${CXXFLAGS} \
		OPJFile.cpp \
		-shared -Wl,-soname,liborigin.so.0 -fPIC \
		-o liborigin.so.0.0.1 || die "lib compilation failed"
	$(tc-getCXX) \
		${CXXFLAGS} \
		opj2dat.cpp OPJFile.cpp \
		-o opj2dat || die "exec compilation failed"
}

src_install() {
	dolib liborigin.so.0.0.1 || die "dolib failed"
	dosym liborigin.so.0.0.1 /usr/$(get_libdir)/liborigin.so.0
	dosym liborigin.so.0 /usr/$(get_libdir)/liborigin.so
	dobin opj2dat || die "dobin failed"
	dodoc README ws4.opj || die "dodoc failed"
	insinto /usr/include
	doins OPJFile.h || die "doins failed"
}