From b3f769c909e947f7de1b2b9e3a7c8a24e2d706d0 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 9 Nov 2014 20:41:28 +0000 Subject: Introduce support for bashrc.d directory that is sourced in bashrc by default, bug #468094. (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!) --- app-shells/bash/ChangeLog | 9 +- app-shells/bash/bash-4.3_p30-r1.ebuild | 248 +++++++++++++++++++++++++++++++++ app-shells/bash/files/bashrc-r1 | 92 ++++++++++++ 3 files changed, 348 insertions(+), 1 deletion(-) create mode 100644 app-shells/bash/bash-4.3_p30-r1.ebuild create mode 100644 app-shells/bash/files/bashrc-r1 (limited to 'app-shells') diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog index ea469436e863..b6e45d1dba86 100644 --- a/app-shells/bash/ChangeLog +++ b/app-shells/bash/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-shells/bash # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.425 2014/10/20 05:14:35 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.426 2014/11/09 20:41:28 mgorny Exp $ + +*bash-4.3_p30-r1 (09 Nov 2014) + + 09 Nov 2014; Michał Górny +bash-4.3_p30-r1.ebuild, + +files/bashrc-r1: + Introduce support for bashrc.d directory that is sourced in bashrc by default, + bug #468094. 20 Oct 2014; Mike Frysinger bash-4.3_p30.ebuild: Fix install of examples #525930 by Erik Zeek. diff --git a/app-shells/bash/bash-4.3_p30-r1.ebuild b/app-shells/bash/bash-4.3_p30-r1.ebuild new file mode 100644 index 000000000000..6b18603f3447 --- /dev/null +++ b/app-shells/bash/bash-4.3_p30-r1.ebuild @@ -0,0 +1,248 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.3_p30-r1.ebuild,v 1.1 2014/11/09 20:41:28 mgorny Exp $ + +EAPI="4" + +inherit eutils flag-o-matic toolchain-funcs multilib + +# Official patchlevel +# See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/ +PLEVEL=${PV##*_p} +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +[[ ${PV} != *_p* ]] && PLEVEL=0 +patches() { + local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}} + [[ ${plevel} -eq 0 ]] && return 1 + eval set -- {1..${plevel}} + set -- $(printf "${pn}${pv/\.}-%03d " "$@") + if [[ ${opt} == -s ]] ; then + echo "${@/#/${DISTDIR}/}" + else + local u + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do + printf "${u}/${pn}-${pv}-patches/%s " "$@" + done + fi +} + +# The version of readline this bash normally ships with. +READLINE_VER="6.3" + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html" +SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" +[[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla" + +DEPEND=">=sys-libs/ncurses-5.2-r2 + readline? ( >=sys-libs/readline-${READLINE_VER} ) + nls? ( virtual/libintl )" +RDEPEND="${DEPEND} + !/dev/null \ + && match_lhs=$(dircolors --print-database) +[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true + +if ${use_color} ; then + # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 + if type -P dircolors >/dev/null ; then + if [[ -f ~/.dir_colors ]] ; then + eval $(dircolors -b ~/.dir_colors) + elif [[ -f /etc/DIR_COLORS ]] ; then + eval $(dircolors -b /etc/DIR_COLORS) + fi + fi + + if [[ ${EUID} == 0 ]] ; then + PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] ' + else + PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' + fi + + #BSD#@export CLICOLOR=1 + #GNU#@alias ls='ls --color=auto' + alias grep='grep --colour=auto' + alias egrep='egrep --colour=auto' + alias fgrep='fgrep --colour=auto' +else + if [[ ${EUID} == 0 ]] ; then + # show root@ when we don't have colors + PS1='\u@\h \W \$ ' + else + PS1='\u@\h \w \$ ' + fi +fi + +for sh in /etc/bash/bashrc.d/* ; do + [[ -r ${sh} ]] && source "${sh}" +done + +# Try to keep environment pollution down, EPA loves us. +unset use_color safe_term match_lhs sh -- cgit v1.2.3-65-gdbad