summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-shells/bash/Manifest2
-rw-r--r--app-shells/bash/bash-4.3_p46.ebuild4
-rw-r--r--eclass/prefix.eclass151
3 files changed, 3 insertions, 154 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index ff6bc1e..501f0aa 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -60,5 +60,5 @@ DIST bash43-044 1658 SHA256 9338820630bf67373b44d8ea68409f65162ea7a47b9b29ace06a
DIST bash43-045 1312 SHA256 ba6ec3978e9eaa1eb3fabdaf3cc6fdf8c4606ac1c599faaeb4e2d69864150023 SHA512 7b79dacff44e5358da736334d2277a2879ca1389e22e9dac50e139f30dab623bc89a56930d89e74efc468a00d051f6747ccaffcd1a30d7c737d49780b9830e3d WHIRLPOOL f361e523879ff1898574ac5eca480661bd787dc278fff204e7f27da89e85439b4e9d36a5f556046b760f3beb115302e745b5196bfa081b402d3f76fb44463558
DIST bash43-046 1494 SHA256 b3b456a6b690cd293353f17e22d92a202b3c8bce587ae5f2667c20c9ab6f688f SHA512 c036b659fa681f8129110356bec33fad00fb8e469f3b4bcefd0b7ddf5e20030977716adf5c65f58f3ff68cd7af0bdd42392ee077100bc7f45ee123749d082f7d WHIRLPOOL d58384a2ca77f9a80a69a117221da51a701539cf5497d8e0fc634cd1cc0cb0024e02675bea810a0f42b873b557d479ba1b7aee6e6f73bd1422df2dbb29396477
EBUILD bash-4.3_p42-r2.ebuild 7355 SHA256 9e3e57dd0af1f66e27493a1e2f31d404084846ddc82dbbef6c67e25d6b4e2280 SHA512 58a5931cfcd89c2587ab336ad87b334127df65f5818cec1b6a3b7871e3b8173a7a46dd0c0956104b9d270351dd873e10c1e3666a37df168725f039edea1b32e0 WHIRLPOOL 72d9a680334722fd0a326c388495cbf77b9776d6ad3497117cffc075ad3acfca2d6677e1fe735ec70b96a6acf2318075be3a91f00ea9278db056cc5c215fd2e0
-EBUILD bash-4.3_p46.ebuild 7288 SHA256 65cbda00f14a953d5621da68075d133a6ca60f4f3404ea1b02ee350dfa4a5a3c SHA512 f63225f99d87d3b3e6d54640c06dec7c4c2176fe0b41ca3fe79b6b2a643b31d4005ce427c82f09385dd8303c2faea68481c0660807d04916f3816e4e139bc4a2 WHIRLPOOL e0d2bfb428ce7c5f3f743a515c40e40758c12035d7dd62aef3e7a072745cf5e912de373612082413053db4b311800e86db01a32ba40c0c53d66cd4409c05eff5
+EBUILD bash-4.3_p46.ebuild 7302 SHA256 9d776281eaeb4faec790b751312417a01634d69e4906e068de214409749ce0f5 SHA512 3b50d6a0949d00ca4eb8bccc7c75a4e4b91e7379c56a8455b9c219cc7c1228186a86aaa6ed5d55fbc91f026a1faf7960d775ee47b741ab1d76f1a085a96dec92 WHIRLPOOL d7c7081a31b891aed5d6b1ebd0af74f82d67cb43a0551fb3218949a8ef7f7c52c6ecc92d200733965a0b256ed8db281fe1492c858a65835b01f55cdac2ffc2d9
MISC metadata.xml 734 SHA256 7850abd55e656b9360deafb278c98598922eb3b6f884d024d199110afdcf6ff0 SHA512 a9301e8d2347e0cf90a97325d9a705076150c00609d28338e5d7d72c135468e4f0531b2a4077b69679ae6ccf89eee691e0e5f0748caab60689f5f017afb544f1 WHIRLPOOL ce0e36bc0ae83b73aee7abee391d1b0a384f0277dfb7f7282043624a523699685d866ef3291a02e9ad1bde3abf196b47e1351f646e0149f942a40ed4dc940a37
diff --git a/app-shells/bash/bash-4.3_p46.ebuild b/app-shells/bash/bash-4.3_p46.ebuild
index 75a52b4..b3ef638 100644
--- a/app-shells/bash/bash-4.3_p46.ebuild
+++ b/app-shells/bash/bash-4.3_p46.ebuild
@@ -86,7 +86,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-4.3-mapfile-improper-array-name-validation.patch
epatch "${FILESDIR}"/${PN}-4.3-arrayfunc.patch
epatch "${FILESDIR}"/${PN}-4.3-protos.patch
- fprefixify epatch "${FILESDIR}"/${PN}-4.0-configs-prefix.patch
+ epatch "$(prefixify_ro "${FILESDIR}"/${PN}-4.0-configs-prefix.patch)"
epatch_user
}
@@ -177,7 +177,7 @@ src_install() {
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
- fprefixify doins "${FILESDIR}"/bashrc
+ doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
keepdir /etc/bash/bashrc.d
insinto /etc/skel
for f in bash{_logout,_profile,rc} ; do
diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
deleted file mode 100644
index 411b365..0000000
--- a/eclass/prefix.eclass
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# @ECLASS: prefix.eclass
-# @MAINTAINER:
-# Feel free to contact the Prefix team through <prefix@gentoo.org> if
-# you have problems, suggestions or questions.
-# @BLURB: Eclass to provide Prefix functionality
-# @DESCRIPTION:
-# Gentoo Prefix allows users to install into a self defined offset
-# located somewhere in the filesystem. Prefix ebuilds require
-# additional functions and variables which are defined by this eclass.
-
-# @ECLASS-VARIABLE: EPREFIX
-# @DESCRIPTION:
-# The offset prefix of a Gentoo Prefix installation. When Gentoo Prefix
-# is not used, ${EPREFIX} should be "". Prefix Portage sets EPREFIX,
-# hence this eclass has nothing to do here in that case.
-# Note that setting EPREFIX in the environment with Prefix Portage sets
-# Portage into cross-prefix mode.
-if [[ ! ${EPREFIX+set} ]]; then
- export EPREFIX=''
-fi
-
-
-# @FUNCTION: eprefixify
-# @USAGE: <list of to be eprefixified files>
-# @DESCRIPTION:
-# Replaces @GENTOO_PORTAGE_EPREFIX@ with ${EPREFIX} for the given files,
-# Dies if no arguments are given, a file does not exist, or changing a
-# file failed.
-eprefixify() {
- [[ $# -lt 1 ]] && die "at least one file operand is required"
- einfo "Adjusting to prefix ${EPREFIX:-/}"
- local x
- for x in "$@" ; do
- if [[ -e ${x} ]] ; then
- ebegin " ${x##*/}"
- sed -i -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" "${x}"
- eend $? || die "failed to eprefixify ${x}"
- else
- die "${x} does not exist"
- fi
- done
-
- return 0
-}
-
-# @FUNCTION: hprefixify
-# @USAGE: [ -w <line matching regex> ] [-e <extended regex>] <list of files>
-# @DESCRIPTION:
-#
-# Tries a set of heuristics to prefixify the given files, Dies if no
-# arguments are given, a file does not exist, or changing a file failed.
-#
-# Additional extended regular expression can be passed by -e or
-# environment variable PREFIX_EXTRA_REGEX. The default heuristics can
-# be constrained to lines matching regular expressions passed by -w or
-# environment variable PREFIX_LINE_MATCH.
-hprefixify() {
- local PREFIX_EXTRA_REGEX PREFIX_LINE_MATCH xl=() x
- while [[ $# -gt 0 ]]; do
- case $1 in
- -e)
- PREFIX_EXTRA_REGEX="$2"
- shift
- ;;
- -w)
- PREFIX_LINE_MATCHING="$2"
- shift
- ;;
- *)
- xl+=( "$1" )
- ;;
- esac
- shift
- done
-
- [[ ${#xl[@]} -lt 1 ]] && die "at least one file operand is required"
- einfo "Adjusting to prefix ${EPREFIX:-/}"
- for x in "${xl[@]}" ; do
- if [[ -e ${x} ]] ; then
- ebegin " ${x##*/}"
- sed -r \
- -e "${PREFIX_LINE_MATCH}s,([^[:alnum:]}\)\.])/(usr|lib(|[onx]?32|n?64)|etc|bin|sbin|var|opt),\1${EPREFIX}/\2,g" \
- -e "${PREFIX_EXTRA_REGEX}" \
- -i "${x}"
- eend $? || die "failed to prefixify ${x}"
- else
- die "${x} does not exist"
- fi
- done
-}
-
-# @FUNCTION: __temp_prefixify
-# @USAGE: a single file. Internal use only.
-# @DESCRIPTION:
-# copies the files to ${T}, calls eprefixify, echos the new file.
-__temp_prefixify() {
- if [[ -e $1 ]] ; then
- local f=${1##*/}
- cp "$1" "${T}" || die "failed to copy file"
- local x="${T}"/${f}
- if grep -qs @GENTOO_PORTAGE_EPREFIX@ "${x}" ; then
- eprefixify "${T}"/${f} > /dev/null
- else
- hprefixify "${T}"/${f} > /dev/null
- fi
- echo "${x}"
- else
- die "$1 does not exist"
- fi
-}
-
-# @FUNCTION: fprefixify
-# @USAGE: <function> <files>
-# @DESCRIPTION:
-# prefixify a function call.
-# copies the files to ${T}, calls eprefixify, and calls the function.
-# @EXAMPLE:
-# fprefixify doexe ${FILESDIR}/fix_libtool_files.sh
-# fprefixify epatch ${FILESDIR}/${PN}-4.0.2-path.patch
-fprefixify() {
- [[ $# -lt 2 ]] && die "at least two arguments required"
-
- local func=$1 f
- einfo "Adjusting ${func} to prefix ${EPREFIX:-/}"
- shift
- case ${func} in
- new*)
- [[ $# -ne 2 ]] && die "${func} takes two arguments"
- ebegin " ${1##*/}"
- f=$(__temp_prefixify "$1")
- ${func} "${f}" "$2"
- eend $? || die "failed to execute ${func}"
- ;;
- *)
- for x in "$@" ; do
- ebegin " ${x##*/}"
- f=$(__temp_prefixify "${x}")
- ${func} "${f}"
- eend $? || die "failed to execute ${func}"
- done
- ;;
- esac
-
- return 0
-}
-
-# vim: tw=72: