--- /usr/portage/app-misc/mc/mc-4.6.0-r13.ebuild 2005-04-13 21:37:13.000000000 +0300 +++ mc-4.6.0-r13.ebuild 2005-04-18 11:38:24.000000000 +0300 @@ -4,15 +4,18 @@ inherit flag-o-matic eutils +U7Z_PV="4.16" +U7Z="u7z-${U7Z_PV}beta.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 - http://www.spock.mga.com.pl/public/gentoo/${P}-sambalib-3.0.0.patch.bz2" + http://www.spock.mga.com.pl/public/gentoo/${P}-sambalib-3.0.0.patch.bz2 + 7zip? ( http://sgh.nightmail.ru/files/u7z/${U7Z} )" LICENSE="GPL-2" SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86" -IUSE="gpm nls samba ncurses X slang unicode" +IUSE="gpm nls samba ncurses X slang unicode 7zip" PROVIDE="virtual/editor" @@ -24,12 +27,14 @@ slang? ( >=sys-libs/slang-1.4.9-r1 ) samba? ( >=net-fs/samba-3.0.0 ) unicode? ( >=sys-libs/slang-1.4.9-r1 ) - X? ( virtual/x11 )" + X? ( virtual/x11 ) + 7zip? ( >=app-arch/p7zip-4.16 )" DEPEND="${RDEPEND} dev-util/pkgconfig" src_unpack() { + useq 7zip && unpack ${U7Z} unpack ${P}.tar.gz cd ${S} @@ -40,6 +45,9 @@ epatch ${FILESDIR}/${P}-can-2004-0226-0231-0232.patch.bz2 epatch ${FILESDIR}/${P}-can-2004-1004-1005-1092-1176.patch.bz2 epatch ${FILESDIR}/${P}-vfs.patch + if useq 7zip; then + epatch ${FILESDIR}/${P}-7zip.patch + fi epatch ${FILESDIR}/${P}-ftp.patch epatch ${FILESDIR}/${P}-largefile.patch epatch ${FILESDIR}/${P}-key.c.patch @@ -101,6 +109,14 @@ insinto /usr/share/mc doins ${FILESDIR}/mc.gentoo + if useq 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 @@ -118,4 +134,12 @@ einfo "if [ -f /usr/share/mc/mc.gentoo ]; then" einfo " . /usr/share/mc/mc.gentoo" einfo "fi" -} + if useq 7zip; then + einfo "" + einfo "You need to remove ~/.mc/bindings or add the following lines" + einfo "to it before '# Manual page' for the 7zip extfs to work" + einfo "regex/\.(7z|7Z)$" + einfo " View=%view{ascii} 7za l %f" + einfo " Open=%cd %p#u7z" + fi +} \ No newline at end of file