blob: 6933eb915889842da5df4ff55e09de9767082840 (
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-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils
DESCRIPTION="Easy error handling and debugging in C++"
HOMEPAGE="http://libthrowable.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~ppc ~x86"
IUSE="threads examples"
DEPEND=""
RDEPEND=">=dev-util/pkgconfig-0.20"
pkg_setup() {
# check if this is a recompile and if the USE flag threads has changed
# must be done before anything is installed!
if use threads; then
has_version dev-cpp/libthrowable && ! built_with_use dev-cpp/libthrowable threads \
&& ewarn "You recompile with USE=threads, so remember to rebuilt all depending packages!" && epause
else
has_version dev-cpp/libthrowable && built_with_use dev-cpp/libthrowable threads \
&& ewarn "You recompile without USE=threads, so remember to rebuilt all depending packages!" && epause
fi
}
src_unpack() {
unpack ${A}
# make it run on 64bit platforms
cd "${S}/libthrowable/internal/"
epatch "${FILESDIR}/${P}-internal.cc-64bit.patch"
epatch "${FILESDIR}/${P}-internal.h-64bit.patch"
}
src_compile() {
econf $(use_enable threads pthreads) \
|| die "econf failed"
emake || die "emake failed"
}
src_install() {
emake DESTDIR=${D} install || die "installing ${PF} failed"
dodoc README NEWS AUTHORS
if use examples; then
insinto /usr/share/doc/${PN}/examples/
doins examples/*
fi
}
|