Gentoo Archives: gentoo-commits

From: "Mark Loeser (halcy0n)" <halcy0n@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/glibc: ChangeLog glibc-2.9_p20081201-r3.ebuild
Date: Sat, 29 Aug 2009 16:12:48
Message-Id: E1MhVMq-0006qr-WA@stork.gentoo.org
1 halcy0n 09/08/29 21:21:48
2
3 Modified: ChangeLog
4 Added: glibc-2.9_p20081201-r3.ebuild
5 Log:
6 Bump for patchset with gcc-4.4 fix and alpha fixes
7 (Portage version: 2.2_rc39/cvs/Linux i686)
8
9 Revision Changes Path
10 1.635 sys-libs/glibc/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.635&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?rev=1.635&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/ChangeLog?r1=1.634&r2=1.635
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v
19 retrieving revision 1.634
20 retrieving revision 1.635
21 diff -u -r1.634 -r1.635
22 --- ChangeLog 29 Aug 2009 10:32:41 -0000 1.634
23 +++ ChangeLog 29 Aug 2009 21:21:48 -0000 1.635
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sys-libs/glibc
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.634 2009/08/29 10:32:41 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.635 2009/08/29 21:21:48 halcy0n Exp $
29 +
30 +*glibc-2.9_p20081201-r3 (28 Aug 2009)
31 +
32 + 28 Aug 2009; Mark Loeser <halcy0n@g.o>
33 + +glibc-2.9_p20081201-r3.ebuild:
34 + Bump for patchset with gcc-4.4 fix and alpha fixes
35
36 29 Aug 2009; Raúl Porcel <armin76@g.o>
37 glibc-2.9_p20081201-r2.ebuild:
38
39
40
41 1.1 sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild?rev=1.1&content-type=text/plain
45
46 Index: glibc-2.9_p20081201-r3.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r3.ebuild,v 1.1 2009/08/29 21:21:48 halcy0n Exp $
51
52 inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
53
54 DESCRIPTION="GNU libc6 (also called glibc2) C library"
55 HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
56
57 LICENSE="LGPL-2"
58 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
59 RESTRICT="strip" # strip ourself #46186
60 EMULTILIB_PKG="true"
61
62 # Configuration variables
63 if [[ ${PV} == *_p* ]] ; then
64 RELEASE_VER=${PV%_p*}
65 BRANCH_UPDATE=""
66 SNAP_VER=${PV#*_p}
67 else
68 RELEASE_VER=${PV}
69 BRANCH_UPDATE=""
70 SNAP_VER=""
71 fi
72 MANPAGE_VER="" # pregenerated manpages
73 INFOPAGE_VER="" # pregenerated infopages
74 PATCH_VER="6" # Gentoo patchset
75 PORTS_VER=${RELEASE_VER} # version of glibc ports addon
76 LIBIDN_VER="" # version of libidn addon
77 LT_VER="" # version of linuxthreads addon
78 NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires
79 #LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires
80
81 IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}"
82 S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER+-${SNAP_VER}}
83
84 # Here's how the cross-compile logic breaks down ...
85 # CTARGET - machine that will target the binaries
86 # CHOST - machine that will host the binaries
87 # CBUILD - machine that will build the binaries
88 # If CTARGET != CHOST, it means you want a libc for cross-compiling.
89 # If CHOST != CBUILD, it means you want to cross-compile the libc.
90 # CBUILD = CHOST = CTARGET - native build/install
91 # CBUILD != (CHOST = CTARGET) - cross-compile a native build
92 # (CBUILD = CHOST) != CTARGET - libc for cross-compiler
93 # CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
94 # For install paths:
95 # CHOST = CTARGET - install into /
96 # CHOST != CTARGET - install into /usr/CTARGET/
97
98 export CBUILD=${CBUILD:-${CHOST}}
99 export CTARGET=${CTARGET:-${CHOST}}
100 if [[ ${CTARGET} == ${CHOST} ]] ; then
101 if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
102 export CTARGET=${CATEGORY/cross-}
103 fi
104 fi
105
106 [[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20}
107
108 is_crosscompile() {
109 [[ ${CHOST} != ${CTARGET} ]]
110 }
111 alt_libdir() {
112 if is_crosscompile ; then
113 echo /usr/${CTARGET}/$(get_libdir)
114 else
115 echo /$(get_libdir)
116 fi
117 }
118
119 if is_crosscompile ; then
120 SLOT="${CTARGET}-2.2"
121 else
122 # Why SLOT 2.2 you ask yourself while sippin your tea ?
123 # Everyone knows 2.2 > 0, duh.
124 SLOT="2.2"
125 PROVIDE="virtual/libc"
126 fi
127
128 # General: We need a new-enough binutils for as-needed
129 # arch: we need to make sure our binutils/gcc supports TLS
130 DEPEND=">=sys-devel/gcc-3.4.4
131 arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
132 ppc? ( >=sys-devel/gcc-4.1.0 )
133 ppc64? ( >=sys-devel/gcc-4.1.0 )
134 >=sys-devel/binutils-2.15.94
135 ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)}
136 >=sys-devel/gcc-config-1.3.12
137 >=app-misc/pax-utils-0.1.10
138 virtual/os-headers
139 nls? ( sys-devel/gettext )
140 >=sys-apps/sandbox-1.2.18.1-r2
141 >=sys-apps/portage-2.1.2
142 selinux? ( sys-libs/libselinux )"
143 RDEPEND="nls? ( sys-devel/gettext )
144 selinux? ( sys-libs/libselinux )"
145
146 if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
147 DEPEND="${DEPEND} ${CATEGORY}/gcc"
148 [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
149 else
150 DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c"
151 RDEPEND="${RDEPEND} sys-libs/timezone-data"
152 fi
153
154 SRC_URI=$(
155 upstream_uris() {
156 echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
157 }
158 gentoo_uris() {
159 local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI"
160 devspace=${devspace//HTTP/http://dev.gentoo.org/}
161 echo mirror://gentoo/$1 ${devspace//URI/$1}
162 }
163
164 TARNAME=${PN}
165 if [[ -n ${SNAP_VER} ]] ; then
166 TARNAME="${PN}-${RELEASE_VER}"
167 [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER}
168 upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2
169 else
170 upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2
171 fi
172 [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
173 [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2
174 [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2
175 [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
176 [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
177 [[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2
178 [[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2
179 )
180
181 # eblit-include [--skip] <function> [version]
182 eblit-include() {
183 local skipable=false
184 [[ $1 == "--skip" ]] && skipable=true && shift
185 [[ $1 == pkg_* ]] && skipable=true
186
187 local e v func=$1 ver=$2
188 [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
189 for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
190 e="${FILESDIR}/eblits/${func}${v}.eblit"
191 if [[ -e ${e} ]] ; then
192 source "${e}"
193 return 0
194 fi
195 done
196 ${skipable} && return 0
197 die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
198 }
199
200 # eblit-run-maybe <function>
201 # run the specified function if it is defined
202 eblit-run-maybe() {
203 [[ $(type -t "$@") == "function" ]] && "$@"
204 }
205
206 # eblit-run <function> [version]
207 # aka: src_unpack() { eblit-run src_unpack ; }
208 eblit-run() {
209 eblit-include --skip common "${*:2}"
210 eblit-include "$@"
211 eblit-run-maybe eblit-$1-pre
212 eblit-${PN}-$1
213 eblit-run-maybe eblit-$1-post
214 }
215
216 src_unpack() { eblit-run src_unpack ; }
217 src_compile() { eblit-run src_compile ; }
218 src_test() { eblit-run src_test ; }
219 src_install() { eblit-run src_install ; }
220
221 # FILESDIR might not be available during binpkg install
222 for x in setup {pre,post}inst ; do
223 e="${FILESDIR}/eblits/pkg_${x}.eblit"
224 if [[ -e ${e} ]] ; then
225 . "${e}"
226 eval "pkg_${x}() { eblit-run pkg_${x} ; }"
227 fi
228 done
229
230 eblit-src_unpack-post() {
231 if use hardened ; then
232 cd "${S}"
233 einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
234 gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch
235 epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
236 epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch
237
238 einfo "Installing Hardened Gentoo SSP handler"
239 cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
240 debug/stack_chk_fail.c || die
241
242 if use debug ; then
243 # When using Hardened Gentoo stack handler, have smashes dump core for
244 # analysis - debug only, as core could be an information leak
245 # (paranoia).
246 sed -i \
247 -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
248 debug/Makefile \
249 || die "Failed to modify debug/Makefile for debug stack handler"
250 fi
251
252 # Build nscd with ssp-all
253 sed -i \
254 -e 's:-fstack-protector$:-fstack-protector-all:' \
255 nscd/Makefile \
256 || die "Failed to ensure nscd builds with ssp-all"
257 fi
258 }
259
260 maint_pkg_create() {
261 local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}"
262 cd ${base}
263 local stamp=$(date +%Y%m%d)
264 local d
265 for d in libc ports ; do
266 #(cd ${d} && cvs up)
267 case ${d} in
268 libc) tarball="${P}";;
269 ports) tarball="${PN}-ports-${PV}";;
270 esac
271 rm -f ${tarball}*
272 ln -sf ${d} ${tarball}
273 tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma
274 du -b "${T}"/${tarball}.tar.lzma
275 done
276 }