Lines 10-16
PYTHON_COMPAT=(
Link Here
|
10 |
) |
10 |
) |
11 |
PYTHON_REQ_USE='bzip2(+),threads(+)' |
11 |
PYTHON_REQ_USE='bzip2(+),threads(+)' |
12 |
|
12 |
|
13 |
inherit distutils-r1 epatch linux-info systemd |
13 |
inherit distutils-r1 epatch linux-info systemd prefix |
14 |
|
14 |
|
15 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
15 |
DESCRIPTION="Portage is the package management and distribution system for Gentoo" |
16 |
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
16 |
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" |
Lines 141-154
python_prepare_all() {
Link Here
|
141 |
|
141 |
|
142 |
if [[ -n ${EPREFIX} ]] ; then |
142 |
if [[ -n ${EPREFIX} ]] ; then |
143 |
einfo "Setting portage.const.EPREFIX ..." |
143 |
einfo "Setting portage.const.EPREFIX ..." |
144 |
sed -e "s|^\(SANDBOX_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/sandbox\"\)|\\1${EPREFIX}\\2|" \ |
144 |
hprefixify -e "s|^(EPREFIX[[:space:]]*=[[:space:]]*\").*|\1${EPREFIX}\"|" \ |
145 |
-e "s|^\(FAKEROOT_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/bin/fakeroot\"\)|\\1${EPREFIX}\\2|" \ |
145 |
-w "/_BINARY/" lib/portage/const.py |
146 |
-e "s|^\(BASH_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/bash\"\)|\\1${EPREFIX}\\2|" \ |
|
|
147 |
-e "s|^\(MOVE_BINARY[[:space:]]*=[[:space:]]*\"\)\(/bin/mv\"\)|\\1${EPREFIX}\\2|" \ |
148 |
-e "s|^\(PRELINK_BINARY[[:space:]]*=[[:space:]]*\"\)\(/usr/sbin/prelink\"\)|\\1${EPREFIX}\\2|" \ |
149 |
-e "s|^\(EPREFIX[[:space:]]*=[[:space:]]*\"\).*|\\1${EPREFIX}\"|" \ |
150 |
-i lib/portage/const.py || \ |
151 |
die "Failed to patch portage.const.EPREFIX" |
152 |
|
146 |
|
153 |
einfo "Prefixing shebangs ..." |
147 |
einfo "Prefixing shebangs ..." |
154 |
while read -r -d $'\0' ; do |
148 |
while read -r -d $'\0' ; do |
Lines 159-173
python_prepare_all() {
Link Here
|
159 |
fi |
153 |
fi |
160 |
done < <(find . -type f -print0) |
154 |
done < <(find . -type f -print0) |
161 |
|
155 |
|
162 |
einfo "Adjusting make.globals ..." |
156 |
einfo "Adjusting make.globals, repos.conf and etc-update ..." |
163 |
sed -e "s|\(/usr/portage\)|${EPREFIX}\\1|" \ |
157 |
hprefixify cnf/{make.globals,repos.conf} bin/etc-update |
164 |
-e "s|^\(PORTAGE_TMPDIR=\"\)\(/var/tmp\"\)|\\1${EPREFIX}\\2|" \ |
|
|
165 |
-i cnf/make.globals || die "sed failed" |
166 |
|
158 |
|
167 |
einfo "Adjusting repos.conf ..." |
|
|
168 |
sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \ |
169 |
-e "s|^\(sync-openpgp-key-path = \)\(.*\)|\\1${EPREFIX}\\2|" \ |
170 |
-i cnf/repos.conf || die "sed failed" |
171 |
if use prefix-guest ; then |
159 |
if use prefix-guest ; then |
172 |
sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
160 |
sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ |
173 |
-e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |
161 |
-e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ |