dev-libs/boehm-gc: Tested on ~amd64-fbsd
[gentoo.git] / dev-libs / boehm-gc / boehm-gc-6.8.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 inherit eutils
5
6 MY_P="gc${PV/_/}"
7 S="${WORKDIR}/${MY_P}"
8
9 DESCRIPTION="The Boehm-Demers-Weiser conservative garbage collector"
10 HOMEPAGE="http://www.hboehm.info/gc/"
11 SRC_URI="http://www.hboehm.info/gc/gc_source/${MY_P}.tar.gz"
12
13 LICENSE="boehm-gc"
14 SLOT="0"
15 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
16 IUSE="cxx threads"
17
18 src_unpack() {
19         unpack ${A}
20         cd "${S}"
21         sed -i -e '/^SUBDIRS/s/doc//' Makefile.in || die
22         epatch "${FILESDIR}"/${PN}-6.5-gentoo.patch
23         epatch "${FILESDIR}"/gc6.6-builtin-backtrace-uclibc.patch
24 }
25
26 src_compile() {
27         econf \
28                 $(use_enable cxx cplusplus) \
29                 $(use threads || echo --disable-threads)
30         emake || die
31 }
32
33 src_install() {
34         make DESTDIR="${D}" install || die
35
36         rm -rf "${D}"/usr/share/gc || die
37
38         # dist_noinst_HEADERS
39         insinto /usr/include/gc
40         doins include/{cord.h,ec.h,javaxfc.h}
41         insinto /usr/include/gc/private
42         doins include/private/*.h
43
44         dodoc README.QUICK doc/README* doc/barrett_diagram
45         dohtml doc/*.html
46         newman doc/gc.man GC_malloc.1
47 }