Lines 1-105
Link Here
|
1 |
# Copyright 1999-2018 Gentoo Foundation |
|
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=6 |
5 |
|
6 |
MY_PV=${PV/_/-} |
7 |
MY_P=${PN}-${MY_PV} |
8 |
inherit autotools eutils libtool multilib-minimal |
9 |
|
10 |
DESCRIPTION="Portable and efficient API to determine the call-chain of a program" |
11 |
HOMEPAGE="https://savannah.nongnu.org/projects/libunwind" |
12 |
SRC_URI="mirror://nongnu/libunwind/${MY_P}.tar.gz" |
13 |
|
14 |
LICENSE="MIT" |
15 |
SLOT="7" |
16 |
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 -sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" |
17 |
IUSE="debug debug-frame doc libatomic lzma +static-libs" |
18 |
|
19 |
RESTRICT="test" # half of tests are broken (toolchain version dependent) |
20 |
|
21 |
# We just use the header from libatomic. |
22 |
RDEPEND="lzma? ( app-arch/xz-utils )" |
23 |
DEPEND="${RDEPEND} |
24 |
libatomic? ( dev-libs/libatomic_ops )" |
25 |
|
26 |
S="${WORKDIR}/${MY_P}" |
27 |
|
28 |
MULTILIB_WRAPPED_HEADERS=( |
29 |
/usr/include/libunwind.h |
30 |
|
31 |
# see libunwind.h for the full list of arch-specific headers |
32 |
/usr/include/libunwind-aarch64.h |
33 |
/usr/include/libunwind-arm.h |
34 |
/usr/include/libunwind-hppa.h |
35 |
/usr/include/libunwind-ia64.h |
36 |
/usr/include/libunwind-mips.h |
37 |
/usr/include/libunwind-ppc32.h |
38 |
/usr/include/libunwind-ppc64.h |
39 |
/usr/include/libunwind-sh.h |
40 |
/usr/include/libunwind-tilegx.h |
41 |
/usr/include/libunwind-x86.h |
42 |
/usr/include/libunwind-x86_64.h |
43 |
) |
44 |
|
45 |
PATCHES=( |
46 |
"${FILESDIR}"/${PN}-1.2-coredump-regs.patch #586092 |
47 |
"${FILESDIR}"/${PN}-1.2-ia64-undwarf.patch |
48 |
"${FILESDIR}"/${PN}-1.2-ia64-ptrace-coredump.patch |
49 |
"${FILESDIR}"/${PN}-1.2-ia64-missing.patch |
50 |
"${FILESDIR}"/${PN}-1.2.1-fix_version_macros.patch |
51 |
"${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch |
52 |
"${FILESDIR}"/${PN}-1.2.1-no-PROTECTED.patch #659732 |
53 |
"${FILESDIR}"/${PN}-1.2.1-arm-__asm__.patch #635674 |
54 |
) |
55 |
|
56 |
src_prepare() { |
57 |
default |
58 |
chmod +x src/ia64/mk_cursor_i || die |
59 |
# Since we have tests disabled via RESTRICT, disable building in the subdir |
60 |
# entirely. This worksaround some build errors too. #484846 |
61 |
sed -i -e '/^SUBDIRS/s:tests::' Makefile.in || die |
62 |
|
63 |
elibtoolize |
64 |
eautoreconf |
65 |
} |
66 |
|
67 |
multilib_src_configure() { |
68 |
# --enable-cxx-exceptions: always enable it, headers provide the interface |
69 |
# and on some archs it is disabled by default causing a mismatch between the |
70 |
# API and the ABI, bug #418253 |
71 |
# conservative-checks: validate memory addresses before use; as of 1.0.1, |
72 |
# only x86_64 supports this, yet may be useful for debugging, couple it with |
73 |
# debug useflag. |
74 |
ECONF_SOURCE="${S}" \ |
75 |
ac_cv_header_atomic_ops_h=$(usex libatomic) \ |
76 |
econf \ |
77 |
--enable-cxx-exceptions \ |
78 |
--enable-coredump \ |
79 |
--enable-ptrace \ |
80 |
--enable-setjmp \ |
81 |
$(use_enable debug-frame) \ |
82 |
$(use_enable doc documentation) \ |
83 |
$(use_enable lzma minidebuginfo) \ |
84 |
$(use_enable static-libs static) \ |
85 |
$(use_enable debug conservative_checks) \ |
86 |
$(use_enable debug) |
87 |
} |
88 |
|
89 |
multilib_src_compile() { |
90 |
# Bug 586208 |
91 |
CCACHE_NODIRECT=1 default |
92 |
} |
93 |
|
94 |
multilib_src_test() { |
95 |
# Explicitly allow parallel build of tests. |
96 |
# Sandbox causes some tests to freak out. |
97 |
SANDBOX_ON=0 emake check |
98 |
} |
99 |
|
100 |
multilib_src_install() { |
101 |
default |
102 |
# libunwind-ptrace.a (and libunwind-ptrace.h) is separate API and without |
103 |
# shared library, so we keep it in any case |
104 |
use static-libs || find "${ED}"usr '(' -name 'libunwind-generic.a' -o -name 'libunwind*.la' ')' -delete |
105 |
} |
106 |
- |
107 |
-- |
108 |
sys-libs/libunwind/libunwind-1.1-r1.ebuild | 6 ++++-- |
0 |
sys-libs/libunwind/libunwind-1.1-r1.ebuild | 6 ++++-- |
109 |
sys-libs/libunwind/libunwind-1.2.1-r1.ebuild | 8 +++++--- |
1 |
sys-libs/libunwind/libunwind-1.2.1-r1.ebuild | 8 +++++--- |
110 |
sys-libs/libunwind/libunwind-1.2.1-r3.ebuild | 8 +++++--- |
2 |
sys-libs/libunwind/libunwind-1.2.1-r3.ebuild | 8 +++++--- |
111 |
3 files changed, 14 insertions(+), 8 deletions(-) |
3 |
3 files changed, 14 insertions(+), 8 deletions(-) |