summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-misc/vifm/ChangeLog10
-rw-r--r--app-misc/vifm/files/vifm-0.5-ncurses-5.8.patch144
-rw-r--r--app-misc/vifm/vifm-0.5-r1.ebuild41
3 files changed, 193 insertions, 2 deletions
diff --git a/app-misc/vifm/ChangeLog b/app-misc/vifm/ChangeLog
index 89fed5a1a12b..116ac7558100 100644
--- a/app-misc/vifm/ChangeLog
+++ b/app-misc/vifm/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-misc/vifm
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/vifm/ChangeLog,v 1.19 2010/06/12 12:14:54 wired Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/vifm/ChangeLog,v 1.20 2011/03/29 20:41:03 wired Exp $
+
+*vifm-0.5-r1 (29 Mar 2011)
+
+ 29 Mar 2011; Alex Alexander <wired@gentoo.org> +vifm-0.5-r1.ebuild,
+ +files/vifm-0.5-ncurses-5.8.patch:
+ fixed segfault with ncurses-5.8. bug #359179
12 Jun 2010; Alex Alexander <wired@gentoo.org> metadata.xml:
added myself as maintainer
diff --git a/app-misc/vifm/files/vifm-0.5-ncurses-5.8.patch b/app-misc/vifm/files/vifm-0.5-ncurses-5.8.patch
new file mode 100644
index 000000000000..17e62bd2f117
--- /dev/null
+++ b/app-misc/vifm/files/vifm-0.5-ncurses-5.8.patch
@@ -0,0 +1,144 @@
+this makes vifm compatible with ncurses-5.8
+
+patch source:
+http://projects.archlinux.org/svntogit/community.git/plain/vifm/repos/community-x86_64/ncurses58.patch
+bug:
+https://bugs.gentoo.org/show_bug.cgi?id=359179
+--- vifm-0.5/src/keys.c
++++ vifm-0.5-new//src/keys.c
+@@ -721,7 +721,6 @@
+ redrawwin(stat_win);
+ redrawwin(status_bar);
+ redrawwin(pos_win);
+- redrawwin(lwin.title);
+ redrawwin(lwin.win);
+ redrawwin(num_win);
+ redrawwin(rborder);
+@@ -740,7 +739,6 @@
+ touchwin(num_win);
+ touchwin(rborder);
+
+- redrawwin(rwin.title);
+ redrawwin(rwin.win);
+ redrawwin(lborder);
+ redrawwin(stat_win);
+@@ -768,10 +766,8 @@
+ touchwin(num_win);
+ touchwin(rborder);
+
+- redrawwin(lwin.title);
+ redrawwin(lwin.win);
+ redrawwin(mborder);
+- redrawwin(rwin.title);
+ redrawwin(rwin.win);
+ redrawwin(lborder);
+ redrawwin(stat_win);
+--- vifm-0.5/src/ui.c
++++ vifm-0.5-new//src/ui.c
+@@ -158,32 +158,32 @@
+
+ werase(stdscr);
+
+- menu_win = newwin(screen_y - 1, screen_x , 0, 0);
++ menu_win = newwin(screen_y - 1, screen_x , 1, 1);
+ wbkgdset(menu_win, COLOR_PAIR(WIN_COLOR));
+ werase(menu_win);
+
+- sort_win = newwin(NUM_SORT_OPTIONS + 3, 30, (screen_y -12)/2, (screen_x -30)/2);
++ sort_win = newwin(NUM_SORT_OPTIONS + 3, 30, (screen_y -12)/2 > 0 ? (screen_y -12/2) :1, (screen_x -30)/2 > 0 ? (screen_x -30)/2: 1);
+ wbkgdset(sort_win, COLOR_PAIR(WIN_COLOR));
+ werase(sort_win);
+
+- change_win = newwin(20, 30, (screen_y -20)/2, (screen_x -30)/2);
++ change_win = newwin(20, 30, ((screen_y -20)/2 > 0 ? (screen_y -20)/2 : 1), (screen_x -30)/2 > 0 ? (screen_x -30/2) : 1 );
+ wbkgdset(change_win, COLOR_PAIR(WIN_COLOR));
+ werase(change_win);
+
+- error_win = newwin(10, screen_x -2, (screen_y -10)/2, 1);
++ error_win = newwin(10, screen_x -2, (screen_y -10)/2 > 0 ? (screen_y -10)/2 : 1, 1);
+ wbkgdset(error_win, COLOR_PAIR(WIN_COLOR));
+ werase(error_win);
+
+- lborder = newwin(screen_y - 2, 1, 0, 0);
++ lborder = newwin(screen_y - 2, 1, 1, 1);
+
+ wbkgdset(lborder, COLOR_PAIR(BORDER_COLOR));
+
+ werase(lborder);
+
+ if (curr_stats.number_of_windows == 1)
+- lwin.title = newwin(0, screen_x -2, 0, 1);
++ lwin.title = newwin(0, screen_x -2, 1, 1);
+ else
+- lwin.title = newwin(0, screen_x/2 -1, 0, 1);
++ lwin.title = newwin(0, screen_x/2 -1, 1, 1);
+
+ wattrset(lwin.title, A_BOLD);
+ wbkgdset(lwin.title, COLOR_PAIR(BORDER_COLOR));
+@@ -204,16 +204,16 @@
+ lwin.window_rows = y -1;
+ lwin.window_width = x -1;
+
+- mborder = newwin(screen_y, 2, 0, screen_x/2 -1);
++ mborder = newwin(screen_y, 2, 1, screen_x/2 -1 > 0 ? screen_x/2 -1 : 1);
+
+ wbkgdset(mborder, COLOR_PAIR(BORDER_COLOR));
+
+ werase(mborder);
+
+ if (curr_stats.number_of_windows == 1)
+- rwin.title = newwin(0, screen_x -2 , 0, 1);
++ rwin.title = newwin(0, screen_x -2 , 1, 1);
+ else
+- rwin.title = newwin(1, screen_x/2 -1 , 0, screen_x/2 +1);
++ rwin.title = newwin(1, screen_x/2 -1 , 1, screen_x/2 +1 > 0 ? screen_x/2 +1 :1);
+
+ wbkgdset(rwin.title, COLOR_PAIR(BORDER_COLOR));
+ wattrset(rwin.title, A_BOLD);
+@@ -224,7 +224,7 @@
+ if (curr_stats.number_of_windows == 1)
+ rwin.win = newwin(screen_y - 3, screen_x -2 , 1, 1);
+ else
+- rwin.win = newwin(screen_y - 3, screen_x/2 -2 , 1, screen_x/2 +1);
++ rwin.win = newwin(screen_y - 3, screen_x/2 -2 , 1, screen_x/2 +1 > 0 ? screen_x/2 +1 : 1);
+
+ keypad(rwin.win, TRUE);
+ wattrset(rwin.win, A_BOLD);
+@@ -235,32 +235,32 @@
+ rwin.window_rows = y - 1;
+ rwin.window_width = x -1;
+
+- rborder = newwin(screen_y - 2, 1, 0, screen_x -1);
++ rborder = newwin(screen_y - 2, 1, 1, screen_x -1 > 0 ? screen_x-1 : 1);
+
+ wbkgdset(rborder, COLOR_PAIR(BORDER_COLOR));
+
+ werase(rborder);
+
+- stat_win = newwin(1, screen_x, screen_y -2, 0);
++ stat_win = newwin(1, screen_x, screen_y -2 > 0 ? screen_y -2 : 1, 1);
+
+ wbkgdset(stat_win, COLOR_PAIR(BORDER_COLOR));
+
+ werase(stat_win);
+
+- status_bar = newwin(1, screen_x - 19, screen_y -1, 0);
++ status_bar = newwin(1, screen_x - 19, screen_y -1 > 0 ? screen_y -2: 1, 1);
+ keypad(status_bar, TRUE);
+ wattrset(status_bar, A_BOLD);
+ wattron(status_bar, A_BOLD);
+ wbkgdset(status_bar, COLOR_PAIR(STATUS_BAR_COLOR));
+ werase(status_bar);
+
+- pos_win = newwin(1, 13, screen_y - 1, screen_x -13);
++ pos_win = newwin(1, 13, screen_y - 1 > 0 ? screen_y -1 : 1, screen_x -13 > 0 ? screen_x -13 : 1);
+ wattrset(pos_win, A_BOLD);
+ wattron(pos_win, A_BOLD);
+ wbkgdset(pos_win, COLOR_PAIR(STATUS_BAR_COLOR));
+ werase(pos_win);
+
+- num_win = newwin(1, 6, screen_y - 1, screen_x -19);
++ num_win = newwin(1, 6, screen_y - 1 > 0 ? screen_y -1 : 1, screen_x -19 > 0 ? screen_x -19 : 1);
+ wattrset(num_win, A_BOLD);
+ wattron(num_win, A_BOLD);
+ wbkgdset(num_win, COLOR_PAIR(STATUS_BAR_COLOR));
diff --git a/app-misc/vifm/vifm-0.5-r1.ebuild b/app-misc/vifm/vifm-0.5-r1.ebuild
new file mode 100644
index 000000000000..090e5cd8e1b1
--- /dev/null
+++ b/app-misc/vifm/vifm-0.5-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/vifm/vifm-0.5-r1.ebuild,v 1.1 2011/03/29 20:41:03 wired Exp $
+
+EAPI=3
+inherit base
+
+DESCRIPTION="Console file manager with vi(m)-like keybindings"
+HOMEPAGE="http://vifm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/vifm/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~x86"
+IUSE=""
+
+DEPEND=">=sys-libs/ncurses-5.8"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS TODO README )
+
+PATCHES=( "${FILESDIR}"/"${P}"-ncurses-5.8.patch )
+
+src_prepare() {
+ sed -i -e "s:(datadir)/@PACKAGE@:(datadir)/${P}:" Makefile.in
+
+ cd "${S}"/src
+ sed -i -e "s:(datadir)/@PACKAGE@:(datadir)/${P}:" Makefile.in
+ sed -i -e "s:/usr/local/share/vifm:/usr/share/${P}:g" config.c
+
+ base_src_prepare
+}
+
+pkg_postinst() {
+ elog "To use vim to view the vifm help, copy /usr/share/${P}/vifm.txt"
+ elog "to ~/.vim/doc/ and run ':helptags ~/.vim/doc' in vim"
+ elog "Then edit ~/.vifm/vifmrc${PV/a/} and set USE_VIM_HELP=1"
+ elog ""
+ elog "To use the vifm plugin in vim, copy /usr/share/${P}/vifm.vim to"
+ elog "/usr/share/vim/vimXX/"
+}