Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/
Date: Fri, 05 Aug 2022 03:19:54
Message-Id: 1659669472.3c81168c1c47bced122a4aac9fb5e6509b1f6576.sam@gentoo
1 commit: 3c81168c1c47bced122a4aac9fb5e6509b1f6576
2 Author: Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
3 AuthorDate: Fri Aug 5 00:12:57 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 5 03:17:52 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c81168c
7
8 sys-libs/libunwind: BDEPEND on texcore for USE=doc
9
10 Needed for building documentation.
11
12 Otherwise man pages would silently not be built:
13 ```
14 configure: WARNING: latex2man not found. Install latex2man. Disabling docs.
15 ```
16
17 Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
18 Closes: https://github.com/gentoo/gentoo/pull/26742
19 Signed-off-by: Sam James <sam <AT> gentoo.org>
20
21 sys-libs/libunwind/libunwind-1.6.2-r1.ebuild | 97 ++++++++++++++++++++++++++++
22 1 file changed, 97 insertions(+)
23
24 diff --git a/sys-libs/libunwind/libunwind-1.6.2-r1.ebuild b/sys-libs/libunwind/libunwind-1.6.2-r1.ebuild
25 new file mode 100644
26 index 000000000000..d14ce27ffb31
27 --- /dev/null
28 +++ b/sys-libs/libunwind/libunwind-1.6.2-r1.ebuild
29 @@ -0,0 +1,97 @@
30 +# Copyright 2005-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +MY_PV=${PV/_/-}
36 +MY_P=${PN}-${MY_PV}
37 +inherit multilib-minimal
38 +
39 +DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
40 +HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
41 +SRC_URI="mirror://nongnu/libunwind/${MY_P}.tar.gz"
42 +S="${WORKDIR}/${MY_P}"
43 +
44 +LICENSE="MIT"
45 +SLOT="0/8" # libunwind.so.8
46 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 -sparc ~x86 ~amd64-linux ~x86-linux"
47 +IUSE="debug debug-frame doc libatomic lzma static-libs test zlib"
48 +
49 +RESTRICT="test !test? ( test )" # some tests are broken (toolchain version dependent, rely on external binaries)
50 +
51 +BDEPEND="
52 + doc? ( app-text/texlive-core )
53 +"
54 +RDEPEND="
55 + lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
56 + zlib? ( sys-libs/zlib[static-libs?,${MULTILIB_USEDEP}] )
57 +"
58 +# We just use the header from libatomic.
59 +DEPEND="${RDEPEND}
60 + libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )"
61 +
62 +MULTILIB_WRAPPED_HEADERS=(
63 + /usr/include/libunwind.h
64 +
65 + # see libunwind.h for the full list of arch-specific headers
66 + /usr/include/libunwind-aarch64.h
67 + /usr/include/libunwind-arm.h
68 + /usr/include/libunwind-hppa.h
69 + /usr/include/libunwind-ia64.h
70 + /usr/include/libunwind-mips.h
71 + /usr/include/libunwind-ppc32.h
72 + /usr/include/libunwind-ppc64.h
73 + /usr/include/libunwind-riscv.h
74 + /usr/include/libunwind-sh.h
75 + /usr/include/libunwind-tilegx.h
76 + /usr/include/libunwind-x86.h
77 + /usr/include/libunwind-x86_64.h
78 +)
79 +
80 +src_prepare() {
81 + default
82 +
83 + chmod +x src/ia64/mk_cursor_i || die
84 +}
85 +
86 +multilib_src_configure() {
87 + local myeconfargs=(
88 + # --enable-cxx-exceptions: always enable it, headers provide the interface
89 + # and on some archs it is disabled by default causing a mismatch between the
90 + # API and the ABI, bug #418253
91 + --enable-cxx-exceptions
92 + --enable-coredump
93 + --enable-ptrace
94 + --enable-setjmp
95 + $(use_enable debug-frame)
96 + $(use_enable doc documentation)
97 + $(use_enable lzma minidebuginfo)
98 + $(use_enable static-libs static)
99 + $(use_enable zlib zlibdebuginfo)
100 + # conservative-checks: validate memory addresses before use; as of 1.0.1,
101 + # only x86_64 supports this, yet may be useful for debugging, couple it with
102 + # debug useflag.
103 + $(use_enable debug conservative_checks)
104 + $(use_enable debug)
105 + $(use_enable test tests)
106 + )
107 +
108 + export ac_cv_header_atomic_ops_h=$(usex libatomic)
109 +
110 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
111 +}
112 +
113 +multilib_src_compile() {
114 + # bug #586208
115 + CCACHE_NODIRECT=1 default
116 +}
117 +
118 +multilib_src_test() {
119 + # Explicitly allow parallel build of tests.
120 + # Sandbox causes some tests to freak out.
121 + SANDBOX_ON=0 emake check
122 +}
123 +
124 +multilib_src_install_all() {
125 + find "${ED}" -name "*.la" -type f -delete || die
126 +}