summaryrefslogtreecommitdiff
path: root/app-shells/bash-completion
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-shells/bash-completion
reinit the tree, so we can have metadata
Diffstat (limited to 'app-shells/bash-completion')
-rw-r--r--app-shells/bash-completion/Manifest12
-rw-r--r--app-shells/bash-completion/bash-completion-2.4-r1.ebuild98
-rw-r--r--app-shells/bash-completion/bash-completion-2.5.ebuild98
-rw-r--r--app-shells/bash-completion/bash-completion-2.7.ebuild122
-rw-r--r--app-shells/bash-completion/bash-completion-9999.ebuild129
-rw-r--r--app-shells/bash-completion/files/bash-completion-2.1-escape-characters-r1.patch27
-rw-r--r--app-shells/bash-completion/metadata.xml28
7 files changed, 514 insertions, 0 deletions
diff --git a/app-shells/bash-completion/Manifest b/app-shells/bash-completion/Manifest
new file mode 100644
index 000000000000..8b0d28d04b28
--- /dev/null
+++ b/app-shells/bash-completion/Manifest
@@ -0,0 +1,12 @@
+AUX bash-completion-2.1-escape-characters-r1.patch 1084 SHA256 b8e96b91f7d03e6e6de7e105dd8100206058b2ad44f09055521b4fab9befb245 SHA512 b7cb548024fbc68e87d781208a378299c399d2661121290c500d62cd66855acc02848710b44c363917c3c4923e063212a2b56c9b0c08deb71aba308d75939cab WHIRLPOOL c2697d7a54614692e8b40c3ca55554a25ccf34e5914a362ce9a256d783be3f4d398dd1d948b8b81130ed8662045177a824fdd5b8c7f0166872c33d4274eb4a9d
+DIST bash-completion-2.4.tar.xz 276148 SHA256 c0f76b5202fec9ef8ffba82f5605025ca003f27cfd7a85115f838ba5136890f6 SHA512 b852e0a38417dfc3754a91dae2d107f99a3c2970d835a4bbaa80f2a4db8d670bc3820ddc6ada26f68070f22fb4c1db7abe50ad489b1c0f8497b1e6e91be27627 WHIRLPOOL f38f148dcbca1ee47ec6fa33637ea0673c03816b607bd638605832fb76ec7fb5f24cba35cb559e8a5b06636b1ec0f225e420615b6721074fc405cb79b505b07b
+DIST bash-completion-2.5.tar.xz 276732 SHA256 b0b9540c65532825eca030f1241731383f89b2b65e80f3492c5dd2f0438c95cf SHA512 44ca2cbf38190c2bfa1e98021c1de36dbef0e55f9fe7840e83bd7f91b4c9afc92afa9bb03d53dbc6d9f9b468ac63ff1021a60e456fc239010010d75687eff3da WHIRLPOOL b488571aca9d8b027214c2964ec789ef616659a098a2bd65a921075d94a8014b51a802040535e44c7831b159a5094b6879935f726ee97409b575c36cd01dbc13
+DIST bash-completion-2.7.tar.xz 280048 SHA256 41ba892d3f427d4a686de32673f35401bc947a7801f684127120cdb13641441e SHA512 514709ad2e5f6bd4e20027c7049a1144c1854a37b653d5c11fad1cdf7a46d0e1afca725d6ce75d49691149e0de57be85747f704ac1c429ef4cea114bfbff8fcd WHIRLPOOL 9f5b2a4af13428a89be8c692cd4bbc38b107045d0c60ee1efe440cf7bfdc5db95f564024373442c32ad1ecfabc22346caee0f4597d71baa4ef7a28dd248c4c27
+DIST bashcomp-2.0.2.tar.gz 3625 SHA256 6ede58bfbe99f0dca1eb9236492aa20a6755e5731526de56e15d1e2b220165c9 SHA512 46bc1bcc32263135f44be68569459a409250dd2c81c18190735f11e13a26508e9d3cb91d24a8fe7b21bdea678347873b7ac1b67d5e8c78c8444011f85dfdcdce WHIRLPOOL 4b6cb989235d5fed8fd9986c1419ab337df38384fe2b307fd78f08f8696f4a2328845ed4f27913a36e9a544e973690bc0dd2af73816e272c3faf27ff2eafa585
+EBUILD bash-completion-2.4-r1.ebuild 3173 SHA256 09d54454ec4c629c21747d071a2c31e432289c207d96b3eebc8cc651ec2fef2a SHA512 5421a782dff1e908fdaafa97b58bcacdaa250ce6d0a701765506bd3384a5f32983bc86e4733336913462102c842b8168fb9e30450180820ce0c6239582467cce WHIRLPOOL b2d3d4d43181c63fa2c49358c6a5d47f310fd6cf578167180aa43eb49784bfa8f0852954460118a34001f00f585459ce975003fb8612931c2b312ab37f038d75
+EBUILD bash-completion-2.5.ebuild 3183 SHA256 2d5e15afb28616799eb7b6129f1c112009155685b7c15fe0dc8214820ae21ae0 SHA512 a3a790e199dfba8150c2f5abdc120e5c3b8b41814f996c034e432b4633b211f79eaf056a3622823b36ea0a259cb9ee3ce09210e3e631250fdd6cc315a2642e0a WHIRLPOOL 35e91efe36b01564a3e913980c5990ee5cd1dcf0f0826d360adc42dc3b3cd07ad011e348c6d3f380a450e351b006dbd847ee7b79469312502bdb4a10e5fce34e
+EBUILD bash-completion-2.7.ebuild 3830 SHA256 f9ec686bc229fab63cd5ce40eb1dbae31390b6a5dcf7d5b9beaf0795971509ca SHA512 7d49ec4fe462c1cf62ad61e76d4427d231ad8aeab4dde7fa0a921b13503a4ae4f382d1de820f208c13ec656af2d26aad8e4b107a906e941863e5ece381b5e645 WHIRLPOOL 4e91de2ddba1f285dacba09265a2fdf7f590a9a5d202aae96ecbd09b1bbbc9b71380269e78b6eb9f8a792ce241c23297cd9ad2849d8969a9bf855226ba1f6fd9
+EBUILD bash-completion-9999.ebuild 3798 SHA256 6e46d1c15ed52aeddf28bdb6ab7be20bf445a92f236c70824fc026113d3c23ee SHA512 6c0f24c7202bf08fcdc5a7e1e78187be0349bf83bc1aa98a5f47551adf355c88ab11f53693c0972ba2622c477f549f91d3f5b1bcdb407ab96fab9311cc649a95 WHIRLPOOL e33502210356baacdb67938b790384b1fed0f67e7500866345daf9c7135a5727a17e0c5b3517485ca82e85c1ea5131f1db4394e4575ed5dbb2372cc4599f1ec8
+MISC ChangeLog 6192 SHA256 7aa78e4d3347e97e9a2676ad90b03dcfbf6bb185ce6f53050786420a7e58b42d SHA512 d689eca6fe0572923dbc618aa95d7a4b43a92654d6485ca14ae974581c3728dfeac45f139788b22b56d17ae86e063316e474f8ce10a7092e43abaad840579c2c WHIRLPOOL de6bc49d153a04b105d21a4de5def31dc028638190a4b51d66d241abaea7206d5704ddba15bef9a5f74acbce2a0b134d9bb38deacac896e9ab4efd16ccc22ddc
+MISC ChangeLog-2015 49155 SHA256 df2d7ecd84a601d6a713409dd0ea3f8c2dacadf9b2f637769c6e8787d66cee1d SHA512 31fec84312c20ff1612f57f1bac506937c128b13005246ba36eaa449c1aff7712cc3645952fb9eebf3a24483590010fb5a954d43f238f47cd759911830fe5205 WHIRLPOOL 1463d6fa3480fd139341ade021e1e70884dd72e5f22aa16cb74eb11c8c4b606014b0b4f6369db06fcc9c76e354016d196a2b206fb0681c5b71237aa37991c914
+MISC metadata.xml 1285 SHA256 efb4f76c8b2dfe1e809c94fd10aac8b3a4e3ada43ceb33f95193ba246a482529 SHA512 e935bab45ac355ca0a05df6f6f9aaf8e20ef73fa3ce4f2bde83b331cccaa7ae7756a6a62a075b148194b556da8f41f4cf2aa72f271958333d026913ddbfcc133 WHIRLPOOL 6e76587fa0d9e19603fb1bd27100c076ed00840f994bd2b73b9208f438503874dcdc02be6a9c986666cf6d00fb9068d6a6f6dbd1de7662e282be11652412ac83
diff --git a/app-shells/bash-completion/bash-completion-2.4-r1.ebuild b/app-shells/bash-completion/bash-completion-2.4-r1.ebuild
new file mode 100644
index 000000000000..cf649cac408a
--- /dev/null
+++ b/app-shells/bash-completion/bash-completion-2.4-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+BASHCOMP_P=bashcomp-2.0.2
+inherit versionator
+
+DESCRIPTION="Programmable Completion for bash"
+HOMEPAGE="https://github.com/scop/bash-completion"
+SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
+ https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
+IUSE=""
+
+RDEPEND=">=app-shells/bash-4.3_p30-r1
+ sys-apps/miscfiles
+ !app-eselect/eselect-bashcomp"
+DEPEND="app-arch/xz-utils"
+PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
+
+# Remove unwanted completions.
+STRIP_COMPLETIONS=(
+ # Slackware package stuff, quite generic names cause collisions
+ # (e.g. with sys-apps/pacman)
+ explodepkg installpkg makepkg pkgtool removepkg upgradepkg
+
+ # Debian/Red Hat network stuff
+ ifdown ifup ifstatus
+
+ # Installed in app-editors/vim-core
+ xxd
+
+ # Now-dead symlinks to deprecated completions
+ hd ncal
+
+ # Installed by sys-apps/util-linux-2.28
+ mount umount mount.linux umount.linux
+)
+
+src_prepare() {
+ eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch
+ # Bug 543100, update bug 601194
+ eapply "${FILESDIR}/${PN}-2.1-escape-characters-r1.patch"
+ eapply_user
+}
+
+src_test() { :; } # Skip testsuite because of interactive shell wrt #477066
+
+src_install() {
+ # work-around race conditions, bug #526996
+ mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
+
+ emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
+
+ local file
+ for file in "${STRIP_COMPLETIONS[@]}"; do
+ rm "${ED}"/usr/share/bash-completion/completions/${file} || die
+ done
+ # remove deprecated completions (moved to other packages)
+ rm "${ED}"/usr/share/bash-completion/completions/_* || die
+
+ dodoc AUTHORS CHANGES CONTRIBUTING.md README.md
+
+ # install the eselect module
+ insinto /usr/share/eselect/modules
+ doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
+ doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.1-r90 ${v}; then
+ ewarn "For bash-completion autoloader to work, all completions need to"
+ ewarn "be installed in /usr/share/bash-completion/completions. You may"
+ ewarn "need to rebuild packages that installed completions in the old"
+ ewarn "location. You can do this using:"
+ ewarn
+ ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
+ ewarn
+ ewarn "After the rebuild, you should remove the old setup symlinks:"
+ ewarn
+ ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
+ fi
+ done
+
+ if has_version 'app-shells/zsh'; then
+ elog
+ elog "If you are interested in using the provided bash completion functions with"
+ elog "zsh, valuable tips on the effective use of bashcompinit are available:"
+ elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
+ elog
+ fi
+}
diff --git a/app-shells/bash-completion/bash-completion-2.5.ebuild b/app-shells/bash-completion/bash-completion-2.5.ebuild
new file mode 100644
index 000000000000..0585f5e0e970
--- /dev/null
+++ b/app-shells/bash-completion/bash-completion-2.5.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+BASHCOMP_P=bashcomp-2.0.2
+inherit versionator
+
+DESCRIPTION="Programmable Completion for bash"
+HOMEPAGE="https://github.com/scop/bash-completion"
+SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
+ https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
+IUSE=""
+
+RDEPEND=">=app-shells/bash-4.3_p30-r1
+ sys-apps/miscfiles
+ !app-eselect/eselect-bashcomp"
+DEPEND="app-arch/xz-utils"
+PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
+
+# Remove unwanted completions.
+STRIP_COMPLETIONS=(
+ # Slackware package stuff, quite generic names cause collisions
+ # (e.g. with sys-apps/pacman)
+ explodepkg installpkg makepkg pkgtool removepkg upgradepkg
+
+ # Debian/Red Hat network stuff
+ ifdown ifup ifstatus
+
+ # Installed in app-editors/vim-core
+ xxd
+
+ # Now-dead symlinks to deprecated completions
+ hd ncal
+
+ # Installed by sys-apps/util-linux-2.28
+ mount umount mount.linux umount.linux
+)
+
+src_prepare() {
+ eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch
+ # Bug 543100, update bug 601194
+ eapply "${FILESDIR}/${PN}-2.1-escape-characters-r1.patch"
+ eapply_user
+}
+
+src_test() { :; } # Skip testsuite because of interactive shell wrt #477066
+
+src_install() {
+ # work-around race conditions, bug #526996
+ mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
+
+ emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
+
+ local file
+ for file in "${STRIP_COMPLETIONS[@]}"; do
+ rm "${ED}"/usr/share/bash-completion/completions/${file} || die
+ done
+ # remove deprecated completions (moved to other packages)
+ rm "${ED}"/usr/share/bash-completion/completions/_* || die
+
+ dodoc AUTHORS CHANGES CONTRIBUTING.md README.md
+
+ # install the eselect module
+ insinto /usr/share/eselect/modules
+ doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
+ doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.1-r90 ${v}; then
+ ewarn "For bash-completion autoloader to work, all completions need to"
+ ewarn "be installed in /usr/share/bash-completion/completions. You may"
+ ewarn "need to rebuild packages that installed completions in the old"
+ ewarn "location. You can do this using:"
+ ewarn
+ ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
+ ewarn
+ ewarn "After the rebuild, you should remove the old setup symlinks:"
+ ewarn
+ ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
+ fi
+ done
+
+ if has_version 'app-shells/zsh'; then
+ elog
+ elog "If you are interested in using the provided bash completion functions with"
+ elog "zsh, valuable tips on the effective use of bashcompinit are available:"
+ elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
+ elog
+ fi
+}
diff --git a/app-shells/bash-completion/bash-completion-2.7.ebuild b/app-shells/bash-completion/bash-completion-2.7.ebuild
new file mode 100644
index 000000000000..99d53dd87c6a
--- /dev/null
+++ b/app-shells/bash-completion/bash-completion-2.7.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+BASHCOMP_P=bashcomp-2.0.2
+inherit versionator
+
+DESCRIPTION="Programmable Completion for bash"
+HOMEPAGE="https://github.com/scop/bash-completion"
+SRC_URI="https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
+ https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
+IUSE="test"
+# Multiple test failures, need to investigate the exact problem
+RESTRICT="test"
+
+RDEPEND=">=app-shells/bash-4.3_p30-r1
+ sys-apps/miscfiles
+ !app-eselect/eselect-bashcomp"
+DEPEND="app-arch/xz-utils
+ test? (
+ ${RDEPEND}
+ app-misc/dtach
+ dev-util/dejagnu
+ dev-tcltk/tcllib
+ )"
+PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
+
+# Remove unwanted completions.
+STRIP_COMPLETIONS=(
+ # Slackware package stuff, quite generic names cause collisions
+ # (e.g. with sys-apps/pacman)
+ explodepkg installpkg makepkg pkgtool removepkg upgradepkg
+
+ # Debian/Red Hat network stuff
+ ifdown ifup ifstatus
+
+ # Installed in app-editors/vim-core
+ xxd
+
+ # Now-dead symlinks to deprecated completions
+ hd ncal
+
+ # Installed by sys-apps/util-linux-2.28
+ mount umount mount.linux umount.linux
+)
+
+src_prepare() {
+ eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch
+ # Bug 543100, update bug 601194
+ eapply "${FILESDIR}/${PN}-2.1-escape-characters-r1.patch"
+ eapply_user
+}
+
+src_test() {
+ # Tests need an interactive shell, #477066
+ # idea stolen from:
+ # http://pkgs.fedoraproject.org/cgit/rpms/bash-completion.git/tree/bash-completion.spec
+
+ # real-time output of the log ;-)
+ touch "${T}/dtach-test.log" || die
+ tail -f "${T}/dtach-test.log" &
+ local tail_pid=${!}
+
+ nonfatal dtach -N "${T}/dtach.sock" \
+ bash -c 'emake check &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
+
+ kill "${tail_pid}"
+ [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
+ [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
+}
+
+src_install() {
+ # work-around race conditions, bug #526996
+ mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
+
+ emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
+
+ local file
+ for file in "${STRIP_COMPLETIONS[@]}"; do
+ rm "${ED}"/usr/share/bash-completion/completions/${file} || die
+ done
+ # remove deprecated completions (moved to other packages)
+ rm "${ED}"/usr/share/bash-completion/completions/_* || die
+
+ dodoc AUTHORS CHANGES CONTRIBUTING.md README.md
+
+ # install the eselect module
+ insinto /usr/share/eselect/modules
+ doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
+ doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.1-r90 ${v}; then
+ ewarn "For bash-completion autoloader to work, all completions need to"
+ ewarn "be installed in /usr/share/bash-completion/completions. You may"
+ ewarn "need to rebuild packages that installed completions in the old"
+ ewarn "location. You can do this using:"
+ ewarn
+ ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
+ ewarn
+ ewarn "After the rebuild, you should remove the old setup symlinks:"
+ ewarn
+ ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
+ fi
+ done
+
+ if has_version 'app-shells/zsh'; then
+ elog
+ elog "If you are interested in using the provided bash completion functions with"
+ elog "zsh, valuable tips on the effective use of bashcompinit are available:"
+ elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
+ elog
+ fi
+}
diff --git a/app-shells/bash-completion/bash-completion-9999.ebuild b/app-shells/bash-completion/bash-completion-9999.ebuild
new file mode 100644
index 000000000000..543a7c362bb1
--- /dev/null
+++ b/app-shells/bash-completion/bash-completion-9999.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+BASHCOMP_P=bashcomp-2.0.2
+EGIT_REPO_URI="https://github.com/scop/bash-completion"
+inherit autotools git-r3 versionator
+
+DESCRIPTION="Programmable Completion for bash"
+HOMEPAGE="https://github.com/scop/bash-completion"
+SRC_URI="https://bitbucket.org/mgorny/bashcomp2/downloads/${BASHCOMP_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="test"
+
+RDEPEND=">=app-shells/bash-4.3_p30-r1
+ sys-apps/miscfiles
+ !app-eselect/eselect-bashcomp"
+DEPEND="app-arch/xz-utils
+ test? (
+ ${RDEPEND}
+ app-misc/dtach
+ dev-util/dejagnu
+ dev-tcltk/tcllib
+ )"
+PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
+
+# Remove unwanted completions.
+STRIP_COMPLETIONS=(
+ # Slackware package stuff, quite generic names cause collisions
+ # (e.g. with sys-apps/pacman)
+ explodepkg installpkg makepkg pkgtool removepkg upgradepkg
+
+ # Debian/Red Hat network stuff
+ ifdown ifup ifstatus
+
+ # Installed in app-editors/vim-core
+ xxd
+
+ # Now-dead symlinks to deprecated completions
+ hd ncal
+
+ # Installed by sys-apps/util-linux-2.28
+ mount umount mount.linux umount.linux
+)
+
+src_unpack() {
+ git-r3_src_unpack
+ default
+}
+
+src_prepare() {
+ eapply "${WORKDIR}/${BASHCOMP_P}/${PN}"-2.1_p*.patch
+ eapply_user
+ eautoreconf
+}
+
+src_test() {
+ # Tests need an interactive shell, #477066
+ # idea stolen from:
+ # http://pkgs.fedoraproject.org/cgit/rpms/bash-completion.git/tree/bash-completion.spec
+
+ # real-time output of the log ;-)
+ touch "${T}/dtach-test.log" || die
+ tail -f "${T}/dtach-test.log" &
+ local tail_pid=${!}
+
+ # override the default expect timeout and buffer size to avoid tests
+ # failing randomly due to cold cache, busy system or just more output
+ # than upstream anticipated (they run tests on pristine docker
+ # installs of binary distros)
+ nonfatal dtach -N "${T}/dtach.sock" \
+ bash -c 'emake check RUNTESTFLAGS="OPT_TIMEOUT=300 OPT_BUFFER_SIZE=1000000" \
+ &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
+
+ kill "${tail_pid}"
+ [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
+ [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
+}
+
+src_install() {
+ # work-around race conditions, bug #526996
+ mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
+
+ emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
+
+ local file
+ for file in "${STRIP_COMPLETIONS[@]}"; do
+ rm "${ED}"/usr/share/bash-completion/completions/${file} || die
+ done
+ # remove deprecated completions (moved to other packages)
+ rm "${ED}"/usr/share/bash-completion/completions/_* || die
+
+ dodoc AUTHORS CHANGES CONTRIBUTING.md README.md
+
+ # install the eselect module
+ insinto /usr/share/eselect/modules
+ doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
+ doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 2.1-r90 ${v}; then
+ ewarn "For bash-completion autoloader to work, all completions need to"
+ ewarn "be installed in /usr/share/bash-completion/completions. You may"
+ ewarn "need to rebuild packages that installed completions in the old"
+ ewarn "location. You can do this using:"
+ ewarn
+ ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
+ ewarn
+ ewarn "After the rebuild, you should remove the old setup symlinks:"
+ ewarn
+ ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
+ fi
+ done
+
+ if has_version 'app-shells/zsh'; then
+ elog
+ elog "If you are interested in using the provided bash completion functions with"
+ elog "zsh, valuable tips on the effective use of bashcompinit are available:"
+ elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
+ elog
+ fi
+}
diff --git a/app-shells/bash-completion/files/bash-completion-2.1-escape-characters-r1.patch b/app-shells/bash-completion/files/bash-completion-2.1-escape-characters-r1.patch
new file mode 100644
index 000000000000..27a85504befd
--- /dev/null
+++ b/app-shells/bash-completion/files/bash-completion-2.1-escape-characters-r1.patch
@@ -0,0 +1,27 @@
+--- bash-completion-2.1/bash_completion.orig 2014-03-09 17:38:14 +0000
++++ bash-completion-2.1/bash_completion 2014-03-13 23:26:44 +0000
+@@ -536,13 +536,23 @@
+ # @param $2 Name of variable to return result to
+ _quote_readline_by_ref()
+ {
+- if [[ $1 == \'* ]]; then
++ if [ -z "$1" ]; then
++ # avoid quoting if empty
++ printf -v $2 %s "$1"
++ elif [[ $1 == \'* ]]; then
+ # Leave out first character
+ printf -v $2 %s "${1:1}"
++ elif [[ $1 == \~* ]]; then
++ # avoid escaping first ~
++ printf -v $2 \~%q "${1:1}"
+ else
+ printf -v $2 %q "$1"
+ fi
+
++ # Replace double escaping ( \\ ) by single ( \ )
++ # This happens always when argument is already escaped at cmdline,
++ # and passed to this function as e.g.: file\ with\ spaces
++ [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}"
+ # If result becomes quoted like this: $'string', re-evaluate in order to
+ # drop the additional quoting. See also: http://www.mail-archive.com/
+ # bash-completion-devel@lists.alioth.debian.org/msg01942.html
diff --git a/app-shells/bash-completion/metadata.xml b/app-shells/bash-completion/metadata.xml
new file mode 100644
index 000000000000..5ceec3abea7e
--- /dev/null
+++ b/app-shells/bash-completion/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>shell-tools@gentoo.org</email>
+ <name>Gentoo Shell Tools Project</name>
+ </maintainer>
+ <longdescription>
+ Since v2.04, bash has allowed you to intelligently program and extend its
+ standard completion behavior to achieve complex command lines with just a
+ few keystrokes. Imagine typing ssh [Tab] and being able to complete on hosts
+ from your ~/.ssh/known_hosts files. Or typing man 3 str [Tab] and getting a
+ list of all string handling functions in the UNIX manual. mount system:
+ [Tab] would complete on all exported file-systems from the host called
+ system, while make [Tab] would complete on all targets in Makefile. This
+ project was conceived to produce programmable completion routines for the
+ most common Linux/UNIX commands, reducing the amount of typing sysadmins and
+ programmers need to do on a daily basis.
+ </longdescription>
+ <upstream>
+ <remote-id type="bitbucket">mgorny/bashcomp2</remote-id>
+ <remote-id type="github">scop/bash-completion</remote-id>
+ </upstream>
+</pkgmetadata>