1 |
solar 08/10/29 15:35:58 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: uclibc-0.9.30_rc3.ebuild |
5 |
Log: |
6 |
- version bump. rc3 drops all gentoo patches. merged upstream |
7 |
(Portage version: 2.1.4.4) |
8 |
|
9 |
Revision Changes Path |
10 |
1.38 sys-libs/uclibc/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?rev=1.38&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?rev=1.38&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?r1=1.37&r2=1.38 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v |
19 |
retrieving revision 1.37 |
20 |
retrieving revision 1.38 |
21 |
diff -u -r1.37 -r1.38 |
22 |
--- ChangeLog 23 Sep 2008 21:30:52 -0000 1.37 |
23 |
+++ ChangeLog 29 Oct 2008 15:35:58 -0000 1.38 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for sys-libs/uclibc |
26 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.37 2008/09/23 21:30:52 solar Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.38 2008/10/29 15:35:58 solar Exp $ |
29 |
+ |
30 |
+*uclibc-0.9.30_rc3 (29 Oct 2008) |
31 |
+ |
32 |
+ 29 Oct 2008; <solar@g.o> +uclibc-0.9.30_rc3.ebuild: |
33 |
+ - version bump. rc3 drops all gentoo patches. merged upstream |
34 |
|
35 |
*uclibc-0.9.30_rc1 (23 Sep 2008) |
36 |
|
37 |
|
38 |
|
39 |
|
40 |
1.1 sys-libs/uclibc/uclibc-0.9.30_rc3.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30_rc3.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30_rc3.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: uclibc-0.9.30_rc3.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2008 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30_rc3.ebuild,v 1.1 2008/10/29 15:35:58 solar Exp $ |
50 |
|
51 |
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" |
52 |
#inherit subversion |
53 |
inherit eutils flag-o-matic toolchain-funcs savedconfig |
54 |
|
55 |
export CBUILD=${CBUILD:-${CHOST}} |
56 |
export CTARGET=${CTARGET:-${CHOST}} |
57 |
if [[ ${CTARGET} == ${CHOST} ]] ; then |
58 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
59 |
export CTARGET=${CATEGORY/cross-} |
60 |
fi |
61 |
fi |
62 |
# Handle the case where we want uclibc on glibc ... |
63 |
if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-uclibc* ]] ; then |
64 |
export UCLIBC_AND_GLIBC="sitting in a tree" |
65 |
export CTARGET=${CHOST%%-*}-pc-linux-uclibc |
66 |
fi |
67 |
|
68 |
MY_P=uClibc-0.9.30-rc3 |
69 |
SVN_VER="" |
70 |
#PATCH_VER="0.1" |
71 |
DESCRIPTION="C library for developing embedded Linux systems" |
72 |
HOMEPAGE="http://www.uclibc.org/" |
73 |
SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2 |
74 |
iconv? ( !userlocales? ( pregen? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz |
75 |
) ) )" |
76 |
[[ -z ${SVN_VER} ]] || \ |
77 |
SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" |
78 |
[[ -z ${PATCH_VER} ]] || \ |
79 |
SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" |
80 |
|
81 |
LICENSE="LGPL-2" |
82 |
[[ ${CTARGET} != ${CHOST} ]] \ |
83 |
&& SLOT="${CTARGET}" \ |
84 |
|| SLOT="0" |
85 |
KEYWORDS="-* ~arm ~m68k -mips ~ppc ~sh ~sparc ~x86 ~amd64" |
86 |
IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen userlocales wordexp crosscompile_opts_headers-only" |
87 |
RESTRICT="strip" |
88 |
|
89 |
RDEPEND="" |
90 |
if [[ ${CTARGET} == ${CHOST} ]] ; then |
91 |
DEPEND="virtual/os-headers app-misc/pax-utils" |
92 |
PROVIDE="virtual/libc" |
93 |
else |
94 |
DEPEND="" |
95 |
fi |
96 |
|
97 |
S=${WORKDIR}/${MY_P} |
98 |
|
99 |
alt_build_kprefix() { |
100 |
if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ |
101 |
|| [[ -n ${UCLIBC_AND_GLIBC} ]] |
102 |
then |
103 |
echo /usr/include |
104 |
else |
105 |
echo /usr/${CTARGET}/usr/include |
106 |
fi |
107 |
} |
108 |
just_headers() { |
109 |
use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] |
110 |
} |
111 |
|
112 |
uclibc_endian() { |
113 |
# XXX: this wont work for a toolchain which is bi-endian, but we |
114 |
# dont have any such thing at the moment, so not a big deal |
115 |
touch "${T}"/endian.s |
116 |
$(tc-getAS) "${T}"/endian.s -o "${T}"/endian.o |
117 |
case $(file "${T}"/endian.o) in |
118 |
*" MSB "*) echo "big";; |
119 |
*" LSB "*) echo "little";; |
120 |
*) echo "NFC";; |
121 |
esac |
122 |
rm -f "${T}"/endian.{s,o} |
123 |
} |
124 |
|
125 |
pkg_setup() { |
126 |
just_headers && return 0 |
127 |
has_version ${CATEGORY}/uclibc || return 0 |
128 |
[[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 |
129 |
[[ ${ROOT} != "/" ]] && return 0 |
130 |
[[ ${CATEGORY} == cross-* ]] && return 0 |
131 |
|
132 |
if use iconv ; then |
133 |
eerror "iconv - bad idea" |
134 |
fi |
135 |
if use nls ; then |
136 |
eerror "nls - even worse idea" |
137 |
fi |
138 |
if use pregen || use userlocales ; then |
139 |
eerror "pregen, userlocales - meaningless without nls" |
140 |
fi |
141 |
if use iconv || use nls || use pregen || use userlocales ; then |
142 |
eerror "compile without nls/gettext support" |
143 |
fi |
144 |
if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then |
145 |
eerror "You previously built uclibc with USE=-nls." |
146 |
eerror "You cannot generate locale data with this" |
147 |
eerror "system. Please rerun emerge with USE=pregen." |
148 |
die "host cannot support locales" |
149 |
elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then |
150 |
eerror "You previously built uclibc with USE=nls." |
151 |
eerror "Rebuilding uClibc with USE=-nls will prob" |
152 |
eerror "destroy your system." |
153 |
# die "switching from nls is baaaad" |
154 |
fi |
155 |
} |
156 |
|
157 |
PIE_STABLE="arm mips ppc x86" |
158 |
|
159 |
CPU_ALPHA="" |
160 |
CPU_AMD64="" |
161 |
CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT}}" |
162 |
CPU_IA64="" |
163 |
CPU_M68K="" |
164 |
CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}} MIPS_{N64,O32,N32}_ABI" |
165 |
CPU_PPC="" |
166 |
CPU_SH="SH{2,3,4,5}" |
167 |
CPU_SPARC="SPARC_V{7,8,9,9B}" |
168 |
CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH" |
169 |
IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}" |
170 |
|
171 |
check_cpu_opts() { |
172 |
local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" |
173 |
[[ -z ${!cpu_var} ]] && return 0 |
174 |
|
175 |
if [[ -z ${UCLIBC_CPU} ]] ; then |
176 |
ewarn "You really should consider setting UCLIBC_CPU" |
177 |
ewarn "Otherwise, the build will be generic (read: slow)." |
178 |
ewarn "Available CPU options:" |
179 |
UCLIBC_CPU=$(eval echo ${!cpu_var}) |
180 |
echo ${UCLIBC_CPU} |
181 |
case ${CTARGET} in |
182 |
mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; |
183 |
sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; |
184 |
i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; |
185 |
*) export UCLIBC_CPU=${UCLIBC_CPU%% *};; |
186 |
esac |
187 |
else |
188 |
local cpu found=0 |
189 |
for cpu in $(eval echo ${!cpu_var}) ; do |
190 |
[[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break |
191 |
done |
192 |
if [[ ${found} -eq 0 ]] ; then |
193 |
ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported" |
194 |
ewarn "Valid choices:" |
195 |
eval echo ${!cpu_var} |
196 |
die "pick a supported cpu type" |
197 |
fi |
198 |
fi |
199 |
} |
200 |
|
201 |
set_opt() { |
202 |
sed -i -e "/^\# $1 is not set/d" -e "/^$1=.*/d" .config |
203 |
echo "$1=$2" >> .config |
204 |
} |
205 |
|
206 |
src_unpack() { |
207 |
[[ -n ${ESVN_REPO_URI} ]] \ |
208 |
&& subversion_src_unpack \ |
209 |
|| unpack ${A} |
210 |
cd "${S}" |
211 |
|
212 |
check_cpu_opts |
213 |
|
214 |
echo |
215 |
einfo "Runtime Prefix: /" |
216 |
einfo "Devel Prefix: /usr" |
217 |
einfo "Kernel Prefix: $(alt_build_kprefix)" |
218 |
einfo "CBUILD: ${CBUILD}" |
219 |
einfo "CHOST: ${CHOST}" |
220 |
einfo "CTARGET: ${CTARGET}" |
221 |
einfo "CPU: ${UCLIBC_CPU:-default}" |
222 |
einfo "ENDIAN: $(uclibc_endian)" |
223 |
echo |
224 |
|
225 |
########## PATCHES ########## |
226 |
|
227 |
[[ -n ${SVN_VER} ]] && \ |
228 |
epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch |
229 |
|
230 |
if [[ -n ${PATCH_VER} ]] ; then |
231 |
unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 |
232 |
EPATCH_SUFFIX="patch" |
233 |
epatch "${WORKDIR}"/patch |
234 |
# math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) |
235 |
cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die |
236 |
epatch "${WORKDIR}"/patch/math |
237 |
fi |
238 |
|
239 |
if [[ -d "${FILESDIR}"/patches-${PV} ]] ; then |
240 |
EPATCH_SUFFIX="patch" |
241 |
epatch "${FILESDIR}"/patches-${PV} |
242 |
if [[ -d "${FILESDIR}"/patches-${PV}/math/libm ]] ; then |
243 |
# math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f) |
244 |
cp "${FILESDIR}"/patches-${PV}/math/libm/* "${S}"/libm/ || die |
245 |
epatch "${FILESDIR}"/patches-${PV}/math |
246 |
fi |
247 |
fi |
248 |
|
249 |
########## CPU SELECTION ########## |
250 |
|
251 |
local target config_target |
252 |
case $(tc-arch) in |
253 |
alpha) target="alpha"; config_target="no cpu-specific options";; |
254 |
amd64) target="x86_64"; config_target="no cpu-specific options";; |
255 |
arm) target="arm"; config_target="GENERIC_ARM";; |
256 |
ia64) target="ia64"; config_target="no cpu-specific options";; |
257 |
m68k) target="m68k"; config_target="no cpu-specific options";; |
258 |
mips) target="mips"; config_target="MIPS_ISA_1";; |
259 |
ppc) target="powerpc"; config_target="no cpu-specific options";; |
260 |
sh) target="sh"; config_target="SH4";; |
261 |
sparc) target="sparc"; config_target="no cpu-specific options";; |
262 |
x86) target="i386"; config_target="GENERIC_386";; |
263 |
*) die "$(tc-arch) lists no defaults :/";; |
264 |
esac |
265 |
sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ |
266 |
extra/Configs/Config.${target} |
267 |
sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak |
268 |
|
269 |
########## CONFIG SETUP ########## |
270 |
|
271 |
make ARCH=${target} defconfig >/dev/null || die "could not config" |
272 |
|
273 |
for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do |
274 |
sed -i -e "s:${def}=y:# ${def} is not set:" .config |
275 |
done |
276 |
if use debug ; then |
277 |
set_opt SUPPORT_LD_DEBUG y |
278 |
set_opt DODEBUG y |
279 |
fi |
280 |
|
281 |
sed -i -e '/ARCH_.*_ENDIAN/d' .config |
282 |
set_opt "ARCH_WANTS_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN" y |
283 |
|
284 |
if [[ $(tc-is-softfloat) != "no" ]] ; then |
285 |
set_opt UCLIBC_HAS_FPU n |
286 |
fi |
287 |
|
288 |
if [[ ${CTARGET/eabi} != ${CTARGET} ]] ; then |
289 |
set_opt CONFIG_ARM_OABI n |
290 |
set_opt CONFIG_ARM_EABI y |
291 |
fi |
292 |
|
293 |
local moredefs="COMPAT_ATEXIT" |
294 |
local compat_sym=atexit |
295 |
|
296 |
# We need todo this for a few months. .29 is a major upgrade. |
297 |
# Don't do it from cross-compiling case though |
298 |
if ! use uclibc-compat ; then |
299 |
if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ |
300 |
! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then |
301 |
local fnames="" |
302 |
einfo "Doing a scanelf in paths for bins containing the ${compat_sym} symbol" |
303 |
fnames=$(scanelf -pyqs${compat_sym} -F%F#s) |
304 |
if [[ -z ${fnames} ]] ; then |
305 |
einfo "This system is clean." |
306 |
einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" |
307 |
moredefs="" |
308 |
else |
309 |
ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." |
310 |
ewarn "qfile -Cq $(echo ${fnames}) | sort | uniq" |
311 |
echo |
312 |
ewarn "Leaving on ${moredefs}" |
313 |
fi |
314 |
else |
315 |
moredefs="" |
316 |
fi |
317 |
fi |
318 |
for def in ${moredefs} MALLOC_GLIBC_COMPAT DO_C99_MATH UCLIBC_HAS_{RPC,FULL_RPC,CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC,FTW} UCLIBC_HAS_REENTRANT_RPC UCLIBC_HAS_GNU_GLOB PTHREADS_DEBUG_SUPPORT UCLIBC_HAS_TZ_FILE_READ_MANY UCLIBC_HAS_FENV UCLIBC_SUSV3_LEGACY UCLIBC_SUSV3_LEGACY_MACROS UCLIBC_HAS_PROGRAM_INVOCATION_NAME ; do |
319 |
set_opt "${def}" y |
320 |
done |
321 |
set_opt UCLIBC_HAS_CTYPE_UNSAFE n |
322 |
|
323 |
if use iconv ; then |
324 |
set_opt UCLIBC_HAS_LOCALE y |
325 |
set_opt UCLIBC_HAS_XLOCALE n |
326 |
set_opt UCLIBC_HAS_GLIBC_DIGIT_GROUPING y |
327 |
set_opt UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING y |
328 |
|
329 |
if use nls ; then |
330 |
set_opt UCLIBC_HAS_GETTEXT_AWARENESS y |
331 |
set_opt UCLIBC_MJN3_ONLY y |
332 |
else |
333 |
set_opt UCLIBC_HAS_GETTEXT_AWARENESS n |
334 |
fi |
335 |
|
336 |
if use pregen ; then |
337 |
set_opt UCLIBC_PREGENERATED_LOCALE_DATA y |
338 |
set_opt UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA y |
339 |
if use userlocales ; then |
340 |
cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \ |
341 |
extra/locale/uClibc-locale-030818.tgz \ |
342 |
|| die "could not copy ${MY_P}-user-locale.tar.gz" |
343 |
else |
344 |
cp "${DISTDIR}"/uClibc-locale-030818.tgz \ |
345 |
extra/locale/uClibc-locale-030818.tgz \ |
346 |
|| die "could not copy locale" |
347 |
fi |
348 |
else |
349 |
set_opt UCLIBC_PREGENERATED_LOCALE_DATA n |
350 |
fi |
351 |
else |
352 |
set_opt UCLIBC_HAS_LOCALE n |
353 |
fi |
354 |
|
355 |
use ipv6 && set_opt UCLIBC_HAS_IPV6 y |
356 |
|
357 |
use wordexp && set_opt UCLIBC_HAS_WORDEXP y |
358 |
|
359 |
# we need to do it independently of hardened to get ssp.c built into libc |
360 |
set_opt UCLIBC_HAS_SSP y |
361 |
set_opt UCLIBC_HAS_SSP_COMPAT y |
362 |
set_opt UCLIBC_HAS_ARC4RANDOM y |
363 |
set_opt PROPOLICE_BLOCK_ABRT n |
364 |
set_opt PROPOLICE_BLOCK_SEGV y |
365 |
|
366 |
# arm/mips do not emit PT_GNU_STACK, but if we enable this here |
367 |
# it will be emitted as RWE, ppc has to be checked, x86 needs it |
368 |
# this option should be used independently of hardened |
369 |
# relro could be also moved out of hardened |
370 |
if has $(tc-arch) x86 ; then |
371 |
set_opt UCLIBC_BUILD_NOEXECSTACK y |
372 |
else |
373 |
set_opt UCLIBC_BUILD_NOEXECSTACK n |
374 |
fi |
375 |
set_opt UCLIBC_BUILD_RELRO y |
376 |
if use hardened ; then |
377 |
if has $(tc-arch) ${PIE_STABLE} ; then |
378 |
set_opt UCLIBC_BUILD_PIE y |
379 |
else |
380 |
set_opt UCLIBC_BUILD_PIE n |
381 |
fi |
382 |
set_opt SSP_QUICK_CANARY n |
383 |
set_opt UCLIBC_BUILD_SSP y |
384 |
set_opt UCLIBC_BUILD_NOW y |
385 |
else |
386 |
set_opt UCLIBC_BUILD_PIE n |
387 |
set_opt SSP_QUICK_CANARY y |
388 |
set_opt UCLIBC_BUILD_SSP n |
389 |
set_opt UCLIBC_BUILD_NOW n |
390 |
fi |
391 |
|
392 |
restore_config .config |
393 |
|
394 |
# setup build and run paths |
395 |
local cross=${CTARGET}- |
396 |
type -p ${cross}ar > /dev/null || cross="" |
397 |
sed -i \ |
398 |
-e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ |
399 |
-e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \ |
400 |
-e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ |
401 |
-e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ |
402 |
-e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ |
403 |
-e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \ |
404 |
.config || die |
405 |
|
406 |
yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" |
407 |
|
408 |
cp .config myconfig |
409 |
|
410 |
emake -s clean > /dev/null || die "could not clean" |
411 |
} |
412 |
|
413 |
setup_locales() { |
414 |
cd "${S}"/extra/locale |
415 |
if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then |
416 |
:; |
417 |
elif use minimal ; then |
418 |
find ./charmaps -name ASCII.pairs > codesets.txt |
419 |
find ./charmaps -name ISO-8859-1.pairs >> codesets.txt |
420 |
cat <<-EOF > locales.txt |
421 |
@euro e |
422 |
UTF-8 yes |
423 |
8-bit yes |
424 |
en_US ISO-8859-1 |
425 |
en_US.UTF-8 UTF-8 |
426 |
EOF |
427 |
else |
428 |
find ./charmaps -name '*.pairs' > codesets.txt |
429 |
cp LOCALES locales.txt |
430 |
fi |
431 |
cd - |
432 |
} |
433 |
|
434 |
src_compile() { |
435 |
cp myconfig .config |
436 |
|
437 |
emake headers || die "make headers failed" |
438 |
just_headers && return 0 |
439 |
|
440 |
if use iconv && ! use pregen ; then |
441 |
cd extra/locale |
442 |
make clean || die "make locale clean failed" |
443 |
setup_locales |
444 |
emake || die "make locales failed" |
445 |
cd ../.. |
446 |
fi |
447 |
|
448 |
emake || die "make failed" |
449 |
if [[ ${CTARGET} != ${CHOST} ]] ; then |
450 |
emake -C utils hostutils || die "make hostutils failed" |
451 |
elif [[ ${CHOST} == *-uclibc* ]] ; then |
452 |
emake utils || die "make utils failed" |
453 |
fi |
454 |
} |
455 |
|
456 |
src_test() { |
457 |
[[ ${CHOST} != ${CTARGET} ]] && return 0 |
458 |
[[ ${CBUILD} != ${CHOST} ]] && return 0 |
459 |
|
460 |
# assert test fails on pax/grsec enabled kernels - normal |
461 |
# vfork test fails in sandbox (both glibc/uclibc) |
462 |
make UCLIBC_ONLY=1 check || die "test failed" |
463 |
} |
464 |
|
465 |
src_install() { |
466 |
local sysroot=${D} |
467 |
[[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" |
468 |
|
469 |
local target="install" |
470 |
just_headers && target="install_headers" |
471 |
emake DESTDIR="${sysroot}" ${target} || die "install failed" |
472 |
|
473 |
just_headers && return 0 |
474 |
|
475 |
save_config .config |
476 |
|
477 |
# remove files coming from kernel-headers |
478 |
rm -rf "${sysroot}"/usr/include/{linux,asm*} |
479 |
|
480 |
# Make sure we install the sys-include symlink so that when |
481 |
# we build a 2nd stage cross-compiler, gcc finds the target |
482 |
# system headers correctly. See gcc/doc/gccinstall.info |
483 |
if [[ ${CTARGET} != ${CHOST} ]] ; then |
484 |
dosym usr/include /usr/${CTARGET}/sys-include |
485 |
newbin utils/ldconfig.host ${CTARGET}-ldconfig || die |
486 |
newbin utils/ldd.host ${CTARGET}-ldd || die |
487 |
return 0 |
488 |
fi |
489 |
|
490 |
if [[ ${CHOST} == *-uclibc* ]] ; then |
491 |
make DESTDIR="${D}" install_utils || die "install-utils failed" |
492 |
dobin extra/scripts/getent |
493 |
fi |
494 |
|
495 |
if ! use build ; then |
496 |
dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 |
497 |
doman docs/man/*.[1-9] |
498 |
fi |
499 |
} |
500 |
|
501 |
pkg_postinst() { |
502 |
[[ ${CTARGET} != ${CHOST} ]] && return 0 |
503 |
[[ ${CHOST} != *-uclibc* ]] && return 0 |
504 |
|
505 |
if [[ ! -e ${ROOT}/etc/TZ ]] ; then |
506 |
ewarn "Please remember to set your timezone in /etc/TZ" |
507 |
[[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc |
508 |
echo "UTC" > "${ROOT}"/etc/TZ |
509 |
fi |
510 |
|
511 |
if [[ ${ROOT} == "/" ]] ; then |
512 |
# update cache before reloading init |
513 |
/sbin/ldconfig |
514 |
# reload init ... |
515 |
[[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null |
516 |
fi |
517 |
} |