From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CD36313832E for ; Thu, 21 Jul 2016 02:19:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 32AE821C08B; Thu, 21 Jul 2016 02:19:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A6E3721C038 for ; Thu, 21 Jul 2016 02:19:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5C7E6340DEB for ; Thu, 21 Jul 2016 02:19:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EC8E27E3 for ; Thu, 21 Jul 2016 02:19:36 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1469067250.63c4f00e4d4bb8ae69cd6d650dc4200cd8779f08.heroxbd@gentoo> Subject: [gentoo-commits] proj/android:master commit in: app-shells/bash/, eclass/ X-VCS-Repository: proj/android X-VCS-Files: app-shells/bash/Manifest app-shells/bash/bash-4.3_p46.ebuild eclass/prefix.eclass X-VCS-Directories: eclass/ app-shells/bash/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: 63c4f00e4d4bb8ae69cd6d650dc4200cd8779f08 X-VCS-Branch: master Date: Thu, 21 Jul 2016 02:19:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 93e3b15a-045d-4a26-be20-0b2fb7dafe65 X-Archives-Hash: 97b737b2a8ad80fe0ebf15194f5e8d1d Message-ID: <20160721021936.0yF2QUTKjuaTuXWxCeUWf8TTq5vcb8YlLxDYlsFbY7o@z> commit: 63c4f00e4d4bb8ae69cd6d650dc4200cd8779f08 Author: Benda Xu gentoo org> AuthorDate: Thu Jul 21 02:14:10 2016 +0000 Commit: Benda XU gentoo org> CommitDate: Thu Jul 21 02:14:10 2016 +0000 URL: https://gitweb.gentoo.org/proj/android.git/commit/?id=63c4f00e app-shells/bash: use prefix.eclass in gx86. app-shells/bash/Manifest | 2 +- app-shells/bash/bash-4.3_p46.ebuild | 4 +- eclass/prefix.eclass | 151 ------------------------------------ 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 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: -# @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 ] [-e ] -# @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: -# @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: