summaryrefslogtreecommitdiff
path: root/app-portage/prefix-toolkit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /app-portage/prefix-toolkit
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'app-portage/prefix-toolkit')
-rw-r--r--app-portage/prefix-toolkit/Manifest4
-rw-r--r--app-portage/prefix-toolkit/prefix-toolkit-8.ebuild (renamed from app-portage/prefix-toolkit/prefix-toolkit-5.ebuild)32
-rw-r--r--app-portage/prefix-toolkit/prefix-toolkit-9.ebuild (renamed from app-portage/prefix-toolkit/prefix-toolkit-4.ebuild)74
3 files changed, 95 insertions, 15 deletions
diff --git a/app-portage/prefix-toolkit/Manifest b/app-portage/prefix-toolkit/Manifest
index 70f5ae7f94de..36c4161d5840 100644
--- a/app-portage/prefix-toolkit/Manifest
+++ b/app-portage/prefix-toolkit/Manifest
@@ -1,3 +1,3 @@
-EBUILD prefix-toolkit-4.ebuild 18535 BLAKE2B 836627d06a4740707af1e7f31f1cc6e0e280f1eb1a3e573621d471038e6470a9c599eb2d4ff37120636a395d5db7a1d20b88d204302f9a8772522ca2b551c6b9 SHA512 97efb29fee5db4f6442847eddf0ca9ec975887122861a6faeb55950019cb2c4dc128822e253adfc920f7dd96b0877f70fa35eda54dd8f1da750c5baffc72a99c
-EBUILD prefix-toolkit-5.ebuild 19268 BLAKE2B 541668fe2a2e61ce4c5e0cb58457a57a468b470fa39e55cb4232d4920e4b9c99855d15031e251737e5c24096395ce7a0f2c83057fc9f4382b35e1741e6aa281f SHA512 87b7d304843460e9f5186641a9e4dbc16ec69271cad386d33c93821d93752db2eae8a60f3c432465f0fb1d2222d8b945f96cbaf1adf99c1ea0faa48620cd82d9
+EBUILD prefix-toolkit-8.ebuild 19947 BLAKE2B d32f9ff7edb08edf8d236c92037654fe68ba1f2b263e2d8bef3a6065fd242fadbbfab0fbe24300412c81d4915221183171520342d72e2c35643624fdec734730 SHA512 fcc6df990c48b7b7508493b7aab82bd578df5fe6d06fa8cfb100264b8fce6b268f5e2770f5dd88ef9c44bd504180ae67b8fb3c4a66b4e73a17d75da3a7f39560
+EBUILD prefix-toolkit-9.ebuild 20305 BLAKE2B 6417c15d1611ac471672a1082e1ae2427842ad5983ec2c1f3f39b0a961dc4790fab50e13f1e7ce9da28f6b9563be207489336147d016d724a241030c1b652a14 SHA512 0acdc25b3e8720ce993d6514b3bb17791404527414e4ca172aada36f94cbfddc449543c80db433858efb52445d1725b81a30ec7b627d0691a43b74258594c480
MISC metadata.xml 243 BLAKE2B d650658b3e248940751d20c9e517a011a34f8d99df54d5203162d67c21df384f507e44ed0c848c1adc99fae8d511e204129f2709f5bdc5d1b2c8e41120bbe6db SHA512 8489be9ea6eac385511b0d193b1b61fad9c8e0d4cb86fd711e6faf04e66b2c935ae64ce6ce0a044d036e76de6787e5d440d67f831e89261a71e74b645a0999d9
diff --git a/app-portage/prefix-toolkit/prefix-toolkit-5.ebuild b/app-portage/prefix-toolkit/prefix-toolkit-8.ebuild
index 61ea23e6a37a..96f9ee699661 100644
--- a/app-portage/prefix-toolkit/prefix-toolkit-5.ebuild
+++ b/app-portage/prefix-toolkit/prefix-toolkit-8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -31,6 +31,9 @@ RDEPEND="${DEPEND}
app-portage/elt-patches
sys-devel/gnuconfig
sys-devel/gcc-config
+ elibc_Winnt? (
+ dev-libs/pthreads4w
+ )
)
"
@@ -131,6 +134,7 @@ src_install() {
newins prefix-stack.bashrc bashrc
newenvd prefix-stack.envd.99stack 99stack
doenvd 000fallback
+ keepdir /usr/share/aclocal
else
dobin prefix-stack-setup
fi
@@ -175,6 +179,12 @@ pkg_preinst() {
eend $?
}
+pkg_postinst() {
+ use prefix-stack || return 0
+ [[ -x ${EROOT}/usr/bin/gcc-config ]] || return 0
+ "${EROOT}"/usr/bin/gcc-config ${CHOST}-${P}
+}
+
return 0
: startprefix <<'EOIN'
@@ -316,6 +326,7 @@ EOIN
: prefix-stack.envd.99stack <<'EOIN'
PKG_CONFIG_PATH@=@"@GENTOO_PORTAGE_EPREFIX@/usr/lib/pkgconfig:@GENTOO_PORTAGE_EPREFIX@/usr/share/pkgconfig"
+AT_SYS_M4DIR@=@"@GENTOO_PORTAGE_EPREFIX@/usr/share/aclocal"
PORTAGE_CONFIGROOT@=@"@GENTOO_PORTAGE_EPREFIX@"
EPREFIX@=@"@GENTOO_PORTAGE_EPREFIX@"
EOIN
@@ -547,6 +558,10 @@ ebegin "installing required basic packages"
sys-devel/gnuconfig \
sys-devel/gcc-config
+ # get eventual dependencies, add to world
+ emerge --verbose --update --deep \
+ app-portage/prefix-toolkit
+
# select the stack wrapper profile from gcc-config
env -i PORTAGE_CONFIGROOT="${CHILD_EPREFIX}" \
"$(type -P bash)" "${CHILD_EPREFIX}"/usr/bin/gcc-config 1
@@ -572,6 +587,7 @@ fi
myself=${0##*/} # basename $0
link_dirs=()
+linkopts=()
opts=()
chost="@GENTOO_PORTAGE_CHOST@"
prefix="@GENTOO_PORTAGE_EPREFIX@"
@@ -586,6 +602,18 @@ orig_args=("$@")
for opt in "$@"
do
+ if [[ ${chost} == *"-winnt"* ]]; then
+ # We depend on dev-libs/pthreads4w, no?
+ case ${opt} in
+ -pthread | -lpthread)
+ case " ${linkopts[*]} " in
+ *" -lpthread "*) ;;
+ *) linkopts=( "${linkopts[@]}" "-lpthread" ) ;;
+ esac
+ continue
+ ;;
+ esac
+ fi
case "$opt" in
-L)
link_dirs=("${link_dirs[@]}" "-L$1")
@@ -648,7 +676,7 @@ esac
[[ ${myself} == *-*-*-* ]] || myself=${chost}-${myself#${chost}-}
case "$mode" in
-link) exec "${myself}" "${link_dirs[@]}" "${pfx_link[@]}" "${opts[@]}" "${pfx_comp[@]}" "${pfx_link_r[@]}" ;;
+link) exec "${myself}" "${link_dirs[@]}" "${pfx_link[@]}" "${opts[@]}" "${pfx_comp[@]}" "${pfx_link_r[@]}" "${linkopts[@]}" ;;
compile) exec "${myself}" "${link_dirs[@]}" "${opts[@]}" "${pfx_comp[@]}" ;;
version) exec "${myself}" "${orig_args[@]}" ;;
dirs)
diff --git a/app-portage/prefix-toolkit/prefix-toolkit-4.ebuild b/app-portage/prefix-toolkit/prefix-toolkit-9.ebuild
index cfe11c4c353a..05ebbcc42e84 100644
--- a/app-portage/prefix-toolkit/prefix-toolkit-4.ebuild
+++ b/app-portage/prefix-toolkit/prefix-toolkit-9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -23,14 +23,21 @@ BDEPEND="${DEPEND}
# In prefix-stack, these dependencies actually are the @system set,
# as we rely on the base prefix anyway for package management,
# which should have a proper @system set.
+# Strictly speaking, only baselayout and gcc-config are necessary
+# (and pthreads4w for Winnt), but it is easier for now to install
+# elt-patches, gentoo-functions and gnuconfig as well, instead of
+# fixing all uses that expect them in EPREFIX rather than BROOT.
# See als: pkg_preinst
RDEPEND="${DEPEND}
prefix-stack? (
>=sys-apps/baselayout-prefix-2.6
- sys-apps/gentoo-functions
+ sys-devel/gcc-config
+ elibc_Winnt? (
+ dev-libs/pthreads4w
+ )
app-portage/elt-patches
+ sys-apps/gentoo-functions
sys-devel/gnuconfig
- sys-devel/gcc-config
)
"
@@ -64,7 +71,10 @@ src_unpack() {
else
my_unpack prefix-stack-setup
fi
- my_unpack startprefix
+ if use prefix; then
+ # does not make sense on vanilla Gentoo
+ my_unpack startprefix
+ fi
}
my_prefixify() {
@@ -131,11 +141,14 @@ src_install() {
newins prefix-stack.bashrc bashrc
newenvd prefix-stack.envd.99stack 99stack
doenvd 000fallback
+ keepdir /usr/share/aclocal
else
dobin prefix-stack-setup
fi
- exeinto /
- doexe startprefix
+ if use prefix; then
+ exeinto /
+ doexe startprefix
+ fi
}
pkg_preinst() {
@@ -175,6 +188,12 @@ pkg_preinst() {
eend $?
}
+pkg_postinst() {
+ use prefix-stack || return 0
+ [[ -x ${EROOT}/usr/bin/gcc-config ]] || return 0
+ "${EROOT}"/usr/bin/gcc-config ${CHOST}-${P}
+}
+
return 0
: startprefix <<'EOIN'
@@ -239,6 +258,15 @@ RETAIN="HOME=$HOME TERM=$TERM USER=$USER SHELL=$SHELL"
[[ -n ${SSH_AUTH_SOCK} ]] && RETAIN+=" SSH_AUTH_SOCK=$SSH_AUTH_SOCK"
# if we're on some X terminal, makes sense to inherit that too
[[ -n ${DISPLAY} ]] && RETAIN+=" DISPLAY=$DISPLAY"
+if [[ -d /proc/registry ]]; then # we're on Cygwin
+ # crucial to Windows but cannot be restored, see
+ # https://cygwin.com/ml/cygwin/2019-08/msg00072.html
+ [[ -n ${SYSTEMDRIVE} ]] && RETAIN+=" SYSTEMDRIVE=$SYSTEMDRIVE"
+ # COMSPEC is to native Windows what SHELL is to *nix
+ [[ -n ${COMSPEC} ]] && RETAIN+=" COMSPEC=$COMSPEC"
+ # some Windows programs (e.g. devenv.exe) need TMP or TEMP
+ [[ -n ${TEMP} ]] && RETAIN+=" TEMP=$TEMP"
+fi
# do it!
if [[ ${SHELL#${EPREFIX}} != ${SHELL} ]] ; then
'@GENTOO_PORTAGE_EENV@' -i $RETAIN $SHELL -l
@@ -307,6 +335,7 @@ EOIN
: prefix-stack.envd.99stack <<'EOIN'
PKG_CONFIG_PATH@=@"@GENTOO_PORTAGE_EPREFIX@/usr/lib/pkgconfig:@GENTOO_PORTAGE_EPREFIX@/usr/share/pkgconfig"
+AT_SYS_M4DIR@=@"@GENTOO_PORTAGE_EPREFIX@/usr/share/aclocal"
PORTAGE_CONFIGROOT@=@"@GENTOO_PORTAGE_EPREFIX@"
EPREFIX@=@"@GENTOO_PORTAGE_EPREFIX@"
EOIN
@@ -412,6 +441,7 @@ eend_exit() {
ebegin "creating directory structure"
(
set -e
+ mkdir -p "${CHILD_EPREFIX}"/var/tmp/portage
mkdir -p "${CHILD_EPREFIX}"/etc/portage/profile/use.mask
mkdir -p "${CHILD_EPREFIX}"/etc/portage/profile/use.force
mkdir -p "${CHILD_EPREFIX}"/etc/portage/env
@@ -427,11 +457,11 @@ ebegin "creating make.conf"
(
set -e
echo "#"
- echo "# The following values where taken from the parent prefix's"
- echo "# environment. Feel free to adopt them as you like."
+ echo "# These are sane default compiler flags, feel free to adopt them as you like."
+ echo "# Extending the flags is done to respect flags probably set by some profile."
echo "#"
- echo "CFLAGS=\"$(portageq envvar CFLAGS)\""
- echo "CXXFLAGS=\"$(portageq envvar CXXFLAGS)\""
+ echo "CFLAGS=\"\${CFLAGS} -O2 -pipe\""
+ echo "CXXFLAGS=\"${CXXFLAGS} -O2 -pipe\""
echo "MAKEOPTS=\"$(portageq envvar MAKEOPTS)\""
niceness=$(portageq envvar PORTAGE_NICENESS || true)
[[ -n ${niceness} ]] &&
@@ -445,6 +475,7 @@ ebegin "creating make.conf"
echo "EPREFIX=\"${CHILD_EPREFIX}\""
echo "PORTAGE_OVERRIDE_EPREFIX=\"${PARENT_EPREFIX}\""
echo "BROOT=\"${PARENT_EPREFIX}\""
+ echo "PORTAGE_TMPDIR=\"\${EPREFIX}/var/tmp\""
# Since EAPI 7 there is BDEPEND, which is DEPEND in EAPI up to 6.
# We do not want to pull DEPEND from EAPI <= 6, but RDEPEND only.
echo "EMERGE_DEFAULT_OPTS=\"--root-deps=rdeps\""
@@ -466,6 +497,10 @@ ebegin "creating env/host-cc.conf"
cat > "${CHILD_EPREFIX}"/etc/portage/env/host-cc.conf <<-EOM
CC=${PARENT_CHOST}-gcc
CXX=${PARENT_CHOST}-g++
+ # Inherited compiler flags from parent prefix,
+ # as the child prefix may have a different compiler.
+ CFLAGS="$(portageq envvar CFLAGS)"
+ CXXFLAGS="$(portageq envvar CXXFLAGS)"
EOM
eend_exit $?
@@ -532,6 +567,10 @@ ebegin "installing required basic packages"
sys-devel/gnuconfig \
sys-devel/gcc-config
+ # get eventual dependencies, add to world
+ emerge --verbose --update --deep \
+ app-portage/prefix-toolkit
+
# select the stack wrapper profile from gcc-config
env -i PORTAGE_CONFIGROOT="${CHILD_EPREFIX}" \
"$(type -P bash)" "${CHILD_EPREFIX}"/usr/bin/gcc-config 1
@@ -557,6 +596,7 @@ fi
myself=${0##*/} # basename $0
link_dirs=()
+linkopts=()
opts=()
chost="@GENTOO_PORTAGE_CHOST@"
prefix="@GENTOO_PORTAGE_EPREFIX@"
@@ -571,6 +611,18 @@ orig_args=("$@")
for opt in "$@"
do
+ if [[ ${chost} == *"-winnt"* ]]; then
+ # We depend on dev-libs/pthreads4w, no?
+ case ${opt} in
+ -pthread | -lpthread)
+ case " ${linkopts[*]} " in
+ *" -lpthread "*) ;;
+ *) linkopts=( "${linkopts[@]}" "-lpthread" ) ;;
+ esac
+ continue
+ ;;
+ esac
+ fi
case "$opt" in
-L)
link_dirs=("${link_dirs[@]}" "-L$1")
@@ -633,7 +685,7 @@ esac
[[ ${myself} == *-*-*-* ]] || myself=${chost}-${myself#${chost}-}
case "$mode" in
-link) exec "${myself}" "${link_dirs[@]}" "${pfx_link[@]}" "${opts[@]}" "${pfx_comp[@]}" "${pfx_link_r[@]}" ;;
+link) exec "${myself}" "${link_dirs[@]}" "${pfx_link[@]}" "${opts[@]}" "${pfx_comp[@]}" "${pfx_link_r[@]}" "${linkopts[@]}" ;;
compile) exec "${myself}" "${link_dirs[@]}" "${opts[@]}" "${pfx_comp[@]}" ;;
version) exec "${myself}" "${orig_args[@]}" ;;
dirs)