Skip to content

Commit

Permalink
Merge pull request #34 from ZyX-I/powerline-release-2.1.4
Browse files Browse the repository at this point in the history
app-misc/powerline: 2.1.4 bump.
  • Loading branch information
leycec committed May 19, 2015
2 parents 7ac2352 + c617ff1 commit 32c434d
Show file tree
Hide file tree
Showing 4 changed files with 383 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-misc/powerline/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ DIST powerline-status-1.2.tar.gz 181048 SHA256 d7d78a2a10190625cbc52ab4ad0eee808
DIST powerline-status-1.3.1.tar.gz 195277 SHA256 a67fd384264e27172b951a5ba0fdeb6a2b7fce8a2eaa249ebe12d46256d02cd8 SHA512 633a8abb4d7e209c4587a3affd153d6715f40aa9f354b413ce539fa961f0186c4aae6b29c307ebf9dc76b55474f3bc2359288138d16d0bbda5252ddf571a9971 WHIRLPOOL 0341fe3b9f4191682eea354c173e28b4deb1f4571dc7624ec13d85a2be3635ed0768e5af73f27323226af7241434aaa8eef34a1eb6d4e97fa95ef99ff0223a9c
DIST powerline-status-1.3.tar.gz 191236 SHA256 941d2e0fac6ca842398504ab540d3c3f590a826769e008942781b7111e7687b4 SHA512 1d51492711fcc18b8fdec80eddcd52b4ce911428baf80616a62dac55560ddc49d6fbba5334cbc1bac992b4b1dffd884e30952a87973056e7509dc31ea9d27263 WHIRLPOOL 1e8fbba002329dca85a71671792ce33d117479320f5b65c0c651c2c2e5f1954929b15f719827760a70947ef1a5909b2d8dce809cbe5a2dd569bb1904399c0bdb
DIST powerline-status-2.0.tar.gz 201735 SHA256 d50f79809d04d33afe80cb1031c41910c7475337c43bdb6efb7daddc440a4904 SHA512 ca757c8e3839e1f109698375eb0d7013b3751869fff6edca281d287e19dc65fbe7fe8bdd7548174d3a358aa5913ea61e51b6cb2e86d7d7a3931e1adcf363f2f5 WHIRLPOOL d37a1524af0fbf4b9fcd51b0c5d33bd8a3c2015008ace332a236f53ba5cb372e569beeb651832521d756b28aa513f409bc1f1ab55f54e686190d951832ce7a31
DIST powerline-status-2.1.4.tar.gz 235011 SHA256 99d220c45ae52b69d89c7b82270c102e17606f8119094b705e87d3e2119dd43d SHA512 28598e0936efb1cd80d4c499554aa0ed0b7e7760e31ab5be52cc8450ead855c723214b34c107073942007f9541292dea36d3afd4b7cedd3e5ad5565a89f67011 WHIRLPOOL c5a9dbbbb3d63a1a5929fd816be6e9793cdd638bb37cd36791325b1bcd41660e522fb2817c728a1d19fc383307473887b9f5e49acfac96fa9f6e3f7f7ce8b927
DIST powerline-status-2.1.tar.gz 212484 SHA256 a027fdeccac68d776ff9fa65bb5ba166cbe71cddb1b053a1e350b2bdabc3b8e4 SHA512 720dde1940fe9e357c5fde0045466ef8db5100aa02cc68f989a4fd8fdafa20b21fb6ae8ac914c4ffaf44fd5e59b6c89dc1dd4496357022f883fce0e1abe32079 WHIRLPOOL 463c38386f454c8e13ea9b03a99f6e5e181ef770ca86d1b97a48345ba4f3b379f65ad69bad5c8255167f80964dae0260badbc8048fe5cae87bd24850dc72ac2b
328 changes: 328 additions & 0 deletions app-misc/powerline/powerline-2.1.4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,328 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"

# Enforce Bash scrictness.
set -e

PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} pypy{,3} )

