Gentoo Archives: gentoo-commits

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