summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-libs/uclibc/ChangeLog7
-rw-r--r--sys-libs/uclibc/Manifest10
-rw-r--r--sys-libs/uclibc/files/digest-uclibc-0.9.282
-rw-r--r--sys-libs/uclibc/uclibc-0.9.28.ebuild372
4 files changed, 386 insertions, 5 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog
index a7a2eaea4f42..8dd3880f1964 100644
--- a/sys-libs/uclibc/ChangeLog
+++ b/sys-libs/uclibc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-libs/uclibc
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.9 2005/08/05 00:06:10 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.10 2005/08/18 03:53:03 vapier Exp $
+
+*uclibc-0.9.28 (18 Aug 2005)
+
+ 18 Aug 2005; Mike Frysinger <vapier@gentoo.org> +uclibc-0.9.28.ebuild:
+ Version bump.
05 Aug 2005; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.27.ebuild,
uclibc-0.9.27-r1.ebuild:
diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest
index cccacbc18a97..a7528f851717 100644
--- a/sys-libs/uclibc/Manifest
+++ b/sys-libs/uclibc/Manifest
@@ -1,17 +1,19 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+MD5 5dcceca7fadef9e94b89f40ff474261d uclibc-0.9.28.ebuild 11101
MD5 e96b4dfc373a1cdf7735aeae52c4cf7e metadata.xml 999
MD5 edfd2313b43acb801cb0b72ddd6d36f8 uclibc-0.9.27.ebuild 10387
-MD5 1b764d593a86e8666d863afc0d606e58 ChangeLog 9277
+MD5 7f032d39812e09cd462f33f448a084d4 ChangeLog 9398
MD5 412319fe8b773b9f524f7cebb22d7345 uclibc-0.9.27-r1.ebuild 11815
MD5 e84bc74ebe851508f689390fd41fdbbd files/digest-uclibc-0.9.27 229
+MD5 e43e6f1125a4f8ec0c7f42091c2f4681 files/digest-uclibc-0.9.28 136
MD5 852a30be80c7911de6b861dd4140c05c files/digest-uclibc-0.9.27-r1 298
MD5 684def72ebc0da73cb8b6d1c53e7e8fb files/getent 1112
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-iD8DBQFC/W5hgIKl8Uu19MoRAtutAJ9AO2XY7Gan/wBIZ0QXKxHsnKqtfACdFvai
-Nklv9hCfYdYqt78E+77/juo=
-=rg01
+iD8DBQFDBAY5gIKl8Uu19MoRAkS7AJ9h9/bDfOVlfD1L/Vkxa/S6fAAKaQCdHR5p
+Q8yttzazhrP9Vyqeo7K/2zM=
+=I6G8
-----END PGP SIGNATURE-----
diff --git a/sys-libs/uclibc/files/digest-uclibc-0.9.28 b/sys-libs/uclibc/files/digest-uclibc-0.9.28
new file mode 100644
index 000000000000..f580002d766a
--- /dev/null
+++ b/sys-libs/uclibc/files/digest-uclibc-0.9.28
@@ -0,0 +1,2 @@
+MD5 1ada58d919a82561061e4741fb6abd29 uClibc-0.9.28.tar.bz2 1763847
+MD5 d75b2239b4e27c3c9cbed1c8f6eabba6 uClibc-locale-030818.tgz 236073
diff --git a/sys-libs/uclibc/uclibc-0.9.28.ebuild b/sys-libs/uclibc/uclibc-0.9.28.ebuild
new file mode 100644
index 000000000000..0ef0b610d737
--- /dev/null
+++ b/sys-libs/uclibc/uclibc-0.9.28.ebuild
@@ -0,0 +1,372 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.ebuild,v 1.1 2005/08/18 03:53:03 vapier Exp $
+
+#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc"
+#inherit subversion
+inherit eutils flag-o-matic toolchain-funcs
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+# Handle the case where we want uclibc on glibc ...
+if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-uclibc ]] ; then
+ export UCLIBC_AND_GLIBC="sitting in a tree"
+ export CTARGET=${CHOST%%-*}-pc-linux-uclibc
+fi
+
+MY_P=${P/ucl/uCl}
+SVN_VER=""
+PATCH_VER=""
+DESCRIPTION="C library for developing embedded Linux systems"
+HOMEPAGE="http://www.uclibc.org/"
+SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2
+ nls? ( !userlocales? ( pregen? (
+ x86? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz )
+ ) ) )"
+
+LICENSE="LGPL-2"
+[[ ${CTARGET} != ${CHOST} ]] \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="-* ~sh" #~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86"
+IUSE="build debug hardened ipv6 minimal nls pregen userlocales wordexp"
+RESTRICT="nostrip"
+
+DEPEND="virtual/os-headers"
+RDEPEND=""
+[[ ${CTARGET} == ${CHOST} ]] && PROVIDE="virtual/libc"
+
+S=${WORKDIR}/${MY_P}
+
+alt_kprefix() {
+ if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \
+ || [[ -n ${UCLIBC_AND_GLIBC} ]]
+ then
+ echo /usr
+ else
+ echo /usr/${CTARGET}
+ fi
+}
+alt_prefix() {
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
+ echo /usr
+ else
+ echo /usr/${CTARGET}
+ fi
+}
+alt_rprefix() {
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
+ echo /
+ else
+ echo /usr/${CTARGET}/
+ fi
+}
+
+pkg_setup() {
+ [[ -z $(best_version ${CATEGORY}/uclibc) ]] && return 0
+
+ if ! built_with_use ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then
+ eerror "You previously built uclibc with USE=-nls."
+ eerror "You cannot generate locale data with this"
+ eerror "system. Please rerun emerge with USE=pregen."
+ die "host cannot support locales"
+ elif built_with_use ${CATEGORY}/uclibc nls && ! use nls ; then
+ eerror "You previously built uclibc with USE=nls."
+ eerror "Rebuilding uClibc with USE=-nls will prob"
+ eerror "destroy your system."
+ die "switching from nls is baaaad"
+ fi
+}
+
+CPU_AMD64=""
+CPU_ARM="GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}"
+CPU_M68K=""
+CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}}"
+CPU_PPC=""
+CPU_SH="SH{2,3,4,5}"
+CPU_SPARC=""
+CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH"
+IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}"
+
+check_cpu_opts() {
+ local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])"
+ [[ -z ${!cpu_var} ]] && return 0
+
+ if [[ -z ${UCLIBC_CPU} ]] ; then
+ ewarn "You really should consider setting UCLIBC_CPU"
+ ewarn "Otherwise, the build will be generic (read: slow)."
+ ewarn "Available CPU options:"
+ UCLIBC_CPU=$(eval echo ${!cpu_var})
+ echo ${UCLIBC_CPU}
+ export UCLIBC_CPU=${UCLIBC_CPU%% *}
+ else
+ local cpu found=0
+ for cpu in $(eval echo ${!cpu_var}) ; do
+ [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break
+ done
+ if [[ ${found} -eq 0 ]] ; then
+ ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported"
+ ewarn "Valid choices:"
+ eval echo ${!cpu_var}
+ die "pick a supported cpu type"
+ fi
+ fi
+}
+
+src_unpack() {
+ [[ -n ${ESVN_REPO_URI} ]] \
+ && subversion_src_unpack \
+ || unpack ${A}
+ cd "${S}"
+ check_cpu_opts
+
+ echo
+ einfo "Runtime Prefix: $(alt_rprefix)"
+ einfo "Kernel Prefix: $(alt_kprefix)"
+ einfo "Devel Prefix: $(alt_prefix)"
+ einfo "CBUILD: ${CBUILD}"
+ einfo "CHOST: ${CHOST}"
+ einfo "CTARGET: ${CTARGET}"
+ einfo "CPU: ${UCLIBC_CPU:-default}"
+ einfo "ENDIAN: $(tc-endian)"
+ echo
+
+ ########## PATCHES ##########
+
+ [[ -n ${SVN_VER} ]] && \
+ epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch
+
+ if [[ -n ${PATCH_VER} ]] ; then
+ unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2
+ EPATCH_SUFFIX="patch"
+ epatch "${WORKDIR}"/patch
+ # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f)
+ use build || epatch "${WORKDIR}"/patch/math
+ fi
+
+ ########## CPU SELECTION ##########
+
+ local target config_target
+ case $(tc-arch) in
+ amd64) target="x86_64"; config_target="no cpu-specific options";;
+ arm) target="arm"; config_target="GENERIC_ARM";;
+ m68k) target="m68k"; config_target="no cpu-specific options";;
+ mips) target="mips"; config_target="MIPS_ISA_1";;
+ ppc) target="powerpc"; config_target="no cpu-specific options";;
+ sh) target="sh"; config_target="SH4";;
+ x86) target="i386"; config_target="GENERIC_386";;
+ *) die "$(tc-arch) lists no defaults :/";;
+ esac
+ sed -i -e "s:default TARGET_i386:default TARGET_${target}:" \
+ extra/Configs/Config.in
+ sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
+ extra/Configs/Config.${target}
+
+ ########## CONFIG SETUP ##########
+
+ make defconfig >/dev/null || die "could not config"
+
+ for def in UCLIBC_PROFILING DO{DEBUG,ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do
+ sed -i -e "s:${def}=y:# ${def} is not set:" .config
+ done
+ if use debug ; then
+ echo "SUPPORT_LD_DEBUG=y" >> .config
+ echo "DODEBUG=y" >> .config
+ fi
+
+ sed -i -e '/ARCH_.*_ENDIAN/d' .config
+ echo "ARCH_$(tc-endian | tr [a-z] [A-Z])_ENDIAN=y" >> .config
+
+ if [[ ${CTARGET} == *-softfloat-* ]] ; then
+ sed -i -e '/^HAS_FPU=y$/d' .config
+ echo 'HAS_FPU=n' >> .config
+ fi
+
+ for def in DO_C99_MATH UCLIBC_HAS_{RPC,CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC,FTW} ; do
+ sed -i -e "s:# ${def} is not set:${def}=y:" .config
+ done
+ echo "UCLIBC_HAS_FULL_RPC=y" >> .config
+ echo "PTHREADS_DEBUG_SUPPORT=y" >> .config
+ echo "UCLIBC_HAS_TZ_FILE_READ_MANY=n" >> .config
+
+ if use nls ; then
+ sed -i -e "s:# UCLIBC_HAS_LOCALE is not set:UCLIBC_HAS_LOCALE=y:" .config
+ echo "UCLIBC_HAS_XLOCALE=n" >> .config
+ echo "UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y" >> .config
+ echo "UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y" >> .config
+ echo "UCLIBC_HAS_GETTEXT_AWARENESS=y" >> .config
+
+ if use pregen ; then
+ echo "UCLIBC_PREGENERATED_LOCALE_DATA=y" >> .config
+ echo "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y" >> .config
+ if use userlocales ; then
+ cp "${DISTDIR}"/${P}-user-locale.tar.gz \
+ extra/locale/uClibc-locale-030818.tgz \
+ || die "could not copy ${P}-user-locale.tar.gz"
+ else
+ cp "${DISTDIR}"/${P}-$(tc-arch)-full-locale.tar.gz \
+ extra/locale/uClibc-locale-030818.tgz \
+ || die "could not copy locale"
+ fi
+ else
+ echo "UCLIBC_PREGENERATED_LOCALE_DATA=n" >> .config
+ fi
+ else
+ echo "UCLIBC_HAS_LOCALE=n" >> .config
+ fi
+
+ use ipv6 && sed -i -e "s:# UCLIBC_HAS_IPV6 is not set:UCLIBC_HAS_IPV6=y:" .config
+
+ # uncomment if you miss wordexp (alsa-lib)
+ use wordexp && sed -i -e "s:# UCLIBC_HAS_WORDEXP is not set:UCLIBC_HAS_WORDEXP=y:" .config
+
+ # we need to do it independently of hardened to get ssp.c built into libc
+ sed -i -e "s:# UCLIBC_SECURITY.*:UCLIBC_SECURITY=y:" .config
+ echo "UCLIBC_HAS_SSP=y" >> .config
+ echo "PROPOLICE_BLOCK_ABRT=n" >> .config
+ if use debug ; then
+ echo "PROPOLICE_BLOCK_SEGV=y" >> .config
+ echo "PROPOLICE_BLOCK_KILL=n" >> .config
+ else
+ echo "PROPOLICE_BLOCK_SEGV=n" >> .config
+ echo "PROPOLICE_BLOCK_KILL=y" >> .config
+ fi
+
+ if use hardened ; then
+ echo "UCLIBC_BUILD_PIE=y" >> .config
+ echo "SSP_QUICK_CANARY=n" >> .config
+ echo "UCLIBC_BUILD_SSP=y" >> .config
+ echo "UCLIBC_BUILD_RELRO=y" >> .config
+ echo "UCLIBC_BUILD_NOW=y" >> .config
+ echo "UCLIBC_BUILD_NOEXECSTACK=y" >> .config
+ else
+ echo "UCLIBC_BUILD_PIE=n" >> .config
+ echo "SSP_QUICK_CANARY=y" >> .config
+ echo "UCLIBC_BUILD_SSP=n" >> .config
+ echo "UCLIBC_BUILD_RELRO=n" >> .config
+ echo "UCLIBC_BUILD_NOW=n" >> .config
+ echo "UCLIBC_BUILD_NOEXECSTACK=n" >> .config
+ fi
+
+ # we are building against system installed kernel headers
+ local cross=${CTARGET}-
+ type -p ${cross}ar > /dev/null || cross=""
+ sed -i \
+ -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \
+ -e "/^KERNEL_SOURCE/s:=.*:=\"$(alt_kprefix)\":" \
+ -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"$(alt_rprefix)$(get_libdir)\":" \
+ -e "/^DEVEL_PREFIX/s:=.*:=\"$(alt_prefix)\":" \
+ -e "/^RUNTIME_PREFIX/s:=.*:=\"$(alt_rprefix)\":" \
+ .config || die
+
+ yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig"
+
+ chmod +x extra/scripts/relative_path.sh
+
+ cp .config myconfig
+
+ emake -s clean > /dev/null || die "could not clean"
+}
+
+setup_locales() {
+ cd "${S}"/extra/locale
+ if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then
+ :;
+ elif use minimal ; then
+ find ./charmaps -name ASCII.pairs > codesets.txt
+ find ./charmaps -name ISO-8859-1.pairs >> codesets.txt
+ cat <<-EOF > locales.txt
+ @euro e
+ UTF-8 yes
+ 8-bit yes
+ en_US ISO-8859-1
+ en_US.UTF-8 UTF-8
+ EOF
+ else
+ find ./charmaps -name '*.pairs' > codesets.txt
+ cp LOCALES locales.txt
+ fi
+ cd -
+}
+
+src_compile() {
+ cp myconfig .config
+
+ emake headers || die "make headers failed"
+ if use nls && ! use pregen ; then
+ cd extra/locale
+ make clean || die "make locale clean failed"
+ setup_locales
+ emake || die "make locales failed"
+ cd ../..
+ fi
+
+ emake || die "make failed"
+ [[ ${CTARGET} != ${CHOST} ]] && return 0
+
+ if [[ ${CHOST} == *-uclibc ]] ; then
+ emake utils || die "make utils failed"
+ fi
+}
+
+src_test() {
+ [[ ${CHOST} != ${CTARGET} ]] && return 0
+ [[ ${CBUILD} != ${CHOST} ]] && return 0
+
+ # This is wrong, but uclibc's tests fail bad when screwing
+ # around with sandbox, so lets just punt it
+ unset LD_PRELOAD
+
+ # assert test fails on pax/grsec enabled kernels - normal
+ # vfork test fails in sandbox (both glibc/uclibc)
+ make check || die "test failed"
+}
+
+src_install() {
+ make PREFIX="${D}" install || die "install failed"
+
+ # remove files coming from kernel-headers
+ rm -rf "${D}"$(alt_prefix)/include/{asm,linux,asm-generic}
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ dosym include $(alt_prefix)/sys-include
+ dosym . $(alt_prefix)/usr
+ return 0
+ fi
+
+ if [[ ${CHOST} == *-uclibc ]] ; then
+ make PREFIX="${D}" install_utils || die "install-utils failed"
+ dobin extra/scripts/getent
+ fi
+
+ if ! use build ; then
+ dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
+ doman docs/man/*.1
+ fi
+}
+
+pkg_postinst() {
+ [[ ${CTARGET} != ${CHOST} ]] && return 0
+ [[ ${CHOST} != *-uclibc ]] && return 0
+
+ if [[ ! -e ${ROOT}/etc/TZ ]] ; then
+ ewarn "Please remember to set your timezone in /etc/TZ"
+ [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc
+ echo "UTC" > "${ROOT}"/etc/TZ
+ fi
+
+ if [[ ${ROOT} == "/" ]] ; then
+ # update cache before reloading init
+ /sbin/ldconfig
+ # reload init ...
+ [[ -x /sbin/init ]] && /sbin/init U &> /dev/null
+ fi
+}