Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 473728 | Differences between
and this patch

Collapse All | Expand All

(-)eblits.old/common.eblit (-3 / +18 lines)
Lines 2-9 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.45 2014/10/18 23:09:51 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.45 2014/10/18 23:09:51 vapier Exp $
4
4
5
: ${TPREFIX:=${EPREFIX}}
6
7
# ROOT variable is not used in src_*; emulate that with $(alt_prefix root).
8
# P:=Prefix X:=Cross-Triplet PX: Cross-Triplet-Prefix
9
#  phase               PX                            X              P         solution              
10
# -------------------+-----------------------------+--------------+---------+-----------------------
11
#  configure_headers   EPREFIX/usr/CTARGET/TPREFIX   /usr/CTARGET   EPREFIX   $EPREFIX$(alt_prefix) 
12
#  configure_target    TPREFIX                       NULL           TPREFIX   $TPREFIX              
13
# -------------------+-----------------------------+--------------+---------+-----------------------
14
#  install_root D/     EPREFIX/usr/CTARGET           /usr/CTARGET   NULL      $(alt_prefix root)    
15
# -------------------+-----------------------------+--------------+---------+-----------------------
16
#  ebuild helper ED/   /usr/CTARGET/TPREFIX          /usr/CTARGET   NULL      $(alt_prefix)         
5
alt_prefix() {
17
alt_prefix() {
6
	is_crosscompile && echo /usr/${CTARGET}
18
	if is_crosscompile; then
19
		echo -n "${EPREFIX}"/usr/${CTARGET}
20
		[[ $1 == root ]] || echo ${TPREFIX}
21
	fi
7
}
22
}
8
23
9
if [[ ${EAPI:-0} == [012] ]] ; then
24
if [[ ${EAPI:-0} == [012] ]] ; then
Lines 27-35 alt_headers() { Link Here
27
}
42
}
28
alt_build_headers() {
43
alt_build_headers() {
29
	if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
44
	if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
30
		ALT_BUILD_HEADERS=$(alt_headers)
45
		ALT_BUILD_HEADERS="${EPREFIX}"$(alt_headers)
31
		if tc-is-cross-compiler ; then
46
		if tc-is-cross-compiler ; then
32
			ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
47
			ALT_BUILD_HEADERS=${SYSROOT}"${EPREFIX}"$(alt_headers)
33
			if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
48
			if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
34
				local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
49
				local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
35
				ALT_BUILD_HEADERS=${header_path%/linux/version.h}
50
				ALT_BUILD_HEADERS=${header_path%/linux/version.h}
(-)eblits.old/pkg_postinst.eblit (-4 / +4 lines)
Lines 6-14 eblit-glibc-pkg_postinst() { Link Here
6
	# nothing to do if just installing headers
6
	# nothing to do if just installing headers
7
	just_headers && return
7
	just_headers && return
8
8
9
	if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
9
	if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
10
		# Generate fastloading iconv module configuration file.
10
		# Generate fastloading iconv module configuration file.
11
		"${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
11
		"${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
12
	fi
12
	fi
13
13
14
	if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
14
	if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
Lines 17-26 eblit-glibc-pkg_postinst() { Link Here
17
		/sbin/telinit U 2>/dev/null
17
		/sbin/telinit U 2>/dev/null
18
18
19
		# if the host locales.gen contains no entries, we'll install everything
19
		# if the host locales.gen contains no entries, we'll install everything
20
		local locale_list="${ROOT}etc/locale.gen"
20
		local locale_list="${EROOT}etc/locale.gen"
21
		if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
21
		if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
22
			ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
22
			ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
23
			locale_list="${ROOT}usr/share/i18n/SUPPORTED"
23
			locale_list="${EROOT}usr/share/i18n/SUPPORTED"
24
		fi
24
		fi
25
		locale-gen -j $(makeopts_jobs) --config "${locale_list}"
25
		locale-gen -j $(makeopts_jobs) --config "${locale_list}"
26
	fi
26
	fi
(-)eblits.old/pkg_preinst.eblit (-2 / +2 lines)
Lines 11-17 Link Here
11
glibc_sanity_check() {
11
glibc_sanity_check() {
12
	cd / #228809
12
	cd / #228809
13
13
14
	# We enter ${D} so to avoid trouble if the path contains
14
	# We enter ${ED} so to avoid trouble if the path contains
15
	# special characters; for instance if the path contains the
15
	# special characters; for instance if the path contains the
16
	# colon character (:), then the linker will try to split it
16
	# colon character (:), then the linker will try to split it
17
	# and look for the libraries in an unexpected place. This can
17
	# and look for the libraries in an unexpected place. This can
Lines 50-56 eblit-glibc-pkg_preinst() { Link Here
50
	fi
50
	fi
51
51
52
	[[ ${ROOT} != "/" ]] && return 0
52
	[[ ${ROOT} != "/" ]] && return 0
53
	[[ -d ${D}/$(get_libdir) ]] || return 0
53
	[[ -d ${ED}/$(get_libdir) ]] || return 0
54
	glibc_sanity_check
54
	glibc_sanity_check
55
55
56
	# Make sure devpts is mounted correctly for use w/out setuid pt_chown.
56
	# Make sure devpts is mounted correctly for use w/out setuid pt_chown.
(-)eblits.old/src_configure.eblit (-9 / +11 lines)
Lines 106-117 glibc_do_configure() { Link Here
106
		--host=${CTARGET_OPT:-${CTARGET}}
106
		--host=${CTARGET_OPT:-${CTARGET}}
107
		$(use_enable profile)
107
		$(use_enable profile)
108
		$(use_with gd)
108
		$(use_with gd)
109
		--with-headers=$(alt_build_headers)
109
		--with-headers="$(alt_build_headers)"
110
		--prefix=/usr
110
		--prefix="${TPREFIX}"/usr
111
		--libdir=/usr/$(get_libdir)
111
		--sysconfdir="${TPREFIX}"/etc
112
		--mandir=/usr/share/man
112
		--localstatedir="${TPREFIX}"/var
113
		--infodir=/usr/share/info
113
		--libdir="${TPREFIX}"/usr/$(get_libdir)
114
		--libexecdir=/usr/$(get_libdir)/misc/glibc
114
		--mandir="${TPREFIX}"/usr/share/man
115
		--infodir="${TPREFIX}"/usr/share/info
116
		--libexecdir="${TPREFIX}"/usr/$(get_libdir)/misc/glibc
115
		--with-bugurl=http://bugs.gentoo.org/
117
		--with-bugurl=http://bugs.gentoo.org/
116
		--with-pkgversion="$(glibc_banner)"
118
		--with-pkgversion="$(glibc_banner)"
117
		$(use_multiarch || echo --disable-multi-arch)
119
		$(use_multiarch || echo --disable-multi-arch)
Lines 123-129 glibc_do_configure() { Link Here
123
125
124
	# There is no configure option for this and we need to export it
126
	# There is no configure option for this and we need to export it
125
	# since the glibc build will re-run configure on itself
127
	# since the glibc build will re-run configure on itself
126
	export libc_cv_slibdir=/$(get_libdir)
128
	export libc_cv_slibdir=${TPREFIX}/$(get_libdir)
127
129
128
	# We take care of patching our binutils to use both hash styles,
130
	# We take care of patching our binutils to use both hash styles,
129
	# and many people like to force gnu hash style only, so disable
131
	# and many people like to force gnu hash style only, so disable
Lines 219-226 toolchain-glibc_headers_configure() { Link Here
219
		--enable-bind-now
221
		--enable-bind-now
220
		--build=${CBUILD_OPT:-${CBUILD}}
222
		--build=${CBUILD_OPT:-${CBUILD}}
221
		--host=${CTARGET_OPT:-${CTARGET}}
223
		--host=${CTARGET_OPT:-${CTARGET}}
222
		--with-headers=$(alt_build_headers)
224
		--with-headers="$(alt_build_headers)"
223
		--prefix=/usr
225
		--prefix="${TPREFIX}"/usr
224
		${EXTRA_ECONF}
226
		${EXTRA_ECONF}
225
	)
227
	)
226
228
(-)eblits.old/src_install.eblit (-4 / +4 lines)
Lines 6-12 toolchain-glibc_src_install() { Link Here
6
	local builddir=$(builddir $(want_linuxthreads && echo linuxthreads || echo nptl))
6
	local builddir=$(builddir $(want_linuxthreads && echo linuxthreads || echo nptl))
7
	cd "${builddir}"
7
	cd "${builddir}"
8
8
9
	emake install_root="${D}$(alt_prefix)" install || die
9
	emake install_root="${D}$(alt_prefix root)" install || die
10
10
11
	if want_linuxthreads && want_nptl ; then
11
	if want_linuxthreads && want_nptl ; then
12
		einfo "Installing NPTL to $(alt_libdir)/tls/..."
12
		einfo "Installing NPTL to $(alt_libdir)/tls/..."
Lines 102-108 toolchain-glibc_src_install() { Link Here
102
		has ${ldso_abi} $(get_install_abis) || continue
102
		has ${ldso_abi} $(get_install_abis) || continue
103
103
104
		ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
104
		ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
105
		if [[ ! -L ${D}/${ldso_name} && ! -e ${D}/${ldso_name} ]] ; then
105
		if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
106
			dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
106
			dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
107
		fi
107
		fi
108
	done
108
	done
Lines 111-117 toolchain-glibc_src_install() { Link Here
111
	# binary to be setuid.  This is because the default owners/perms will be
111
	# binary to be setuid.  This is because the default owners/perms will be
112
	# exactly what we want.
112
	# exactly what we want.
113
	if in_iuse suid && ! use suid ; then
113
	if in_iuse suid && ! use suid ; then
114
		find "${D}" -name pt_chown -exec chmod -s {} +
114
		find "${ED}" -name pt_chown -exec chmod -s {} +
115
	fi
115
	fi
116
116
117
	#################################################################
117
	#################################################################
Lines 202-208 toolchain-glibc_src_install() { Link Here
202
toolchain-glibc_headers_install() {
202
toolchain-glibc_headers_install() {
203
	local builddir=$(builddir "headers")
203
	local builddir=$(builddir "headers")
204
	cd "${builddir}"
204
	cd "${builddir}"
205
	emake install_root="${D}$(alt_prefix)" install-headers || die
205
	emake install_root="${D}$(alt_prefix root)" install-headers || die
206
	if ! version_is_at_least 2.16 ; then
206
	if ! version_is_at_least 2.16 ; then
207
		insinto $(alt_headers)/bits
207
		insinto $(alt_headers)/bits
208
		doins bits/stdio_lim.h || die
208
		doins bits/stdio_lim.h || die

Return to bug 473728