dev-libs/boehm-gc: Tested on ~amd64-fbsd
[gentoo.git] / dev-libs / boehm-gc / boehm-gc-7.2d-r1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit autotools eutils
7
8 MY_P="gc-${PV/_/}"
9
10 DESCRIPTION="The Boehm-Demers-Weiser conservative garbage collector"
11 HOMEPAGE="http://www.hboehm.info/gc/"
12 SRC_URI="http://www.hboehm.info/gc/gc_source/${MY_P}.tar.gz"
13
14 LICENSE="boehm-gc"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
17 IUSE="cxx static-libs threads"
18
19 DEPEND=">=dev-libs/libatomic_ops-7.2
20         virtual/pkgconfig"
21
22 S="${WORKDIR}/${MY_P/d}"
23
24 src_prepare() {
25         rm -r libatomic_ops || die
26
27         epatch "${FILESDIR}"/${P}-configure.patch
28         epatch "${FILESDIR}"/${P}-automake-1.13.patch
29         eautoreconf
30 }
31
32 src_configure() {
33         local config=(
34                 --with-libatomic-ops
35                 $(use_enable cxx cplusplus)
36                 $(use_enable static-libs static)
37                 $(use threads || echo --disable-threads)
38         )
39         econf "${config[@]}"
40 }
41
42 src_install() {
43         default
44
45         rm -rf "${ED}"/usr/share/gc || die
46
47         # dist_noinst_HEADERS
48         insinto /usr/include/gc
49         doins include/{cord.h,ec.h,javaxfc.h}
50         insinto /usr/include/gc/private
51         doins include/private/*.h
52
53         dodoc README.QUICK doc/README{.environment,.linux,.macros} doc/barrett_diagram
54         dohtml doc/*.html
55         newman doc/gc.man GC_malloc.1
56
57         prune_libtool_files
58 }