dev-libs/boehm-gc: Tested on ~amd64-fbsd
[gentoo.git] / dev-libs / boehm-gc / boehm-gc-7.4.0.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 eutils libtool
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 ~mips ~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.4
20         virtual/pkgconfig"
21
22 S="${WORKDIR}/${MY_P}"
23
24 src_prepare() {
25         elibtoolize #594754
26 }
27
28 src_configure() {
29         local config=(
30                 --with-libatomic-ops
31                 $(use_enable cxx cplusplus)
32                 $(use_enable static-libs static)
33                 $(use threads || echo --disable-threads)
34         )
35         econf "${config[@]}"
36 }
37
38 src_compile() {
39         # Workaround build errors. #574566
40         use ia64 && emake src/ia64_save_regs_in_stack.lo
41         use sparc && emake src/sparc_mach_dep.lo
42         default
43 }
44
45 src_install() {
46         default
47         use static-libs || prune_libtool_files
48
49         rm -r "${ED}"/usr/share/gc || die
50         dodoc README.QUICK doc/README{.environment,.linux,.macros} \
51                 doc/barrett_diagram
52         dohtml doc/*.html
53         newman doc/gc.man GC_malloc.1
54 }