summaryrefslogtreecommitdiff
path: root/sys-fs/pysize/pysize-0.2-r1.ebuild
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 /sys-fs/pysize/pysize-0.2-r1.ebuild
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fs/pysize/pysize-0.2-r1.ebuild')
-rw-r--r--sys-fs/pysize/pysize-0.2-r1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/sys-fs/pysize/pysize-0.2-r1.ebuild b/sys-fs/pysize/pysize-0.2-r1.ebuild
new file mode 100644
index 000000000000..00d9596d3c9c
--- /dev/null
+++ b/sys-fs/pysize/pysize-0.2-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="A graphical and console tool for exploring the size of directories"
+HOMEPAGE="http://guichaz.free.fr/pysize/"
+SRC_URI="http://guichaz.free.fr/${PN}/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="gtk ncurses"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ gtk? ( dev-python/pygtk:2 )
+ ncurses? ( sys-libs/ncurses:0= )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}"/psyco-${PV}-automagic.patch
+ "${FILESDIR}"/${PV}-setuptools-automagic.patch
+ )
+
+python_prepare_all() {
+ if ! use gtk; then
+ sed \
+ -e '/^from pysize.ui.gtk/d' \
+ -e "s~'gtk': ui_gtk.run,~~g" \
+ -e 's:ui_gtk.run,::g' \
+ -i pysize/main.py || die "Failed to remove gtk support"
+ rm -rf pysize/ui/gtk || die "Failed to remove gtk support"
+ fi
+
+ if ! use ncurses; then
+ sed \
+ -e '/^from pysize.ui.curses/d' \
+ -e "s~'curses': ui_curses.run,~~g" \
+ -e 's:ui_curses.run,::g' \
+ -i pysize/main.py || die "Failed to remove ncurses support"
+ rm -rf pysize/ui/curses || die "Failed to remove ncurses support"
+ fi
+
+ sed \
+ -e '/for ui_run in/s:ui_ascii.run:ui_ascii.run, ui_ascii.run:g' \
+ -i pysize/main.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ pushd "${S}"/tests > /dev/null
+ PYTHONPATH=.:../ "${PYTHON}" pysize_tests.py || die "tests failed under ${EPYTHON}"
+ popd > /dev/null
+}