| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libunwind/libunwind-1.0.1-r1.ebuild,v 1.7 2012/09/11 20:15:12 aballier Exp $
|
| 4 |
|
| 5 |
EAPI="4"
|
| 6 |
|
| 7 |
inherit autotools eutils
|
| 8 |
|
| 9 |
DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
|
| 10 |
HOMEPAGE="http://savannah.nongnu.org/projects/libunwind"
|
| 11 |
SRC_URI="http://download.savannah.nongnu.org/releases/libunwind/${P}.tar.gz"
|
| 12 |
|
| 13 |
LICENSE="MIT"
|
| 14 |
SLOT="7"
|
| 15 |
KEYWORDS="amd64 ~arm ia64 ~ppc x86 ~amd64-fbsd ~x86-fbsd"
|
| 16 |
IUSE="debug debug-frame static-libs"
|
| 17 |
|
| 18 |
# https://savannah.nongnu.org/bugs/?22368
|
| 19 |
# https://bugs.gentoo.org/273372
|
| 20 |
RESTRICT="test"
|
| 21 |
|
| 22 |
DOCS=( AUTHORS ChangeLog NEWS README TODO )
|
| 23 |
|
| 24 |
QA_DT_NEEDED_x86_fbsd="usr/lib/libunwind.so.7.0.0"
|
| 25 |
|
| 26 |
src_prepare() {
|
| 27 |
epatch "${FILESDIR}"/${PN}-1.0.1-disable-setjmp.patch
|
| 28 |
epatch "${FILESDIR}"/${PN}-1.0.1-ia64.patch #425736
|
| 29 |
eautoreconf
|
| 30 |
}
|
| 31 |
|
| 32 |
src_configure() {
|
| 33 |
# do not $(use_enable) because the configure.in is broken and parses
|
| 34 |
# --disable-debug the same as --enable-debug.
|
| 35 |
# https://savannah.nongnu.org/bugs/index.php?34324
|
| 36 |
# --enable-cxx-exceptions: always enable it, headers provide the interface
|
| 37 |
# and on some archs it is disabled by default causing a mismatch between the
|
| 38 |
# API and the ABI, bug #418253
|
| 39 |
# conservative-checks: validate memory addresses before use; as of 1.0.1,
|
| 40 |
# only x86_64 supports this, yet may be useful for debugging, couple it with
|
| 41 |
# debug useflag.
|
| 42 |
econf \
|
| 43 |
--enable-cxx-exceptions \
|
| 44 |
$(use_enable debug-frame) \
|
| 45 |
$(use_enable static-libs static) \
|
| 46 |
$(use_enable debug conservative_checks) \
|
| 47 |
$(use debug && echo --enable-debug)
|
| 48 |
}
|
| 49 |
|
| 50 |
src_test() {
|
| 51 |
# explicitly allow parallel build of tests
|
| 52 |
emake check
|
| 53 |
}
|
| 54 |
|
| 55 |
src_install() {
|
| 56 |
default
|
| 57 |
# libunwind-ptrace.a (and libunwind-ptrace.h) is separate API and without
|
| 58 |
# shared library, so we keep it in any case
|
| 59 |
use static-libs || rm -f "${ED}"usr/lib*/libunwind{-generic.a,*.la}
|
| 60 |
}
|