summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/mc')
-rw-r--r--app-misc/mc/ChangeLog8
-rw-r--r--app-misc/mc/files/digest-mc-4.6.1-r49
-rw-r--r--app-misc/mc/files/mc-4.6.1-invalid-mtime.patch30
-rw-r--r--app-misc/mc/mc-4.6.1-r4.ebuild161
4 files changed, 207 insertions, 1 deletions
diff --git a/app-misc/mc/ChangeLog b/app-misc/mc/ChangeLog
index 3213d4f007c9..a1253289507a 100644
--- a/app-misc/mc/ChangeLog
+++ b/app-misc/mc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-misc/mc
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/ChangeLog,v 1.125 2007/06/03 10:17:39 philantrop Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/ChangeLog,v 1.126 2007/07/05 21:42:35 truedfx Exp $
+
+*mc-4.6.1-r4 (05 Jul 2007)
+
+ 05 Jul 2007; Harald van Dijk <truedfx@gentoo.org>
+ +files/mc-4.6.1-invalid-mtime.patch, +mc-4.6.1-r4.ebuild:
+ Report invalid mtimes without crashing (#184296)
03 Jun 2007; Wulf C. Krueger <philantrop@gentoo.org> mc-4.6.1-r3.ebuild:
Added get_libdir instead of hardcoded lib. Fixes bug 180678.
diff --git a/app-misc/mc/files/digest-mc-4.6.1-r4 b/app-misc/mc/files/digest-mc-4.6.1-r4
new file mode 100644
index 000000000000..1bb42318c1b6
--- /dev/null
+++ b/app-misc/mc/files/digest-mc-4.6.1-r4
@@ -0,0 +1,9 @@
+MD5 f90bffe7f51883e818143dc2077eb98f mc-4.6.1-utf8-r2.patch.bz2 30449
+RMD160 ffe89eb0cef217ba87398c93b65ebc0e5fefac5d mc-4.6.1-utf8-r2.patch.bz2 30449
+SHA256 f58de9e412694958c00c7ef831995f2b56b7add7ea1e26567281516db02f483e mc-4.6.1-utf8-r2.patch.bz2 30449
+MD5 18b20db6e40480a53bac2870c56fc3c4 mc-4.6.1.tar.gz 3928370
+RMD160 d565ee95a8916d73fad5e0defeb9f2f57e50962b mc-4.6.1.tar.gz 3928370
+SHA256 086ab03daaac28a28c0ddb9a709040b59e1322f6bfa68e39d004d9c66b119e7e mc-4.6.1.tar.gz 3928370
+MD5 d63ffd21654bfa965b5c19b845cb7b34 u7z-4.29.tar.bz2 2951
+RMD160 1ab0cfea1563e81bdde9c0552d37efe710ea14bf u7z-4.29.tar.bz2 2951
+SHA256 0d046e76fade7c7e31be01626bb3fcb0afcb5f62809733d0c70e0e12c655348d u7z-4.29.tar.bz2 2951
diff --git a/app-misc/mc/files/mc-4.6.1-invalid-mtime.patch b/app-misc/mc/files/mc-4.6.1-invalid-mtime.patch
new file mode 100644
index 000000000000..07b1f6d1c169
--- /dev/null
+++ b/app-misc/mc/files/mc-4.6.1-invalid-mtime.patch
@@ -0,0 +1,30 @@
+
+ Invalid timestamps on files caused mc to segfault by passing a null
+ pointer to strftime. Avoid trying to print the time in this case.
+
+ Reported by Maxim Britov <maxim@office.modum.by>
+ at http://bugs.gentoo.org/184296
+
+--- mc-4.6.1/src/util.c
++++ mc-4.6.1/src/util.c
+@@ -717,6 +717,7 @@
+ static size_t i18n_timelength = 0;
+ static const char *fmtyear, *fmttime;
+ const char *fmt;
++ struct tm *whentm;
+
+ if (i18n_timelength == 0){
+ i18n_timelength = i18n_checktimelength() + 1;
+@@ -740,7 +741,11 @@
+ else
+ fmt = fmttime;
+
+- strftime (timebuf, i18n_timelength, fmt, localtime(&when));
++ whentm = localtime(&when);
++ if (whentm == NULL)
++ return "(invalid)";
++
++ strftime (timebuf, i18n_timelength, fmt, whentm);
+ return timebuf;
+ }
+
diff --git a/app-misc/mc/mc-4.6.1-r4.ebuild b/app-misc/mc/mc-4.6.1-r4.ebuild
new file mode 100644
index 000000000000..eead372609d2
--- /dev/null
+++ b/app-misc/mc/mc-4.6.1-r4.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/mc-4.6.1-r4.ebuild,v 1.1 2007/07/05 21:42:35 truedfx Exp $
+
+inherit flag-o-matic eutils
+
+U7Z_PV="4.29"
+U7Z="u7z-${U7Z_PV}.tar.bz2"
+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
+ mirror://gentoo/${P}-utf8-r2.patch.bz2
+ 7zip? ( http://sgh-punk.narod.ru/files/u7z/${U7Z} )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="7zip X gpm ncurses nls pam samba slang unicode"
+
+PROVIDE="virtual/editor"
+
+RDEPEND="kernel_linux? ( >=sys-fs/e2fsprogs-1.19 )
+ ncurses? ( >=sys-libs/ncurses-5.2-r5 )
+ =dev-libs/glib-2*
+ pam? ( >=sys-libs/pam-0.72 )
+ gpm? ( >=sys-libs/gpm-1.19.3 )
+ slang? ( ~sys-libs/slang-1.4.9 )
+ samba? ( >=net-fs/samba-3.0.0 )
+ X? ( || ( (
+ x11-libs/libX11
+ x11-libs/libICE
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM
+ )
+ virtual/x11
+ )
+ )
+ x86? ( 7zip? ( >=app-arch/p7zip-4.16 ) )
+ ppc? ( 7zip? ( >=app-arch/p7zip-4.16 ) )
+ amd64? ( 7zip? ( >=app-arch/p7zip-4.16 ) )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+pkg_setup() {
+ if use unicode && ! use slang ; then
+ eerror "You must either disable unicode useflag or, if you want a"
+ eerror "unicode-aware mc, set the slang useflag as well."
+ die "set slang or unset unicode"
+ fi
+}
+
+src_unpack() {
+ if ( use x86 || use amd64 || use ppc ) && use 7zip; then
+ unpack ${U7Z}
+ fi
+ unpack ${P}.tar.gz
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-find.patch
+ if ( use x86 || use amd64 || use ppc ) && use 7zip; then
+ epatch "${FILESDIR}"/${PN}-4.6.0-7zip.patch
+ fi
+ epatch "${FILESDIR}"/${P}-largefile.patch
+
+ # Don't crash on invalid mtimes
+ # Bug #184296
+ epatch "${FILESDIR}"/${P}-invalid-mtime.patch
+
+ if use slang && use unicode; then
+ epatch "${DISTDIR}"/${P}-utf8-r2.patch.bz2
+ fi
+ epatch "${FILESDIR}"/${P}-nonblock.patch
+ epatch "${FILESDIR}"/${P}-bash-all.patch
+
+ # Prevent lazy bindings in cons.saver binary. (bug #135009)
+ # - not using bindnow-flags() because cons.saver is only built on GNU/Linux
+ sed -i -e "s:^\(cons_saver_LDADD = .*\):\1 -Wl,-z,now:" \
+ src/Makefile.in
+
+ # Correctly generate charset.alias.
+ # Fixes bugs 71275, 105960 and 169678
+ epatch "${FILESDIR}"/${P}-charset-locale-aliases.patch
+}
+
+src_compile() {
+ append-flags -I/usr/include/gssapi
+
+ filter-flags -malign-double
+
+ 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
+
+ myconf="${myconf} `use_with gpm gpm-mouse`"
+
+ use nls \
+ && myconf="${myconf} --with-included-gettext" \
+ || myconf="${myconf} --disable-nls"
+
+ myconf="${myconf} `use_with X x`"
+
+ use samba \
+ && myconf="${myconf} --with-samba --with-configdir=/etc/samba --with-codepagedir=/var/lib/samba/codepages --with-privatedir=/etc/samba/private" \
+ || myconf="${myconf} --without-samba"
+
+ econf \
+ --with-vfs \
+ --with-ext2undel \
+ --with-edit \
+ --enable-charset \
+ ${myconf} || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ cat "${FILESDIR}"/chdir-4.6.0.gentoo >>\
+ "${S}"/lib/mc-wrapper.sh
+
+ make install DESTDIR="${D}" || die "make install failed"
+
+ # install cons.saver setuid, to actually work
+ fperms u+s /usr/$(get_libdir)/mc/cons.saver
+
+ dodoc ChangeLog AUTHORS MAINTAINERS FAQ INSTALL* NEWS README*
+
+ insinto /usr/share/mc
+ doins "${FILESDIR}"/mc.gentoo
+ doins "${FILESDIR}"/mc.ini
+
+ if ( use x86 || use amd64 || use ppc ) && use 7zip; then
+ cd ../${U7Z_PV}
+ exeinto /usr/share/mc/extfs
+ doexe u7z
+ dodoc readme.u7z
+ newdoc ChangeLog ChangeLog.u7z
+ fi
+
+ insinto /usr/share/mc/syntax
+ doins "${FILESDIR}"/ebuild.syntax
+ cd "${D}"/usr/share/mc/syntax
+ epatch "${FILESDIR}"/${PN}-4.6.0-ebuild-syntax.patch
+}
+
+pkg_postinst() {
+ elog "Add the following line to your ~/.bashrc to"
+ elog "allow mc to chdir to its latest working dir at exit"
+ elog ""
+ elog "# Midnight Commander chdir enhancement"
+ elog "if [ -f /usr/share/mc/mc.gentoo ]; then"
+ elog " . /usr/share/mc/mc.gentoo"
+ elog "fi"
+}