dev-libs/boehm-gc: Tested on ~amd64-fbsd
[gentoo.git] / dev-libs / boehm-gc / boehm-gc-7.2d.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=4
5
6 AUTOTOOLS_AUTORECONF=yes
7
8 inherit autotools-utils
9
10 MY_P="gc-${PV/_/}"
11
12 DESCRIPTION="The Boehm-Demers-Weiser conservative garbage collector"
13 HOMEPAGE="http://www.hboehm.info/gc/"
14 SRC_URI="http://www.hboehm.info/gc/gc_source/${MY_P}.tar.gz"
15
16 LICENSE="boehm-gc"
17 SLOT="0"
18 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"
19 IUSE="cxx static-libs threads"
20
21 RDEPEND=">=dev-libs/libatomic_ops-7.2"
22 DEPEND="${RDEPEND}
23         virtual/pkgconfig"
24
25 S="${WORKDIR}/${MY_P/d}"
26
27 DOCS=( README.QUICK doc/README{,.environment,.linux,.macros} doc/barrett_diagram )
28
29 PATCHES=( "${FILESDIR}"/${P}-configure.patch )
30
31 AUTOTOOLS_AUTORECONF=1
32
33 src_prepare() {
34         sed '/Cflags/s:$:/gc:g' -i bdw-gc.pc.in || die
35         sed \
36                 -e '/gc_allocator.h/d' \
37                 -i Makefile.am || die
38         rm -rf libatomic_ops || die
39         autotools-utils_src_prepare
40 }
41
42 src_configure() {
43         local myeconfargs=(
44                 --with-libatomic-ops=yes
45                 $(use_enable cxx cplusplus)
46                 $(use threads || echo --disable-threads)
47                 )
48         autotools-utils_src_configure
49 }
50
51 src_install() {
52         autotools-utils_src_install
53
54         rm -rf "${ED}"/usr/share/gc || die
55
56         # dist_noinst_HEADERS
57         insinto /usr/include/gc
58         doins include/{cord.h,ec.h,javaxfc.h}
59         insinto /usr/include/gc/private
60         doins include/private/*.h
61
62         dohtml doc/*.html
63         newman doc/gc.man GC_malloc.1
64 }