Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/native-cctools/
Date: Thu, 13 Apr 2017 19:03:07
Message-Id: 1492110165.9a060082fff221957e4ab87a48a8757edeb8acc5.grobian@gentoo
1 commit: 9a060082fff221957e4ab87a48a8757edeb8acc5
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 13 19:02:45 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 13 19:02:45 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a060082
7
8 sys-devel/native-cctools: cleanup, convert from EAPI=3 to EAPI=6
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 sys-devel/native-cctools/native-cctools-1.ebuild | 107 -----------------------
13 sys-devel/native-cctools/native-cctools-2.ebuild | 107 -----------------------
14 sys-devel/native-cctools/native-cctools-4.ebuild | 6 +-
15 3 files changed, 5 insertions(+), 215 deletions(-)
16
17 diff --git a/sys-devel/native-cctools/native-cctools-1.ebuild b/sys-devel/native-cctools/native-cctools-1.ebuild
18 deleted file mode 100644
19 index 6a61a8cee23..00000000000
20 --- a/sys-devel/native-cctools/native-cctools-1.ebuild
21 +++ /dev/null
22 @@ -1,107 +0,0 @@
23 -# Copyright 1999-2017 Gentoo Foundation
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -EAPI="3"
27 -
28 -inherit eutils
29 -
30 -DESCRIPTION="Host OS native assembler as and static linker ld"
31 -HOMEPAGE="https://prefix.gentoo.org/"
32 -SRC_URI=""
33 -
34 -LICENSE="GPL-2" # actually, we don't know, the wrapper is
35 -SLOT="0"
36 -
37 -LD_AIX_V=1
38 -
39 -KEYWORDS="~ppc-aix ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
40 -
41 -IUSE=""
42 -
43 -DEPEND="sys-devel/binutils-config"
44 -RDEPEND="${DEPEND}"
45 -
46 -src_install() {
47 - LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
48 - BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}
49 -
50 - keepdir ${LIBPATH} || die
51 - dodir ${BINPATH} || die
52 -
53 - # allow for future hosts with different paths
54 - nativepath=""
55 - wrappers=()
56 - case ${CHOST} in
57 - *-solaris*)
58 - nativepath=/usr/sfw/bin
59 - ;;
60 - *-aix*)
61 - nativepath=/usr/ccs/bin
62 - wrappers=("${wrappers[@]}" "ld=${FILESDIR}/ld-aix-${LD_AIX_V}")
63 - ;;
64 - *-apple-darwin*|*-netbsd*|*-openbsd*)
65 - nativepath=/usr/bin
66 - ;;
67 - *-interix*)
68 - nativepath=/opt/gcc.3.3/bin
69 - ;;
70 - *)
71 - die "Don't know where the native linker for your platform is"
72 - ;;
73 - esac
74 -
75 - what="addr2line as ar c++filt gprof ld nm objcopy objdump \
76 - ranlib readelf elfdump size strings strip"
77 - # Darwin things
78 - what="${what} install_name_tool ld64 libtool lipo nmedit \
79 - otool otool64 pagestuff redo_prebinding segedit"
80 -
81 - # copy from the host os
82 - cd "${ED}${BINPATH}"
83 - for b in ${what} ; do
84 - if [[ ${CHOST} == *-darwin* && ${b} == libtool ]] ; then
85 - echo "linking darwin libtool ${nativepath}/${b}"
86 - ln -s "${nativepath}/${b}" "${b}"
87 - elif [[ -x ${nativepath}/g${b} ]] ; then
88 - einfo "linking ${nativepath}/g${b}"
89 - ln -s "${nativepath}/g${b}" "${b}"
90 - elif [[ -x ${nativepath}/${b} ]] ; then
91 - einfo "linking ${nativepath}/${b}"
92 - ln -s "${nativepath}/${b}" "${b}"
93 - else
94 - ewarn "skipping ${b} (not in ${nativepath})"
95 - fi
96 - done
97 -
98 - # post fix for Darwin's ranlib (doesn't like it when its called other than
99 - # that, as libtool and ranlib are one tool)
100 - if [[ ${CHOST} == *-darwin* ]] ; then
101 - rm -f ranlib
102 - cat <<-EOF > ranlib
103 - #!/usr/bin/env bash
104 - exec ${nativepath}/ranlib "\$@"
105 - EOF
106 - chmod 755 ranlib
107 - fi
108 -
109 - exeinto ${BINPATH}
110 - local wrapper source target
111 - for wrapper in "${wrappers[@]}" ; do
112 - source=${wrapper#*=}
113 - target=${wrapper%%=*}
114 - newexe "${source}" "${target}" || die
115 - done
116 - # Generate an env.d entry for this binutils
117 - insinto /etc/env.d/binutils
118 - cat <<-EOF > "${T}"/env.d
119 - TARGET="${CHOST}"
120 - VER="native-${PV}"
121 - LIBPATH="${EPREFIX}/${LIBPATH}"
122 - FAKE_TARGETS="${CHOST}"
123 - EOF
124 - newins "${T}"/env.d ${CHOST}-native-${PV}
125 -}
126 -
127 -pkg_postinst() {
128 - binutils-config ${CHOST}-native-${PV}
129 -}
130
131 diff --git a/sys-devel/native-cctools/native-cctools-2.ebuild b/sys-devel/native-cctools/native-cctools-2.ebuild
132 deleted file mode 100644
133 index 5bb62c15c22..00000000000
134 --- a/sys-devel/native-cctools/native-cctools-2.ebuild
135 +++ /dev/null
136 @@ -1,107 +0,0 @@
137 -# Copyright 1999-2017 Gentoo Foundation
138 -# Distributed under the terms of the GNU General Public License v2
139 -
140 -EAPI="3"
141 -
142 -inherit eutils
143 -
144 -DESCRIPTION="Host OS native assembler as and static linker ld"
145 -HOMEPAGE="https://prefix.gentoo.org/"
146 -SRC_URI=""
147 -
148 -LICENSE="GPL-2" # actually, we don't know, the wrapper is
149 -SLOT="0"
150 -
151 -LD_AIX_V=2
152 -
153 -KEYWORDS="~ppc-aix ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
154 -
155 -IUSE=""
156 -
157 -DEPEND="sys-devel/binutils-config"
158 -RDEPEND="${DEPEND}"
159 -
160 -src_install() {
161 - LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
162 - BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}
163 -
164 - keepdir ${LIBPATH} || die
165 - dodir ${BINPATH} || die
166 -
167 - # allow for future hosts with different paths
168 - nativepath=""
169 - wrappers=()
170 - case ${CHOST} in
171 - *-solaris*)
172 - nativepath=/usr/sfw/bin
173 - ;;
174 - *-aix*)
175 - nativepath=/usr/ccs/bin
176 - wrappers=("${wrappers[@]}" "ld=${FILESDIR}/ld-aix-${LD_AIX_V}")
177 - ;;
178 - *-apple-darwin*|*-netbsd*|*-openbsd*)
179 - nativepath=/usr/bin
180 - ;;
181 - *-interix*)
182 - nativepath=/opt/gcc.3.3/bin
183 - ;;
184 - *)
185 - die "Don't know where the native linker for your platform is"
186 - ;;
187 - esac
188 -
189 - what="addr2line as ar c++filt gprof ld nm objcopy objdump \
190 - ranlib readelf elfdump size strings strip"
191 - # Darwin things
192 - what="${what} install_name_tool ld64 libtool lipo nmedit \
193 - otool otool64 pagestuff redo_prebinding segedit"
194 -
195 - # copy from the host os
196 - cd "${ED}${BINPATH}"
197 - for b in ${what} ; do
198 - if [[ ${CHOST} == *-darwin* && ${b} == libtool ]] ; then
199 - echo "linking darwin libtool ${nativepath}/${b}"
200 - ln -s "${nativepath}/${b}" "${b}"
201 - elif [[ -x ${nativepath}/g${b} ]] ; then
202 - einfo "linking ${nativepath}/g${b}"
203 - ln -s "${nativepath}/g${b}" "${b}"
204 - elif [[ -x ${nativepath}/${b} ]] ; then
205 - einfo "linking ${nativepath}/${b}"
206 - ln -s "${nativepath}/${b}" "${b}"
207 - else
208 - ewarn "skipping ${b} (not in ${nativepath})"
209 - fi
210 - done
211 -
212 - # post fix for Darwin's ranlib (doesn't like it when its called other than
213 - # that, as libtool and ranlib are one tool)
214 - if [[ ${CHOST} == *-darwin* ]] ; then
215 - rm -f ranlib
216 - cat <<-EOF > ranlib
217 - #!/usr/bin/env bash
218 - exec ${nativepath}/ranlib "\$@"
219 - EOF
220 - chmod 755 ranlib
221 - fi
222 -
223 - exeinto ${BINPATH}
224 - local wrapper source target
225 - for wrapper in "${wrappers[@]}" ; do
226 - source=${wrapper#*=}
227 - target=${wrapper%%=*}
228 - newexe "${source}" "${target}" || die
229 - done
230 - # Generate an env.d entry for this binutils
231 - insinto /etc/env.d/binutils
232 - cat <<-EOF > "${T}"/env.d
233 - TARGET="${CHOST}"
234 - VER="native-${PV}"
235 - LIBPATH="${EPREFIX}/${LIBPATH}"
236 - FAKE_TARGETS="${CHOST}"
237 - EOF
238 - newins "${T}"/env.d ${CHOST}-native-${PV}
239 -}
240 -
241 -pkg_postinst() {
242 - binutils-config ${CHOST}-native-${PV}
243 -}
244
245 diff --git a/sys-devel/native-cctools/native-cctools-4.ebuild b/sys-devel/native-cctools/native-cctools-4.ebuild
246 index 83b7b29a353..e94fdaa2f60 100644
247 --- a/sys-devel/native-cctools/native-cctools-4.ebuild
248 +++ b/sys-devel/native-cctools/native-cctools-4.ebuild
249 @@ -1,7 +1,7 @@
250 # Copyright 1999-2017 Gentoo Foundation
251 # Distributed under the terms of the GNU General Public License v2
252
253 -EAPI="3"
254 +EAPI="6"
255
256 inherit eutils
257
258 @@ -21,6 +21,10 @@ IUSE=""
259 DEPEND="sys-devel/binutils-config"
260 RDEPEND="${DEPEND}"
261
262 +src_unpack() {
263 + mkdir -p "${S}"
264 +}
265 +
266 src_install() {
267 LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
268 BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}