summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-misc/mc/ChangeLog8
-rw-r--r--app-misc/mc/files/chdir-4.6.0.gentoo11
-rw-r--r--app-misc/mc/files/digest-mc-4.6.0-r11
-rw-r--r--app-misc/mc/files/mc.gentoo16
-rw-r--r--app-misc/mc/mc-4.6.0-r1.ebuild84
5 files changed, 119 insertions, 1 deletions
diff --git a/app-misc/mc/ChangeLog b/app-misc/mc/ChangeLog
index 57e73d7fdc39..838243033f09 100644
--- a/app-misc/mc/ChangeLog
+++ b/app-misc/mc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-misc/mc
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/ChangeLog,v 1.10 2003/03/30 22:47:47 joker Exp $
+
+*mc-4.6.0-r1 (06 May 2003)
+
+ 06 May 2003; Michael Nazaroff <naz@gentoo.org> mc-4.6.0-r1.ebuild,
+ chdir-4.6.0.gentoo, mc.gentoo:
+ Made a small edition to mc which allows it to chdir to the current
+ working directory on exit.
*mc-4.6.0 (05 Feb 2003)
diff --git a/app-misc/mc/files/chdir-4.6.0.gentoo b/app-misc/mc/files/chdir-4.6.0.gentoo
new file mode 100644
index 000000000000..04b66eb08556
--- /dev/null
+++ b/app-misc/mc/files/chdir-4.6.0.gentoo
@@ -0,0 +1,11 @@
+
+MC ()
+{
+ mkdir -p $HOME/.mc/tmp 2> /dev/null
+ chmod 700 $HOME/.mc/tmp
+ MC=$HOME/.mc/tmp/mc-$$
+ /usr/bin/mc -P "$@" > "$MC"
+ cd "`cat $MC`"
+ rm -f "$MC"
+ unset MC;
+}
diff --git a/app-misc/mc/files/digest-mc-4.6.0-r1 b/app-misc/mc/files/digest-mc-4.6.0-r1
new file mode 100644
index 000000000000..1ea08f5eaef9
--- /dev/null
+++ b/app-misc/mc/files/digest-mc-4.6.0-r1
@@ -0,0 +1 @@
+MD5 70804dc9e2049e24f294ff7090a82a12 mc-4.6.0.tar.gz 3727676
diff --git a/app-misc/mc/files/mc.gentoo b/app-misc/mc/files/mc.gentoo
new file mode 100644
index 000000000000..9762925fe515
--- /dev/null
+++ b/app-misc/mc/files/mc.gentoo
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# A little fix so mc exits into it's current working directory
+MC_ENV=/usr/share/mc/bin/mc.sh
+
+for i in $MC_ENV; do
+ if [ -x $i ]; then
+ . $i
+ fi
+done
+
+# include this, so also xterm,kterm,gterm,etc will have default bash settings
+
+if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
+ . /etc/profile
+fi
diff --git a/app-misc/mc/mc-4.6.0-r1.ebuild b/app-misc/mc/mc-4.6.0-r1.ebuild
new file mode 100644
index 000000000000..5cd350c3fcee
--- /dev/null
+++ b/app-misc/mc/mc-4.6.0-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+
+IUSE="gpm nls samba ncurses X slang"
+
+S=${WORKDIR}/${P}
+DESCRIPTION="GNU Midnight Commander cli-based file manager"
+HOMEPAGE="http://www.ibiblio.org/mc/"
+SRC_URI="http://www.ibiblio.org/pub/Linux/utils/file/managers/${PN}/${P}.tar.gz"
+
+DEPEND=">=sys-apps/e2fsprogs-1.19
+ ncurses? ( >=sys-libs/ncurses-5.2-r5 )
+ =dev-libs/glib-2*
+ >=sys-libs/pam-0.72
+ gpm? ( >=sys-libs/gpm-1.19.3 )
+ slang? ( >=sys-libs/slang-1.4.2 )
+ samba? ( >=net-fs/samba-2.2.3a-r1 )
+ X? ( virtual/x11 )"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~arm"
+
+src_compile() {
+ local myconf=""
+
+ if ! use slang && ! use ncurses
+ then
+ myconf="${myconf} --with-screen=mcslang"
+ elif
+ use ncurses && ! use slang
+ then
+ myconf="${myconf} --with-screen=ncurses"
+ else
+ use slang && myconf="${myconf} --with-screen=slang"
+ fi
+
+ use gpm \
+ && myconf="${myconf} --with-gpm-mouse" \
+ || myconf="${myconf} --without-gpm-mouse"
+
+ use nls \
+ && myconf="${myconf} --with-included-gettext" \
+ || myconf="${myconf} --disable-nls"
+
+ use X \
+ && myconf="${myconf} --with-x" \
+ || myconf="${myconf} --without-x"
+
+ use samba \
+ && myconf="${myconf} --with-samba --with-configdir=/etc/samba
+ --with-codepagedir=/var/lib/samba/codepages" \
+ || myconf="${myconf} --without-samba"
+
+ econf \
+ --with-vfs \
+ --with-gnu-ld \
+ --with-ext2undel \
+ --with-edit \
+ ${myconf} || die
+ emake || die
+}
+
+src_install() {
+ cat ${FILESDIR}/chdir-4.6.0.gentoo >>\
+ ${S}/lib/mc-wrapper.sh
+
+ einstall || die
+
+ dodoc ABOUT-NLS COPYING* ChangeLog AUTHORS MAINTAINERS FAQ INSTALL* NEWS README*
+
+ insinto /usr/share/mc
+ doins ${FILESDIR}/mc.gentoo
+}
+
+pkg_postinst() {
+ einfo "Add the following line to your ~/.bashrc to"
+ einfo "allow mc to chdir to it's latest working dir at exit"
+ einfo ""
+ einfo "# Midnight Commander chdir enhancement"
+ einfo "if [ -f /usr/share/mc/mc.gentoo ]; then"
+ einfo " . /usr/share/mc/mc.gentoo"
+ einfo "fi"
+}