Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/attr/
Date: Fri, 15 Nov 2019 15:01:27
Message-Id: 1573830076.160e36dec431e784d841a86ca97e79071847a9d9.whissi@gentoo
1 commit: 160e36dec431e784d841a86ca97e79071847a9d9
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 15 15:01:03 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 15 15:01:16 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=160e36de
7
8 sys-apps/attr: add live ebuild for easier bisect
9
10 Package-Manager: Portage-2.3.79, Repoman-2.3.18
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 sys-apps/attr/attr-9999.ebuild | 100 +++++++++++++++++++++++++++++++++++++++++
14 1 file changed, 100 insertions(+)
15
16 diff --git a/sys-apps/attr/attr-9999.ebuild b/sys-apps/attr/attr-9999.ebuild
17 new file mode 100644
18 index 00000000000..1d01d82440c
19 --- /dev/null
20 +++ b/sys-apps/attr/attr-9999.ebuild
21 @@ -0,0 +1,100 @@
22 +# Copyright 1999-2019 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI="7"
26 +
27 +inherit flag-o-matic libtool toolchain-funcs multilib-minimal usr-ldscript
28 +
29 +if [[ ${PV} == 9999 ]] ; then
30 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/${PN}.git"
31 +
32 + inherit autotools git-r3
33 +else
34 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
35 + SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
36 +fi
37 +
38 +DESCRIPTION="Extended attributes tools"
39 +HOMEPAGE="https://savannah.nongnu.org/projects/attr"
40 +LICENSE="LGPL-2.1"
41 +SLOT="0"
42 +
43 +IUSE="debug nls static-libs"
44 +
45 +DEPEND="nls? ( sys-devel/gettext )"
46 +
47 +pkg_setup() {
48 + # Remove -flto* from flags as this breaks binaries (bug #644048)
49 + filter-flags -flto*
50 +}
51 +
52 +src_prepare() {
53 + default
54 +
55 + if [[ ${PV} == 9999 ]] ; then
56 + po/update-potfiles || die
57 + eautopoint
58 + eautoreconf
59 + else
60 + elibtoolize #580792
61 + fi
62 +}
63 +
64 +multilib_src_configure() {
65 + unset PLATFORM #184564
66 + export OPTIMIZER=${CFLAGS}
67 + export DEBUG=-DNDEBUG
68 +
69 + tc-ld-disable-gold #644048
70 +
71 + local myeconfargs=(
72 + --bindir="${EPREFIX%/}"/bin
73 + --enable-shared
74 + $(use_enable static-libs static)
75 + $(use_enable nls)
76 + --libexecdir="${EPREFIX%/}"/usr/$(get_libdir)
77 + $(use_enable debug)
78 + )
79 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
80 +}
81 +
82 +multilib_src_install() {
83 + emake DESTDIR="${D}" install
84 +
85 + # Sanity check until we track down why this is happening. #644048
86 + local lib="${ED}/usr/$(get_libdir)/libattr.so.1"
87 + if [[ -e ${lib} ]] ; then
88 + local versions=$(readelf -V "${lib}")
89 + local symbols=$(readelf -sW "${lib}")
90 + if [[ "${versions}" != *"ATTR_1.0"* || \
91 + "${versions}" != *"ATTR_1.1"* || \
92 + "${versions}" != *"ATTR_1.2"* || \
93 + "${versions}" != *"ATTR_1.3"* || \
94 + "${symbols}" != *"getxattr@ATTR_1.0"* ]] ; then
95 + echo "# readelf -V ${lib}"
96 + echo "${versions}"
97 + echo "# readelf -sW ${lib}"
98 + echo "${symbols}"
99 + die "symbol version sanity check failed; please comment on https://bugs.gentoo.org/644048"
100 + else
101 + einfo "${lib} passed symbol checks"
102 + fi
103 + fi
104 +
105 + if multilib_is_native_abi; then
106 + # we install attr into /bin, so we need the shared lib with it
107 + gen_usr_ldscript -a attr
108 + fi
109 +
110 + # Add a wrapper until people upgrade.
111 + insinto /usr/include/attr
112 + newins "${FILESDIR}"/xattr-shim.h xattr.h
113 +}
114 +
115 +multilib_src_install_all() {
116 + if ! use static-libs; then
117 + find "${ED}" -name '*.la' -delete || die
118 + fi
119 +
120 + einstalldocs
121 +}