Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 390684 Details for
Bug 473728
sys-libs/glibc Prefix support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Prefix patch for glibc eblits
glibc-prefix.patch (text/plain), 7.43 KB, created by
Benda Xu
on 2014-12-01 08:27:12 UTC
(
hide
)
Description:
Prefix patch for glibc eblits
Filename:
MIME Type:
Creator:
Benda Xu
Created:
2014-12-01 08:27:12 UTC
Size:
7.43 KB
patch
obsolete
>diff -Naurp eblits.old/common.eblit eblits/common.eblit >--- eblits.old/common.eblit 2014-10-19 08:31:18.000000000 +0900 >+++ eblits/common.eblit 2014-12-01 16:55:03.829065539 +0900 >@@ -2,8 +2,23 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.45 2014/10/18 23:09:51 vapier Exp $ > >+: ${TPREFIX:=${EPREFIX}} >+ >+# ROOT variable is not used in src_*; emulate that with $(alt_prefix root). >+# P:=Prefix X:=Cross-Triplet PX: Cross-Triplet-Prefix >+# phase PX X P solution >+# -------------------+-----------------------------+--------------+---------+----------------------- >+# configure_headers EPREFIX/usr/CTARGET/TPREFIX /usr/CTARGET EPREFIX $EPREFIX$(alt_prefix) >+# configure_target TPREFIX NULL TPREFIX $TPREFIX >+# -------------------+-----------------------------+--------------+---------+----------------------- >+# install_root D/ EPREFIX/usr/CTARGET /usr/CTARGET NULL $(alt_prefix root) >+# -------------------+-----------------------------+--------------+---------+----------------------- >+# ebuild helper ED/ /usr/CTARGET/TPREFIX /usr/CTARGET NULL $(alt_prefix) > alt_prefix() { >- is_crosscompile && echo /usr/${CTARGET} >+ if is_crosscompile; then >+ echo -n "${EPREFIX}"/usr/${CTARGET} >+ [[ $1 == root ]] || echo ${TPREFIX} >+ fi > } > > if [[ ${EAPI:-0} == [012] ]] ; then >@@ -27,9 +42,9 @@ alt_headers() { > } > alt_build_headers() { > if [[ -z ${ALT_BUILD_HEADERS} ]] ; then >- ALT_BUILD_HEADERS=$(alt_headers) >+ ALT_BUILD_HEADERS="${EPREFIX}"$(alt_headers) > if tc-is-cross-compiler ; then >- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers) >+ ALT_BUILD_HEADERS=${SYSROOT}"${EPREFIX}"$(alt_headers) > if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then > local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') > ALT_BUILD_HEADERS=${header_path%/linux/version.h} >diff -Naurp eblits.old/pkg_postinst.eblit eblits/pkg_postinst.eblit >--- eblits.old/pkg_postinst.eblit 2012-04-16 05:04:44.000000000 +0900 >+++ eblits/pkg_postinst.eblit 2014-12-01 16:20:45.078947533 +0900 >@@ -6,9 +6,9 @@ eblit-glibc-pkg_postinst() { > # nothing to do if just installing headers > just_headers && return > >- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then >+ if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then > # Generate fastloading iconv module configuration file. >- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" >+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" > fi > > if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then >@@ -17,10 +17,10 @@ eblit-glibc-pkg_postinst() { > /sbin/telinit U 2>/dev/null > > # if the host locales.gen contains no entries, we'll install everything >- local locale_list="${ROOT}etc/locale.gen" >+ local locale_list="${EROOT}etc/locale.gen" > if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then > ewarn "Generating all locales; edit /etc/locale.gen to save time/space" >- locale_list="${ROOT}usr/share/i18n/SUPPORTED" >+ locale_list="${EROOT}usr/share/i18n/SUPPORTED" > fi > locale-gen -j $(makeopts_jobs) --config "${locale_list}" > fi >diff -Naurp eblits.old/pkg_preinst.eblit eblits/pkg_preinst.eblit >--- eblits.old/pkg_preinst.eblit 2014-08-10 13:01:17.000000000 +0900 >+++ eblits/pkg_preinst.eblit 2014-12-01 16:23:14.625067484 +0900 >@@ -11,7 +11,7 @@ > glibc_sanity_check() { > cd / #228809 > >- # We enter ${D} so to avoid trouble if the path contains >+ # We enter ${ED} so to avoid trouble if the path contains > # special characters; for instance if the path contains the > # colon character (:), then the linker will try to split it > # and look for the libraries in an unexpected place. This can >@@ -50,7 +50,7 @@ eblit-glibc-pkg_preinst() { > fi > > [[ ${ROOT} != "/" ]] && return 0 >- [[ -d ${D}/$(get_libdir) ]] || return 0 >+ [[ -d ${ED}/$(get_libdir) ]] || return 0 > glibc_sanity_check > > # Make sure devpts is mounted correctly for use w/out setuid pt_chown. >diff -Naurp eblits.old/src_configure.eblit eblits/src_configure.eblit >--- eblits.old/src_configure.eblit 2014-09-19 02:01:17.000000000 +0900 >+++ eblits/src_configure.eblit 2014-12-01 17:18:41.139247537 +0900 >@@ -106,12 +106,14 @@ glibc_do_configure() { > --host=${CTARGET_OPT:-${CTARGET}} > $(use_enable profile) > $(use_with gd) >- --with-headers=$(alt_build_headers) >- --prefix=/usr >- --libdir=/usr/$(get_libdir) >- --mandir=/usr/share/man >- --infodir=/usr/share/info >- --libexecdir=/usr/$(get_libdir)/misc/glibc >+ --with-headers="$(alt_build_headers)" >+ --prefix="${TPREFIX}"/usr >+ --sysconfdir="${TPREFIX}"/etc >+ --localstatedir="${TPREFIX}"/var >+ --libdir="${TPREFIX}"/usr/$(get_libdir) >+ --mandir="${TPREFIX}"/usr/share/man >+ --infodir="${TPREFIX}"/usr/share/info >+ --libexecdir="${TPREFIX}"/usr/$(get_libdir)/misc/glibc > --with-bugurl=http://bugs.gentoo.org/ > --with-pkgversion="$(glibc_banner)" > $(use_multiarch || echo --disable-multi-arch) >@@ -123,7 +125,7 @@ glibc_do_configure() { > > # There is no configure option for this and we need to export it > # since the glibc build will re-run configure on itself >- export libc_cv_slibdir=/$(get_libdir) >+ export libc_cv_slibdir=${TPREFIX}/$(get_libdir) > > # We take care of patching our binutils to use both hash styles, > # and many people like to force gnu hash style only, so disable >@@ -219,8 +221,8 @@ toolchain-glibc_headers_configure() { > --enable-bind-now > --build=${CBUILD_OPT:-${CBUILD}} > --host=${CTARGET_OPT:-${CTARGET}} >- --with-headers=$(alt_build_headers) >- --prefix=/usr >+ --with-headers="$(alt_build_headers)" >+ --prefix="${TPREFIX}"/usr > ${EXTRA_ECONF} > ) > >diff -Naurp eblits.old/src_install.eblit eblits/src_install.eblit >--- eblits.old/src_install.eblit 2014-09-11 03:31:18.000000000 +0900 >+++ eblits/src_install.eblit 2014-12-01 16:22:11.249864218 +0900 >@@ -6,7 +6,7 @@ toolchain-glibc_src_install() { > local builddir=$(builddir $(want_linuxthreads && echo linuxthreads || echo nptl)) > cd "${builddir}" > >- emake install_root="${D}$(alt_prefix)" install || die >+ emake install_root="${D}$(alt_prefix root)" install || die > > if want_linuxthreads && want_nptl ; then > einfo "Installing NPTL to $(alt_libdir)/tls/..." >@@ -102,7 +102,7 @@ toolchain-glibc_src_install() { > has ${ldso_abi} $(get_install_abis) || continue > > ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" >- if [[ ! -L ${D}/${ldso_name} && ! -e ${D}/${ldso_name} ]] ; then >+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then > dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} > fi > done >@@ -111,7 +111,7 @@ toolchain-glibc_src_install() { > # binary to be setuid. This is because the default owners/perms will be > # exactly what we want. > if in_iuse suid && ! use suid ; then >- find "${D}" -name pt_chown -exec chmod -s {} + >+ find "${ED}" -name pt_chown -exec chmod -s {} + > fi > > ################################################################# >@@ -202,7 +202,7 @@ toolchain-glibc_src_install() { > toolchain-glibc_headers_install() { > local builddir=$(builddir "headers") > cd "${builddir}" >- emake install_root="${D}$(alt_prefix)" install-headers || die >+ emake install_root="${D}$(alt_prefix root)" install-headers || die > if ! version_is_at_least 2.16 ; then > insinto $(alt_headers)/bits > doins bits/stdio_lim.h || die
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 473728
:
351336
|
351386
|
351388
|
351402
|
351436
|
352204
|
390684
|
435510
|
435512
|
436150