# Since default phase functions defined by "distutils-r1" take absolute
# precedence over those defined by "readme.gentoo", inherit the latter later.
inherit eutils readme.gentoo distutils-r1

MY_PN="powerline-status"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="Python-based statusline/prompt utility"
HOMEPAGE="https://pypi.python.org/pypi/powerline-status"
SRC_URI="mirror://pypi/p/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"

SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
IUSE="awesome busybox bash dash doc extra fish fonts man mksh rc qtile test tmux vim zsh"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

# Some optional dependencies are only available for a limited subset of
# architectures supported by this ebuild. For example, "app-shells/rc" is only
# available for amd64 and x86 architectures. Such dependencies are explicitly
# masked in the corresponding "profiles/arch/${ARCH}/package.use.mask" file for
# this overlay.
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
man? ( dev-python/sphinx[${PYTHON_USEDEP}] )
test? (
dev-python/pexpect
dev-python/psutil[${PYTHON_USEDEP}]
x11-libs/libvterm
>=dev-vcs/git-1.7.2
)
"
RDEPEND="
media-fonts/powerline-symbols
awesome? ( >=x11-wm/awesome-3.5.1 )
bash? ( app-shells/bash )
busybox? ( sys-apps/busybox )
dash? ( app-shells/dash )
extra? (
dev-python/netifaces[${PYTHON_USEDEP}]
dev-python/psutil[${PYTHON_USEDEP}]
)
fish? ( >=app-shells/fish-2.1 )
fonts? ( media-fonts/powerline-fonts )
mksh? ( app-shells/mksh )
qtile? ( >=x11-wm/qtile-0.6 )
rc? ( app-shells/rc )
vim? ( ~app-vim/powerline-vim-${PV} )
zsh? ( app-shells/zsh )
"

# Source directory from which all applicable files will be installed.
POWERLINE_BINDINGS_DIR="${T}/bindings"
POWERLINE_FULL_BINDINGS_DIR="${T}/bindings-full"

# Target directory to which all applicable files will be installed.
POWERLINE_TRG_DIR='/usr/share/powerline'
POWERLINE_TRG_DIR_EROOTED="${EROOT}usr/share/powerline/"

S="${WORKDIR}/${MY_P}"

src_unpack() {
git-r3_src_unpack

This comment has been minimized.

Copy link
@leycec

leycec May 23, 2015

Author Owner

Is this supposed to be in stable portage? I can't install this package on my machine, it spits git-r3_src_unpack: command not found

This is in stable Portage – and has been for a few years. See line 948 of the official git-r3 eclass, last updated three months ago.

That said, it's conceivable that this could be an issue on our end. So, thanks for reporting this! It's a rather peculiar issue. I'm suddenly concerned about the integrity of either our ebuilds or your system. Possibly both? (Tragedies happen.)

We'll definitely investigate this from our end. In the meanwhile, would you mind confirming that the git-r3 eclass exists on your system, has the proper permissions (namely, -rw-r--r--), and contains the git-r3_src_unpack() function? Specifically, would you mind reporting the output of the following commands as a non-superuser?

$ ls -l /usr/portage/eclass/git-r3.eclass
$ grep git-r3_src_unpack /usr/portage/eclass/git-r3.eclass

If we intentionally require unstable portage, we might want to document it in the readme.

To the best of our knowledge, our ebuilds comply with the current Portage tree. At least, they should. If that's not the case, that's a critical issue that we'd definitely want to patch.

If I replace this line with default_src_unpack, it works. This whole function wasn't there before. We added it to support running automated tests?

You got it, magic hat.

Was it ever supposed to work at all?

That's debatable. 😬

Powerline's functional and unit tests have been a moving target for some time. According to ZyX-I, they should be fairly stable now. In disgust with the current (admittedly fragile and terrible) approach, I recently repaired the live Powerline ebuild. If I backport those changes to the 2.1.4 release, the issue you're seeing should go away... even though it should be working anyway.

I think I'll do that. In the meanwhile, consider giving the live Powerline ebuild a go.

This comment has been minimized.

Copy link
@leycec

leycec May 23, 2015

Author Owner

Backported.

Please resync raiagent and give the 2.1.4 Powerline release another try. Happiness should ensue.

This comment has been minimized.

Copy link
@leycec

leycec May 24, 2015

Author Owner

A little bit of A; a little of B. Glad the revisions patched your issue up, and thanks for the fast feedback. 👍


#FIXME: This seems a little terrible. Ideally, a new
#"app-misc/powerline-bot-ci/powerline-bot-ci-9999.ebuild" should be added,
#conditionally depended upon above, and then copied into the work tree
#below. For the moment, unit tests break sandboxing, so we can't be
#particularly bothered.

# If running unit tests, clone Powerline's testing-specific "bot-ci"
# repository.
if use test; then
ewarn 'Unit tests currently fail under most systems. Consider adding "-test" to "FEATURE" in "/etc/portage/make.conf".'
has sandbox ${FEATURES} && ewarn\
'Unit testing currently conflicts with Portage sandboxing. Expect numerous ignorable error messages.'

# Preserve the git branch name for the current ebuild.
local egit_branch_saved="${EGIT_BRANCH}"

# Download metadata for such repository.
local work_dirname="powerline-bot-ci"
local egit_repo_uri="https://github.com/powerline/bot-ci"
EGIT_BRANCH="master"

# Clone such repository.
git-r3_fetch\
"${egit_repo_uri}" "${EGIT_BRANCH}" "${work_dirname}"
git-r3_checkout\
"${egit_repo_uri}" "${S}/tests/bot-ci" "${work_dirname}"

# Restore such branch name.
EGIT_BRANCH="${egit_branch_saved}"
fi
}

