]> Pileus Git - ~andy/sunrise/blob - dev-libs/openthreads/openthreads-1.2.1.ebuild
cf6491a75d3ae7ed6beffc2c675624f4127b2cd4
[~andy/sunrise] / dev-libs / openthreads / openthreads-1.2.1.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils fixheadtails toolchain-funcs multilib
6
7 MY_PN="OpenThreads"
8 MY_PV="v1.2dev2-osg0.9.5"
9
10 DESCRIPTION="a minimal & complete Object-Oriented thread interface for C++"
11 HOMEPAGE="http://openthreads.sourceforge.net/"
12 SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-${MY_PV}.tar.gz"
13
14 LICENSE="LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="~x86"
17 IUSE="doc examples"
18
19 DEPEND="app-arch/unzip
20         doc? ( app-doc/doxygen )"
21 RDEPEND=""
22
23 S=${WORKDIR}/${MY_PN}
24
25 src_unpack() {
26         unpack ${A}
27         cd "${S}"
28         epatch "${FILESDIR}"/${P}-build.patch
29
30         ht_fix_all
31 }
32
33 src_compile() {
34         emake CXX=$(tc-getCXX) || die "emake failed"
35
36         if use doc; then
37                 cd docs
38                 doxygen doxyfile
39         fi
40 }
41
42 src_install() {
43         emake INST_LOCATION="${D}"/usr install || die "emake install failed"
44
45         dosym /usr/$(get_libdir)/lib${MY_PN}.so{.${PV},}
46         dosym /usr/$(get_libdir)/lib${MY_PN}.so.{${PV},${PV%%.*}}
47
48         dodoc AUTHORS.txt ChangeLog README.txt TODO.txt
49
50         use doc && dohtml docs/html/*
51
52         if use examples ; then
53                 insinto /usr/share/doc/${PF}/examples
54                 doins -r examples_src/*
55         fi
56 }