diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-09-16 05:03:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-09-16 05:03:17 +0000 |
commit | 9f69a8648b29bdec2b4ca285368b5f31b21f4961 (patch) | |
tree | e52dc1fa345d27bff47b637c58af2a99288afc3f /sys-libs/glibc | |
parent | Mark 2.19 stable on alpha (diff) | |
download | gentoo-2-9f69a8648b29bdec2b4ca285368b5f31b21f4961.tar.gz gentoo-2-9f69a8648b29bdec2b4ca285368b5f31b21f4961.tar.bz2 gentoo-2-9f69a8648b29bdec2b4ca285368b5f31b21f4961.zip |
add quoting to a lot more variables and touch up coding style in a few places
(Portage version: 2.0.52-r1 http://ronaldmcnightrider.ytmnd.com/ )
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r-- | sys-libs/glibc/glibc-2.3.4.20041102-r2.ebuild | 116 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.3.4.20050125-r1.ebuild | 129 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.3.5-r1.ebuild | 118 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.3.5.20050421.ebuild | 116 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.3.5.20050722.ebuild | 118 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.3.5.ebuild | 118 |
6 files changed, 367 insertions, 348 deletions
diff --git a/sys-libs/glibc/glibc-2.3.4.20041102-r2.ebuild b/sys-libs/glibc/glibc-2.3.4.20041102-r2.ebuild index bf8ff383b759..18205539ea3b 100644 --- a/sys-libs/glibc/glibc-2.3.4.20041102-r2.ebuild +++ b/sys-libs/glibc/glibc-2.3.4.20041102-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.4.20041102-r2.ebuild,v 1.3 2005/09/16 02:03:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.4.20041102-r2.ebuild,v 1.4 2005/09/16 05:03:17 vapier Exp $ # Here's how the cross-compile logic breaks down ... # CTARGET - machine that will target the binaries @@ -170,7 +170,7 @@ get_glibc_src_uri() { } SRC_URI=$(get_glibc_src_uri) -S="${WORKDIR}/${PN}-${GLIBC_RELEASE_VER}" +S=${WORKDIR}/${PN}-${GLIBC_RELEASE_VER} ### EXPORTED FUNCTIONS ### toolchain-glibc_src_unpack() { @@ -265,7 +265,7 @@ toolchain-glibc_src_compile() { fi if want_nptl ; then # ... and then do the optional nptl build - unset LD_ASSUME_KERNEL || : + unset LD_ASSUME_KERNEL glibc_do_configure nptl einfo "Building GLIBC with NPTL..." make PARALLELMFLAGS="${MAKEOPTS}" ${MAKEFLAGS} || die @@ -279,12 +279,12 @@ toolchain-glibc_src_test() { # do the linuxthreads build unless we're using nptlonly if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads einfo "Checking GLIBC with linuxthreads..." make check || die "linuxthreads glibc did not pass make check" fi if want_nptl ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl unset LD_ASSUME_KERNEL || : einfo "Checking GLIBC with NPTL..." make check || die "nptl glibc did not pass make check" @@ -326,16 +326,16 @@ toolchain-glibc_src_install() { unset LANGUAGE LANG LC_ALL if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads - einfo "Installing GLIBC with linuxthreads..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads + einfo "Installing GLIBC ${ABI} with linuxthreads ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die else # nptlonly - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - einfo "Installing GLIBC with NPTL..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + einfo "Installing GLIBC ${ABI} with NPTL ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die fi @@ -345,7 +345,7 @@ toolchain-glibc_src_install() { # crosscompile. if [[ $(get_libdir) != "lib" && -d ${D}$(alt_prefix)/lib ]] ; then dodir $(alt_libdir) - mv ${D}$(alt_prefix)/lib/* ${D}$(alt_libdir) + mv "${D}"$(alt_prefix)/lib/* "${D}"$(alt_libdir) fi # punt all the junk not needed by a cross-compiler @@ -354,58 +354,58 @@ toolchain-glibc_src_install() { if want_linuxthreads && want_nptl ; then einfo "Installing NPTL to $(alt_libdir)/tls/..." - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - mkdir -p ${D}$(alt_libdir)/tls/ + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + mkdir -p "${D}"$(alt_libdir)/tls/ - libcsofile=$(basename ${D}$(alt_libdir)/libc-*.so) - cp -a libc.so ${D}$(alt_libdir)/tls/${libcsofile} || die + libcsofile=$(basename "${D}"$(alt_libdir)/libc-*.so) + cp -a libc.so "${D}"$(alt_libdir)/tls/${libcsofile} || die dosym ${libcsofile} $(alt_libdir)/tls/$(ls libc.so.*) - libmsofile=$(basename ${D}$(alt_libdir)/libm-*.so) + libmsofile=$(basename "${D}"$(alt_libdir)/libm-*.so) pushd math > /dev/null - cp -a libm.so ${D}$(alt_libdir)/tls/${libmsofile} || die + cp -a libm.so "${D}"$(alt_libdir)/tls/${libmsofile} || die dosym ${libmsofile} $(alt_libdir)/tls/$(ls libm.so.*) popd > /dev/null - librtsofile=$(basename ${D}$(alt_libdir)/librt-*.so) + librtsofile=$(basename "${D}"$(alt_libdir)/librt-*.so) pushd rt > /dev/null - cp -a librt.so ${D}$(alt_libdir)/tls/${librtsofile} || die + cp -a librt.so "${D}"$(alt_libdir)/tls/${librtsofile} || die dosym ${librtsofile} $(alt_libdir)/tls/$(ls librt.so.*) popd > /dev/null - libthreaddbsofile=$(basename ${D}$(alt_libdir)/libthread_db-*.so) + libthreaddbsofile=$(basename "${D}"$(alt_libdir)/libthread_db-*.so) pushd nptl_db > /dev/null - cp -a libthread_db.so ${D}$(alt_libdir)/tls/${libthreaddbsofile} || die + cp -a libthread_db.so "${D}"$(alt_libdir)/tls/${libthreaddbsofile} || die dosym ${libthreaddbsofile} $(alt_libdir)/tls/$(ls libthread_db.so.*) popd > /dev/null libpthreadsofile=libpthread-${GLIBC_RELEASE_VER}.so - cp -a nptl/libpthread.so ${D}$(alt_libdir)/tls/${libpthreadsofile} || die + cp -a nptl/libpthread.so "${D}"$(alt_libdir)/tls/${libpthreadsofile} || die dosym ${libpthreadsofile} $(alt_libdir)/tls/libpthread.so.0 # and now for the static libs - mkdir -p ${D}$(alt_usrlibdir)/nptl + mkdir -p "${D}"$(alt_usrlibdir)/nptl cp -a libc.a nptl/libpthread.a nptl/libpthread_nonshared.a rt/librt.a \ - ${D}$(alt_usrlibdir)/nptl + "${D}"$(alt_usrlibdir)/nptl # linker script crap for lib in libc libpthread; do sed -e "s:$(alt_libdir)/${lib}.so:$(alt_libdir)/tls/${lib}.so:g" \ -e "s:$(alt_usrlibdir)/${lib}_nonshared.a:$(alt_usrlibdir)/nptl/${lib}_nonshared.a:g" \ - ${D}$(alt_usrlibdir)/${lib}.so \ - > ${D}$(alt_usrlibdir)/nptl/${lib}.so + "${D}"$(alt_usrlibdir)/${lib}.so \ + > "${D}"$(alt_usrlibdir)/nptl/${lib}.so - chmod 755 ${D}$(alt_usrlibdir)/nptl/${lib}.so + chmod 755 "${D}"$(alt_usrlibdir)/nptl/${lib}.so done dosym ../librt.so $(alt_usrlibdir)/nptl/librt.so # last but not least... headers. - mkdir -p ${D}/nptl ${D}$(alt_headers)/nptl - make install_root=${D}/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" - pushd ${D}/nptl/$(alt_headers) > /dev/null - for i in `find . -type f`; do - if ! [ -f ${D}$(alt_headers)/$i ] \ + mkdir -p "${D}"/nptl "${D}"$(alt_headers)/nptl + make install_root="${D}"/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" + pushd "${D}"/nptl/$(alt_headers) > /dev/null + for i in $(find . -type f) ; do + if ! [[ -f ${D}$(alt_headers)/$i ]] \ || ! cmp -s $i ${D}$(alt_headers)/$i; then mkdir -p ${D}$(alt_headers)/nptl/`dirname $i` cp -a $i ${D}$(alt_headers)/nptl/$i @@ -463,7 +463,7 @@ toolchain-glibc_src_install() { else MYMAINBUILDDIR=build-${ABI}-${CTARGET}-nptl fi - cd ${WORKDIR}/${MYMAINBUILDDIR} + cd "${WORKDIR}"/${MYMAINBUILDDIR} if ! use build ; then if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then einfo "Installing info pages..." @@ -479,7 +479,7 @@ toolchain-glibc_src_install() { einfo "Installing man pages..." # Install linuxthreads man pages even if nptl is enabled - cd ${WORKDIR}/man + cd "${WORKDIR}"/man doman *.3thr fi @@ -646,7 +646,7 @@ setup_flags() { strip-unsupported-flags filter-flags -m32 -m64 -mabi=* - has_multilib_profile && CTARGET_OPT="$(get_abi_CHOST)" + has_multilib_profile && CTARGET_OPT=$(get_abi_CHOST) case $(tc-arch) in ppc) @@ -859,7 +859,7 @@ want_omitfp() { install_locales() { unset LANGUAGE LANG LC_ALL - cd ${WORKDIR}/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" + cd "${WORKDIR}"/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" make PARALLELMFLAGS="${MAKEOPTS} -j1" \ install_root=${D} localedata/install-locales || die } @@ -955,7 +955,7 @@ glibc_do_configure() { export CC="$(tc-getCC ${CTARGET})" - GBUILDDIR="${WORKDIR}/build-${ABI}-${CTARGET}-$1" + GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 mkdir -p ${GBUILDDIR} cd ${GBUILDDIR} einfo "Configuring GLIBC for $1 with: ${myconf}" @@ -1302,40 +1302,42 @@ src_install() { # Handle stupid lib32 BS unset OLD_LIBDIR - if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_x86="lib" - fi + if ! is_crosscompile ; then + if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_x86="lib" + fi - if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_ppc="lib" + if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_ppc="lib" + fi fi toolchain-glibc_src_install # Handle stupid lib32 BS on amd64 and ppc64 if [[ -n ${OLD_LIBDIR} ]] ; then - cd ${S} - [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86="${OLD_LIBDIR}" - [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc="${OLD_LIBDIR}" + cd "${S}" + [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86=${OLD_LIBDIR} + [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc=${OLD_LIBDIR} unset OLD_LIBDIR - mv ${D}/lib ${D}/$(get_libdir) - mv ${D}/usr/lib ${D}/usr/$(get_libdir) + mv "${D}"/lib "${D}"/$(get_libdir) + mv "${D}"/usr/lib "${D}"/usr/$(get_libdir) dodir /lib dodir /usr/lib - mv ${D}/usr/$(get_libdir)/locale ${D}/usr/lib + mv "${D}"/usr/$(get_libdir)/locale "${D}"/usr/lib [[ $(tc-arch) == "amd64" ]] && dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2 [[ $(tc-arch) == "ppc64" ]] && dosym ../$(get_libdir)/ld.so.1 /lib/ld.so.1 - for f in ${D}/usr/$(get_libdir)/*.so; do - local basef=$(basename ${f}) - if [ -L ${f} ] ; then - local target=$(readlink ${f}) + for f in "${D}"/usr/$(get_libdir)/*.so; do + local basef=$(basename "${f}") + if [[ -L ${f} ]] ; then + local target=$(readlink "${f}") target=${target/\/lib\//\/$(get_libdir)\/} - rm ${f} - dosym ${target} /usr/$(get_libdir)/${basef} + rm "${f}" + dosym "${target}" /usr/$(get_libdir)/"${basef}" fi done diff --git a/sys-libs/glibc/glibc-2.3.4.20050125-r1.ebuild b/sys-libs/glibc/glibc-2.3.4.20050125-r1.ebuild index ae21d83a3dc2..3c83f540ed8b 100644 --- a/sys-libs/glibc/glibc-2.3.4.20050125-r1.ebuild +++ b/sys-libs/glibc/glibc-2.3.4.20050125-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.4.20050125-r1.ebuild,v 1.59 2005/09/16 02:03:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.4.20050125-r1.ebuild,v 1.60 2005/09/16 05:03:17 vapier Exp $ # Here's how the cross-compile logic breaks down ... # CTARGET - machine that will target the binaries @@ -160,7 +160,7 @@ get_glibc_src_uri() { } SRC_URI=$(get_glibc_src_uri) -S="${WORKDIR}/${PN}-${GLIBC_RELEASE_VER}" +S=${WORKDIR}/${PN}-${GLIBC_RELEASE_VER} ### EXPORTED FUNCTIONS ### toolchain-glibc_src_unpack() { @@ -182,12 +182,12 @@ toolchain-glibc_src_unpack() { fi if [[ -n ${PATCH_VER} ]] ; then - cd ${WORKDIR} + cd "${WORKDIR}" unpack ${PN}-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2 fi if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then - cd ${WORKDIR} + cd "${WORKDIR}" unpack ${PN}-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2 fi @@ -197,14 +197,14 @@ toolchain-glibc_src_unpack() { fi if [[ -n ${BRANCH_UPDATE} ]] ; then - cd ${WORKDIR} + cd "${WORKDIR}" unpack ${PN}-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 fi cd ${S} if [[ -n ${BRANCH_UPDATE} ]] ; then - epatch ${WORKDIR}/${PN}-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch + epatch "${WORKDIR}"/${PN}-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch # Snapshot date patch einfo "Patching version to display snapshot date ..." @@ -218,7 +218,7 @@ toolchain-glibc_src_unpack() { ARCH="$(tc-arch)" einfo "Applying Gentoo Glibc Patches: ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER}" - epatch ${WORKDIR}/patches + epatch "${WORKDIR}"/patches ARCH="${OLD_ARCH}" unset EPATCH_EXCLUDE @@ -245,7 +245,7 @@ toolchain-glibc_src_compile() { fi if want_nptl ; then # ... and then do the optional nptl build - unset LD_ASSUME_KERNEL || : + unset LD_ASSUME_KERNEL glibc_do_configure nptl einfo "Building GLIBC with NPTL..." make PARALLELMFLAGS="${MAKEOPTS}" ${MAKEFLAGS} || die @@ -259,12 +259,12 @@ toolchain-glibc_src_test() { # do the linuxthreads build unless we're using nptlonly if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads einfo "Checking GLIBC with linuxthreads..." make check || die "linuxthreads glibc did not pass make check" fi if want_nptl ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl unset LD_ASSUME_KERNEL || : einfo "Checking GLIBC with NPTL..." make check || die "nptl glibc did not pass make check" @@ -306,16 +306,16 @@ toolchain-glibc_src_install() { unset LANGUAGE LANG LC_ALL if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads - einfo "Installing GLIBC with linuxthreads..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads + einfo "Installing GLIBC ${ABI} with linuxthreads ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die else # nptlonly - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - einfo "Installing GLIBC with NPTL..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + einfo "Installing GLIBC ${ABI} with NPTL ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die fi @@ -325,7 +325,7 @@ toolchain-glibc_src_install() { # crosscompile. if [[ $(get_libdir) != "lib" && -d ${D}$(alt_prefix)/lib ]] ; then dodir $(alt_libdir) - mv ${D}$(alt_prefix)/lib/* ${D}$(alt_libdir) + mv "${D}"$(alt_prefix)/lib/* "${D}"$(alt_libdir) fi # punt all the junk not needed by a cross-compiler @@ -334,58 +334,58 @@ toolchain-glibc_src_install() { if want_linuxthreads && want_nptl ; then einfo "Installing NPTL to $(alt_libdir)/tls/..." - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - mkdir -p ${D}$(alt_libdir)/tls/ + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + mkdir -p "${D}"$(alt_libdir)/tls/ - libcsofile=$(basename ${D}$(alt_libdir)/libc-*.so) - cp -a libc.so ${D}$(alt_libdir)/tls/${libcsofile} || die + libcsofile=$(basename "${D}"$(alt_libdir)/libc-*.so) + cp -a libc.so "${D}"$(alt_libdir)/tls/${libcsofile} || die dosym ${libcsofile} $(alt_libdir)/tls/$(ls libc.so.*) - libmsofile=$(basename ${D}$(alt_libdir)/libm-*.so) + libmsofile=$(basename "${D}"$(alt_libdir)/libm-*.so) pushd math > /dev/null - cp -a libm.so ${D}$(alt_libdir)/tls/${libmsofile} || die + cp -a libm.so "${D}"$(alt_libdir)/tls/${libmsofile} || die dosym ${libmsofile} $(alt_libdir)/tls/$(ls libm.so.*) popd > /dev/null - librtsofile=$(basename ${D}$(alt_libdir)/librt-*.so) + librtsofile=$(basename "${D}"$(alt_libdir)/librt-*.so) pushd rt > /dev/null - cp -a librt.so ${D}$(alt_libdir)/tls/${librtsofile} || die + cp -a librt.so "${D}"$(alt_libdir)/tls/${librtsofile} || die dosym ${librtsofile} $(alt_libdir)/tls/$(ls librt.so.*) popd > /dev/null - libthreaddbsofile=$(basename ${D}$(alt_libdir)/libthread_db-*.so) + libthreaddbsofile=$(basename "${D}"$(alt_libdir)/libthread_db-*.so) pushd nptl_db > /dev/null - cp -a libthread_db.so ${D}$(alt_libdir)/tls/${libthreaddbsofile} || die + cp -a libthread_db.so "${D}"$(alt_libdir)/tls/${libthreaddbsofile} || die dosym ${libthreaddbsofile} $(alt_libdir)/tls/$(ls libthread_db.so.*) popd > /dev/null libpthreadsofile=libpthread-${GLIBC_RELEASE_VER}.so - cp -a nptl/libpthread.so ${D}$(alt_libdir)/tls/${libpthreadsofile} || die + cp -a nptl/libpthread.so "${D}"$(alt_libdir)/tls/${libpthreadsofile} || die dosym ${libpthreadsofile} $(alt_libdir)/tls/libpthread.so.0 # and now for the static libs - mkdir -p ${D}$(alt_usrlibdir)/nptl + mkdir -p "${D}"$(alt_usrlibdir)/nptl cp -a libc.a nptl/libpthread.a nptl/libpthread_nonshared.a rt/librt.a \ - ${D}$(alt_usrlibdir)/nptl + "${D}"$(alt_usrlibdir)/nptl # linker script crap for lib in libc libpthread; do sed -e "s:$(alt_libdir)/${lib}.so:$(alt_libdir)/tls/${lib}.so:g" \ -e "s:$(alt_usrlibdir)/${lib}_nonshared.a:$(alt_usrlibdir)/nptl/${lib}_nonshared.a:g" \ - ${D}$(alt_usrlibdir)/${lib}.so \ - > ${D}$(alt_usrlibdir)/nptl/${lib}.so + "${D}"$(alt_usrlibdir)/${lib}.so \ + > "${D}"$(alt_usrlibdir)/nptl/${lib}.so - chmod 755 ${D}$(alt_usrlibdir)/nptl/${lib}.so + chmod 755 "${D}"$(alt_usrlibdir)/nptl/${lib}.so done dosym ../librt.so $(alt_usrlibdir)/nptl/librt.so # last but not least... headers. - mkdir -p ${D}/nptl ${D}$(alt_headers)/nptl - make install_root=${D}/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" - pushd ${D}/nptl/$(alt_headers) > /dev/null - for i in `find . -type f`; do - if ! [ -f ${D}$(alt_headers)/$i ] \ + mkdir -p "${D}"/nptl "${D}"$(alt_headers)/nptl + make install_root="${D}"/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" + pushd "${D}"/nptl/$(alt_headers) > /dev/null + for i in $(find . -type f) ; do + if ! [[ -f ${D}$(alt_headers)/$i ]] \ || ! cmp -s $i ${D}$(alt_headers)/$i; then mkdir -p ${D}$(alt_headers)/nptl/`dirname $i` cp -a $i ${D}$(alt_headers)/nptl/$i @@ -451,7 +451,7 @@ toolchain-glibc_src_install() { else MYMAINBUILDDIR=build-${ABI}-${CTARGET}-nptl fi - cd ${WORKDIR}/${MYMAINBUILDDIR} + cd "${WORKDIR}"/${MYMAINBUILDDIR} if ! use build ; then if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then einfo "Installing info pages..." @@ -467,7 +467,7 @@ toolchain-glibc_src_install() { einfo "Installing man pages..." # Install linuxthreads man pages even if nptl is enabled - cd ${WORKDIR}/man + cd "${WORKDIR}"/man doman *.3thr fi @@ -639,7 +639,7 @@ setup_flags() { strip-unsupported-flags filter-flags -m32 -m64 -mabi=* - has_multilib_profile && CTARGET_OPT="$(get_abi_CHOST)" + has_multilib_profile && CTARGET_OPT=$(get_abi_CHOST) case $(tc-arch) in ppc) @@ -817,7 +817,7 @@ want_tls() { install_locales() { unset LANGUAGE LANG LC_ALL - cd ${WORKDIR}/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" + cd "${WORKDIR}"/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" make PARALLELMFLAGS="${MAKEOPTS} -j1" \ install_root=${D} localedata/install-locales || die } @@ -900,7 +900,7 @@ glibc_do_configure() { export CC="$(tc-getCC ${CTARGET})" - GBUILDDIR="${WORKDIR}/build-${ABI}-${CTARGET}-$1" + GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 mkdir -p ${GBUILDDIR} cd ${GBUILDDIR} einfo "Configuring GLIBC for $1 with: ${myconf}" @@ -1240,33 +1240,42 @@ src_install() { # Handle stupid lib32 BS unset OLD_LIBDIR - if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_x86="lib" + if ! is_crosscompile ; then + if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_x86="lib" + fi + + if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_ppc="lib" + fi fi toolchain-glibc_src_install - # Handle stupid lib32 BS on amd64 + # Handle stupid lib32 BS on amd64 and ppc64 if [[ -n ${OLD_LIBDIR} ]] ; then - cd ${S} - LIBDIR_x86="${OLD_LIBDIR}" + cd "${S}" + [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86=${OLD_LIBDIR} + [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc=${OLD_LIBDIR} unset OLD_LIBDIR - mv ${D}/lib ${D}/$(get_libdir) - mv ${D}/usr/lib ${D}/usr/$(get_libdir) + mv "${D}"/lib "${D}"/$(get_libdir) + mv "${D}"/usr/lib "${D}"/usr/$(get_libdir) dodir /lib dodir /usr/lib - mv ${D}/usr/$(get_libdir)/locale ${D}/usr/lib - dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2 - - for f in ${D}/usr/$(get_libdir)/*.so; do - local basef=$(basename ${f}) - if [ -L ${f} ] ; then - local target=$(readlink ${f}) + mv "${D}"/usr/$(get_libdir)/locale "${D}"/usr/lib + [[ $(tc-arch) == "amd64" ]] && dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2 + [[ $(tc-arch) == "ppc64" ]] && dosym ../$(get_libdir)/ld.so.1 /lib/ld.so.1 + + for f in "${D}"/usr/$(get_libdir)/*.so; do + local basef=$(basename "${f}") + if [[ -L ${f} ]] ; then + local target=$(readlink "${f}") target=${target/\/lib\//\/$(get_libdir)\/} - rm ${f} - dosym ${target} /usr/$(get_libdir)/${basef} + rm "${f}" + dosym "${target}" /usr/$(get_libdir)/"${basef}" fi done diff --git a/sys-libs/glibc/glibc-2.3.5-r1.ebuild b/sys-libs/glibc/glibc-2.3.5-r1.ebuild index d544713f4451..bcb63eb6df8d 100644 --- a/sys-libs/glibc/glibc-2.3.5-r1.ebuild +++ b/sys-libs/glibc/glibc-2.3.5-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5-r1.ebuild,v 1.26 2005/09/16 02:03:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5-r1.ebuild,v 1.27 2005/09/16 05:03:17 vapier Exp $ # Here's how the cross-compile logic breaks down ... # CTARGET - machine that will target the binaries @@ -160,7 +160,7 @@ get_glibc_src_uri() { } SRC_URI=$(get_glibc_src_uri) -S="${WORKDIR}/${PN}-${GLIBC_RELEASE_VER}" +S=${WORKDIR}/${PN}-${GLIBC_RELEASE_VER} ### EXPORTED FUNCTIONS ### toolchain-glibc_src_unpack() { @@ -234,7 +234,7 @@ toolchain-glibc_src_compile() { fi if want_nptl ; then # ... and then do the optional nptl build - unset LD_ASSUME_KERNEL || : + unset LD_ASSUME_KERNEL glibc_do_configure nptl einfo "Building GLIBC with NPTL..." make PARALLELMFLAGS="${MAKEOPTS} -j1" ${MAKEFLAGS} || die @@ -248,12 +248,12 @@ toolchain-glibc_src_test() { # do the linuxthreads build unless we're using nptlonly if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads einfo "Checking GLIBC with linuxthreads..." make check || die "linuxthreads glibc did not pass make check" fi if want_nptl ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl unset LD_ASSUME_KERNEL || : einfo "Checking GLIBC with NPTL..." make check || die "nptl glibc did not pass make check" @@ -295,16 +295,16 @@ toolchain-glibc_src_install() { unset LANGUAGE LANG LC_ALL if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads - einfo "Installing GLIBC with linuxthreads..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads + einfo "Installing GLIBC ${ABI} with linuxthreads ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die else # nptlonly - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - einfo "Installing GLIBC with NPTL..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + einfo "Installing GLIBC ${ABI} with NPTL ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die fi @@ -314,7 +314,7 @@ toolchain-glibc_src_install() { # crosscompile. if [[ $(get_libdir) != "lib" && -d ${D}$(alt_prefix)/lib ]] ; then dodir $(alt_libdir) - mv ${D}$(alt_prefix)/lib/* ${D}$(alt_libdir) + mv "${D}"$(alt_prefix)/lib/* "${D}"$(alt_libdir) fi # punt all the junk not needed by a cross-compiler @@ -323,58 +323,58 @@ toolchain-glibc_src_install() { if want_linuxthreads && want_nptl ; then einfo "Installing NPTL to $(alt_libdir)/tls/..." - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - mkdir -p ${D}$(alt_libdir)/tls/ + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + mkdir -p "${D}"$(alt_libdir)/tls/ - libcsofile=$(basename ${D}$(alt_libdir)/libc-*.so) - cp -a libc.so ${D}$(alt_libdir)/tls/${libcsofile} || die + libcsofile=$(basename "${D}"$(alt_libdir)/libc-*.so) + cp -a libc.so "${D}"$(alt_libdir)/tls/${libcsofile} || die dosym ${libcsofile} $(alt_libdir)/tls/$(ls libc.so.*) - libmsofile=$(basename ${D}$(alt_libdir)/libm-*.so) + libmsofile=$(basename "${D}"$(alt_libdir)/libm-*.so) pushd math > /dev/null - cp -a libm.so ${D}$(alt_libdir)/tls/${libmsofile} || die + cp -a libm.so "${D}"$(alt_libdir)/tls/${libmsofile} || die dosym ${libmsofile} $(alt_libdir)/tls/$(ls libm.so.*) popd > /dev/null - librtsofile=$(basename ${D}$(alt_libdir)/librt-*.so) + librtsofile=$(basename "${D}"$(alt_libdir)/librt-*.so) pushd rt > /dev/null - cp -a librt.so ${D}$(alt_libdir)/tls/${librtsofile} || die + cp -a librt.so "${D}"$(alt_libdir)/tls/${librtsofile} || die dosym ${librtsofile} $(alt_libdir)/tls/$(ls librt.so.*) popd > /dev/null - libthreaddbsofile=$(basename ${D}$(alt_libdir)/libthread_db-*.so) + libthreaddbsofile=$(basename "${D}"$(alt_libdir)/libthread_db-*.so) pushd nptl_db > /dev/null - cp -a libthread_db.so ${D}$(alt_libdir)/tls/${libthreaddbsofile} || die + cp -a libthread_db.so "${D}"$(alt_libdir)/tls/${libthreaddbsofile} || die dosym ${libthreaddbsofile} $(alt_libdir)/tls/$(ls libthread_db.so.*) popd > /dev/null libpthreadsofile=libpthread-${GLIBC_RELEASE_VER}.so - cp -a nptl/libpthread.so ${D}$(alt_libdir)/tls/${libpthreadsofile} || die + cp -a nptl/libpthread.so "${D}"$(alt_libdir)/tls/${libpthreadsofile} || die dosym ${libpthreadsofile} $(alt_libdir)/tls/libpthread.so.0 # and now for the static libs - mkdir -p ${D}$(alt_usrlibdir)/nptl + mkdir -p "${D}"$(alt_usrlibdir)/nptl cp -a libc.a nptl/libpthread.a nptl/libpthread_nonshared.a rt/librt.a \ - ${D}$(alt_usrlibdir)/nptl + "${D}"$(alt_usrlibdir)/nptl # linker script crap for lib in libc libpthread; do sed -e "s:$(alt_libdir)/${lib}.so:$(alt_libdir)/tls/${lib}.so:g" \ -e "s:$(alt_usrlibdir)/${lib}_nonshared.a:$(alt_usrlibdir)/nptl/${lib}_nonshared.a:g" \ - ${D}$(alt_usrlibdir)/${lib}.so \ - > ${D}$(alt_usrlibdir)/nptl/${lib}.so + "${D}"$(alt_usrlibdir)/${lib}.so \ + > "${D}"$(alt_usrlibdir)/nptl/${lib}.so - chmod 755 ${D}$(alt_usrlibdir)/nptl/${lib}.so + chmod 755 "${D}"$(alt_usrlibdir)/nptl/${lib}.so done dosym ../librt.so $(alt_usrlibdir)/nptl/librt.so # last but not least... headers. - mkdir -p ${D}/nptl ${D}$(alt_headers)/nptl - make install_root=${D}/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" - pushd ${D}/nptl/$(alt_headers) > /dev/null - for i in `find . -type f`; do - if ! [ -f ${D}$(alt_headers)/$i ] \ + mkdir -p "${D}"/nptl "${D}"$(alt_headers)/nptl + make install_root="${D}"/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" + pushd "${D}"/nptl/$(alt_headers) > /dev/null + for i in $(find . -type f) ; do + if ! [[ -f ${D}$(alt_headers)/$i ]] \ || ! cmp -s $i ${D}$(alt_headers)/$i; then mkdir -p ${D}$(alt_headers)/nptl/`dirname $i` cp -a $i ${D}$(alt_headers)/nptl/$i @@ -440,7 +440,7 @@ toolchain-glibc_src_install() { else MYMAINBUILDDIR=build-${ABI}-${CTARGET}-nptl fi - cd ${WORKDIR}/${MYMAINBUILDDIR} + cd "${WORKDIR}"/${MYMAINBUILDDIR} if ! use build ; then if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then einfo "Installing info pages..." @@ -456,7 +456,7 @@ toolchain-glibc_src_install() { einfo "Installing man pages..." # Install linuxthreads man pages even if nptl is enabled - cd ${WORKDIR}/man + cd "${WORKDIR}"/man doman *.3thr fi @@ -623,7 +623,7 @@ setup_flags() { strip-unsupported-flags filter-flags -m32 -m64 -mabi=* - has_multilib_profile && CTARGET_OPT="$(get_abi_CHOST)" + has_multilib_profile && CTARGET_OPT=$(get_abi_CHOST) case $(tc-arch) in amd64) @@ -816,7 +816,7 @@ want__thread() { install_locales() { unset LANGUAGE LANG LC_ALL - cd ${WORKDIR}/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" + cd "${WORKDIR}"/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" make PARALLELMFLAGS="${MAKEOPTS} -j1" \ install_root=${D} localedata/install-locales || die } @@ -868,7 +868,7 @@ glibc_do_configure() { use glibc-omitfp && myconf="${myconf} --enable-omitfp" if [ "$1" == "linuxthreads" ] ; then - if want_tls && [[ ${CTARGET} != "i486-pc-linux-gnu" && ${CTARGET} != "i586-pc-linux-gnu" ]] ; then + if want_tls && [[ ${CTARGET} != i[45]86-* ]] ; then myconf="${myconf} --with-tls" if want__thread && use linuxthreads-tls ; then @@ -912,7 +912,7 @@ glibc_do_configure() { export CC="$(tc-getCC ${CTARGET})" - GBUILDDIR="${WORKDIR}/build-${ABI}-${CTARGET}-$1" + GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 mkdir -p ${GBUILDDIR} cd ${GBUILDDIR} einfo "Configuring GLIBC for $1 with: ${myconf}" @@ -1248,40 +1248,42 @@ src_install() { # Handle stupid lib32 BS unset OLD_LIBDIR - if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_x86="lib" - fi + if ! is_crosscompile ; then + if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_x86="lib" + fi - if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_ppc="lib" + if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_ppc="lib" + fi fi toolchain-glibc_src_install # Handle stupid lib32 BS on amd64 and ppc64 if [[ -n ${OLD_LIBDIR} ]] ; then - cd ${S} - [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86="${OLD_LIBDIR}" - [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc="${OLD_LIBDIR}" + cd "${S}" + [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86=${OLD_LIBDIR} + [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc=${OLD_LIBDIR} unset OLD_LIBDIR - mv ${D}/lib ${D}/$(get_libdir) - mv ${D}/usr/lib ${D}/usr/$(get_libdir) + mv "${D}"/lib "${D}"/$(get_libdir) + mv "${D}"/usr/lib "${D}"/usr/$(get_libdir) dodir /lib dodir /usr/lib - mv ${D}/usr/$(get_libdir)/locale ${D}/usr/lib + mv "${D}"/usr/$(get_libdir)/locale "${D}"/usr/lib [[ $(tc-arch) == "amd64" ]] && dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2 [[ $(tc-arch) == "ppc64" ]] && dosym ../$(get_libdir)/ld.so.1 /lib/ld.so.1 - for f in ${D}/usr/$(get_libdir)/*.so; do - local basef=$(basename ${f}) - if [ -L ${f} ] ; then - local target=$(readlink ${f}) + for f in "${D}"/usr/$(get_libdir)/*.so; do + local basef=$(basename "${f}") + if [[ -L ${f} ]] ; then + local target=$(readlink "${f}") target=${target/\/lib\//\/$(get_libdir)\/} - rm ${f} - dosym ${target} /usr/$(get_libdir)/${basef} + rm "${f}" + dosym "${target}" /usr/$(get_libdir)/"${basef}" fi done diff --git a/sys-libs/glibc/glibc-2.3.5.20050421.ebuild b/sys-libs/glibc/glibc-2.3.5.20050421.ebuild index c9a661839247..d50cb72cf1e5 100644 --- a/sys-libs/glibc/glibc-2.3.5.20050421.ebuild +++ b/sys-libs/glibc/glibc-2.3.5.20050421.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5.20050421.ebuild,v 1.33 2005/09/16 02:03:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5.20050421.ebuild,v 1.34 2005/09/16 05:03:17 vapier Exp $ # Here's how the cross-compile logic breaks down ... # CTARGET - machine that will target the binaries @@ -161,7 +161,7 @@ get_glibc_src_uri() { } SRC_URI=$(get_glibc_src_uri) -S="${WORKDIR}/${PN}-${GLIBC_RELEASE_VER}" +S=${WORKDIR}/${PN}-${GLIBC_RELEASE_VER} ### EXPORTED FUNCTIONS ### toolchain-glibc_src_unpack() { @@ -235,7 +235,7 @@ toolchain-glibc_src_compile() { fi if want_nptl ; then # ... and then do the optional nptl build - unset LD_ASSUME_KERNEL || : + unset LD_ASSUME_KERNEL glibc_do_configure nptl einfo "Building GLIBC with NPTL..." make PARALLELMFLAGS="${MAKEOPTS}" ${MAKEFLAGS} || die @@ -249,12 +249,12 @@ toolchain-glibc_src_test() { # do the linuxthreads build unless we're using nptlonly if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads einfo "Checking GLIBC with linuxthreads..." make check || die "linuxthreads glibc did not pass make check" fi if want_nptl ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl unset LD_ASSUME_KERNEL || : einfo "Checking GLIBC with NPTL..." make check || die "nptl glibc did not pass make check" @@ -296,16 +296,16 @@ toolchain-glibc_src_install() { unset LANGUAGE LANG LC_ALL if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads - einfo "Installing GLIBC with linuxthreads..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads + einfo "Installing GLIBC ${ABI} with linuxthreads ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die else # nptlonly - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - einfo "Installing GLIBC with NPTL..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + einfo "Installing GLIBC ${ABI} with NPTL ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die fi @@ -315,7 +315,7 @@ toolchain-glibc_src_install() { # crosscompile. if [[ $(get_libdir) != "lib" && -d ${D}$(alt_prefix)/lib ]] ; then dodir $(alt_libdir) - mv ${D}$(alt_prefix)/lib/* ${D}$(alt_libdir) + mv "${D}"$(alt_prefix)/lib/* "${D}"$(alt_libdir) fi # punt all the junk not needed by a cross-compiler @@ -324,58 +324,58 @@ toolchain-glibc_src_install() { if want_linuxthreads && want_nptl ; then einfo "Installing NPTL to $(alt_libdir)/tls/..." - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - mkdir -p ${D}$(alt_libdir)/tls/ + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + mkdir -p "${D}"$(alt_libdir)/tls/ - libcsofile=$(basename ${D}$(alt_libdir)/libc-*.so) - cp -a libc.so ${D}$(alt_libdir)/tls/${libcsofile} || die + libcsofile=$(basename "${D}"$(alt_libdir)/libc-*.so) + cp -a libc.so "${D}"$(alt_libdir)/tls/${libcsofile} || die dosym ${libcsofile} $(alt_libdir)/tls/$(ls libc.so.*) - libmsofile=$(basename ${D}$(alt_libdir)/libm-*.so) + libmsofile=$(basename "${D}"$(alt_libdir)/libm-*.so) pushd math > /dev/null - cp -a libm.so ${D}$(alt_libdir)/tls/${libmsofile} || die + cp -a libm.so "${D}"$(alt_libdir)/tls/${libmsofile} || die dosym ${libmsofile} $(alt_libdir)/tls/$(ls libm.so.*) popd > /dev/null - librtsofile=$(basename ${D}$(alt_libdir)/librt-*.so) + librtsofile=$(basename "${D}"$(alt_libdir)/librt-*.so) pushd rt > /dev/null - cp -a librt.so ${D}$(alt_libdir)/tls/${librtsofile} || die + cp -a librt.so "${D}"$(alt_libdir)/tls/${librtsofile} || die dosym ${librtsofile} $(alt_libdir)/tls/$(ls librt.so.*) popd > /dev/null - libthreaddbsofile=$(basename ${D}$(alt_libdir)/libthread_db-*.so) + libthreaddbsofile=$(basename "${D}"$(alt_libdir)/libthread_db-*.so) pushd nptl_db > /dev/null - cp -a libthread_db.so ${D}$(alt_libdir)/tls/${libthreaddbsofile} || die + cp -a libthread_db.so "${D}"$(alt_libdir)/tls/${libthreaddbsofile} || die dosym ${libthreaddbsofile} $(alt_libdir)/tls/$(ls libthread_db.so.*) popd > /dev/null libpthreadsofile=libpthread-${GLIBC_RELEASE_VER}.so - cp -a nptl/libpthread.so ${D}$(alt_libdir)/tls/${libpthreadsofile} || die + cp -a nptl/libpthread.so "${D}"$(alt_libdir)/tls/${libpthreadsofile} || die dosym ${libpthreadsofile} $(alt_libdir)/tls/libpthread.so.0 # and now for the static libs - mkdir -p ${D}$(alt_usrlibdir)/nptl + mkdir -p "${D}"$(alt_usrlibdir)/nptl cp -a libc.a nptl/libpthread.a nptl/libpthread_nonshared.a rt/librt.a \ - ${D}$(alt_usrlibdir)/nptl + "${D}"$(alt_usrlibdir)/nptl # linker script crap for lib in libc libpthread; do sed -e "s:$(alt_libdir)/${lib}.so:$(alt_libdir)/tls/${lib}.so:g" \ -e "s:$(alt_usrlibdir)/${lib}_nonshared.a:$(alt_usrlibdir)/nptl/${lib}_nonshared.a:g" \ - ${D}$(alt_usrlibdir)/${lib}.so \ - > ${D}$(alt_usrlibdir)/nptl/${lib}.so + "${D}"$(alt_usrlibdir)/${lib}.so \ + > "${D}"$(alt_usrlibdir)/nptl/${lib}.so - chmod 755 ${D}$(alt_usrlibdir)/nptl/${lib}.so + chmod 755 "${D}"$(alt_usrlibdir)/nptl/${lib}.so done dosym ../librt.so $(alt_usrlibdir)/nptl/librt.so # last but not least... headers. - mkdir -p ${D}/nptl ${D}$(alt_headers)/nptl - make install_root=${D}/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" - pushd ${D}/nptl/$(alt_headers) > /dev/null - for i in `find . -type f`; do - if ! [ -f ${D}$(alt_headers)/$i ] \ + mkdir -p "${D}"/nptl "${D}"$(alt_headers)/nptl + make install_root="${D}"/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" + pushd "${D}"/nptl/$(alt_headers) > /dev/null + for i in $(find . -type f) ; do + if ! [[ -f ${D}$(alt_headers)/$i ]] \ || ! cmp -s $i ${D}$(alt_headers)/$i; then mkdir -p ${D}$(alt_headers)/nptl/`dirname $i` cp -a $i ${D}$(alt_headers)/nptl/$i @@ -441,7 +441,7 @@ toolchain-glibc_src_install() { else MYMAINBUILDDIR=build-${ABI}-${CTARGET}-nptl fi - cd ${WORKDIR}/${MYMAINBUILDDIR} + cd "${WORKDIR}"/${MYMAINBUILDDIR} if ! use build ; then if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then einfo "Installing info pages..." @@ -457,7 +457,7 @@ toolchain-glibc_src_install() { einfo "Installing man pages..." # Install linuxthreads man pages even if nptl is enabled - cd ${WORKDIR}/man + cd "${WORKDIR}"/man doman *.3thr fi @@ -624,7 +624,7 @@ setup_flags() { strip-unsupported-flags filter-flags -m32 -m64 -mabi=* - has_multilib_profile && CTARGET_OPT="$(get_abi_CHOST)" + has_multilib_profile && CTARGET_OPT=$(get_abi_CHOST) case $(tc-arch) in ppc) @@ -814,7 +814,7 @@ want__thread() { install_locales() { unset LANGUAGE LANG LC_ALL - cd ${WORKDIR}/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" + cd "${WORKDIR}"/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" make PARALLELMFLAGS="${MAKEOPTS} -j1" \ install_root=${D} localedata/install-locales || die } @@ -910,7 +910,7 @@ glibc_do_configure() { export CC="$(tc-getCC ${CTARGET})" - GBUILDDIR="${WORKDIR}/build-${ABI}-${CTARGET}-$1" + GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 mkdir -p ${GBUILDDIR} cd ${GBUILDDIR} einfo "Configuring GLIBC for $1 with: ${myconf}" @@ -1257,40 +1257,42 @@ src_install() { # Handle stupid lib32 BS unset OLD_LIBDIR - if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_x86="lib" - fi + if ! is_crosscompile ; then + if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_x86="lib" + fi - if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_ppc="lib" + if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_ppc="lib" + fi fi toolchain-glibc_src_install # Handle stupid lib32 BS on amd64 and ppc64 if [[ -n ${OLD_LIBDIR} ]] ; then - cd ${S} - [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86="${OLD_LIBDIR}" - [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc="${OLD_LIBDIR}" + cd "${S}" + [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86=${OLD_LIBDIR} + [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc=${OLD_LIBDIR} unset OLD_LIBDIR - mv ${D}/lib ${D}/$(get_libdir) - mv ${D}/usr/lib ${D}/usr/$(get_libdir) + mv "${D}"/lib "${D}"/$(get_libdir) + mv "${D}"/usr/lib "${D}"/usr/$(get_libdir) dodir /lib dodir /usr/lib - mv ${D}/usr/$(get_libdir)/locale ${D}/usr/lib + mv "${D}"/usr/$(get_libdir)/locale "${D}"/usr/lib [[ $(tc-arch) == "amd64" ]] && dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2 [[ $(tc-arch) == "ppc64" ]] && dosym ../$(get_libdir)/ld.so.1 /lib/ld.so.1 - for f in ${D}/usr/$(get_libdir)/*.so; do - local basef=$(basename ${f}) - if [ -L ${f} ] ; then - local target=$(readlink ${f}) + for f in "${D}"/usr/$(get_libdir)/*.so; do + local basef=$(basename "${f}") + if [[ -L ${f} ]] ; then + local target=$(readlink "${f}") target=${target/\/lib\//\/$(get_libdir)\/} - rm ${f} - dosym ${target} /usr/$(get_libdir)/${basef} + rm "${f}" + dosym "${target}" /usr/$(get_libdir)/"${basef}" fi done diff --git a/sys-libs/glibc/glibc-2.3.5.20050722.ebuild b/sys-libs/glibc/glibc-2.3.5.20050722.ebuild index b09b8fae6803..2bb1780e4dea 100644 --- a/sys-libs/glibc/glibc-2.3.5.20050722.ebuild +++ b/sys-libs/glibc/glibc-2.3.5.20050722.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5.20050722.ebuild,v 1.12 2005/09/16 02:03:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5.20050722.ebuild,v 1.13 2005/09/16 05:03:17 vapier Exp $ # Here's how the cross-compile logic breaks down ... # CTARGET - machine that will target the binaries @@ -165,7 +165,7 @@ get_glibc_src_uri() { } SRC_URI=$(get_glibc_src_uri) -S="${WORKDIR}/${PN}-${GLIBC_RELEASE_VER}" +S=${WORKDIR}/${PN}-${GLIBC_RELEASE_VER} ### EXPORTED FUNCTIONS ### toolchain-glibc_src_unpack() { @@ -240,7 +240,7 @@ toolchain-glibc_src_compile() { fi if want_nptl ; then # ... and then do the optional nptl build - unset LD_ASSUME_KERNEL || : + unset LD_ASSUME_KERNEL glibc_do_configure nptl einfo "Building GLIBC with NPTL..." make PARALLELMFLAGS="${MAKEOPTS}" ${MAKEFLAGS} || die @@ -254,12 +254,12 @@ toolchain-glibc_src_test() { # do the linuxthreads build unless we're using nptlonly if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads einfo "Checking GLIBC with linuxthreads..." make check || die "linuxthreads glibc did not pass make check" fi if want_nptl ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl unset LD_ASSUME_KERNEL || : einfo "Checking GLIBC with NPTL..." make check || die "nptl glibc did not pass make check" @@ -301,16 +301,16 @@ toolchain-glibc_src_install() { unset LANGUAGE LANG LC_ALL if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads - einfo "Installing GLIBC with linuxthreads..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads + einfo "Installing GLIBC ${ABI} with linuxthreads ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die else # nptlonly - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - einfo "Installing GLIBC with NPTL..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + einfo "Installing GLIBC ${ABI} with NPTL ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die fi @@ -320,7 +320,7 @@ toolchain-glibc_src_install() { # crosscompile. if [[ $(get_libdir) != "lib" && -d ${D}$(alt_prefix)/lib ]] ; then dodir $(alt_libdir) - mv ${D}$(alt_prefix)/lib/* ${D}$(alt_libdir) + mv "${D}"$(alt_prefix)/lib/* "${D}"$(alt_libdir) fi # punt all the junk not needed by a cross-compiler @@ -329,58 +329,58 @@ toolchain-glibc_src_install() { if want_linuxthreads && want_nptl ; then einfo "Installing NPTL to $(alt_libdir)/tls/..." - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - mkdir -p ${D}$(alt_libdir)/tls/ + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + mkdir -p "${D}"$(alt_libdir)/tls/ - libcsofile=$(basename ${D}$(alt_libdir)/libc-*.so) - cp -a libc.so ${D}$(alt_libdir)/tls/${libcsofile} || die + libcsofile=$(basename "${D}"$(alt_libdir)/libc-*.so) + cp -a libc.so "${D}"$(alt_libdir)/tls/${libcsofile} || die dosym ${libcsofile} $(alt_libdir)/tls/$(ls libc.so.*) - libmsofile=$(basename ${D}$(alt_libdir)/libm-*.so) + libmsofile=$(basename "${D}"$(alt_libdir)/libm-*.so) pushd math > /dev/null - cp -a libm.so ${D}$(alt_libdir)/tls/${libmsofile} || die + cp -a libm.so "${D}"$(alt_libdir)/tls/${libmsofile} || die dosym ${libmsofile} $(alt_libdir)/tls/$(ls libm.so.*) popd > /dev/null - librtsofile=$(basename ${D}$(alt_libdir)/librt-*.so) + librtsofile=$(basename "${D}"$(alt_libdir)/librt-*.so) pushd rt > /dev/null - cp -a librt.so ${D}$(alt_libdir)/tls/${librtsofile} || die + cp -a librt.so "${D}"$(alt_libdir)/tls/${librtsofile} || die dosym ${librtsofile} $(alt_libdir)/tls/$(ls librt.so.*) popd > /dev/null - libthreaddbsofile=$(basename ${D}$(alt_libdir)/libthread_db-*.so) + libthreaddbsofile=$(basename "${D}"$(alt_libdir)/libthread_db-*.so) pushd nptl_db > /dev/null - cp -a libthread_db.so ${D}$(alt_libdir)/tls/${libthreaddbsofile} || die + cp -a libthread_db.so "${D}"$(alt_libdir)/tls/${libthreaddbsofile} || die dosym ${libthreaddbsofile} $(alt_libdir)/tls/$(ls libthread_db.so.*) popd > /dev/null libpthreadsofile=libpthread-${GLIBC_RELEASE_VER}.so - cp -a nptl/libpthread.so ${D}$(alt_libdir)/tls/${libpthreadsofile} || die + cp -a nptl/libpthread.so "${D}"$(alt_libdir)/tls/${libpthreadsofile} || die dosym ${libpthreadsofile} $(alt_libdir)/tls/libpthread.so.0 # and now for the static libs - mkdir -p ${D}$(alt_usrlibdir)/nptl + mkdir -p "${D}"$(alt_usrlibdir)/nptl cp -a libc.a nptl/libpthread.a nptl/libpthread_nonshared.a rt/librt.a \ - ${D}$(alt_usrlibdir)/nptl + "${D}"$(alt_usrlibdir)/nptl # linker script crap for lib in libc libpthread; do sed -e "s:$(alt_libdir)/${lib}.so:$(alt_libdir)/tls/${lib}.so:g" \ -e "s:$(alt_usrlibdir)/${lib}_nonshared.a:$(alt_usrlibdir)/nptl/${lib}_nonshared.a:g" \ - ${D}$(alt_usrlibdir)/${lib}.so \ - > ${D}$(alt_usrlibdir)/nptl/${lib}.so + "${D}"$(alt_usrlibdir)/${lib}.so \ + > "${D}"$(alt_usrlibdir)/nptl/${lib}.so - chmod 755 ${D}$(alt_usrlibdir)/nptl/${lib}.so + chmod 755 "${D}"$(alt_usrlibdir)/nptl/${lib}.so done dosym ../librt.so $(alt_usrlibdir)/nptl/librt.so # last but not least... headers. - mkdir -p ${D}/nptl ${D}$(alt_headers)/nptl - make install_root=${D}/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" - pushd ${D}/nptl/$(alt_headers) > /dev/null - for i in `find . -type f`; do - if ! [ -f ${D}$(alt_headers)/$i ] \ + mkdir -p "${D}"/nptl "${D}"$(alt_headers)/nptl + make install_root="${D}"/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" + pushd "${D}"/nptl/$(alt_headers) > /dev/null + for i in $(find . -type f) ; do + if ! [[ -f ${D}$(alt_headers)/$i ]] \ || ! cmp -s $i ${D}$(alt_headers)/$i; then mkdir -p ${D}$(alt_headers)/nptl/`dirname $i` cp -a $i ${D}$(alt_headers)/nptl/$i @@ -446,7 +446,7 @@ toolchain-glibc_src_install() { else MYMAINBUILDDIR=build-${ABI}-${CTARGET}-nptl fi - cd ${WORKDIR}/${MYMAINBUILDDIR} + cd "${WORKDIR}"/${MYMAINBUILDDIR} if ! use build ; then if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then einfo "Installing info pages..." @@ -462,7 +462,7 @@ toolchain-glibc_src_install() { einfo "Installing man pages..." # Install linuxthreads man pages even if nptl is enabled - cd ${WORKDIR}/man + cd "${WORKDIR}"/man doman *.3thr fi @@ -629,7 +629,7 @@ setup_flags() { strip-unsupported-flags filter-flags -m32 -m64 -mabi=* - has_multilib_profile && CTARGET_OPT="$(get_abi_CHOST)" + has_multilib_profile && CTARGET_OPT=$(get_abi_CHOST) case $(tc-arch) in amd64) @@ -822,7 +822,7 @@ want__thread() { install_locales() { unset LANGUAGE LANG LC_ALL - cd ${WORKDIR}/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" + cd "${WORKDIR}"/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" make PARALLELMFLAGS="${MAKEOPTS} -j1" \ install_root=${D} localedata/install-locales || die } @@ -874,7 +874,7 @@ glibc_do_configure() { use glibc-omitfp && myconf="${myconf} --enable-omitfp" if [ "$1" == "linuxthreads" ] ; then - if want_tls && [[ ${CTARGET} != "i486-pc-linux-gnu" && ${CTARGET} != "i586-pc-linux-gnu" ]] ; then + if want_tls && [[ ${CTARGET} != i[45]86-* ]] ; then myconf="${myconf} --with-tls" if want__thread && use linuxthreads-tls ; then @@ -918,7 +918,7 @@ glibc_do_configure() { export CC="$(tc-getCC ${CTARGET})" - GBUILDDIR="${WORKDIR}/build-${ABI}-${CTARGET}-$1" + GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 mkdir -p ${GBUILDDIR} cd ${GBUILDDIR} einfo "Configuring GLIBC for $1 with: ${myconf}" @@ -1271,40 +1271,42 @@ src_install() { # Handle stupid lib32 BS unset OLD_LIBDIR - if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_x86="lib" - fi + if ! is_crosscompile ; then + if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_x86="lib" + fi - if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_ppc="lib" + if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_ppc="lib" + fi fi toolchain-glibc_src_install # Handle stupid lib32 BS on amd64 and ppc64 if [[ -n ${OLD_LIBDIR} ]] ; then - cd ${S} - [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86="${OLD_LIBDIR}" - [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc="${OLD_LIBDIR}" + cd "${S}" + [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86=${OLD_LIBDIR} + [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc=${OLD_LIBDIR} unset OLD_LIBDIR - mv ${D}/lib ${D}/$(get_libdir) - mv ${D}/usr/lib ${D}/usr/$(get_libdir) + mv "${D}"/lib "${D}"/$(get_libdir) + mv "${D}"/usr/lib "${D}"/usr/$(get_libdir) dodir /lib dodir /usr/lib - mv ${D}/usr/$(get_libdir)/locale ${D}/usr/lib + mv "${D}"/usr/$(get_libdir)/locale "${D}"/usr/lib [[ $(tc-arch) == "amd64" ]] && dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2 [[ $(tc-arch) == "ppc64" ]] && dosym ../$(get_libdir)/ld.so.1 /lib/ld.so.1 - for f in ${D}/usr/$(get_libdir)/*.so; do - local basef=$(basename ${f}) - if [ -L ${f} ] ; then - local target=$(readlink ${f}) + for f in "${D}"/usr/$(get_libdir)/*.so; do + local basef=$(basename "${f}") + if [[ -L ${f} ]] ; then + local target=$(readlink "${f}") target=${target/\/lib\//\/$(get_libdir)\/} - rm ${f} - dosym ${target} /usr/$(get_libdir)/${basef} + rm "${f}" + dosym "${target}" /usr/$(get_libdir)/"${basef}" fi done diff --git a/sys-libs/glibc/glibc-2.3.5.ebuild b/sys-libs/glibc/glibc-2.3.5.ebuild index fb82b5a03a16..4ba9d41ef570 100644 --- a/sys-libs/glibc/glibc-2.3.5.ebuild +++ b/sys-libs/glibc/glibc-2.3.5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5.ebuild,v 1.44 2005/09/16 02:03:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5.ebuild,v 1.45 2005/09/16 05:03:17 vapier Exp $ # Here's how the cross-compile logic breaks down ... # CTARGET - machine that will target the binaries @@ -160,7 +160,7 @@ get_glibc_src_uri() { } SRC_URI=$(get_glibc_src_uri) -S="${WORKDIR}/${PN}-${GLIBC_RELEASE_VER}" +S=${WORKDIR}/${PN}-${GLIBC_RELEASE_VER} ### EXPORTED FUNCTIONS ### toolchain-glibc_src_unpack() { @@ -245,7 +245,7 @@ toolchain-glibc_src_compile() { fi if want_nptl ; then # ... and then do the optional nptl build - unset LD_ASSUME_KERNEL || : + unset LD_ASSUME_KERNEL glibc_do_configure nptl einfo "Building GLIBC with NPTL..." make PARALLELMFLAGS="${MAKEOPTS}" ${MAKEFLAGS} || die @@ -259,12 +259,12 @@ toolchain-glibc_src_test() { # do the linuxthreads build unless we're using nptlonly if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads einfo "Checking GLIBC with linuxthreads..." make check || die "linuxthreads glibc did not pass make check" fi if want_nptl ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl unset LD_ASSUME_KERNEL || : einfo "Checking GLIBC with NPTL..." make check || die "nptl glibc did not pass make check" @@ -306,16 +306,16 @@ toolchain-glibc_src_install() { unset LANGUAGE LANG LC_ALL if want_linuxthreads ; then - cd ${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads - einfo "Installing GLIBC with linuxthreads..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads + einfo "Installing GLIBC ${ABI} with linuxthreads ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die else # nptlonly - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - einfo "Installing GLIBC with NPTL..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + einfo "Installing GLIBC ${ABI} with NPTL ..." make PARALLELMFLAGS="${MAKEOPTS} -j1" \ - install_root=${D} \ + install_root="${D}" \ install || die fi @@ -325,7 +325,7 @@ toolchain-glibc_src_install() { # crosscompile. if [[ $(get_libdir) != "lib" && -d ${D}$(alt_prefix)/lib ]] ; then dodir $(alt_libdir) - mv ${D}$(alt_prefix)/lib/* ${D}$(alt_libdir) + mv "${D}"$(alt_prefix)/lib/* "${D}"$(alt_libdir) fi # punt all the junk not needed by a cross-compiler @@ -334,58 +334,58 @@ toolchain-glibc_src_install() { if want_linuxthreads && want_nptl ; then einfo "Installing NPTL to $(alt_libdir)/tls/..." - cd ${WORKDIR}/build-${ABI}-${CTARGET}-nptl - mkdir -p ${D}$(alt_libdir)/tls/ + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + mkdir -p "${D}"$(alt_libdir)/tls/ - libcsofile=$(basename ${D}$(alt_libdir)/libc-*.so) - cp -a libc.so ${D}$(alt_libdir)/tls/${libcsofile} || die + libcsofile=$(basename "${D}"$(alt_libdir)/libc-*.so) + cp -a libc.so "${D}"$(alt_libdir)/tls/${libcsofile} || die dosym ${libcsofile} $(alt_libdir)/tls/$(ls libc.so.*) - libmsofile=$(basename ${D}$(alt_libdir)/libm-*.so) + libmsofile=$(basename "${D}"$(alt_libdir)/libm-*.so) pushd math > /dev/null - cp -a libm.so ${D}$(alt_libdir)/tls/${libmsofile} || die + cp -a libm.so "${D}"$(alt_libdir)/tls/${libmsofile} || die dosym ${libmsofile} $(alt_libdir)/tls/$(ls libm.so.*) popd > /dev/null - librtsofile=$(basename ${D}$(alt_libdir)/librt-*.so) + librtsofile=$(basename "${D}"$(alt_libdir)/librt-*.so) pushd rt > /dev/null - cp -a librt.so ${D}$(alt_libdir)/tls/${librtsofile} || die + cp -a librt.so "${D}"$(alt_libdir)/tls/${librtsofile} || die dosym ${librtsofile} $(alt_libdir)/tls/$(ls librt.so.*) popd > /dev/null - libthreaddbsofile=$(basename ${D}$(alt_libdir)/libthread_db-*.so) + libthreaddbsofile=$(basename "${D}"$(alt_libdir)/libthread_db-*.so) pushd nptl_db > /dev/null - cp -a libthread_db.so ${D}$(alt_libdir)/tls/${libthreaddbsofile} || die + cp -a libthread_db.so "${D}"$(alt_libdir)/tls/${libthreaddbsofile} || die dosym ${libthreaddbsofile} $(alt_libdir)/tls/$(ls libthread_db.so.*) popd > /dev/null libpthreadsofile=libpthread-${GLIBC_RELEASE_VER}.so - cp -a nptl/libpthread.so ${D}$(alt_libdir)/tls/${libpthreadsofile} || die + cp -a nptl/libpthread.so "${D}"$(alt_libdir)/tls/${libpthreadsofile} || die dosym ${libpthreadsofile} $(alt_libdir)/tls/libpthread.so.0 # and now for the static libs - mkdir -p ${D}$(alt_usrlibdir)/nptl + mkdir -p "${D}"$(alt_usrlibdir)/nptl cp -a libc.a nptl/libpthread.a nptl/libpthread_nonshared.a rt/librt.a \ - ${D}$(alt_usrlibdir)/nptl + "${D}"$(alt_usrlibdir)/nptl # linker script crap for lib in libc libpthread; do sed -e "s:$(alt_libdir)/${lib}.so:$(alt_libdir)/tls/${lib}.so:g" \ -e "s:$(alt_usrlibdir)/${lib}_nonshared.a:$(alt_usrlibdir)/nptl/${lib}_nonshared.a:g" \ - ${D}$(alt_usrlibdir)/${lib}.so \ - > ${D}$(alt_usrlibdir)/nptl/${lib}.so + "${D}"$(alt_usrlibdir)/${lib}.so \ + > "${D}"$(alt_usrlibdir)/nptl/${lib}.so - chmod 755 ${D}$(alt_usrlibdir)/nptl/${lib}.so + chmod 755 "${D}"$(alt_usrlibdir)/nptl/${lib}.so done dosym ../librt.so $(alt_usrlibdir)/nptl/librt.so # last but not least... headers. - mkdir -p ${D}/nptl ${D}$(alt_headers)/nptl - make install_root=${D}/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" - pushd ${D}/nptl/$(alt_headers) > /dev/null - for i in `find . -type f`; do - if ! [ -f ${D}$(alt_headers)/$i ] \ + mkdir -p "${D}"/nptl "${D}"$(alt_headers)/nptl + make install_root="${D}"/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1" + pushd "${D}"/nptl/$(alt_headers) > /dev/null + for i in $(find . -type f) ; do + if ! [[ -f ${D}$(alt_headers)/$i ]] \ || ! cmp -s $i ${D}$(alt_headers)/$i; then mkdir -p ${D}$(alt_headers)/nptl/`dirname $i` cp -a $i ${D}$(alt_headers)/nptl/$i @@ -444,7 +444,7 @@ toolchain-glibc_src_install() { else MYMAINBUILDDIR=build-${ABI}-${CTARGET}-nptl fi - cd ${WORKDIR}/${MYMAINBUILDDIR} + cd "${WORKDIR}"/${MYMAINBUILDDIR} if ! use build ; then if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then einfo "Installing info pages..." @@ -460,7 +460,7 @@ toolchain-glibc_src_install() { einfo "Installing man pages..." # Install linuxthreads man pages even if nptl is enabled - cd ${WORKDIR}/man + cd "${WORKDIR}"/man doman *.3thr fi @@ -627,7 +627,7 @@ setup_flags() { strip-unsupported-flags filter-flags -m32 -m64 -mabi=* - has_multilib_profile && CTARGET_OPT="$(get_abi_CHOST)" + has_multilib_profile && CTARGET_OPT=$(get_abi_CHOST) case $(tc-arch) in amd64) @@ -843,7 +843,7 @@ want_omitfp() { install_locales() { unset LANGUAGE LANG LC_ALL - cd ${WORKDIR}/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" + cd "${WORKDIR}"/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" make PARALLELMFLAGS="${MAKEOPTS} -j1" \ install_root=${D} localedata/install-locales || die } @@ -894,7 +894,7 @@ glibc_do_configure() { want_omitfp && myconf="${myconf} --enable-omitfp" if [ "$1" == "linuxthreads" ] ; then - if want_tls && [[ ${CTARGET} != "i486-pc-linux-gnu" && ${CTARGET} != "i586-pc-linux-gnu" ]] ; then + if want_tls && [[ ${CTARGET} != i[45]86-* ]] ; then myconf="${myconf} --with-tls" if want__thread ; then @@ -938,7 +938,7 @@ glibc_do_configure() { export CC="$(tc-getCC ${CTARGET})" - GBUILDDIR="${WORKDIR}/build-${ABI}-${CTARGET}-$1" + GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 mkdir -p ${GBUILDDIR} cd ${GBUILDDIR} einfo "Configuring GLIBC for $1 with: ${myconf}" @@ -1270,40 +1270,42 @@ src_install() { # Handle stupid lib32 BS unset OLD_LIBDIR - if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_x86="lib" - fi + if ! is_crosscompile ; then + if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_x86="lib" + fi - if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] && ! is_crosscompile; then - OLD_LIBDIR="$(get_libdir)" - LIBDIR_ppc="lib" + if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] ; then + OLD_LIBDIR=$(get_libdir) + LIBDIR_ppc="lib" + fi fi toolchain-glibc_src_install # Handle stupid lib32 BS on amd64 and ppc64 if [[ -n ${OLD_LIBDIR} ]] ; then - cd ${S} - [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86="${OLD_LIBDIR}" - [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc="${OLD_LIBDIR}" + cd "${S}" + [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86=${OLD_LIBDIR} + [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc=${OLD_LIBDIR} unset OLD_LIBDIR - mv ${D}/lib ${D}/$(get_libdir) - mv ${D}/usr/lib ${D}/usr/$(get_libdir) + mv "${D}"/lib "${D}"/$(get_libdir) + mv "${D}"/usr/lib "${D}"/usr/$(get_libdir) dodir /lib dodir /usr/lib - mv ${D}/usr/$(get_libdir)/locale ${D}/usr/lib + mv "${D}"/usr/$(get_libdir)/locale "${D}"/usr/lib [[ $(tc-arch) == "amd64" ]] && dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2 [[ $(tc-arch) == "ppc64" ]] && dosym ../$(get_libdir)/ld.so.1 /lib/ld.so.1 - for f in ${D}/usr/$(get_libdir)/*.so; do - local basef=$(basename ${f}) - if [ -L ${f} ] ; then - local target=$(readlink ${f}) + for f in "${D}"/usr/$(get_libdir)/*.so; do + local basef=$(basename "${f}") + if [[ -L ${f} ]] ; then + local target=$(readlink "${f}") target=${target/\/lib\//\/$(get_libdir)\/} - rm ${f} - dosym ${target} /usr/$(get_libdir)/${basef} + rm "${f}" + dosym "${target}" /usr/$(get_libdir)/"${basef}" fi done |