# void powerline_set_config_var_to_value(
# string variable_name, string variable_value)
#
# Globally replace each string assigned to the passed Python variable in
# Powerline's Python configuration with the passed string.
powerline_set_config_var_to_value() {
(( ${#} == 2 )) || die 'Expected one variable name and one variable value.'
sed -i -e 's~^\('${1}' = \).*~\1'"'"${2}"'~" "${S}"/powerline/config.py ||
die '"sed" failed.'
}

python_prepare_all() {
# Replace nonstandard system paths in Powerline's Python configuration.
powerline_set_config_var_to_value\
DEFAULT_SYSTEM_CONFIG_DIR "${EROOT}"etc/xdg
powerline_set_config_var_to_value\
BINDINGS_DIRECTORY "${POWERLINE_TRG_DIR_EROOTED}"

# Copy the directory tree containing application-specific Powerline
# bindings to a temporary directory. Since such tree contains both Python
# and non-Python files, failing to remove the latter causes distutils to
# install non-Python files into the Powerline Python module directory. To
# safely remove such files *AND* permit their installation after the main
# distutils-based installation, copy them to such location and then remove
# them from the original tree that distutils operates on.
cp -R "${S}"/powerline/bindings "${POWERLINE_BINDINGS_DIR}" || die '"cp" failed.'
if use test ; then
cp -R "${S}"/powerline/bindings "${POWERLINE_FULL_BINDINGS_DIR}" || die '"cp" failed.'
fi

# Remove all non-Python files from the original tree.
find "${S}"/powerline/bindings -type f -not -name '*.py' -delete

# Remove all Python files from the copied tree, for safety. Most such files
# relate to Powerline's distutils-based install process. Exclude the
# following unrelated Python files:
#
# * "powerline-awesome.py", an awesome-specific integration script.
find "${POWERLINE_BINDINGS_DIR}"\
-type f\
-name '*.py'\
-not -name 'powerline-awesome.py'\
-delete

# Continue with the default behaviour.
distutils-r1_python_prepare_all
}

python_compile_all() {
# Build documentation, if both available *AND* requested by the user.
if use doc && [ -d "${S}"/docs ]; then
einfo "Generating documentation"
sphinx-build -b html "${S}"/docs/source docs_output ||
die 'HTML documentation compilation failed.'
HTML_DOCS=( docs_output/. )
fi

# Build man pages.
if use man; then
einfo "Generating man pages"
sphinx-build -b man "${S}"/docs/source man_pages ||
die 'Manpage compilation failed.'
fi
}

python_test() {
# *All* bindings files are required for tests.
mv "${S}"/powerline/bindings{,.bak}
cp -R "${POWERLINE_FULL_BINDINGS_DIR}" "${S}"/powerline/bindings
# Powerline shell tests do not work with LD_PRELOAD-based sandbox.
env -i \
USER="$USER" \
HOME="$HOME" \
LANG=en_US.UTF-8 \
PATH="$PATH" \
PYTHON="${PYTHON}" \
"${S}"/tests/test.sh \
|| die 'Unit tests failed.'
rm -r "${S}"/powerline/bindings
mv "${S}"/powerline/bindings{.bak,}
}

python_install_all() {
# Install man pages.
if use man; then
doman man_pages/*.1
fi

# Contents of the "/usr/share/doc/${P}/README.gentoo" file to be installed.
DOC_CONTENTS=""

# Install application-specific libraries and documentation.
if use awesome; then
local AWESOME_LIB_DIR='/usr/share/awesome/lib/powerline'
insinto "${AWESOME_LIB_DIR}"
newins "${POWERLINE_BINDINGS_DIR}"/awesome/powerline.lua init.lua
exeinto "${AWESOME_LIB_DIR}"
doexe "${POWERLINE_BINDINGS_DIR}"/awesome/powerline-awesome.py

DOC_CONTENTS+="
To enable Powerline under awesome, add the following lines to \"~/.config/awesome/rc.lua\" (assuming you originally copied such file from \"/etc/xdg/awesome/rc.lua\"):\\n
\\trequire(\"powerline\")\\n
\\tright_layout:add(powerline_widget)\\n\\n"
fi

if use bash; then
insinto "${POWERLINE_TRG_DIR}"/bash
doins "${POWERLINE_BINDINGS_DIR}"/bash/powerline.sh

DOC_CONTENTS+="
To enable Powerline under bash, add the following line to either \"~/.bashrc\" or \"~/.profile\":\\n
\\tsource ${POWERLINE_TRG_DIR_EROOTED}bash/powerline.sh\\n\\n"
fi

if use busybox; then
insinto "${POWERLINE_TRG_DIR}"/busybox
doins "${POWERLINE_BINDINGS_DIR}"/shell/powerline.sh

DOC_CONTENTS+="
To enable Powerline under interactive sessions of BusyBox's ash shell, interactively run the following command:\\n
\\t. ${POWERLINE_TRG_DIR_EROOTED}busybox/powerline.sh\\n\\n"
fi

if use dash; then
insinto "${POWERLINE_TRG_DIR}"/dash
doins "${POWERLINE_BINDINGS_DIR}"/shell/powerline.sh

DOC_CONTENTS+="
To enable Powerline under dash, add the following line to the file referenced by environment variable \${ENV}:\\n
\\t. ${POWERLINE_TRG_DIR_EROOTED}dash/powerline.sh\\n
If such variable does not exist, you may need to manually create such file.\\n\\n"
fi

if use fish; then
insinto /usr/share/fish/functions
doins "${POWERLINE_BINDINGS_DIR}"/fish/powerline-setup.fish

DOC_CONTENTS+="
To enable Powerline under fish, add the following line to \"~/.config/fish/config.fish\":\\n
\\tpowerline-setup\\n\\n"
fi

if use mksh; then
insinto "${POWERLINE_TRG_DIR}"/mksh
doins "${POWERLINE_BINDINGS_DIR}"/shell/powerline.sh

DOC_CONTENTS+="
To enable Powerline under mksh, add the following line to \"~/.mkshrc\":\\n
\\t. ${POWERLINE_TRG_DIR_EROOTED}mksh/powerline.sh\\n\\n"
fi

if use qtile; then
DOC_CONTENTS+="
To enable powerline under qtile, add the following to \"~/.config/qtile/config.py\":\\n
\\tfrom libqtile.bar import Bar\\n
\\tfrom libqtile.config import Screen\\n
\\tfrom libqtile.widget import Spacer\\n
\\t\\n
\\tfrom powerline.bindings.qtile.widget import PowerlineTextBox\\n
\\t\\n
\\tscreens = [\\n
\\t Screen(\\n
\\t top=Bar([\\n
\\t PowerlineTextBox(timeout=2, side='left'),\\n
\\t Spacer(),\\n
\\t PowerlineTextBox(timeout=2, side='right'),\\n
\\t ],\\n
\\t 35\\n
\\t ),\\n
\\t ),\\n
\\t]\\n\\n"
fi

if use rc; then
insinto "${POWERLINE_TRG_DIR}"/rc
doins "${POWERLINE_BINDINGS_DIR}"/rc/powerline.rc

DOC_CONTENTS+="
To enable Powerline under rc shell, add the following line to \"~/.rcrc\":\\n
\\t. ${POWERLINE_TRG_DIR_EROOTED}rc/powerline.rc\\n\\n"
fi

if use tmux; then
insinto "${POWERLINE_TRG_DIR}"/tmux
doins "${POWERLINE_BINDINGS_DIR}"/tmux/powerline*.conf

DOC_CONTENTS+="
To enable Powerline under tmux, add the following line to \"~/.tmux.conf\":\\n
\\tsource ${POWERLINE_TRG_DIR_EROOTED}tmux/powerline.conf\\n\\n"
fi

if use zsh; then
insinto /usr/share/zsh/site-contrib
doins "${POWERLINE_BINDINGS_DIR}"/zsh/powerline.zsh

DOC_CONTENTS+="
To enable Powerline under zsh, add the following line to \"~/.zshrc\":\\n
\\tsource ${EROOT}usr/share/zsh/site-contrib/powerline.zsh\\n\\n"
fi

# Install Powerline configuration files.
insinto /etc/xdg/powerline
doins -r "${S}"/powerline/config_files/*

# If no USE flags were enabled, ${DOC_CONTENTS} will be empty, in which case
# calling readme.gentoo_create_doc() will throw a fatal error:
# "You are not specifying README.gentoo contents!"
# Avoid this by defaulting ${DOC_CONTENTS} to a non-empty string if empty.
DOC_CONTENTS=${DOC_CONTENTS:-All Powerline USE flags were disabled.}

# Install Gentoo-specific documentation.
readme.gentoo_create_doc

# Install Powerline python modules.
distutils-r1_python_install_all
}

# On first installation, print Gentoo-specific documentation.
pkg_postinst() {
readme.gentoo_print_elog
}
1 change: 1 addition & 0 deletions app-vim/powerline-vim/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ DIST powerline-status-1.2.tar.gz 181048 SHA256 d7d78a2a10190625cbc52ab4ad0eee808
DIST powerline-status-1.3.1.tar.gz 195277 SHA256 a67fd384264e27172b951a5ba0fdeb6a2b7fce8a2eaa249ebe12d46256d02cd8 SHA512 633a8abb4d7e209c4587a3affd153d6715f40aa9f354b413ce539fa961f0186c4aae6b29c307ebf9dc76b55474f3bc2359288138d16d0bbda5252ddf571a9971 WHIRLPOOL 0341fe3b9f4191682eea354c173e28b4deb1f4571dc7624ec13d85a2be3635ed0768e5af73f27323226af7241434aaa8eef34a1eb6d4e97fa95ef99ff0223a9c
DIST powerline-status-1.3.tar.gz 191236 SHA256 941d2e0fac6ca842398504ab540d3c3f590a826769e008942781b7111e7687b4 SHA512 1d51492711fcc18b8fdec80eddcd52b4ce911428baf80616a62dac55560ddc49d6fbba5334cbc1bac992b4b1dffd884e30952a87973056e7509dc31ea9d27263 WHIRLPOOL 1e8fbba002329dca85a71671792ce33d117479320f5b65c0c651c2c2e5f1954929b15f719827760a70947ef1a5909b2d8dce809cbe5a2dd569bb1904399c0bdb
DIST powerline-status-2.0.tar.gz 201735 SHA256 d50f79809d04d33afe80cb1031c41910c7475337c43bdb6efb7daddc440a4904 SHA512 ca757c8e3839e1f109698375eb0d7013b3751869fff6edca281d287e19dc65fbe7fe8bdd7548174d3a358aa5913ea61e51b6cb2e86d7d7a3931e1adcf363f2f5 WHIRLPOOL d37a1524af0fbf4b9fcd51b0c5d33bd8a3c2015008ace332a236f53ba5cb372e569beeb651832521d756b28aa513f409bc1f1ab55f54e686190d951832ce7a31
DIST powerline-status-2.1.4.tar.gz 235011 SHA256 99d220c45ae52b69d89c7b82270c102e17606f8119094b705e87d3e2119dd43d SHA512 28598e0936efb1cd80d4c499554aa0ed0b7e7760e31ab5be52cc8450ead855c723214b34c107073942007f9541292dea36d3afd4b7cedd3e5ad5565a89f67011 WHIRLPOOL c5a9dbbbb3d63a1a5929fd816be6e9793cdd638bb37cd36791325b1bcd41660e522fb2817c728a1d19fc383307473887b9f5e49acfac96fa9f6e3f7f7ce8b927
DIST powerline-status-2.1.tar.gz 212484 SHA256 a027fdeccac68d776ff9fa65bb5ba166cbe71cddb1b053a1e350b2bdabc3b8e4 SHA512 720dde1940fe9e357c5fde0045466ef8db5100aa02cc68f989a4fd8fdafa20b21fb6ae8ac914c4ffaf44fd5e59b6c89dc1dd4496357022f883fce0e1abe32079 WHIRLPOOL 463c38386f454c8e13ea9b03a99f6e5e181ef770ca86d1b97a48345ba4f3b379f65ad69bad5c8255167f80964dae0260badbc8048fe5cae87bd24850dc72ac2b
53 changes: 53 additions & 0 deletions app-vim/powerline-vim/powerline-vim-2.1.4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="5"

# Enforce Bash scrictness.
set -e

# Since eclasses cannot be conditionally inherited, this ebuild remains distinct
# from the top-level Powerline ebuild at "app-misc/powerline".
inherit vim-plugin

MY_PN="powerline-status"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="Vim plugin for Python-based Powerline"
HOMEPAGE="https://pypi.python.org/pypi/powerline-status"
SRC_URI="mirror://pypi/p/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"

SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
IUSE=""
DEPEND="|| (
>=app-editors/vim-7.2[python]
>=app-editors/gvim-7.2[python]
)"
RDEPEND="${DEPEND}
~app-misc/powerline-${PV}
"

# Basename of this plugin's help file.
VIM_PLUGIN_HELPFILES="Powerline"

S="${WORKDIR}/${MY_P}"

src_prepare() {
# vim-plugin_src_install() expects ${S} to be the Vim plugin directory to be
# installed to "/usr/share/vim/vimfiles". Ensure this by temporarily moving
# such directory away, deleting everything remaining under ${S}, and moving
# such directory back to ${S}.
mkdir "${T}"/ignore
mv "${S}"/powerline/bindings/vim "${T}"
mv * "${T}"/ignore
mv "${T}"/vim/* "${S}"

# Remove all remaining Python files to prevent vim-plugin_src_install() from
# installing such files as documentation.
find . -type f -name '*.py' -delete

# Remove nonstandard paths from the plugin's implementation.
sed -i -e '/sys\.path\.append/d' "${S}"/plugin/powerline.vim
}

0 comments on commit 32c434d

Please sign in to comment.