1 |
commit: 9dd75da4747093a7e59135f39b82e976a45f4c2a |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 24 17:03:09 2016 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 24 17:03:09 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/android.git/commit/?id=9dd75da4 |
7 |
|
8 |
sys-libs/glibc: clean up and bump to glibc-2.23. |
9 |
|
10 |
sys-libs/glibc/glibc-2.10.1-r1.ebuild | 203 ---------------------- |
11 |
sys-libs/glibc/glibc-2.11.3.ebuild | 206 ---------------------- |
12 |
sys-libs/glibc/glibc-2.12.1-r3.ebuild | 220 ------------------------ |
13 |
sys-libs/glibc/glibc-2.12.2.ebuild | 220 ------------------------ |
14 |
sys-libs/glibc/glibc-2.13-r2.ebuild | 218 ------------------------ |
15 |
sys-libs/glibc/glibc-2.13-r4.ebuild | 218 ------------------------ |
16 |
sys-libs/glibc/glibc-2.14.1-r2.ebuild | 246 --------------------------- |
17 |
sys-libs/glibc/glibc-2.14.1-r3.ebuild | 246 --------------------------- |
18 |
sys-libs/glibc/glibc-2.14.ebuild | 242 -------------------------- |
19 |
sys-libs/glibc/glibc-2.16.0.ebuild | 223 ------------------------ |
20 |
sys-libs/glibc/glibc-2.23-r2.ebuild | 206 ++++++++++++++++++++++ |
21 |
sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild | 193 --------------------- |
22 |
12 files changed, 206 insertions(+), 2435 deletions(-) |
23 |
|
24 |
diff --git a/sys-libs/glibc/glibc-2.10.1-r1.ebuild b/sys-libs/glibc/glibc-2.10.1-r1.ebuild |
25 |
deleted file mode 100644 |
26 |
index a2f9922..0000000 |
27 |
--- a/sys-libs/glibc/glibc-2.10.1-r1.ebuild |
28 |
+++ /dev/null |
29 |
@@ -1,203 +0,0 @@ |
30 |
-# Copyright 1999-2013 Gentoo Foundation |
31 |
-# Distributed under the terms of the GNU General Public License v2 |
32 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.10.1-r1.ebuild,v 1.29 2013/04/05 00:25:16 vapier Exp $ |
33 |
- |
34 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
35 |
- |
36 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
37 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
38 |
- |
39 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
40 |
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86" |
41 |
-RESTRICT="strip" # strip ourself #46186 |
42 |
-EMULTILIB_PKG="true" |
43 |
- |
44 |
-# Configuration variables |
45 |
-if [[ ${PV} == *_p* ]] ; then |
46 |
-RELEASE_VER=${PV%_p*} |
47 |
-BRANCH_UPDATE="" |
48 |
-SNAP_VER=${PV#*_p} |
49 |
-LIBIDN_VER="" |
50 |
-else |
51 |
-RELEASE_VER=${PV} |
52 |
-BRANCH_UPDATE="" |
53 |
-SNAP_VER="" |
54 |
-LIBIDN_VER=${RELEASE_VER} |
55 |
-fi |
56 |
-PATCH_VER="7" # Gentoo patchset |
57 |
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
58 |
-LT_VER="" # version of linuxthreads addon |
59 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
60 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
61 |
- |
62 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
63 |
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
64 |
- |
65 |
-# Here's how the cross-compile logic breaks down ... |
66 |
-# CTARGET - machine that will target the binaries |
67 |
-# CHOST - machine that will host the binaries |
68 |
-# CBUILD - machine that will build the binaries |
69 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
70 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
71 |
-# CBUILD = CHOST = CTARGET - native build/install |
72 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
73 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
74 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
75 |
-# For install paths: |
76 |
-# CHOST = CTARGET - install into / |
77 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
78 |
- |
79 |
-export CBUILD=${CBUILD:-${CHOST}} |
80 |
-export CTARGET=${CTARGET:-${CHOST}} |
81 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
82 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
83 |
- export CTARGET=${CATEGORY#cross-} |
84 |
- fi |
85 |
-fi |
86 |
- |
87 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
88 |
- |
89 |
-is_crosscompile() { |
90 |
- [[ ${CHOST} != ${CTARGET} ]] |
91 |
-} |
92 |
- |
93 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
94 |
-# Everyone knows 2.2 > 0, duh. |
95 |
-SLOT="2.2" |
96 |
- |
97 |
-# General: We need a new-enough binutils for as-needed |
98 |
-# arch: we need to make sure our binutils/gcc supports TLS |
99 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
100 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
101 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
102 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
103 |
- >=sys-devel/binutils-2.15.94 |
104 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
105 |
- >=app-misc/pax-utils-0.1.10 |
106 |
- virtual/os-headers |
107 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
108 |
- !<sys-apps/portage-2.1.2 |
109 |
- selinux? ( sys-libs/libselinux )" |
110 |
-RDEPEND="!sys-kernel/ps3-sources |
111 |
- selinux? ( sys-libs/libselinux )" |
112 |
- |
113 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
114 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
115 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
116 |
-else |
117 |
- DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c" |
118 |
- RDEPEND="${RDEPEND} sys-libs/timezone-data" |
119 |
-fi |
120 |
- |
121 |
-SRC_URI=$( |
122 |
- upstream_uris() { |
123 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
124 |
- } |
125 |
- gentoo_uris() { |
126 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
127 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
128 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
129 |
- } |
130 |
- |
131 |
- TARNAME=${PN} |
132 |
- if [[ -n ${SNAP_VER} ]] ; then |
133 |
- TARNAME="${PN}-${RELEASE_VER}" |
134 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
135 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
136 |
- else |
137 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
138 |
- fi |
139 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
140 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
141 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
142 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
143 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
144 |
-) |
145 |
- |
146 |
-# eblit-include [--skip] <function> [version] |
147 |
-eblit-include() { |
148 |
- local skipable=false |
149 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
150 |
- [[ $1 == pkg_* ]] && skipable=true |
151 |
- |
152 |
- local e v func=$1 ver=$2 |
153 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
154 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
155 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
156 |
- if [[ -e ${e} ]] ; then |
157 |
- source "${e}" |
158 |
- return 0 |
159 |
- fi |
160 |
- done |
161 |
- ${skipable} && return 0 |
162 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
163 |
-} |
164 |
- |
165 |
-# eblit-run-maybe <function> |
166 |
-# run the specified function if it is defined |
167 |
-eblit-run-maybe() { |
168 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
169 |
-} |
170 |
- |
171 |
-# eblit-run <function> [version] |
172 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
173 |
-eblit-run() { |
174 |
- eblit-include --skip common "${*:2}" |
175 |
- eblit-include "$@" |
176 |
- eblit-run-maybe eblit-$1-pre |
177 |
- eblit-${PN}-$1 |
178 |
- eblit-run-maybe eblit-$1-post |
179 |
-} |
180 |
- |
181 |
-src_unpack() { eblit-run src_unpack ; } |
182 |
-src_compile() { eblit-run src_compile ; } |
183 |
-src_test() { eblit-run src_test ; } |
184 |
-src_install() { eblit-run src_install ; } |
185 |
- |
186 |
-# FILESDIR might not be available during binpkg install |
187 |
-for x in setup {pre,post}inst ; do |
188 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
189 |
- if [[ -e ${e} ]] ; then |
190 |
- . "${e}" |
191 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
192 |
- fi |
193 |
-done |
194 |
- |
195 |
-eblit-src_unpack-post() { |
196 |
- if use hardened ; then |
197 |
- cd "${S}" |
198 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
199 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch |
200 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
201 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
202 |
- |
203 |
- einfo "Patching Glibc to support older SSP __guard" |
204 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-ssp-compat.patch |
205 |
- |
206 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
207 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
208 |
- debug/stack_chk_fail.c || die |
209 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
210 |
- debug/chk_fail.c || die |
211 |
- |
212 |
- if use debug ; then |
213 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
214 |
- # analysis - debug only, as core could be an information leak |
215 |
- # (paranoia). |
216 |
- sed -i \ |
217 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
218 |
- debug/Makefile \ |
219 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
220 |
- sed -i \ |
221 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
222 |
- debug/Makefile \ |
223 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
224 |
- fi |
225 |
- |
226 |
- # Build nscd with ssp-all |
227 |
- sed -i \ |
228 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
229 |
- nscd/Makefile \ |
230 |
- || die "Failed to ensure nscd builds with ssp-all" |
231 |
- fi |
232 |
-} |
233 |
|
234 |
diff --git a/sys-libs/glibc/glibc-2.11.3.ebuild b/sys-libs/glibc/glibc-2.11.3.ebuild |
235 |
deleted file mode 100644 |
236 |
index 0e98826..0000000 |
237 |
--- a/sys-libs/glibc/glibc-2.11.3.ebuild |
238 |
+++ /dev/null |
239 |
@@ -1,206 +0,0 @@ |
240 |
-# Copyright 1999-2013 Gentoo Foundation |
241 |
-# Distributed under the terms of the GNU General Public License v2 |
242 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.11.3.ebuild,v 1.21 2013/04/05 00:25:16 vapier Exp $ |
243 |
- |
244 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
245 |
- |
246 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
247 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
248 |
- |
249 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
250 |
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 sh sparc x86" |
251 |
-RESTRICT="strip" # strip ourself #46186 |
252 |
-EMULTILIB_PKG="true" |
253 |
- |
254 |
-# Configuration variables |
255 |
-if [[ ${PV} == *_p* ]] ; then |
256 |
-RELEASE_VER=${PV%_p*} |
257 |
-BRANCH_UPDATE="" |
258 |
-SNAP_VER=${PV#*_p} |
259 |
-else |
260 |
-RELEASE_VER=${PV} |
261 |
-BRANCH_UPDATE="" |
262 |
-SNAP_VER="" |
263 |
-fi |
264 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
265 |
-PATCH_VER="3" # Gentoo patchset |
266 |
-PORTS_VER=${RELEASE_VER%.?} # version of glibc ports addon |
267 |
-LT_VER="" # version of linuxthreads addon |
268 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
269 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
270 |
- |
271 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
272 |
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
273 |
- |
274 |
-# Here's how the cross-compile logic breaks down ... |
275 |
-# CTARGET - machine that will target the binaries |
276 |
-# CHOST - machine that will host the binaries |
277 |
-# CBUILD - machine that will build the binaries |
278 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
279 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
280 |
-# CBUILD = CHOST = CTARGET - native build/install |
281 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
282 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
283 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
284 |
-# For install paths: |
285 |
-# CHOST = CTARGET - install into / |
286 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
287 |
- |
288 |
-export CBUILD=${CBUILD:-${CHOST}} |
289 |
-export CTARGET=${CTARGET:-${CHOST}} |
290 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
291 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
292 |
- export CTARGET=${CATEGORY#cross-} |
293 |
- fi |
294 |
-fi |
295 |
- |
296 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
297 |
- |
298 |
-is_crosscompile() { |
299 |
- [[ ${CHOST} != ${CTARGET} ]] |
300 |
-} |
301 |
- |
302 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
303 |
-# Everyone knows 2.2 > 0, duh. |
304 |
-SLOT="2.2" |
305 |
- |
306 |
-# General: We need a new-enough binutils for as-needed |
307 |
-# arch: we need to make sure our binutils/gcc supports TLS |
308 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
309 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
310 |
- x86? ( >=sys-devel/gcc-4.3 ) |
311 |
- amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
312 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
313 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
314 |
- >=sys-devel/binutils-2.15.94 |
315 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
316 |
- >=app-misc/pax-utils-0.1.10 |
317 |
- virtual/os-headers |
318 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
319 |
- !<sys-apps/portage-2.1.2 |
320 |
- selinux? ( sys-libs/libselinux )" |
321 |
-RDEPEND="!sys-kernel/ps3-sources |
322 |
- selinux? ( sys-libs/libselinux )" |
323 |
- |
324 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
325 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
326 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
327 |
-else |
328 |
- DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
329 |
- RDEPEND="${RDEPEND} |
330 |
- vanilla? ( !sys-libs/timezone-data ) |
331 |
- !vanilla? ( sys-libs/timezone-data )" |
332 |
-fi |
333 |
- |
334 |
-SRC_URI=$( |
335 |
- upstream_uris() { |
336 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
337 |
- } |
338 |
- gentoo_uris() { |
339 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
340 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
341 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
342 |
- } |
343 |
- |
344 |
- TARNAME=${PN} |
345 |
- if [[ -n ${SNAP_VER} ]] ; then |
346 |
- TARNAME="${PN}-${RELEASE_VER}" |
347 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
348 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
349 |
- else |
350 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
351 |
- fi |
352 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
353 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
354 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
355 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
356 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
357 |
-) |
358 |
- |
359 |
-# eblit-include [--skip] <function> [version] |
360 |
-eblit-include() { |
361 |
- local skipable=false |
362 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
363 |
- [[ $1 == pkg_* ]] && skipable=true |
364 |
- |
365 |
- local e v func=$1 ver=$2 |
366 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
367 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
368 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
369 |
- if [[ -e ${e} ]] ; then |
370 |
- source "${e}" |
371 |
- return 0 |
372 |
- fi |
373 |
- done |
374 |
- ${skipable} && return 0 |
375 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
376 |
-} |
377 |
- |
378 |
-# eblit-run-maybe <function> |
379 |
-# run the specified function if it is defined |
380 |
-eblit-run-maybe() { |
381 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
382 |
-} |
383 |
- |
384 |
-# eblit-run <function> [version] |
385 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
386 |
-eblit-run() { |
387 |
- eblit-include --skip common "${*:2}" |
388 |
- eblit-include "$@" |
389 |
- eblit-run-maybe eblit-$1-pre |
390 |
- eblit-${PN}-$1 |
391 |
- eblit-run-maybe eblit-$1-post |
392 |
-} |
393 |
- |
394 |
-src_unpack() { eblit-run src_unpack ; } |
395 |
-src_compile() { eblit-run src_compile ; } |
396 |
-src_test() { eblit-run src_test ; } |
397 |
-src_install() { eblit-run src_install ; } |
398 |
- |
399 |
-# FILESDIR might not be available during binpkg install |
400 |
-for x in setup {pre,post}inst ; do |
401 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
402 |
- if [[ -e ${e} ]] ; then |
403 |
- . "${e}" |
404 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
405 |
- fi |
406 |
-done |
407 |
- |
408 |
-eblit-src_unpack-post() { |
409 |
- if use hardened ; then |
410 |
- cd "${S}" |
411 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
412 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.11/glibc-2.11-hardened-pie.patch |
413 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
414 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
415 |
- |
416 |
- einfo "Patching Glibc to support older SSP __guard" |
417 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-ssp-compat.patch |
418 |
- |
419 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
420 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
421 |
- debug/stack_chk_fail.c || die |
422 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
423 |
- debug/chk_fail.c || die |
424 |
- |
425 |
- if use debug ; then |
426 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
427 |
- # analysis - debug only, as core could be an information leak |
428 |
- # (paranoia). |
429 |
- sed -i \ |
430 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
431 |
- debug/Makefile \ |
432 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
433 |
- sed -i \ |
434 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
435 |
- debug/Makefile \ |
436 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
437 |
- fi |
438 |
- |
439 |
- # Build nscd with ssp-all |
440 |
- sed -i \ |
441 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
442 |
- nscd/Makefile \ |
443 |
- || die "Failed to ensure nscd builds with ssp-all" |
444 |
- fi |
445 |
-} |
446 |
|
447 |
diff --git a/sys-libs/glibc/glibc-2.12.1-r3.ebuild b/sys-libs/glibc/glibc-2.12.1-r3.ebuild |
448 |
deleted file mode 100644 |
449 |
index 0c5ad4b..0000000 |
450 |
--- a/sys-libs/glibc/glibc-2.12.1-r3.ebuild |
451 |
+++ /dev/null |
452 |
@@ -1,220 +0,0 @@ |
453 |
-# Copyright 1999-2013 Gentoo Foundation |
454 |
-# Distributed under the terms of the GNU General Public License v2 |
455 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.12.1-r3.ebuild,v 1.18 2013/04/05 00:25:16 vapier Exp $ |
456 |
- |
457 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
458 |
- |
459 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
460 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
461 |
- |
462 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
463 |
-KEYWORDS="~amd64 ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
464 |
-RESTRICT="strip" # strip ourself #46186 |
465 |
-EMULTILIB_PKG="true" |
466 |
- |
467 |
-# Configuration variables |
468 |
-if [[ ${PV} == *_p* ]] ; then |
469 |
-RELEASE_VER=${PV%_p*} |
470 |
-BRANCH_UPDATE="" |
471 |
-SNAP_VER=${PV#*_p} |
472 |
-else |
473 |
-RELEASE_VER=${PV} |
474 |
-BRANCH_UPDATE="" |
475 |
-SNAP_VER="" |
476 |
-fi |
477 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
478 |
-PATCH_VER="8" # Gentoo patchset |
479 |
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
480 |
-LT_VER="" # version of linuxthreads addon |
481 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
482 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
483 |
- |
484 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
485 |
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
486 |
- |
487 |
-# Here's how the cross-compile logic breaks down ... |
488 |
-# CTARGET - machine that will target the binaries |
489 |
-# CHOST - machine that will host the binaries |
490 |
-# CBUILD - machine that will build the binaries |
491 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
492 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
493 |
-# CBUILD = CHOST = CTARGET - native build/install |
494 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
495 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
496 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
497 |
-# For install paths: |
498 |
-# CHOST = CTARGET - install into / |
499 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
500 |
- |
501 |
-export CBUILD=${CBUILD:-${CHOST}} |
502 |
-export CTARGET=${CTARGET:-${CHOST}} |
503 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
504 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
505 |
- export CTARGET=${CATEGORY#cross-} |
506 |
- fi |
507 |
-fi |
508 |
- |
509 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
510 |
- |
511 |
-is_crosscompile() { |
512 |
- [[ ${CHOST} != ${CTARGET} ]] |
513 |
-} |
514 |
- |
515 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
516 |
-# Everyone knows 2.2 > 0, duh. |
517 |
-SLOT="2.2" |
518 |
- |
519 |
-# General: We need a new-enough binutils for as-needed |
520 |
-# arch: we need to make sure our binutils/gcc supports TLS |
521 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
522 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
523 |
- x86? ( >=sys-devel/gcc-4.3 ) |
524 |
- amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
525 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
526 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
527 |
- >=sys-devel/binutils-2.15.94 |
528 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
529 |
- >=app-misc/pax-utils-0.1.10 |
530 |
- virtual/os-headers |
531 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
532 |
- !<sys-apps/portage-2.1.2 |
533 |
- selinux? ( sys-libs/libselinux )" |
534 |
-RDEPEND="!sys-kernel/ps3-sources |
535 |
- selinux? ( sys-libs/libselinux )" |
536 |
- |
537 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
538 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
539 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
540 |
-else |
541 |
- DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
542 |
- RDEPEND="${RDEPEND} |
543 |
- vanilla? ( !sys-libs/timezone-data ) |
544 |
- !vanilla? ( sys-libs/timezone-data )" |
545 |
-fi |
546 |
- |
547 |
-SRC_URI=$( |
548 |
- upstream_uris() { |
549 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
550 |
- } |
551 |
- gentoo_uris() { |
552 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
553 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
554 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
555 |
- } |
556 |
- |
557 |
- TARNAME=${PN} |
558 |
- if [[ -n ${SNAP_VER} ]] ; then |
559 |
- TARNAME="${PN}-${RELEASE_VER}" |
560 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
561 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
562 |
- else |
563 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
564 |
- fi |
565 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
566 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
567 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
568 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
569 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
570 |
-) |
571 |
- |
572 |
-# eblit-include [--skip] <function> [version] |
573 |
-eblit-include() { |
574 |
- local skipable=false |
575 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
576 |
- [[ $1 == pkg_* ]] && skipable=true |
577 |
- |
578 |
- local e v func=$1 ver=$2 |
579 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
580 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
581 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
582 |
- if [[ -e ${e} ]] ; then |
583 |
- source "${e}" |
584 |
- return 0 |
585 |
- fi |
586 |
- done |
587 |
- ${skipable} && return 0 |
588 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
589 |
-} |
590 |
- |
591 |
-# eblit-run-maybe <function> |
592 |
-# run the specified function if it is defined |
593 |
-eblit-run-maybe() { |
594 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
595 |
-} |
596 |
- |
597 |
-# eblit-run <function> [version] |
598 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
599 |
-eblit-run() { |
600 |
- eblit-include --skip common "${*:2}" |
601 |
- eblit-include "$@" |
602 |
- eblit-run-maybe eblit-$1-pre |
603 |
- eblit-${PN}-$1 |
604 |
- eblit-run-maybe eblit-$1-post |
605 |
-} |
606 |
- |
607 |
-src_unpack() { eblit-run src_unpack ; } |
608 |
-src_compile() { eblit-run src_compile ; } |
609 |
-src_test() { eblit-run src_test ; } |
610 |
-src_install() { eblit-run src_install ; } |
611 |
- |
612 |
-# FILESDIR might not be available during binpkg install |
613 |
-for x in setup {pre,post}inst ; do |
614 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
615 |
- if [[ -e ${e} ]] ; then |
616 |
- . "${e}" |
617 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
618 |
- fi |
619 |
-done |
620 |
- |
621 |
-pkg_setup() { |
622 |
- eblit-run pkg_setup |
623 |
- |
624 |
- # Static binary sanity check #332927 |
625 |
- if [[ ${ROOT} == "/" ]] && \ |
626 |
- has_version "<${CATEGORY}/${P}" && \ |
627 |
- built_with_use sys-apps/coreutils static |
628 |
- then |
629 |
- eerror "Please rebuild coreutils with USE=-static, then install" |
630 |
- eerror "glibc, then you may rebuild coreutils with USE=static." |
631 |
- die "Avoiding system meltdown #332927" |
632 |
- fi |
633 |
-} |
634 |
- |
635 |
-eblit-src_unpack-post() { |
636 |
- if use hardened ; then |
637 |
- cd "${S}" |
638 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
639 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch |
640 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
641 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
642 |
- |
643 |
- einfo "Patching Glibc to support older SSP __guard" |
644 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-ssp-compat.patch |
645 |
- |
646 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
647 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
648 |
- debug/stack_chk_fail.c || die |
649 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
650 |
- debug/chk_fail.c || die |
651 |
- |
652 |
- if use debug ; then |
653 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
654 |
- # analysis - debug only, as core could be an information leak |
655 |
- # (paranoia). |
656 |
- sed -i \ |
657 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
658 |
- debug/Makefile \ |
659 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
660 |
- sed -i \ |
661 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
662 |
- debug/Makefile \ |
663 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
664 |
- fi |
665 |
- |
666 |
- # Build nscd with ssp-all |
667 |
- sed -i \ |
668 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
669 |
- nscd/Makefile \ |
670 |
- || die "Failed to ensure nscd builds with ssp-all" |
671 |
- fi |
672 |
-} |
673 |
|
674 |
diff --git a/sys-libs/glibc/glibc-2.12.2.ebuild b/sys-libs/glibc/glibc-2.12.2.ebuild |
675 |
deleted file mode 100644 |
676 |
index 68a1dd3..0000000 |
677 |
--- a/sys-libs/glibc/glibc-2.12.2.ebuild |
678 |
+++ /dev/null |
679 |
@@ -1,220 +0,0 @@ |
680 |
-# Copyright 1999-2013 Gentoo Foundation |
681 |
-# Distributed under the terms of the GNU General Public License v2 |
682 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.12.2.ebuild,v 1.24 2013/04/05 00:25:16 vapier Exp $ |
683 |
- |
684 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
685 |
- |
686 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
687 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
688 |
- |
689 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
690 |
-KEYWORDS="amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86" |
691 |
-RESTRICT="strip" # strip ourself #46186 |
692 |
-EMULTILIB_PKG="true" |
693 |
- |
694 |
-# Configuration variables |
695 |
-if [[ ${PV} == *_p* ]] ; then |
696 |
-RELEASE_VER=${PV%_p*} |
697 |
-BRANCH_UPDATE="" |
698 |
-SNAP_VER=${PV#*_p} |
699 |
-else |
700 |
-RELEASE_VER=${PV} |
701 |
-BRANCH_UPDATE="" |
702 |
-SNAP_VER="" |
703 |
-fi |
704 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
705 |
-PATCH_VER="4" # Gentoo patchset |
706 |
-PORTS_VER="2.12.1" # version of glibc ports addon |
707 |
-LT_VER="" # version of linuxthreads addon |
708 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
709 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
710 |
- |
711 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
712 |
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
713 |
- |
714 |
-# Here's how the cross-compile logic breaks down ... |
715 |
-# CTARGET - machine that will target the binaries |
716 |
-# CHOST - machine that will host the binaries |
717 |
-# CBUILD - machine that will build the binaries |
718 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
719 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
720 |
-# CBUILD = CHOST = CTARGET - native build/install |
721 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
722 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
723 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
724 |
-# For install paths: |
725 |
-# CHOST = CTARGET - install into / |
726 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
727 |
- |
728 |
-export CBUILD=${CBUILD:-${CHOST}} |
729 |
-export CTARGET=${CTARGET:-${CHOST}} |
730 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
731 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
732 |
- export CTARGET=${CATEGORY#cross-} |
733 |
- fi |
734 |
-fi |
735 |
- |
736 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
737 |
- |
738 |
-is_crosscompile() { |
739 |
- [[ ${CHOST} != ${CTARGET} ]] |
740 |
-} |
741 |
- |
742 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
743 |
-# Everyone knows 2.2 > 0, duh. |
744 |
-SLOT="2.2" |
745 |
- |
746 |
-# General: We need a new-enough binutils for as-needed |
747 |
-# arch: we need to make sure our binutils/gcc supports TLS |
748 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
749 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
750 |
- x86? ( >=sys-devel/gcc-4.3 ) |
751 |
- amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
752 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
753 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
754 |
- >=sys-devel/binutils-2.15.94 |
755 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
756 |
- >=app-misc/pax-utils-0.1.10 |
757 |
- virtual/os-headers |
758 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
759 |
- !<sys-apps/portage-2.1.2 |
760 |
- selinux? ( sys-libs/libselinux )" |
761 |
-RDEPEND="!sys-kernel/ps3-sources |
762 |
- selinux? ( sys-libs/libselinux )" |
763 |
- |
764 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
765 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
766 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
767 |
-else |
768 |
- DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
769 |
- RDEPEND="${RDEPEND} |
770 |
- vanilla? ( !sys-libs/timezone-data ) |
771 |
- !vanilla? ( sys-libs/timezone-data )" |
772 |
-fi |
773 |
- |
774 |
-SRC_URI=$( |
775 |
- upstream_uris() { |
776 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
777 |
- } |
778 |
- gentoo_uris() { |
779 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
780 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
781 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
782 |
- } |
783 |
- |
784 |
- TARNAME=${PN} |
785 |
- if [[ -n ${SNAP_VER} ]] ; then |
786 |
- TARNAME="${PN}-${RELEASE_VER}" |
787 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
788 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
789 |
- else |
790 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
791 |
- fi |
792 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
793 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
794 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
795 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
796 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
797 |
-) |
798 |
- |
799 |
-# eblit-include [--skip] <function> [version] |
800 |
-eblit-include() { |
801 |
- local skipable=false |
802 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
803 |
- [[ $1 == pkg_* ]] && skipable=true |
804 |
- |
805 |
- local e v func=$1 ver=$2 |
806 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
807 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
808 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
809 |
- if [[ -e ${e} ]] ; then |
810 |
- source "${e}" |
811 |
- return 0 |
812 |
- fi |
813 |
- done |
814 |
- ${skipable} && return 0 |
815 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
816 |
-} |
817 |
- |
818 |
-# eblit-run-maybe <function> |
819 |
-# run the specified function if it is defined |
820 |
-eblit-run-maybe() { |
821 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
822 |
-} |
823 |
- |
824 |
-# eblit-run <function> [version] |
825 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
826 |
-eblit-run() { |
827 |
- eblit-include --skip common "${*:2}" |
828 |
- eblit-include "$@" |
829 |
- eblit-run-maybe eblit-$1-pre |
830 |
- eblit-${PN}-$1 |
831 |
- eblit-run-maybe eblit-$1-post |
832 |
-} |
833 |
- |
834 |
-src_unpack() { eblit-run src_unpack ; } |
835 |
-src_compile() { eblit-run src_compile ; } |
836 |
-src_test() { eblit-run src_test ; } |
837 |
-src_install() { eblit-run src_install ; } |
838 |
- |
839 |
-# FILESDIR might not be available during binpkg install |
840 |
-for x in setup {pre,post}inst ; do |
841 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
842 |
- if [[ -e ${e} ]] ; then |
843 |
- . "${e}" |
844 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
845 |
- fi |
846 |
-done |
847 |
- |
848 |
-pkg_setup() { |
849 |
- eblit-run pkg_setup |
850 |
- |
851 |
- # Static binary sanity check #332927 |
852 |
- if [[ ${ROOT} == "/" ]] && \ |
853 |
- has_version "<${CATEGORY}/${P}" && \ |
854 |
- built_with_use sys-apps/coreutils static |
855 |
- then |
856 |
- eerror "Please rebuild coreutils with USE=-static, then install" |
857 |
- eerror "glibc, then you may rebuild coreutils with USE=static." |
858 |
- die "Avoiding system meltdown #332927" |
859 |
- fi |
860 |
-} |
861 |
- |
862 |
-eblit-src_unpack-post() { |
863 |
- if use hardened ; then |
864 |
- cd "${S}" |
865 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
866 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch |
867 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
868 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
869 |
- |
870 |
- einfo "Patching Glibc to support older SSP __guard" |
871 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-ssp-compat.patch |
872 |
- |
873 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
874 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
875 |
- debug/stack_chk_fail.c || die |
876 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
877 |
- debug/chk_fail.c || die |
878 |
- |
879 |
- if use debug ; then |
880 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
881 |
- # analysis - debug only, as core could be an information leak |
882 |
- # (paranoia). |
883 |
- sed -i \ |
884 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
885 |
- debug/Makefile \ |
886 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
887 |
- sed -i \ |
888 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
889 |
- debug/Makefile \ |
890 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
891 |
- fi |
892 |
- |
893 |
- # Build nscd with ssp-all |
894 |
- sed -i \ |
895 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
896 |
- nscd/Makefile \ |
897 |
- || die "Failed to ensure nscd builds with ssp-all" |
898 |
- fi |
899 |
-} |
900 |
|
901 |
diff --git a/sys-libs/glibc/glibc-2.13-r2.ebuild b/sys-libs/glibc/glibc-2.13-r2.ebuild |
902 |
deleted file mode 100644 |
903 |
index 6606439..0000000 |
904 |
--- a/sys-libs/glibc/glibc-2.13-r2.ebuild |
905 |
+++ /dev/null |
906 |
@@ -1,218 +0,0 @@ |
907 |
-# Copyright 1999-2013 Gentoo Foundation |
908 |
-# Distributed under the terms of the GNU General Public License v2 |
909 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.13-r2.ebuild,v 1.19 2013/04/05 00:25:16 vapier Exp $ |
910 |
- |
911 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
912 |
- |
913 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
914 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
915 |
- |
916 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
917 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
918 |
-RESTRICT="strip" # strip ourself #46186 |
919 |
-EMULTILIB_PKG="true" |
920 |
- |
921 |
-# Configuration variables |
922 |
-if [[ ${PV} == *_p* ]] ; then |
923 |
-RELEASE_VER=${PV%_p*} |
924 |
-BRANCH_UPDATE="" |
925 |
-SNAP_VER=${PV#*_p} |
926 |
-else |
927 |
-RELEASE_VER=${PV} |
928 |
-BRANCH_UPDATE="" |
929 |
-SNAP_VER="" |
930 |
-fi |
931 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
932 |
-PATCH_VER="6" # Gentoo patchset |
933 |
-PORTS_VER="2.13" # version of glibc ports addon |
934 |
-LT_VER="" # version of linuxthreads addon |
935 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
936 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
937 |
- |
938 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
939 |
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
940 |
- |
941 |
-# Here's how the cross-compile logic breaks down ... |
942 |
-# CTARGET - machine that will target the binaries |
943 |
-# CHOST - machine that will host the binaries |
944 |
-# CBUILD - machine that will build the binaries |
945 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
946 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
947 |
-# CBUILD = CHOST = CTARGET - native build/install |
948 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
949 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
950 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
951 |
-# For install paths: |
952 |
-# CHOST = CTARGET - install into / |
953 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
954 |
- |
955 |
-export CBUILD=${CBUILD:-${CHOST}} |
956 |
-export CTARGET=${CTARGET:-${CHOST}} |
957 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
958 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
959 |
- export CTARGET=${CATEGORY#cross-} |
960 |
- fi |
961 |
-fi |
962 |
- |
963 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
964 |
- |
965 |
-is_crosscompile() { |
966 |
- [[ ${CHOST} != ${CTARGET} ]] |
967 |
-} |
968 |
- |
969 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
970 |
-# Everyone knows 2.2 > 0, duh. |
971 |
-SLOT="2.2" |
972 |
- |
973 |
-# General: We need a new-enough binutils for as-needed |
974 |
-# arch: we need to make sure our binutils/gcc supports TLS |
975 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
976 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
977 |
- x86? ( >=sys-devel/gcc-4.3 ) |
978 |
- amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
979 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
980 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
981 |
- >=sys-devel/binutils-2.15.94 |
982 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
983 |
- >=app-misc/pax-utils-0.1.10 |
984 |
- virtual/os-headers |
985 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
986 |
- !<sys-apps/portage-2.1.2 |
987 |
- !<sys-devel/patch-2.6 |
988 |
- selinux? ( sys-libs/libselinux )" |
989 |
-RDEPEND="!sys-kernel/ps3-sources |
990 |
- selinux? ( sys-libs/libselinux )" |
991 |
- |
992 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
993 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
994 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
995 |
-else |
996 |
- DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
997 |
- RDEPEND="${RDEPEND} |
998 |
- vanilla? ( !sys-libs/timezone-data ) |
999 |
- !vanilla? ( sys-libs/timezone-data )" |
1000 |
-fi |
1001 |
- |
1002 |
-SRC_URI=$( |
1003 |
- upstream_uris() { |
1004 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
1005 |
- } |
1006 |
- gentoo_uris() { |
1007 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
1008 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
1009 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
1010 |
- } |
1011 |
- |
1012 |
- TARNAME=${PN} |
1013 |
- if [[ -n ${SNAP_VER} ]] ; then |
1014 |
- TARNAME="${PN}-${RELEASE_VER}" |
1015 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
1016 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
1017 |
- else |
1018 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
1019 |
- fi |
1020 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
1021 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
1022 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
1023 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
1024 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
1025 |
-) |
1026 |
- |
1027 |
-# eblit-include [--skip] <function> [version] |
1028 |
-eblit-include() { |
1029 |
- local skipable=false |
1030 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
1031 |
- [[ $1 == pkg_* ]] && skipable=true |
1032 |
- |
1033 |
- local e v func=$1 ver=$2 |
1034 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
1035 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
1036 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
1037 |
- if [[ -e ${e} ]] ; then |
1038 |
- source "${e}" |
1039 |
- return 0 |
1040 |
- fi |
1041 |
- done |
1042 |
- ${skipable} && return 0 |
1043 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
1044 |
-} |
1045 |
- |
1046 |
-# eblit-run-maybe <function> |
1047 |
-# run the specified function if it is defined |
1048 |
-eblit-run-maybe() { |
1049 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
1050 |
-} |
1051 |
- |
1052 |
-# eblit-run <function> [version] |
1053 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
1054 |
-eblit-run() { |
1055 |
- eblit-include --skip common "${*:2}" |
1056 |
- eblit-include "$@" |
1057 |
- eblit-run-maybe eblit-$1-pre |
1058 |
- eblit-${PN}-$1 |
1059 |
- eblit-run-maybe eblit-$1-post |
1060 |
-} |
1061 |
- |
1062 |
-src_unpack() { eblit-run src_unpack ; } |
1063 |
-src_compile() { eblit-run src_compile ; } |
1064 |
-src_test() { eblit-run src_test ; } |
1065 |
-src_install() { eblit-run src_install ; } |
1066 |
- |
1067 |
-# FILESDIR might not be available during binpkg install |
1068 |
-for x in setup {pre,post}inst ; do |
1069 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
1070 |
- if [[ -e ${e} ]] ; then |
1071 |
- . "${e}" |
1072 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
1073 |
- fi |
1074 |
-done |
1075 |
- |
1076 |
-pkg_setup() { |
1077 |
- eblit-run pkg_setup |
1078 |
- |
1079 |
- # Static binary sanity check #332927 |
1080 |
- if [[ ${ROOT} == "/" ]] && \ |
1081 |
- has_version "<${CATEGORY}/${P}" && \ |
1082 |
- built_with_use sys-apps/coreutils static |
1083 |
- then |
1084 |
- eerror "Please rebuild coreutils with USE=-static, then install" |
1085 |
- eerror "glibc, then you may rebuild coreutils with USE=static." |
1086 |
- die "Avoiding system meltdown #332927" |
1087 |
- fi |
1088 |
-} |
1089 |
- |
1090 |
-eblit-src_unpack-post() { |
1091 |
- if use hardened ; then |
1092 |
- cd "${S}" |
1093 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
1094 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch |
1095 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
1096 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
1097 |
- |
1098 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
1099 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
1100 |
- debug/stack_chk_fail.c || die |
1101 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
1102 |
- debug/chk_fail.c || die |
1103 |
- |
1104 |
- if use debug ; then |
1105 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
1106 |
- # analysis - debug only, as core could be an information leak |
1107 |
- # (paranoia). |
1108 |
- sed -i \ |
1109 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
1110 |
- debug/Makefile \ |
1111 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
1112 |
- sed -i \ |
1113 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
1114 |
- debug/Makefile \ |
1115 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
1116 |
- fi |
1117 |
- |
1118 |
- # Build nscd with ssp-all |
1119 |
- sed -i \ |
1120 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
1121 |
- nscd/Makefile \ |
1122 |
- || die "Failed to ensure nscd builds with ssp-all" |
1123 |
- fi |
1124 |
-} |
1125 |
|
1126 |
diff --git a/sys-libs/glibc/glibc-2.13-r4.ebuild b/sys-libs/glibc/glibc-2.13-r4.ebuild |
1127 |
deleted file mode 100644 |
1128 |
index de21baf..0000000 |
1129 |
--- a/sys-libs/glibc/glibc-2.13-r4.ebuild |
1130 |
+++ /dev/null |
1131 |
@@ -1,218 +0,0 @@ |
1132 |
-# Copyright 1999-2013 Gentoo Foundation |
1133 |
-# Distributed under the terms of the GNU General Public License v2 |
1134 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.13-r4.ebuild,v 1.24 2013/04/05 00:25:16 vapier Exp $ |
1135 |
- |
1136 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
1137 |
- |
1138 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
1139 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
1140 |
- |
1141 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
1142 |
-KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86" |
1143 |
-RESTRICT="strip" # strip ourself #46186 |
1144 |
-EMULTILIB_PKG="true" |
1145 |
- |
1146 |
-# Configuration variables |
1147 |
-if [[ ${PV} == *_p* ]] ; then |
1148 |
-RELEASE_VER=${PV%_p*} |
1149 |
-BRANCH_UPDATE="" |
1150 |
-SNAP_VER=${PV#*_p} |
1151 |
-else |
1152 |
-RELEASE_VER=${PV} |
1153 |
-BRANCH_UPDATE="" |
1154 |
-SNAP_VER="" |
1155 |
-fi |
1156 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
1157 |
-PATCH_VER="11" # Gentoo patchset |
1158 |
-PORTS_VER="2.13" # version of glibc ports addon |
1159 |
-LT_VER="" # version of linuxthreads addon |
1160 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
1161 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
1162 |
- |
1163 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
1164 |
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
1165 |
- |
1166 |
-# Here's how the cross-compile logic breaks down ... |
1167 |
-# CTARGET - machine that will target the binaries |
1168 |
-# CHOST - machine that will host the binaries |
1169 |
-# CBUILD - machine that will build the binaries |
1170 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
1171 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
1172 |
-# CBUILD = CHOST = CTARGET - native build/install |
1173 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
1174 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
1175 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
1176 |
-# For install paths: |
1177 |
-# CHOST = CTARGET - install into / |
1178 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
1179 |
- |
1180 |
-export CBUILD=${CBUILD:-${CHOST}} |
1181 |
-export CTARGET=${CTARGET:-${CHOST}} |
1182 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
1183 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
1184 |
- export CTARGET=${CATEGORY#cross-} |
1185 |
- fi |
1186 |
-fi |
1187 |
- |
1188 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
1189 |
- |
1190 |
-is_crosscompile() { |
1191 |
- [[ ${CHOST} != ${CTARGET} ]] |
1192 |
-} |
1193 |
- |
1194 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
1195 |
-# Everyone knows 2.2 > 0, duh. |
1196 |
-SLOT="2.2" |
1197 |
- |
1198 |
-# General: We need a new-enough binutils for as-needed |
1199 |
-# arch: we need to make sure our binutils/gcc supports TLS |
1200 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
1201 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
1202 |
- x86? ( >=sys-devel/gcc-4.3 ) |
1203 |
- amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
1204 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
1205 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
1206 |
- >=sys-devel/binutils-2.15.94 |
1207 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
1208 |
- >=app-misc/pax-utils-0.1.10 |
1209 |
- virtual/os-headers |
1210 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
1211 |
- !<sys-apps/portage-2.1.2 |
1212 |
- !<sys-devel/patch-2.6 |
1213 |
- selinux? ( sys-libs/libselinux )" |
1214 |
-RDEPEND="!sys-kernel/ps3-sources |
1215 |
- selinux? ( sys-libs/libselinux )" |
1216 |
- |
1217 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
1218 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
1219 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
1220 |
-else |
1221 |
- DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
1222 |
- RDEPEND="${RDEPEND} |
1223 |
- vanilla? ( !sys-libs/timezone-data ) |
1224 |
- !vanilla? ( sys-libs/timezone-data )" |
1225 |
-fi |
1226 |
- |
1227 |
-SRC_URI=$( |
1228 |
- upstream_uris() { |
1229 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
1230 |
- } |
1231 |
- gentoo_uris() { |
1232 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
1233 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
1234 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
1235 |
- } |
1236 |
- |
1237 |
- TARNAME=${PN} |
1238 |
- if [[ -n ${SNAP_VER} ]] ; then |
1239 |
- TARNAME="${PN}-${RELEASE_VER}" |
1240 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
1241 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
1242 |
- else |
1243 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
1244 |
- fi |
1245 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
1246 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
1247 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
1248 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
1249 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
1250 |
-) |
1251 |
- |
1252 |
-# eblit-include [--skip] <function> [version] |
1253 |
-eblit-include() { |
1254 |
- local skipable=false |
1255 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
1256 |
- [[ $1 == pkg_* ]] && skipable=true |
1257 |
- |
1258 |
- local e v func=$1 ver=$2 |
1259 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
1260 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
1261 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
1262 |
- if [[ -e ${e} ]] ; then |
1263 |
- source "${e}" |
1264 |
- return 0 |
1265 |
- fi |
1266 |
- done |
1267 |
- ${skipable} && return 0 |
1268 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
1269 |
-} |
1270 |
- |
1271 |
-# eblit-run-maybe <function> |
1272 |
-# run the specified function if it is defined |
1273 |
-eblit-run-maybe() { |
1274 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
1275 |
-} |
1276 |
- |
1277 |
-# eblit-run <function> [version] |
1278 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
1279 |
-eblit-run() { |
1280 |
- eblit-include --skip common "${*:2}" |
1281 |
- eblit-include "$@" |
1282 |
- eblit-run-maybe eblit-$1-pre |
1283 |
- eblit-${PN}-$1 |
1284 |
- eblit-run-maybe eblit-$1-post |
1285 |
-} |
1286 |
- |
1287 |
-src_unpack() { eblit-run src_unpack ; } |
1288 |
-src_compile() { eblit-run src_compile ; } |
1289 |
-src_test() { eblit-run src_test ; } |
1290 |
-src_install() { eblit-run src_install ; } |
1291 |
- |
1292 |
-# FILESDIR might not be available during binpkg install |
1293 |
-for x in setup {pre,post}inst ; do |
1294 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
1295 |
- if [[ -e ${e} ]] ; then |
1296 |
- . "${e}" |
1297 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
1298 |
- fi |
1299 |
-done |
1300 |
- |
1301 |
-pkg_setup() { |
1302 |
- eblit-run pkg_setup |
1303 |
- |
1304 |
- # Static binary sanity check #332927 |
1305 |
- if [[ ${ROOT} == "/" ]] && \ |
1306 |
- has_version "<${CATEGORY}/${P}" && \ |
1307 |
- built_with_use sys-apps/coreutils static |
1308 |
- then |
1309 |
- eerror "Please rebuild coreutils with USE=-static, then install" |
1310 |
- eerror "glibc, then you may rebuild coreutils with USE=static." |
1311 |
- die "Avoiding system meltdown #332927" |
1312 |
- fi |
1313 |
-} |
1314 |
- |
1315 |
-eblit-src_unpack-post() { |
1316 |
- if use hardened ; then |
1317 |
- cd "${S}" |
1318 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
1319 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch |
1320 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
1321 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
1322 |
- |
1323 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
1324 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
1325 |
- debug/stack_chk_fail.c || die |
1326 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
1327 |
- debug/chk_fail.c || die |
1328 |
- |
1329 |
- if use debug ; then |
1330 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
1331 |
- # analysis - debug only, as core could be an information leak |
1332 |
- # (paranoia). |
1333 |
- sed -i \ |
1334 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
1335 |
- debug/Makefile \ |
1336 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
1337 |
- sed -i \ |
1338 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
1339 |
- debug/Makefile \ |
1340 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
1341 |
- fi |
1342 |
- |
1343 |
- # Build nscd with ssp-all |
1344 |
- sed -i \ |
1345 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
1346 |
- nscd/Makefile \ |
1347 |
- || die "Failed to ensure nscd builds with ssp-all" |
1348 |
- fi |
1349 |
-} |
1350 |
|
1351 |
diff --git a/sys-libs/glibc/glibc-2.14.1-r2.ebuild b/sys-libs/glibc/glibc-2.14.1-r2.ebuild |
1352 |
deleted file mode 100644 |
1353 |
index e5ff431..0000000 |
1354 |
--- a/sys-libs/glibc/glibc-2.14.1-r2.ebuild |
1355 |
+++ /dev/null |
1356 |
@@ -1,246 +0,0 @@ |
1357 |
-# Copyright 1999-2013 Gentoo Foundation |
1358 |
-# Distributed under the terms of the GNU General Public License v2 |
1359 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.14.1-r2.ebuild,v 1.17 2013/04/05 00:25:16 vapier Exp $ |
1360 |
- |
1361 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
1362 |
- |
1363 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
1364 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
1365 |
- |
1366 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
1367 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
1368 |
-RESTRICT="strip" # strip ourself #46186 |
1369 |
-EMULTILIB_PKG="true" |
1370 |
- |
1371 |
-# Configuration variables |
1372 |
-RELEASE_VER="" |
1373 |
-BRANCH_UPDATE="" |
1374 |
-SNAP_VER="" |
1375 |
-case ${PV} in |
1376 |
-9999*) |
1377 |
- EGIT_REPO_URIS=( "git://sourceware.org/git/glibc.git" "git://sourceware.org/git/glibc-ports.git" ) |
1378 |
- EGIT_SOURCEDIRS=( "${S}" "${S}/ports" ) |
1379 |
- inherit git-2 |
1380 |
- ;; |
1381 |
-*_p*) |
1382 |
- RELEASE_VER=${PV%_p*} |
1383 |
- SNAP_VER=${PV#*_p} |
1384 |
- ;; |
1385 |
-*) |
1386 |
- RELEASE_VER=${PV} |
1387 |
- ;; |
1388 |
-esac |
1389 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
1390 |
-PATCH_VER="5" # Gentoo patchset |
1391 |
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
1392 |
-LT_VER="" # version of linuxthreads addon |
1393 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
1394 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
1395 |
- |
1396 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
1397 |
-[[ -n ${RELEASE_VER} ]] && S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
1398 |
- |
1399 |
-# Here's how the cross-compile logic breaks down ... |
1400 |
-# CTARGET - machine that will target the binaries |
1401 |
-# CHOST - machine that will host the binaries |
1402 |
-# CBUILD - machine that will build the binaries |
1403 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
1404 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
1405 |
-# CBUILD = CHOST = CTARGET - native build/install |
1406 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
1407 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
1408 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
1409 |
-# For install paths: |
1410 |
-# CHOST = CTARGET - install into / |
1411 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
1412 |
- |
1413 |
-export CBUILD=${CBUILD:-${CHOST}} |
1414 |
-export CTARGET=${CTARGET:-${CHOST}} |
1415 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
1416 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
1417 |
- export CTARGET=${CATEGORY#cross-} |
1418 |
- fi |
1419 |
-fi |
1420 |
- |
1421 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
1422 |
- |
1423 |
-is_crosscompile() { |
1424 |
- [[ ${CHOST} != ${CTARGET} ]] |
1425 |
-} |
1426 |
- |
1427 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
1428 |
-# Everyone knows 2.2 > 0, duh. |
1429 |
-SLOT="2.2" |
1430 |
- |
1431 |
-# General: We need a new-enough binutils for as-needed |
1432 |
-# arch: we need to make sure our binutils/gcc supports TLS |
1433 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
1434 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
1435 |
- x86? ( >=sys-devel/gcc-4.3 ) |
1436 |
- amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
1437 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
1438 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
1439 |
- >=sys-devel/binutils-2.15.94 |
1440 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
1441 |
- >=app-misc/pax-utils-0.1.10 |
1442 |
- virtual/os-headers |
1443 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
1444 |
- !<sys-apps/portage-2.1.2 |
1445 |
- !<sys-devel/patch-2.6 |
1446 |
- selinux? ( sys-libs/libselinux )" |
1447 |
-RDEPEND="!sys-kernel/ps3-sources |
1448 |
- selinux? ( sys-libs/libselinux )" |
1449 |
- |
1450 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
1451 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
1452 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
1453 |
-else |
1454 |
- DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
1455 |
- RDEPEND="${RDEPEND} |
1456 |
- vanilla? ( !sys-libs/timezone-data ) |
1457 |
- !vanilla? ( sys-libs/timezone-data )" |
1458 |
-fi |
1459 |
- |
1460 |
-SRC_URI=$( |
1461 |
- upstream_uris() { |
1462 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
1463 |
- } |
1464 |
- gentoo_uris() { |
1465 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
1466 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
1467 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
1468 |
- } |
1469 |
- |
1470 |
- TARNAME=${PN} |
1471 |
- if [[ -n ${SNAP_VER} ]] ; then |
1472 |
- TARNAME="${PN}-${RELEASE_VER}" |
1473 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
1474 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
1475 |
- elif [[ -z ${EGIT_REPO_URIS} ]] ; then |
1476 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
1477 |
- fi |
1478 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
1479 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
1480 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
1481 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
1482 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
1483 |
-) |
1484 |
- |
1485 |
-# eblit-include [--skip] <function> [version] |
1486 |
-eblit-include() { |
1487 |
- local skipable=false |
1488 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
1489 |
- [[ $1 == pkg_* ]] && skipable=true |
1490 |
- |
1491 |
- local e v func=$1 ver=$2 |
1492 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
1493 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
1494 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
1495 |
- if [[ -e ${e} ]] ; then |
1496 |
- source "${e}" |
1497 |
- return 0 |
1498 |
- fi |
1499 |
- done |
1500 |
- ${skipable} && return 0 |
1501 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
1502 |
-} |
1503 |
- |
1504 |
-# eblit-run-maybe <function> |
1505 |
-# run the specified function if it is defined |
1506 |
-eblit-run-maybe() { |
1507 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
1508 |
-} |
1509 |
- |
1510 |
-# eblit-run <function> [version] |
1511 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
1512 |
-eblit-run() { |
1513 |
- eblit-include --skip common "${*:2}" |
1514 |
- eblit-include "$@" |
1515 |
- eblit-run-maybe eblit-$1-pre |
1516 |
- eblit-${PN}-$1 |
1517 |
- eblit-run-maybe eblit-$1-post |
1518 |
-} |
1519 |
- |
1520 |
-src_unpack() { eblit-run src_unpack ; } |
1521 |
-src_compile() { eblit-run src_compile ; } |
1522 |
-src_test() { eblit-run src_test ; } |
1523 |
-src_install() { eblit-run src_install ; } |
1524 |
- |
1525 |
-# FILESDIR might not be available during binpkg install |
1526 |
-for x in setup {pre,post}inst ; do |
1527 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
1528 |
- if [[ -e ${e} ]] ; then |
1529 |
- . "${e}" |
1530 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
1531 |
- fi |
1532 |
-done |
1533 |
- |
1534 |
-pkg_setup() { |
1535 |
- eblit-run pkg_setup |
1536 |
- |
1537 |
- # Static binary sanity check #332927 |
1538 |
- if [[ ${ROOT} == "/" ]] && \ |
1539 |
- has_version "<${CATEGORY}/${P}" && \ |
1540 |
- built_with_use sys-apps/coreutils static |
1541 |
- then |
1542 |
- eerror "Please rebuild coreutils with USE=-static, then install" |
1543 |
- eerror "glibc, then you may rebuild coreutils with USE=static." |
1544 |
- die "Avoiding system meltdown #332927" |
1545 |
- fi |
1546 |
-} |
1547 |
- |
1548 |
-eblit-src_unpack-pre() { |
1549 |
- GLIBC_PATCH_EXCLUDE+=" 1200_all_glibc-${PV}-x32.patch" |
1550 |
-} |
1551 |
- |
1552 |
-eblit-src_unpack-post() { |
1553 |
- if use hardened ; then |
1554 |
- cd "${S}" |
1555 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
1556 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch |
1557 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
1558 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
1559 |
- |
1560 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
1561 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
1562 |
- debug/stack_chk_fail.c || die |
1563 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
1564 |
- debug/chk_fail.c || die |
1565 |
- |
1566 |
- if use debug ; then |
1567 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
1568 |
- # analysis - debug only, as core could be an information leak |
1569 |
- # (paranoia). |
1570 |
- sed -i \ |
1571 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
1572 |
- debug/Makefile \ |
1573 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
1574 |
- sed -i \ |
1575 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
1576 |
- debug/Makefile \ |
1577 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
1578 |
- fi |
1579 |
- |
1580 |
- # Build nscd with ssp-all |
1581 |
- sed -i \ |
1582 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
1583 |
- nscd/Makefile \ |
1584 |
- || die "Failed to ensure nscd builds with ssp-all" |
1585 |
- fi |
1586 |
-} |
1587 |
- |
1588 |
-eblit-pkg_preinst-post() { |
1589 |
- if [[ ${CTARGET} == arm* ]] ; then |
1590 |
- # Backwards compat support for renaming hardfp ldsos #417287 |
1591 |
- local oldso='/lib/ld-linux.so.3' |
1592 |
- local nldso='/lib/ld-linux-armhf.so.3' |
1593 |
- if [[ -e ${D}${nldso} ]] ; then |
1594 |
- if scanelf -qRyi "${ROOT}$(alt_prefix)"/*bin/ | grep -s "^${oldso}" ; then |
1595 |
- ewarn "Symlinking old ldso (${oldso}) to new ldso (${nldso})." |
1596 |
- ewarn "Please rebuild all packages using this old ldso as compat" |
1597 |
- ewarn "support will be dropped in the future." |
1598 |
- ln -s "${nldso##*/}" "${D}$(alt_prefix)${oldso}" |
1599 |
- fi |
1600 |
- fi |
1601 |
- fi |
1602 |
-} |
1603 |
|
1604 |
diff --git a/sys-libs/glibc/glibc-2.14.1-r3.ebuild b/sys-libs/glibc/glibc-2.14.1-r3.ebuild |
1605 |
deleted file mode 100644 |
1606 |
index 4b14d0a..0000000 |
1607 |
--- a/sys-libs/glibc/glibc-2.14.1-r3.ebuild |
1608 |
+++ /dev/null |
1609 |
@@ -1,246 +0,0 @@ |
1610 |
-# Copyright 1999-2013 Gentoo Foundation |
1611 |
-# Distributed under the terms of the GNU General Public License v2 |
1612 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.14.1-r3.ebuild,v 1.25 2013/04/05 00:25:16 vapier Exp $ |
1613 |
- |
1614 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
1615 |
- |
1616 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
1617 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
1618 |
- |
1619 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
1620 |
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86" |
1621 |
-RESTRICT="strip" # strip ourself #46186 |
1622 |
-EMULTILIB_PKG="true" |
1623 |
- |
1624 |
-# Configuration variables |
1625 |
-RELEASE_VER="" |
1626 |
-BRANCH_UPDATE="" |
1627 |
-SNAP_VER="" |
1628 |
-case ${PV} in |
1629 |
-9999*) |
1630 |
- EGIT_REPO_URIS=( "git://sourceware.org/git/glibc.git" "git://sourceware.org/git/glibc-ports.git" ) |
1631 |
- EGIT_SOURCEDIRS=( "${S}" "${S}/ports" ) |
1632 |
- inherit git-2 |
1633 |
- ;; |
1634 |
-*_p*) |
1635 |
- RELEASE_VER=${PV%_p*} |
1636 |
- SNAP_VER=${PV#*_p} |
1637 |
- ;; |
1638 |
-*) |
1639 |
- RELEASE_VER=${PV} |
1640 |
- ;; |
1641 |
-esac |
1642 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
1643 |
-PATCH_VER="10" # Gentoo patchset |
1644 |
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
1645 |
-LT_VER="" # version of linuxthreads addon |
1646 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
1647 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
1648 |
- |
1649 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
1650 |
-[[ -n ${RELEASE_VER} ]] && S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
1651 |
- |
1652 |
-# Here's how the cross-compile logic breaks down ... |
1653 |
-# CTARGET - machine that will target the binaries |
1654 |
-# CHOST - machine that will host the binaries |
1655 |
-# CBUILD - machine that will build the binaries |
1656 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
1657 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
1658 |
-# CBUILD = CHOST = CTARGET - native build/install |
1659 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
1660 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
1661 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
1662 |
-# For install paths: |
1663 |
-# CHOST = CTARGET - install into / |
1664 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
1665 |
- |
1666 |
-export CBUILD=${CBUILD:-${CHOST}} |
1667 |
-export CTARGET=${CTARGET:-${CHOST}} |
1668 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
1669 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
1670 |
- export CTARGET=${CATEGORY#cross-} |
1671 |
- fi |
1672 |
-fi |
1673 |
- |
1674 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
1675 |
- |
1676 |
-is_crosscompile() { |
1677 |
- [[ ${CHOST} != ${CTARGET} ]] |
1678 |
-} |
1679 |
- |
1680 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
1681 |
-# Everyone knows 2.2 > 0, duh. |
1682 |
-SLOT="2.2" |
1683 |
- |
1684 |
-# General: We need a new-enough binutils for as-needed |
1685 |
-# arch: we need to make sure our binutils/gcc supports TLS |
1686 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
1687 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
1688 |
- x86? ( >=sys-devel/gcc-4.3 ) |
1689 |
- amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
1690 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
1691 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
1692 |
- >=sys-devel/binutils-2.15.94 |
1693 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
1694 |
- >=app-misc/pax-utils-0.1.10 |
1695 |
- virtual/os-headers |
1696 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
1697 |
- !<sys-apps/portage-2.1.2 |
1698 |
- !<sys-devel/patch-2.6 |
1699 |
- selinux? ( sys-libs/libselinux )" |
1700 |
-RDEPEND="!sys-kernel/ps3-sources |
1701 |
- selinux? ( sys-libs/libselinux )" |
1702 |
- |
1703 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
1704 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
1705 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
1706 |
-else |
1707 |
- DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
1708 |
- RDEPEND="${RDEPEND} |
1709 |
- vanilla? ( !sys-libs/timezone-data ) |
1710 |
- !vanilla? ( sys-libs/timezone-data )" |
1711 |
-fi |
1712 |
- |
1713 |
-SRC_URI=$( |
1714 |
- upstream_uris() { |
1715 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
1716 |
- } |
1717 |
- gentoo_uris() { |
1718 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
1719 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
1720 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
1721 |
- } |
1722 |
- |
1723 |
- TARNAME=${PN} |
1724 |
- if [[ -n ${SNAP_VER} ]] ; then |
1725 |
- TARNAME="${PN}-${RELEASE_VER}" |
1726 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
1727 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
1728 |
- elif [[ -z ${EGIT_REPO_URIS} ]] ; then |
1729 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
1730 |
- fi |
1731 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
1732 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
1733 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
1734 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
1735 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
1736 |
-) |
1737 |
- |
1738 |
-# eblit-include [--skip] <function> [version] |
1739 |
-eblit-include() { |
1740 |
- local skipable=false |
1741 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
1742 |
- [[ $1 == pkg_* ]] && skipable=true |
1743 |
- |
1744 |
- local e v func=$1 ver=$2 |
1745 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
1746 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
1747 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
1748 |
- if [[ -e ${e} ]] ; then |
1749 |
- source "${e}" |
1750 |
- return 0 |
1751 |
- fi |
1752 |
- done |
1753 |
- ${skipable} && return 0 |
1754 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
1755 |
-} |
1756 |
- |
1757 |
-# eblit-run-maybe <function> |
1758 |
-# run the specified function if it is defined |
1759 |
-eblit-run-maybe() { |
1760 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
1761 |
-} |
1762 |
- |
1763 |
-# eblit-run <function> [version] |
1764 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
1765 |
-eblit-run() { |
1766 |
- eblit-include --skip common "${*:2}" |
1767 |
- eblit-include "$@" |
1768 |
- eblit-run-maybe eblit-$1-pre |
1769 |
- eblit-${PN}-$1 |
1770 |
- eblit-run-maybe eblit-$1-post |
1771 |
-} |
1772 |
- |
1773 |
-src_unpack() { eblit-run src_unpack ; } |
1774 |
-src_compile() { eblit-run src_compile ; } |
1775 |
-src_test() { eblit-run src_test ; } |
1776 |
-src_install() { eblit-run src_install ; } |
1777 |
- |
1778 |
-# FILESDIR might not be available during binpkg install |
1779 |
-for x in setup {pre,post}inst ; do |
1780 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
1781 |
- if [[ -e ${e} ]] ; then |
1782 |
- . "${e}" |
1783 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
1784 |
- fi |
1785 |
-done |
1786 |
- |
1787 |
-pkg_setup() { |
1788 |
- eblit-run pkg_setup |
1789 |
- |
1790 |
- # Static binary sanity check #332927 |
1791 |
- if [[ ${ROOT} == "/" ]] && \ |
1792 |
- has_version "<${CATEGORY}/${P}" && \ |
1793 |
- built_with_use sys-apps/coreutils static |
1794 |
- then |
1795 |
- eerror "Please rebuild coreutils with USE=-static, then install" |
1796 |
- eerror "glibc, then you may rebuild coreutils with USE=static." |
1797 |
- die "Avoiding system meltdown #332927" |
1798 |
- fi |
1799 |
-} |
1800 |
- |
1801 |
-eblit-src_unpack-pre() { |
1802 |
- GLIBC_PATCH_EXCLUDE+=" 1200_all_glibc-${PV}-x32.patch" |
1803 |
-} |
1804 |
- |
1805 |
-eblit-src_unpack-post() { |
1806 |
- if use hardened ; then |
1807 |
- cd "${S}" |
1808 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
1809 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch |
1810 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
1811 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
1812 |
- |
1813 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
1814 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
1815 |
- debug/stack_chk_fail.c || die |
1816 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
1817 |
- debug/chk_fail.c || die |
1818 |
- |
1819 |
- if use debug ; then |
1820 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
1821 |
- # analysis - debug only, as core could be an information leak |
1822 |
- # (paranoia). |
1823 |
- sed -i \ |
1824 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
1825 |
- debug/Makefile \ |
1826 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
1827 |
- sed -i \ |
1828 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
1829 |
- debug/Makefile \ |
1830 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
1831 |
- fi |
1832 |
- |
1833 |
- # Build nscd with ssp-all |
1834 |
- sed -i \ |
1835 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
1836 |
- nscd/Makefile \ |
1837 |
- || die "Failed to ensure nscd builds with ssp-all" |
1838 |
- fi |
1839 |
-} |
1840 |
- |
1841 |
-eblit-pkg_preinst-post() { |
1842 |
- if [[ ${CTARGET} == arm* ]] ; then |
1843 |
- # Backwards compat support for renaming hardfp ldsos #417287 |
1844 |
- local oldso='/lib/ld-linux.so.3' |
1845 |
- local nldso='/lib/ld-linux-armhf.so.3' |
1846 |
- if [[ -e ${D}${nldso} ]] ; then |
1847 |
- if scanelf -qRyi "${ROOT}$(alt_prefix)"/*bin/ | grep -s "^${oldso}" ; then |
1848 |
- ewarn "Symlinking old ldso (${oldso}) to new ldso (${nldso})." |
1849 |
- ewarn "Please rebuild all packages using this old ldso as compat" |
1850 |
- ewarn "support will be dropped in the future." |
1851 |
- ln -s "${nldso##*/}" "${D}$(alt_prefix)${oldso}" |
1852 |
- fi |
1853 |
- fi |
1854 |
- fi |
1855 |
-} |
1856 |
|
1857 |
diff --git a/sys-libs/glibc/glibc-2.14.ebuild b/sys-libs/glibc/glibc-2.14.ebuild |
1858 |
deleted file mode 100644 |
1859 |
index 6faf730..0000000 |
1860 |
--- a/sys-libs/glibc/glibc-2.14.ebuild |
1861 |
+++ /dev/null |
1862 |
@@ -1,242 +0,0 @@ |
1863 |
-# Copyright 1999-2013 Gentoo Foundation |
1864 |
-# Distributed under the terms of the GNU General Public License v2 |
1865 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.14.ebuild,v 1.24 2013/04/05 00:25:16 vapier Exp $ |
1866 |
- |
1867 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
1868 |
- |
1869 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
1870 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
1871 |
- |
1872 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
1873 |
-KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
1874 |
-RESTRICT="strip" # strip ourself #46186 |
1875 |
-EMULTILIB_PKG="true" |
1876 |
- |
1877 |
-# Configuration variables |
1878 |
-RELEASE_VER="" |
1879 |
-BRANCH_UPDATE="" |
1880 |
-SNAP_VER="" |
1881 |
-case ${PV} in |
1882 |
-9999*) |
1883 |
- EGIT_REPO_URIS=( "git://sourceware.org/git/glibc.git" "git://sourceware.org/git/glibc-ports.git" ) |
1884 |
- EGIT_SOURCEDIRS=( "${S}" "${S}/ports" ) |
1885 |
- inherit git-2 |
1886 |
- ;; |
1887 |
-*_p*) |
1888 |
- RELEASE_VER=${PV%_p*} |
1889 |
- SNAP_VER=${PV#*_p} |
1890 |
- ;; |
1891 |
-*) |
1892 |
- RELEASE_VER=${PV} |
1893 |
- ;; |
1894 |
-esac |
1895 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
1896 |
-PATCH_VER="7" # Gentoo patchset |
1897 |
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
1898 |
-LT_VER="" # version of linuxthreads addon |
1899 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
1900 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
1901 |
- |
1902 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
1903 |
-[[ -n ${RELEASE_VER} ]] && S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
1904 |
- |
1905 |
-# Here's how the cross-compile logic breaks down ... |
1906 |
-# CTARGET - machine that will target the binaries |
1907 |
-# CHOST - machine that will host the binaries |
1908 |
-# CBUILD - machine that will build the binaries |
1909 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
1910 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
1911 |
-# CBUILD = CHOST = CTARGET - native build/install |
1912 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
1913 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
1914 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
1915 |
-# For install paths: |
1916 |
-# CHOST = CTARGET - install into / |
1917 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
1918 |
- |
1919 |
-export CBUILD=${CBUILD:-${CHOST}} |
1920 |
-export CTARGET=${CTARGET:-${CHOST}} |
1921 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
1922 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
1923 |
- export CTARGET=${CATEGORY#cross-} |
1924 |
- fi |
1925 |
-fi |
1926 |
- |
1927 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
1928 |
- |
1929 |
-is_crosscompile() { |
1930 |
- [[ ${CHOST} != ${CTARGET} ]] |
1931 |
-} |
1932 |
- |
1933 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
1934 |
-# Everyone knows 2.2 > 0, duh. |
1935 |
-SLOT="2.2" |
1936 |
- |
1937 |
-# General: We need a new-enough binutils for as-needed |
1938 |
-# arch: we need to make sure our binutils/gcc supports TLS |
1939 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
1940 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
1941 |
- x86? ( >=sys-devel/gcc-4.3 ) |
1942 |
- amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 ) |
1943 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
1944 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
1945 |
- >=sys-devel/binutils-2.15.94 |
1946 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
1947 |
- >=app-misc/pax-utils-0.1.10 |
1948 |
- virtual/os-headers |
1949 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
1950 |
- !<sys-apps/portage-2.1.2 |
1951 |
- !<sys-devel/patch-2.6 |
1952 |
- selinux? ( sys-libs/libselinux )" |
1953 |
-RDEPEND="!sys-kernel/ps3-sources |
1954 |
- selinux? ( sys-libs/libselinux )" |
1955 |
- |
1956 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
1957 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
1958 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
1959 |
-else |
1960 |
- DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )" |
1961 |
- RDEPEND="${RDEPEND} |
1962 |
- vanilla? ( !sys-libs/timezone-data ) |
1963 |
- !vanilla? ( sys-libs/timezone-data )" |
1964 |
-fi |
1965 |
- |
1966 |
-SRC_URI=$( |
1967 |
- upstream_uris() { |
1968 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
1969 |
- } |
1970 |
- gentoo_uris() { |
1971 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
1972 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
1973 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
1974 |
- } |
1975 |
- |
1976 |
- TARNAME=${PN} |
1977 |
- if [[ -n ${SNAP_VER} ]] ; then |
1978 |
- TARNAME="${PN}-${RELEASE_VER}" |
1979 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
1980 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
1981 |
- elif [[ -z ${EGIT_REPO_URIS} ]] ; then |
1982 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
1983 |
- fi |
1984 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
1985 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
1986 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
1987 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
1988 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
1989 |
-) |
1990 |
- |
1991 |
-# eblit-include [--skip] <function> [version] |
1992 |
-eblit-include() { |
1993 |
- local skipable=false |
1994 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
1995 |
- [[ $1 == pkg_* ]] && skipable=true |
1996 |
- |
1997 |
- local e v func=$1 ver=$2 |
1998 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
1999 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
2000 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
2001 |
- if [[ -e ${e} ]] ; then |
2002 |
- source "${e}" |
2003 |
- return 0 |
2004 |
- fi |
2005 |
- done |
2006 |
- ${skipable} && return 0 |
2007 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
2008 |
-} |
2009 |
- |
2010 |
-# eblit-run-maybe <function> |
2011 |
-# run the specified function if it is defined |
2012 |
-eblit-run-maybe() { |
2013 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
2014 |
-} |
2015 |
- |
2016 |
-# eblit-run <function> [version] |
2017 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
2018 |
-eblit-run() { |
2019 |
- eblit-include --skip common "${*:2}" |
2020 |
- eblit-include "$@" |
2021 |
- eblit-run-maybe eblit-$1-pre |
2022 |
- eblit-${PN}-$1 |
2023 |
- eblit-run-maybe eblit-$1-post |
2024 |
-} |
2025 |
- |
2026 |
-src_unpack() { eblit-run src_unpack ; } |
2027 |
-src_compile() { eblit-run src_compile ; } |
2028 |
-src_test() { eblit-run src_test ; } |
2029 |
-src_install() { eblit-run src_install ; } |
2030 |
- |
2031 |
-# FILESDIR might not be available during binpkg install |
2032 |
-for x in setup {pre,post}inst ; do |
2033 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
2034 |
- if [[ -e ${e} ]] ; then |
2035 |
- . "${e}" |
2036 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
2037 |
- fi |
2038 |
-done |
2039 |
- |
2040 |
-pkg_setup() { |
2041 |
- eblit-run pkg_setup |
2042 |
- |
2043 |
- # Static binary sanity check #332927 |
2044 |
- if [[ ${ROOT} == "/" ]] && \ |
2045 |
- has_version "<${CATEGORY}/${P}" && \ |
2046 |
- built_with_use sys-apps/coreutils static |
2047 |
- then |
2048 |
- eerror "Please rebuild coreutils with USE=-static, then install" |
2049 |
- eerror "glibc, then you may rebuild coreutils with USE=static." |
2050 |
- die "Avoiding system meltdown #332927" |
2051 |
- fi |
2052 |
-} |
2053 |
- |
2054 |
-eblit-src_unpack-post() { |
2055 |
- if use hardened ; then |
2056 |
- cd "${S}" |
2057 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
2058 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.12/glibc-2.12-hardened-pie.patch |
2059 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
2060 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
2061 |
- |
2062 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
2063 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
2064 |
- debug/stack_chk_fail.c || die |
2065 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
2066 |
- debug/chk_fail.c || die |
2067 |
- |
2068 |
- if use debug ; then |
2069 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
2070 |
- # analysis - debug only, as core could be an information leak |
2071 |
- # (paranoia). |
2072 |
- sed -i \ |
2073 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
2074 |
- debug/Makefile \ |
2075 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
2076 |
- sed -i \ |
2077 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
2078 |
- debug/Makefile \ |
2079 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
2080 |
- fi |
2081 |
- |
2082 |
- # Build nscd with ssp-all |
2083 |
- sed -i \ |
2084 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
2085 |
- nscd/Makefile \ |
2086 |
- || die "Failed to ensure nscd builds with ssp-all" |
2087 |
- fi |
2088 |
-} |
2089 |
- |
2090 |
-eblit-pkg_preinst-post() { |
2091 |
- if [[ ${CTARGET} == arm* ]] ; then |
2092 |
- # Backwards compat support for renaming hardfp ldsos #417287 |
2093 |
- local oldso='/lib/ld-linux.so.3' |
2094 |
- local nldso='/lib/ld-linux-armhf.so.3' |
2095 |
- if [[ -e ${D}${nldso} ]] ; then |
2096 |
- if scanelf -qRyi "${ROOT}$(alt_prefix)"/*bin/ | grep -s "^${oldso}" ; then |
2097 |
- ewarn "Symlinking old ldso (${oldso}) to new ldso (${nldso})." |
2098 |
- ewarn "Please rebuild all packages using this old ldso as compat" |
2099 |
- ewarn "support will be dropped in the future." |
2100 |
- ln -s "${nldso##*/}" "${D}$(alt_prefix)${oldso}" |
2101 |
- fi |
2102 |
- fi |
2103 |
- fi |
2104 |
-} |
2105 |
|
2106 |
diff --git a/sys-libs/glibc/glibc-2.16.0.ebuild b/sys-libs/glibc/glibc-2.16.0.ebuild |
2107 |
deleted file mode 100644 |
2108 |
index 707ec70..0000000 |
2109 |
--- a/sys-libs/glibc/glibc-2.16.0.ebuild |
2110 |
+++ /dev/null |
2111 |
@@ -1,223 +0,0 @@ |
2112 |
-# Copyright 1999-2013 Gentoo Foundation |
2113 |
-# Distributed under the terms of the GNU General Public License v2 |
2114 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.16.0.ebuild,v 1.24 2013/06/23 05:03:42 vapier Exp $ |
2115 |
- |
2116 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib unpacker multiprocessing |
2117 |
- |
2118 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
2119 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
2120 |
- |
2121 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
2122 |
-KEYWORDS="-alpha ~amd64 ~arm -hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
2123 |
-RESTRICT="strip" # strip ourself #46186 |
2124 |
-EMULTILIB_PKG="true" |
2125 |
- |
2126 |
-# Configuration variables |
2127 |
-RELEASE_VER="" |
2128 |
-BRANCH_UPDATE="" |
2129 |
-SNAP_VER="" |
2130 |
-case ${PV} in |
2131 |
-9999*) |
2132 |
- EGIT_REPO_URIS=( "git://sourceware.org/git/glibc.git" "git://sourceware.org/git/glibc-ports.git" ) |
2133 |
- EGIT_SOURCEDIRS=( "${S}" "${S}/ports" ) |
2134 |
- inherit git-2 |
2135 |
- ;; |
2136 |
-*_p*) |
2137 |
- RELEASE_VER=${PV%_p*} |
2138 |
- SNAP_VER=${PV#*_p} |
2139 |
- ;; |
2140 |
-*) |
2141 |
- RELEASE_VER=${PV} |
2142 |
- ;; |
2143 |
-esac |
2144 |
-LIBIDN_VER="" # it's integrated into the main tarball now |
2145 |
-PATCH_VER="11" # Gentoo patchset |
2146 |
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
2147 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.16"} # min kernel version nptl requires |
2148 |
- |
2149 |
-IUSE="debug gd hardened multilib selinux suid systemtap profile vanilla crosscompile_opts_headers-only" |
2150 |
-[[ -n ${RELEASE_VER} ]] && S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER:+-${SNAP_VER}} |
2151 |
- |
2152 |
-# Here's how the cross-compile logic breaks down ... |
2153 |
-# CTARGET - machine that will target the binaries |
2154 |
-# CHOST - machine that will host the binaries |
2155 |
-# CBUILD - machine that will build the binaries |
2156 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
2157 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
2158 |
-# CBUILD = CHOST = CTARGET - native build/install |
2159 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
2160 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
2161 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
2162 |
-# For install paths: |
2163 |
-# CHOST = CTARGET - install into / |
2164 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
2165 |
- |
2166 |
-export CBUILD=${CBUILD:-${CHOST}} |
2167 |
-export CTARGET=${CTARGET:-${CHOST}} |
2168 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
2169 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
2170 |
- export CTARGET=${CATEGORY#cross-} |
2171 |
- fi |
2172 |
-fi |
2173 |
- |
2174 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.16/2.6.20} |
2175 |
- |
2176 |
-is_crosscompile() { |
2177 |
- [[ ${CHOST} != ${CTARGET} ]] |
2178 |
-} |
2179 |
- |
2180 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
2181 |
-# Everyone knows 2.2 > 0, duh. |
2182 |
-SLOT="2.2" |
2183 |
- |
2184 |
-# General: We need a new-enough binutils/gcc to match upstream baseline. |
2185 |
-# arch: we need to make sure our binutils/gcc supports TLS. |
2186 |
-DEPEND=">=app-misc/pax-utils-0.1.10 |
2187 |
- !<sys-apps/sandbox-1.6 |
2188 |
- !<sys-apps/portage-2.1.2 |
2189 |
- selinux? ( sys-libs/libselinux )" |
2190 |
-RDEPEND="!sys-kernel/ps3-sources |
2191 |
- selinux? ( sys-libs/libselinux ) |
2192 |
- !sys-libs/nss-db" |
2193 |
- |
2194 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
2195 |
- DEPEND+=" !crosscompile_opts_headers-only? ( |
2196 |
- >=${CATEGORY}/binutils-2.20 |
2197 |
- >=${CATEGORY}/gcc-4.3 |
2198 |
- )" |
2199 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" |
2200 |
-else |
2201 |
- DEPEND+=" |
2202 |
- >=sys-devel/binutils-2.20 |
2203 |
- >=sys-devel/gcc-4.3 |
2204 |
- virtual/os-headers |
2205 |
- !vanilla? ( >=sys-libs/timezone-data-2012c )" |
2206 |
- RDEPEND+=" |
2207 |
- vanilla? ( !sys-libs/timezone-data ) |
2208 |
- !vanilla? ( sys-libs/timezone-data )" |
2209 |
-fi |
2210 |
- |
2211 |
-SRC_URI=$( |
2212 |
- upstream_uris() { |
2213 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
2214 |
- } |
2215 |
- gentoo_uris() { |
2216 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
2217 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
2218 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
2219 |
- } |
2220 |
- |
2221 |
- TARNAME=${PN} |
2222 |
- if [[ -n ${SNAP_VER} ]] ; then |
2223 |
- TARNAME="${PN}-${RELEASE_VER}" |
2224 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
2225 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
2226 |
- elif [[ -z ${EGIT_REPO_URIS} ]] ; then |
2227 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.xz |
2228 |
- fi |
2229 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
2230 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.xz |
2231 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
2232 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
2233 |
-) |
2234 |
- |
2235 |
-# eblit-include [--skip] <function> [version] |
2236 |
-eblit-include() { |
2237 |
- local skipable=false |
2238 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
2239 |
- [[ $1 == pkg_* ]] && skipable=true |
2240 |
- |
2241 |
- local e v func=$1 ver=$2 |
2242 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
2243 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
2244 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
2245 |
- if [[ -e ${e} ]] ; then |
2246 |
- source "${e}" |
2247 |
- return 0 |
2248 |
- fi |
2249 |
- done |
2250 |
- ${skipable} && return 0 |
2251 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
2252 |
-} |
2253 |
- |
2254 |
-# eblit-run-maybe <function> |
2255 |
-# run the specified function if it is defined |
2256 |
-eblit-run-maybe() { |
2257 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
2258 |
-} |
2259 |
- |
2260 |
-# eblit-run <function> [version] |
2261 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
2262 |
-eblit-run() { |
2263 |
- eblit-include --skip common "${*:2}" |
2264 |
- eblit-include "$@" |
2265 |
- eblit-run-maybe eblit-$1-pre |
2266 |
- eblit-${PN}-$1 |
2267 |
- eblit-run-maybe eblit-$1-post |
2268 |
-} |
2269 |
- |
2270 |
-src_unpack() { eblit-run src_unpack ; } |
2271 |
-src_compile() { eblit-run src_compile ; } |
2272 |
-src_test() { eblit-run src_test ; } |
2273 |
-src_install() { eblit-run src_install ; } |
2274 |
- |
2275 |
-# FILESDIR might not be available during binpkg install |
2276 |
-for x in setup {pre,post}inst ; do |
2277 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
2278 |
- if [[ -e ${e} ]] ; then |
2279 |
- . "${e}" |
2280 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
2281 |
- fi |
2282 |
-done |
2283 |
- |
2284 |
-eblit-src_unpack-post() { |
2285 |
- if use hardened ; then |
2286 |
- cd "${S}" |
2287 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
2288 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.16/glibc-2.16-hardened-pie.patch |
2289 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch |
2290 |
- epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch |
2291 |
- |
2292 |
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
2293 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
2294 |
- debug/stack_chk_fail.c || die |
2295 |
- cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \ |
2296 |
- debug/chk_fail.c || die |
2297 |
- |
2298 |
- if use debug ; then |
2299 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
2300 |
- # analysis - debug only, as core could be an information leak |
2301 |
- # (paranoia). |
2302 |
- sed -i \ |
2303 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
2304 |
- debug/Makefile \ |
2305 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
2306 |
- sed -i \ |
2307 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
2308 |
- debug/Makefile \ |
2309 |
- || die "Failed to modify debug/Makefile for debug fortify handler" |
2310 |
- fi |
2311 |
- |
2312 |
- # Build nscd with ssp-all |
2313 |
- sed -i \ |
2314 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
2315 |
- nscd/Makefile \ |
2316 |
- || die "Failed to ensure nscd builds with ssp-all" |
2317 |
- fi |
2318 |
-} |
2319 |
- |
2320 |
-eblit-pkg_preinst-post() { |
2321 |
- if [[ ${CTARGET} == arm* ]] ; then |
2322 |
- # Backwards compat support for renaming hardfp ldsos #417287 |
2323 |
- local oldso='/lib/ld-linux.so.3' |
2324 |
- local nldso='/lib/ld-linux-armhf.so.3' |
2325 |
- if [[ -e ${D}${nldso} ]] ; then |
2326 |
- if scanelf -qRyi "${ROOT}$(alt_prefix)"/*bin/ | grep -s "^${oldso}" ; then |
2327 |
- ewarn "Symlinking old ldso (${oldso}) to new ldso (${nldso})." |
2328 |
- ewarn "Please rebuild all packages using this old ldso as compat" |
2329 |
- ewarn "support will be dropped in the future." |
2330 |
- ln -s "${nldso##*/}" "${D}$(alt_prefix)${oldso}" |
2331 |
- fi |
2332 |
- fi |
2333 |
- fi |
2334 |
-} |
2335 |
|
2336 |
diff --git a/sys-libs/glibc/glibc-2.23-r2.ebuild b/sys-libs/glibc/glibc-2.23-r2.ebuild |
2337 |
new file mode 100644 |
2338 |
index 0000000..d0f60e2 |
2339 |
--- /dev/null |
2340 |
+++ b/sys-libs/glibc/glibc-2.23-r2.ebuild |
2341 |
@@ -0,0 +1,206 @@ |
2342 |
+# Copyright 1999-2015 Gentoo Foundation |
2343 |
+# Distributed under the terms of the GNU General Public License v2 |
2344 |
+# $Id$ |
2345 |
+ |
2346 |
+EAPI="4" |
2347 |
+ |
2348 |
+inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib systemd unpacker multiprocessing |
2349 |
+ |
2350 |
+DESCRIPTION="GNU libc6 (also called glibc2) C library" |
2351 |
+HOMEPAGE="https://www.gnu.org/software/libc/libc.html" |
2352 |
+ |
2353 |
+LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" |
2354 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
2355 |
+RESTRICT="strip" # strip ourself #46186 |
2356 |
+EMULTILIB_PKG="true" |
2357 |
+ |
2358 |
+# Configuration variables |
2359 |
+RELEASE_VER="" |
2360 |
+case ${PV} in |
2361 |
+9999*) |
2362 |
+ EGIT_REPO_URIS="git://sourceware.org/git/glibc.git" |
2363 |
+ EGIT_SOURCEDIRS="${S}" |
2364 |
+ inherit git-2 |
2365 |
+ ;; |
2366 |
+*) |
2367 |
+ RELEASE_VER=${PV} |
2368 |
+ ;; |
2369 |
+esac |
2370 |
+GCC_BOOTSTRAP_VER="4.7.3-r1" |
2371 |
+PATCH_VER="4" # Gentoo patchset |
2372 |
+: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires |
2373 |
+ |
2374 |
+IUSE="audit caps debug gd hardened multilib nscd +rpc selinux systemtap profile suid vanilla crosscompile_opts_headers-only" |
2375 |
+ |
2376 |
+# Here's how the cross-compile logic breaks down ... |
2377 |
+# CTARGET - machine that will target the binaries |
2378 |
+# CHOST - machine that will host the binaries |
2379 |
+# CBUILD - machine that will build the binaries |
2380 |
+# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
2381 |
+# If CHOST != CBUILD, it means you want to cross-compile the libc. |
2382 |
+# CBUILD = CHOST = CTARGET - native build/install |
2383 |
+# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
2384 |
+# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
2385 |
+# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
2386 |
+# For install paths: |
2387 |
+# CHOST = CTARGET - install into / |
2388 |
+# CHOST != CTARGET - install into /usr/CTARGET/ |
2389 |
+ |
2390 |
+export CBUILD=${CBUILD:-${CHOST}} |
2391 |
+export CTARGET=${CTARGET:-${CHOST}} |
2392 |
+if [[ ${CTARGET} == ${CHOST} ]] ; then |
2393 |
+ if [[ ${CATEGORY} == cross-* ]] ; then |
2394 |
+ export CTARGET=${CATEGORY#cross-} |
2395 |
+ fi |
2396 |
+fi |
2397 |
+ |
2398 |
+is_crosscompile() { |
2399 |
+ [[ ${CHOST} != ${CTARGET} ]] |
2400 |
+} |
2401 |
+ |
2402 |
+# Why SLOT 2.2 you ask yourself while sippin your tea ? |
2403 |
+# Everyone knows 2.2 > 0, duh. |
2404 |
+SLOT="2.2" |
2405 |
+ |
2406 |
+# General: We need a new-enough binutils/gcc to match upstream baseline. |
2407 |
+# arch: we need to make sure our binutils/gcc supports TLS. |
2408 |
+COMMON_DEPEND=" |
2409 |
+ nscd? ( selinux? ( |
2410 |
+ audit? ( sys-process/audit ) |
2411 |
+ caps? ( sys-libs/libcap ) |
2412 |
+ ) ) |
2413 |
+ suid? ( caps? ( sys-libs/libcap ) ) |
2414 |
+ selinux? ( sys-libs/libselinux ) |
2415 |
+" |
2416 |
+DEPEND="${COMMON_DEPEND} |
2417 |
+ >=app-misc/pax-utils-0.1.10 |
2418 |
+ !<sys-apps/sandbox-1.6 |
2419 |
+ !<sys-apps/portage-2.1.2" |
2420 |
+RDEPEND="${COMMON_DEPEND} |
2421 |
+ !sys-kernel/ps3-sources |
2422 |
+ sys-apps/gentoo-functions |
2423 |
+ !sys-libs/nss-db" |
2424 |
+ |
2425 |
+if [[ ${CATEGORY} == cross-* ]] ; then |
2426 |
+ DEPEND+=" !crosscompile_opts_headers-only? ( |
2427 |
+ >=${CATEGORY}/binutils-2.24 |
2428 |
+ >=${CATEGORY}/gcc-4.7 |
2429 |
+ )" |
2430 |
+ [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" |
2431 |
+else |
2432 |
+ DEPEND+=" |
2433 |
+ >=sys-devel/binutils-2.24 |
2434 |
+ >=sys-devel/gcc-4.7 |
2435 |
+ virtual/os-headers" |
2436 |
+ RDEPEND+=" vanilla? ( !sys-libs/timezone-data )" |
2437 |
+ PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" |
2438 |
+fi |
2439 |
+ |
2440 |
+upstream_uris() { |
2441 |
+ echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
2442 |
+} |
2443 |
+gentoo_uris() { |
2444 |
+ local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
2445 |
+ devspace=${devspace//HTTP/https://dev.gentoo.org/} |
2446 |
+ echo mirror://gentoo/$1 ${devspace//URI/$1} |
2447 |
+} |
2448 |
+SRC_URI=$( |
2449 |
+ [[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz |
2450 |
+ [[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2 |
2451 |
+) |
2452 |
+SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}" |
2453 |
+ |
2454 |
+# eblit-include [--skip] <function> [version] |
2455 |
+eblit-include() { |
2456 |
+ local skipable=false |
2457 |
+ [[ $1 == "--skip" ]] && skipable=true && shift |
2458 |
+ [[ $1 == pkg_* ]] && skipable=true |
2459 |
+ |
2460 |
+ local e v func=$1 ver=$2 |
2461 |
+ [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
2462 |
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
2463 |
+ e="${FILESDIR}/eblits/${func}${v}.eblit" |
2464 |
+ if [[ -e ${e} ]] ; then |
2465 |
+ source "${e}" |
2466 |
+ return 0 |
2467 |
+ fi |
2468 |
+ done |
2469 |
+ ${skipable} && return 0 |
2470 |
+ die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
2471 |
+} |
2472 |
+ |
2473 |
+# eblit-run-maybe <function> |
2474 |
+# run the specified function if it is defined |
2475 |
+eblit-run-maybe() { |
2476 |
+ [[ $(type -t "$@") == "function" ]] && "$@" |
2477 |
+} |
2478 |
+ |
2479 |
+# eblit-run <function> [version] |
2480 |
+# aka: src_unpack() { eblit-run src_unpack ; } |
2481 |
+eblit-run() { |
2482 |
+ eblit-include --skip common "${*:2}" |
2483 |
+ eblit-include "$@" |
2484 |
+ eblit-run-maybe eblit-$1-pre |
2485 |
+ eblit-${PN}-$1 |
2486 |
+ eblit-run-maybe eblit-$1-post |
2487 |
+} |
2488 |
+ |
2489 |
+src_unpack() { eblit-run src_unpack ; } |
2490 |
+src_prepare() { eblit-run src_prepare ; } |
2491 |
+src_configure() { eblit-run src_configure ; } |
2492 |
+src_compile() { eblit-run src_compile ; } |
2493 |
+src_test() { eblit-run src_test ; } |
2494 |
+src_install() { eblit-run src_install ; } |
2495 |
+ |
2496 |
+# FILESDIR might not be available during binpkg install |
2497 |
+for x in pretend setup {pre,post}inst ; do |
2498 |
+ e="${FILESDIR}/eblits/pkg_${x}.eblit" |
2499 |
+ if [[ -e ${e} ]] ; then |
2500 |
+ . "${e}" |
2501 |
+ eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
2502 |
+ fi |
2503 |
+done |
2504 |
+ |
2505 |
+eblit-src_unpack-pre() { |
2506 |
+ [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 |
2507 |
+ # Bug 558636 we don't apply the pie works around for 2.22. It shoud have the support. #558636 |
2508 |
+ GLIBC_PATCH_EXCLUDE+=" 00_all_0002-workaround-crash-when-handling-signals-in-static-PIE.patch" |
2509 |
+ GLIBC_PATCH_EXCLUDE+=" 00_all_0012-disable-PIE-when-checking-for-PIC-default.patch" |
2510 |
+ GLIBC_PATCH_EXCLUDE+=" 00_all_0009-sys-types.h-drop-sys-sysmacros.h-include.patch" |
2511 |
+} |
2512 |
+ |
2513 |
+eblit-src_prepare-post() { |
2514 |
+ cd "${S}" |
2515 |
+ |
2516 |
+ epatch "${FILESDIR}"/2.19/${PN}-2.19-ia64-gcc-4.8-reloc-hack.patch #503838 |
2517 |
+ |
2518 |
+ if use hardened ; then |
2519 |
+ # We don't enable these for non-hardened as the output is very terse -- |
2520 |
+ # it only states that a crash happened. The default upstream behavior |
2521 |
+ # includes backtraces and symbols. |
2522 |
+ einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" |
2523 |
+ cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die |
2524 |
+ cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-chk_fail.c debug/chk_fail.c || die |
2525 |
+ |
2526 |
+ if use debug ; then |
2527 |
+ # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested. |
2528 |
+ sed -i \ |
2529 |
+ -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
2530 |
+ -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
2531 |
+ debug/Makefile || die |
2532 |
+ fi |
2533 |
+ |
2534 |
+ # Build various bits with ssp-all |
2535 |
+ sed -i \ |
2536 |
+ -e 's:-fstack-protector$:-fstack-protector-all:' \ |
2537 |
+ */Makefile || die |
2538 |
+ fi |
2539 |
+ |
2540 |
+ case $(gcc-fullversion) in |
2541 |
+ 4.8.[0-3]|4.9.0) |
2542 |
+ eerror "You need to switch to a newer compiler; gcc-4.8.[0-3] and gcc-4.9.0 miscompile" |
2543 |
+ eerror "glibc. See https://bugs.gentoo.org/547420 for details." |
2544 |
+ die "need to switch compilers #547420" |
2545 |
+ ;; |
2546 |
+ esac |
2547 |
+} |
2548 |
|
2549 |
diff --git a/sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild b/sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild |
2550 |
deleted file mode 100644 |
2551 |
index 3756489..0000000 |
2552 |
--- a/sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild |
2553 |
+++ /dev/null |
2554 |
@@ -1,193 +0,0 @@ |
2555 |
-# Copyright 1999-2013 Gentoo Foundation |
2556 |
-# Distributed under the terms of the GNU General Public License v2 |
2557 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild,v 1.22 2013/04/05 00:25:16 vapier Exp $ |
2558 |
- |
2559 |
-inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib multiprocessing |
2560 |
- |
2561 |
-DESCRIPTION="GNU libc6 (also called glibc2) C library" |
2562 |
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html" |
2563 |
- |
2564 |
-LICENSE="LGPL-2.1+ BSD HPND inner-net" |
2565 |
-KEYWORDS="alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
2566 |
-RESTRICT="strip" # strip ourself #46186 |
2567 |
-EMULTILIB_PKG="true" |
2568 |
- |
2569 |
-# Configuration variables |
2570 |
-if [[ ${PV} == *_p* ]] ; then |
2571 |
-RELEASE_VER=${PV%_p*} |
2572 |
-BRANCH_UPDATE="" |
2573 |
-SNAP_VER=${PV#*_p} |
2574 |
-else |
2575 |
-RELEASE_VER=${PV} |
2576 |
-BRANCH_UPDATE="" |
2577 |
-SNAP_VER="" |
2578 |
-fi |
2579 |
-PATCH_VER="8" # Gentoo patchset |
2580 |
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon |
2581 |
-LIBIDN_VER="" # version of libidn addon |
2582 |
-LT_VER="" # version of linuxthreads addon |
2583 |
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires |
2584 |
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires |
2585 |
- |
2586 |
-IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl linuxthreads}" |
2587 |
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER+-${SNAP_VER}} |
2588 |
- |
2589 |
-# Here's how the cross-compile logic breaks down ... |
2590 |
-# CTARGET - machine that will target the binaries |
2591 |
-# CHOST - machine that will host the binaries |
2592 |
-# CBUILD - machine that will build the binaries |
2593 |
-# If CTARGET != CHOST, it means you want a libc for cross-compiling. |
2594 |
-# If CHOST != CBUILD, it means you want to cross-compile the libc. |
2595 |
-# CBUILD = CHOST = CTARGET - native build/install |
2596 |
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build |
2597 |
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler |
2598 |
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler |
2599 |
-# For install paths: |
2600 |
-# CHOST = CTARGET - install into / |
2601 |
-# CHOST != CTARGET - install into /usr/CTARGET/ |
2602 |
- |
2603 |
-export CBUILD=${CBUILD:-${CHOST}} |
2604 |
-export CTARGET=${CTARGET:-${CHOST}} |
2605 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
2606 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
2607 |
- export CTARGET=${CATEGORY#cross-} |
2608 |
- fi |
2609 |
-fi |
2610 |
- |
2611 |
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} |
2612 |
- |
2613 |
-is_crosscompile() { |
2614 |
- [[ ${CHOST} != ${CTARGET} ]] |
2615 |
-} |
2616 |
- |
2617 |
-# Why SLOT 2.2 you ask yourself while sippin your tea ? |
2618 |
-# Everyone knows 2.2 > 0, duh. |
2619 |
-SLOT="2.2" |
2620 |
- |
2621 |
-# General: We need a new-enough binutils for as-needed |
2622 |
-# arch: we need to make sure our binutils/gcc supports TLS |
2623 |
-DEPEND=">=sys-devel/gcc-3.4.4 |
2624 |
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) |
2625 |
- ppc? ( >=sys-devel/gcc-4.1.0 ) |
2626 |
- ppc64? ( >=sys-devel/gcc-4.1.0 ) |
2627 |
- >=sys-devel/binutils-2.15.94 |
2628 |
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} |
2629 |
- >=app-misc/pax-utils-0.1.10 |
2630 |
- virtual/os-headers |
2631 |
- !<sys-apps/sandbox-1.2.18.1-r2 |
2632 |
- !<sys-apps/portage-2.1.2 |
2633 |
- selinux? ( sys-libs/libselinux )" |
2634 |
-RDEPEND="!sys-kernel/ps3-sources |
2635 |
- selinux? ( sys-libs/libselinux )" |
2636 |
- |
2637 |
-if [[ ${CATEGORY} == cross-* ]] ; then |
2638 |
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )" |
2639 |
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" |
2640 |
-else |
2641 |
- DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c" |
2642 |
- RDEPEND="${RDEPEND} sys-libs/timezone-data" |
2643 |
-fi |
2644 |
- |
2645 |
-SRC_URI=$( |
2646 |
- upstream_uris() { |
2647 |
- echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 |
2648 |
- } |
2649 |
- gentoo_uris() { |
2650 |
- local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" |
2651 |
- devspace=${devspace//HTTP/http://dev.gentoo.org/} |
2652 |
- echo mirror://gentoo/$1 ${devspace//URI/$1} |
2653 |
- } |
2654 |
- |
2655 |
- TARNAME=${PN} |
2656 |
- if [[ -n ${SNAP_VER} ]] ; then |
2657 |
- TARNAME="${PN}-${RELEASE_VER}" |
2658 |
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} |
2659 |
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 |
2660 |
- else |
2661 |
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 |
2662 |
- fi |
2663 |
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 |
2664 |
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 |
2665 |
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 |
2666 |
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 |
2667 |
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 |
2668 |
-) |
2669 |
- |
2670 |
-# eblit-include [--skip] <function> [version] |
2671 |
-eblit-include() { |
2672 |
- local skipable=false |
2673 |
- [[ $1 == "--skip" ]] && skipable=true && shift |
2674 |
- [[ $1 == pkg_* ]] && skipable=true |
2675 |
- |
2676 |
- local e v func=$1 ver=$2 |
2677 |
- [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" |
2678 |
- for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do |
2679 |
- e="${FILESDIR}/eblits/${func}${v}.eblit" |
2680 |
- if [[ -e ${e} ]] ; then |
2681 |
- source "${e}" |
2682 |
- return 0 |
2683 |
- fi |
2684 |
- done |
2685 |
- ${skipable} && return 0 |
2686 |
- die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" |
2687 |
-} |
2688 |
- |
2689 |
-# eblit-run-maybe <function> |
2690 |
-# run the specified function if it is defined |
2691 |
-eblit-run-maybe() { |
2692 |
- [[ $(type -t "$@") == "function" ]] && "$@" |
2693 |
-} |
2694 |
- |
2695 |
-# eblit-run <function> [version] |
2696 |
-# aka: src_unpack() { eblit-run src_unpack ; } |
2697 |
-eblit-run() { |
2698 |
- eblit-include --skip common "${*:2}" |
2699 |
- eblit-include "$@" |
2700 |
- eblit-run-maybe eblit-$1-pre |
2701 |
- eblit-${PN}-$1 |
2702 |
- eblit-run-maybe eblit-$1-post |
2703 |
-} |
2704 |
- |
2705 |
-src_unpack() { eblit-run src_unpack ; } |
2706 |
-src_compile() { eblit-run src_compile ; } |
2707 |
-src_test() { eblit-run src_test ; } |
2708 |
-src_install() { eblit-run src_install ; } |
2709 |
- |
2710 |
-# FILESDIR might not be available during binpkg install |
2711 |
-for x in setup {pre,post}inst ; do |
2712 |
- e="${FILESDIR}/eblits/pkg_${x}.eblit" |
2713 |
- if [[ -e ${e} ]] ; then |
2714 |
- . "${e}" |
2715 |
- eval "pkg_${x}() { eblit-run pkg_${x} ; }" |
2716 |
- fi |
2717 |
-done |
2718 |
- |
2719 |
-eblit-src_unpack-post() { |
2720 |
- if use hardened ; then |
2721 |
- cd "${S}" |
2722 |
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms" |
2723 |
- gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch |
2724 |
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch |
2725 |
- epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch |
2726 |
- |
2727 |
- einfo "Installing Hardened Gentoo SSP handler" |
2728 |
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ |
2729 |
- debug/stack_chk_fail.c || die |
2730 |
- |
2731 |
- if use debug ; then |
2732 |
- # When using Hardened Gentoo stack handler, have smashes dump core for |
2733 |
- # analysis - debug only, as core could be an information leak |
2734 |
- # (paranoia). |
2735 |
- sed -i \ |
2736 |
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ |
2737 |
- debug/Makefile \ |
2738 |
- || die "Failed to modify debug/Makefile for debug stack handler" |
2739 |
- fi |
2740 |
- |
2741 |
- # Build nscd with ssp-all |
2742 |
- sed -i \ |
2743 |
- -e 's:-fstack-protector$:-fstack-protector-all:' \ |
2744 |
- nscd/Makefile \ |
2745 |
- || die "Failed to ensure nscd builds with ssp-all" |
2746 |
- fi |
2747 |
-} |