Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/binutils-libs/
Date: Mon, 08 Feb 2021 22:17:34
Message-Id: 1612822640.ccf5cc6db79cb74a611718be5f081d414e747ca9.dilfridge@gentoo
1 commit: ccf5cc6db79cb74a611718be5f081d414e747ca9
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 8 22:16:50 2021 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 8 22:17:20 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccf5cc6d
7
8 sys-libs/binutils-libs: Version bump
9
10 Package-Manager: Portage-3.0.13, Repoman-3.0.2
11 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
12
13 sys-libs/binutils-libs/Manifest | 2 +
14 sys-libs/binutils-libs/binutils-libs-2.36.1.ebuild | 129 +++++++++++++++++++++
15 2 files changed, 131 insertions(+)
16
17 diff --git a/sys-libs/binutils-libs/Manifest b/sys-libs/binutils-libs/Manifest
18 index 9dcbfa648d3..bdb3fea84b4 100644
19 --- a/sys-libs/binutils-libs/Manifest
20 +++ b/sys-libs/binutils-libs/Manifest
21 @@ -7,4 +7,6 @@ DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc4
22 DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c
23 DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
24 DIST binutils-2.36-patches-1.tar.xz 13200 BLAKE2B 82e8ef3c51984d4418466d7b838fa5c0a5a72c3bbe3e631b8aeb28503fd8b81e2b187908a2a4e1b286eba8af0db25eafadc5ffe42dd07677e6bd659cf5483b07 SHA512 88c5ac42d25d131c1507d94992fdd11a15700a0304da10cedd3b0db9bc689d3387189d6d97f847d77e8a5d053619b174695a0a6b3c6c1bb66ea8f122f0b38d63
25 +DIST binutils-2.36.1-patches-1.tar.xz 11392 BLAKE2B 8112dda3f000d29952cbf58101f842ca519054bf9de6e22908881fe4d46cc1ea9a26db74ab00c64aedd3746eb058c19a978b8dc025ad8de07b6365c70a1803b2 SHA512 c6f5645b09d0c149f2eef8e992ff7181716dfb961f1155207a1349168f2d2fb76857cc224c27b4d764cfbc4ddec0630ef8c0a91d7bac489896f28de64651b367
26 +DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
27 DIST binutils-2.36.tar.xz 22760136 BLAKE2B 6666841e26c89a07b7e6c1144d893bab112278906d7917f3ca6273aa78094951686f0d5893857cae1edde1e1ecd7c6798bc14eac88d03c5a1e6e3e480a788f9c SHA512 0b89b70d4ad5cfe5bd0011dc7e342ae9de96efdbfc3442a0d6b5f7660e38bbcad36f2c72ba8f074323f02bde022ff1cd723ae99f0ea55cf94ee2dbbc0e4efdb2
28
29 diff --git a/sys-libs/binutils-libs/binutils-libs-2.36.1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.36.1.ebuild
30 new file mode 100644
31 index 00000000000..c30d96e6bb4
32 --- /dev/null
33 +++ b/sys-libs/binutils-libs/binutils-libs-2.36.1.ebuild
34 @@ -0,0 +1,129 @@
35 +# Copyright 1999-2021 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +PATCH_VER=1
41 +PATCH_DEV=dilfridge
42 +
43 +inherit eutils libtool toolchain-funcs multilib-minimal
44 +
45 +MY_PN="binutils"
46 +MY_P="${MY_PN}-${PV}"
47 +PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
48 +PATCH_DEV=${PATCH_DEV:-slyfox}
49 +
50 +DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
51 +HOMEPAGE="https://sourceware.org/binutils/"
52 +SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
53 + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
54 +
55 +LICENSE="|| ( GPL-3 LGPL-3 )"
56 +SLOT="0/${PV}"
57 +IUSE="64-bit-bfd multitarget nls static-libs"
58 +#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
59 +
60 +BDEPEND="nls? ( sys-devel/gettext )"
61 +DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
62 +# Need a newer binutils-config that'll reset include/lib symlinks for us.
63 +RDEPEND="${DEPEND}
64 + >=sys-devel/binutils-config-5
65 +"
66 +
67 +S="${WORKDIR}/${MY_P}"
68 +
69 +MULTILIB_WRAPPED_HEADERS=(
70 + /usr/include/bfd.h
71 +)
72 +
73 +src_prepare() {
74 + if [[ ! -z ${PATCH_VER} ]] ; then
75 + einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
76 + eapply "${WORKDIR}/patch"/*.patch
77 + fi
78 +
79 + # Fix cross-compile relinking issue, bug #626402
80 + elibtoolize
81 +
82 + default
83 +}
84 +
85 +pkgversion() {
86 + printf "Gentoo ${PVR}"
87 + [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
88 +}
89 +
90 +multilib_src_configure() {
91 + local myconf=(
92 + --enable-obsolete
93 + --enable-shared
94 + --enable-threads
95 + # Newer versions (>=2.24) make this an explicit option. #497268
96 + --enable-install-libiberty
97 + --disable-werror
98 + --with-bugurl="https://bugs.gentoo.org/"
99 + --with-pkgversion="$(pkgversion)"
100 + $(use_enable static-libs static)
101 + # The binutils eclass enables this flag for all bi-arch builds,
102 + # but other tools often don't care about that support. Put it
103 + # beyond a flag if people really want it, but otherwise leave
104 + # it disabled as it can slow things down on 32bit arches. #438522
105 + $(use_enable 64-bit-bfd)
106 + # This only disables building in the zlib subdir.
107 + # For binutils itself, it'll use the system version. #591516
108 + --without-zlib
109 + --with-system-zlib
110 + # We only care about the libs, so disable programs. #528088
111 + --disable-{binutils,etc,ld,gas,gold,gprof}
112 + # Disable modules that are in a combined binutils/gdb tree. #490566
113 + --disable-{gdb,libdecnumber,readline,sim}
114 + # Strip out broken static link flags.
115 + # https://gcc.gnu.org/PR56750
116 + --without-stage1-ldflags
117 + # We pull in all USE-flags that change ABI in an incompatible
118 + # way. #666100
119 + # USE=multitarget change size of global arrays
120 + # USE=64-bit-bfd changes data structures of exported API
121 + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
122 +
123 + # avoid automagic dependency on (currently prefix) systems
124 + # systems with debuginfod library, bug #754753
125 + --without-debuginfod
126 + )
127 +
128 + # mips can't do hash-style=gnu ...
129 + if [[ $(tc-arch) != mips ]] ; then
130 + myconf+=( --enable-default-hash-style=gnu )
131 + fi
132 +
133 + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
134 +
135 + use nls \
136 + && myconf+=( --without-included-gettext ) \
137 + || myconf+=( --disable-nls )
138 +
139 + if [[ ${CHOST} == *-darwin* ]] && use nls ; then
140 + # fix underlinking in opcodes
141 + sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
142 + "${S}"/opcodes/Makefile.in || die
143 + fi
144 +
145 + ECONF_SOURCE=${S} \
146 + econf "${myconf[@]}"
147 +
148 + # Prevent makeinfo from running as we don't build docs here.
149 + # bug #622652
150 + sed -i \
151 + -e '/^MAKEINFO/s:=.*:= true:' \
152 + Makefile || die
153 +}
154 +
155 +multilib_src_install() {
156 + default
157 + # Provide libiberty.h directly.
158 + dosym libiberty/libiberty.h /usr/include/libiberty.h
159 +}
160 +
161 +multilib_src_install_all() {
162 + use static-libs || find "${ED}"/usr -name '*.la' -delete
163 +}