summaryrefslogtreecommitdiff
path: root/app-misc/mc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/mc
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/mc')
-rw-r--r--app-misc/mc/Manifest9
-rw-r--r--app-misc/mc/files/mc-4.8.13-tinfo.patch39
-rw-r--r--app-misc/mc/files/mc-4.8.19-selected-size.patch30
-rw-r--r--app-misc/mc/mc-4.8.20-r1.ebuild102
-rw-r--r--app-misc/mc/mc-4.8.20-r2.ebuild105
-rw-r--r--app-misc/mc/mc-4.8.21.ebuild93
-rw-r--r--app-misc/mc/mc-9999.ebuild106
-rw-r--r--app-misc/mc/metadata.xml23
8 files changed, 507 insertions, 0 deletions
diff --git a/app-misc/mc/Manifest b/app-misc/mc/Manifest
new file mode 100644
index 000000000000..35b1e498df4b
--- /dev/null
+++ b/app-misc/mc/Manifest
@@ -0,0 +1,9 @@
+AUX mc-4.8.13-tinfo.patch 1742 BLAKE2B d9428200e62bbffd0cf056bd25b3cec9a3c4b83638f4e72379f8756e62376c61ef3375c9ede50deb52619ead78a39d49280f9a654e0d8877158b6ef4b8117556 SHA512 7714d42ece73fe6f044f5cc0f59ab5c23bedb820122291d1af581f5f7dd94d4410072868205e94419be459ed9769c8ed75dfb8ad5b945c8df820901f756e7c3c
+AUX mc-4.8.19-selected-size.patch 988 BLAKE2B de407c64d1d7e2460f165ace967f6b83c50e45c6842a1d174928c872d4f6a9aff31939942f2896bb2f3d34f656fb2c1e262c35a7c72f1cb58256472d5cac7c19 SHA512 f7740ec01e38857b1e365737cc4e1cd41397e41aea9ef5aa121c6db2f11955980df949a440cce7bbf810b7b8a6f0c1c5e5090de3c5008dd6390ecee4c659d80c
+DIST mc-4.8.20.tar.xz 2529580 BLAKE2B 14e575b650d28e0dcaa8ef0dc0b8e9bbf3e840ddc3d34d20518d28a6b253a8769c041c29ef7136c5fb72bd6130b0fc6c367dab8e44e040ef6dfd5406c364b86c SHA512 c2460561ae94bed75b1ed12f5c8039c9f8ace4c06987c57d07b8399c4e01c5a6c57851fddb3e918a4541ade089c89e8526078572a09580ccd0ae95344e3c1138
+DIST mc-4.8.21.tar.xz 2528292 BLAKE2B 0cbebcd2284f9ed9687022280aa1ba9e4a5960c6f1de27e5f4bab1b9bf205077dec2851e47b787aa6aec9cac28d467bf58ee2647a592e194ab3bfc63138b373f SHA512 db1a252744b47ebf5339ad204d8b69cb914f25ade7fe5aae2650c4abb57478715d3b7b3a24f4460adfb9fbdc928e8728b369b4f1709215e5e9af3d430fce6acf
+EBUILD mc-4.8.20-r1.ebuild 2482 BLAKE2B 1bf8934ae7f8d5478804017453efc0a8d16e1f6b2f8bedd8d878202df154fa01138e5284f18a4a5e3a7ca11b70785fcf250275b45941e4b411a045142a3e0705 SHA512 6345f42e21960543ccd50ee95790c017667f73a293386ad28a6107e4575e649902b8e26970185f3ef59d8ef23f4a45b02596d0f99156c704083ab15f54f87384
+EBUILD mc-4.8.20-r2.ebuild 2619 BLAKE2B 818c6c1ab7b190d80566935453e3467479733e266683e17f02c397d6d55bc2ad3a9aeacad91e4c2ad7dd6e26e9a6319b1392726a097415d5302dc49a9daf7843 SHA512 50e29ca64ea1e6172653960220e8bee6b7a298792e7774971a7c3db6a3187646ae84a88291ba0deb898ca6294fd752b827b0213ea7d770a078edd9f506abd0cc
+EBUILD mc-4.8.21.ebuild 2425 BLAKE2B c1fd699e82c24ac68898dbb3a67eb61c9a5bcc27f2c31a6cb2c76adaba25651f18f24eafc9434b36144cbec1fc4451d306cb8661cf433217f973ce5b24077317 SHA512 806b4dc06c0afcfecbd5a00469e85fbfb115b2645df2c504c79f8788fd6e0248155b0c8e728580b8b12ee74e091f8f8ade41bd57e5c2c8eb86abdb9318b1d928
+EBUILD mc-9999.ebuild 2710 BLAKE2B acbcdaf95260df5b4f34ac03e19b2b674f65d3c95083e79eaf916cd62f99ea0d9008c94bb2c0e030bcd8face202c00a646eca1521461058ae009da1f17a4499e SHA512 0388200a8134818d797d79849bc618a222377c33fb1802dcbf2fdafcbc22d85888171fee546ff5a484aeb4d97074afa1fea23ea5ee2078182bf72277658b65bb
+MISC metadata.xml 994 BLAKE2B 59d3e1c9bc8bcaf74ef8f646f1067a07127a70825bb2651e7bee1628e93131769caf1c7251b6aecd4ed35707984b95c928fcf5563b3e2ba6997c090ea08ea0b4 SHA512 8e36834754b8335c133eb3693d17d02a0c6c3c7d25263857558cf290922b8e7508bf90c609e09ebbfaed54eecc2179936ded60c2b723cc0abc6722db180cc3ed
diff --git a/app-misc/mc/files/mc-4.8.13-tinfo.patch b/app-misc/mc/files/mc-4.8.13-tinfo.patch
new file mode 100644
index 000000000000..761c103df654
--- /dev/null
+++ b/app-misc/mc/files/mc-4.8.13-tinfo.patch
@@ -0,0 +1,39 @@
+Gentoo-bug: https://bugs.gentoo.org/527118
+--- a/m4.include/mc-with-screen-ncurses.m4
++++ b/m4.include/mc-with-screen-ncurses.m4
+@@ -101,6 +101,9 @@
+ LIBS=
+ AC_SEARCH_LIBS([has_colors], [ncurses], [MCLIBS="$MCLIBS $LIBS"],
+ [AC_MSG_ERROR([Cannot find ncurses library])])
++ AC_SEARCH_LIBS([stdscr],[tinfo ncurses],[MCLIBS="$MCLIBS $LIBS"],
++ [AC_MSG_ERROR([Cannot find a library providing stdscr])])
++
+
+ screen_type=ncurses
+ screen_msg="Ncurses library"
+@@ -111,10 +114,15 @@
+ AC_SEARCH_LIBS([addwstr], [ncursesw ncurses curses], [MCLIBS="$MCLIBS $LIBS";ncursesw_found=yes],
+ [AC_MSG_WARN([Cannot find ncurses library, that support wide characters])])
+
++ AC_SEARCH_LIBS([stdscr],[tinfo ncursesw ncurses curses],[MCLIBS="$MCLIBS $LIBS"],
++ [AC_MSG_ERROR([Cannot find a library providing stdscr])])
++
+ if test x"$ncursesw_found" = "x"; then
+ LIBS=
+ AC_SEARCH_LIBS([has_colors], [ncurses curses], [MCLIBS="$MCLIBS $LIBS"],
+ [AC_MSG_ERROR([Cannot find ncurses library])])
++ AC_SEARCH_LIBS([stdscr],[tinfo ncurses curses],[MCLIBS="$MCLIBS $LIBS"],
++ [AC_MSG_ERROR([Cannot find a library providing stdscr])])
+ fi
+
+ dnl Check the header
+@@ -166,6 +174,9 @@
+ LIBS=
+ AC_SEARCH_LIBS([has_colors], [ncursesw], [MCLIBS="$MCLIBS $LIBS"],
+ [AC_MSG_ERROR([Cannot find ncursesw library])])
++ AC_SEARCH_LIBS([stdscr],[tinfow ncursesw],[MCLIBS="$MCLIBS $LIBS"],
++ [AC_MSG_ERROR([Cannot find a library providing stdscr])])
++
+
+ dnl Check the header
+ ncurses_h_found=
diff --git a/app-misc/mc/files/mc-4.8.19-selected-size.patch b/app-misc/mc/files/mc-4.8.19-selected-size.patch
new file mode 100644
index 000000000000..06d6f46ff325
--- /dev/null
+++ b/app-misc/mc/files/mc-4.8.19-selected-size.patch
@@ -0,0 +1,30 @@
+From 069306eb2e7174f431bd3eecbc8f489f9652b782 Mon Sep 17 00:00:00 2001
+From: Andrew Borodin <aborodin@vmail.ru>
+Date: Sat, 2 Dec 2017 14:39:50 +0300
+Subject: [PATCH] Ticket #3883: size_trunc_sep() breaks on multibyte locales.
+
+The bug was introduced in b3867a6e154420833d6a1117f556b9ab2d64c6ab.
+
+Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
+---
+ lib/util.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lib/util.c b/lib/util.c
+index 0326f65e8..c23d91fba 100644
+--- a/lib/util.c
++++ b/lib/util.c
+@@ -383,7 +383,9 @@ size_trunc_sep (uintmax_t size, gboolean use_si)
+ p += strlen (p) - 1;
+ d = x + sizeof (x) - 1;
+ *d-- = '\0';
+- while (p >= y && (isalpha ((unsigned char) *p) || (unsigned char) *p == ' '))
++ /* @size format is "size unit", i.e. "[digits][space][letters]".
++ Copy all charactes after digits. */
++ while (p >= y && !g_ascii_isdigit (*p))
+ *d-- = *p--;
+ for (count = 0; p >= y; count++)
+ {
+--
+2.15.1
+
diff --git a/app-misc/mc/mc-4.8.20-r1.ebuild b/app-misc/mc/mc-4.8.20-r1.ebuild
new file mode 100644
index 000000000000..344079ed4251
--- /dev/null
+++ b/app-misc/mc/mc-4.8.20-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic
+
+MY_P=${P/_/-}
+
+DESCRIPTION="GNU Midnight Commander is a text based file manager"
+HOMEPAGE="https://www.midnight-commander.org"
+SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="+edit gpm mclib nls samba sftp +slang spell test X +xdg"
+
+REQUIRED_USE="spell? ( edit )"
+
+RDEPEND=">=dev-libs/glib-2.26.0:2
+ gpm? ( sys-libs/gpm )
+ kernel_linux? ( sys-fs/e2fsprogs )
+ samba? ( net-fs/samba )
+ sftp? ( net-libs/libssh2 )
+ slang? ( >=sys-libs/slang-2 )
+ !slang? ( sys-libs/ncurses:0= )
+ spell? ( app-text/aspell )
+ X? ( x11-libs/libX11
+ x11-libs/libICE
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( dev-libs/check )
+ "
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.8.13-tinfo.patch
+ "${FILESDIR}"/${PN}-4.8.19-selected-size.patch
+)
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ [[ -n ${LIVE_EBUILD} ]] && ./autogen.sh
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myscreen=ncurses
+ use slang && myscreen=slang
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket"
+
+ local homedir=".mc"
+ use xdg && homedir="XDG"
+
+ econf \
+ --disable-silent-rules \
+ --disable-dependency-tracking \
+ $(use_enable nls) \
+ --enable-vfs \
+ $(use_enable kernel_linux vfs-undelfs) \
+ --enable-charset \
+ $(use_with X x) \
+ $(use_enable samba vfs-smb) \
+ $(use_enable sftp vfs-sftp) \
+ $(use_enable spell aspell) \
+ $(use_with gpm gpm-mouse) \
+ --with-screen=${myscreen} \
+ $(use_with edit internal-edit) \
+ $(use_enable mclib) \
+ $(use_enable test tests) \
+ --with-homedir=${homedir}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS README NEWS
+
+ # fix bug #334383
+ if use kernel_linux && [[ ${EUID} == 0 ]] ; then
+ fowners root:tty /usr/libexec/mc/cons.saver
+ fperms g+s /usr/libexec/mc/cons.saver
+ fi
+
+ if ! use xdg ; then
+ sed 's@MC_XDG_OPEN="xdg-open"@MC_XDG_OPEN="/bin/false"@' \
+ -i "${ED}"/usr/libexec/mc/ext.d/*.sh || die
+ fi
+}
+
+pkg_postinst() {
+ elog "To enable exiting to latest working directory,"
+ elog "put this into your ~/.bashrc:"
+ elog ". ${EPREFIX}/usr/libexec/mc/mc.sh"
+}
diff --git a/app-misc/mc/mc-4.8.20-r2.ebuild b/app-misc/mc/mc-4.8.20-r2.ebuild
new file mode 100644
index 000000000000..9b920e68246d
--- /dev/null
+++ b/app-misc/mc/mc-4.8.20-r2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic
+
+MY_P=${P/_/-}
+
+DESCRIPTION="GNU Midnight Commander is a text based file manager"
+HOMEPAGE="https://www.midnight-commander.org"
+SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="+edit gpm mclib nls samba sftp +slang spell test unicode X +xdg"
+
+REQUIRED_USE="spell? ( edit )"
+
+RDEPEND=">=dev-libs/glib-2.26.0:2
+ gpm? ( sys-libs/gpm )
+ kernel_linux? ( sys-fs/e2fsprogs )
+ samba? ( net-fs/samba )
+ sftp? ( net-libs/libssh2 )
+ slang? ( >=sys-libs/slang-2 )
+ !slang? ( sys-libs/ncurses:0=[unicode?] )
+ spell? ( app-text/aspell )
+ X? ( x11-libs/libX11
+ x11-libs/libICE
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( dev-libs/check )
+ "
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.8.13-tinfo.patch
+ "${FILESDIR}"/${PN}-4.8.19-selected-size.patch
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if use slang && use unicode ; then
+ ewarn "\"unicode\" USE flag only takes effect when the \"slang\" USE flag is disabled."
+ fi
+}
+
+src_prepare() {
+ [[ -n ${LIVE_EBUILD} ]] && ./autogen.sh
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket"
+
+ local myeconfargs=(
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-charset
+ --enable-vfs
+ --with-homedir=$(usex xdg 'XDG' '.mc')
+ --with-screen=$(usex slang 'slang' "ncurses$(usex unicode 'w' '')")
+ $(use_enable kernel_linux vfs-undelfs)
+ $(use_enable mclib)
+ $(use_enable nls)
+ $(use_enable samba vfs-smb)
+ $(use_enable sftp vfs-sftp)
+ $(use_enable spell aspell)
+ $(use_enable test tests)
+ $(use_with gpm gpm-mouse)
+ $(use_with X x)
+ $(use_with edit internal-edit)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS README NEWS
+
+ # fix bug #334383
+ if use kernel_linux && [[ ${EUID} == 0 ]] ; then
+ fowners root:tty /usr/libexec/mc/cons.saver
+ fperms g+s /usr/libexec/mc/cons.saver
+ fi
+
+ if ! use xdg ; then
+ sed 's@MC_XDG_OPEN="xdg-open"@MC_XDG_OPEN="/bin/false"@' \
+ -i "${ED%/}"/usr/libexec/mc/ext.d/*.sh || die
+ fi
+}
+
+pkg_postinst() {
+ elog "To enable exiting to latest working directory,"
+ elog "put this into your ~/.bashrc:"
+ elog ". ${EPREFIX}/usr/libexec/mc/mc.sh"
+}
diff --git a/app-misc/mc/mc-4.8.21.ebuild b/app-misc/mc/mc-4.8.21.ebuild
new file mode 100644
index 000000000000..a7b19052bb2f
--- /dev/null
+++ b/app-misc/mc/mc-4.8.21.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+MY_P=${P/_/-}
+
+DESCRIPTION="GNU Midnight Commander is a text based file manager"
+HOMEPAGE="https://www.midnight-commander.org"
+SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="+edit gpm mclib nls samba sftp +slang spell test unicode X +xdg"
+
+REQUIRED_USE="spell? ( edit )"
+
+RDEPEND=">=dev-libs/glib-2.26.0:2
+ gpm? ( sys-libs/gpm )
+ kernel_linux? ( sys-fs/e2fsprogs )
+ samba? ( net-fs/samba )
+ sftp? ( net-libs/libssh2 )
+ slang? ( >=sys-libs/slang-2 )
+ !slang? ( sys-libs/ncurses:0=[unicode?] )
+ spell? ( app-text/aspell )
+ X? ( x11-libs/libX11
+ x11-libs/libICE
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( dev-libs/check )
+ "
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if use slang && use unicode ; then
+ ewarn "\"unicode\" USE flag only takes effect when the \"slang\" USE flag is disabled."
+ fi
+}
+
+src_configure() {
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket"
+
+ local myeconfargs=(
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-charset
+ --enable-vfs
+ --with-homedir=$(usex xdg 'XDG' '.mc')
+ --with-screen=$(usex slang 'slang' "ncurses$(usex unicode 'w' '')")
+ $(use_enable kernel_linux vfs-undelfs)
+ $(use_enable mclib)
+ $(use_enable nls)
+ $(use_enable samba vfs-smb)
+ $(use_enable sftp vfs-sftp)
+ $(use_enable spell aspell)
+ $(use_enable test tests)
+ $(use_with gpm gpm-mouse)
+ $(use_with X x)
+ $(use_with edit internal-edit)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS README NEWS
+
+ # fix bug #334383
+ if use kernel_linux && [[ ${EUID} == 0 ]] ; then
+ fowners root:tty /usr/libexec/mc/cons.saver
+ fperms g+s /usr/libexec/mc/cons.saver
+ fi
+
+ if ! use xdg ; then
+ sed 's@MC_XDG_OPEN="xdg-open"@MC_XDG_OPEN="/bin/false"@' \
+ -i "${ED%/}"/usr/libexec/mc/ext.d/*.sh || die
+ fi
+}
+
+pkg_postinst() {
+ elog "To enable exiting to latest working directory,"
+ elog "put this into your ~/.bashrc:"
+ elog ". ${EPREFIX}/usr/libexec/mc/mc.sh"
+}
diff --git a/app-misc/mc/mc-9999.ebuild b/app-misc/mc/mc-9999.ebuild
new file mode 100644
index 000000000000..ef5501c8bc47
--- /dev/null
+++ b/app-misc/mc/mc-9999.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/MidnightCommander/mc.git git://repo.or.cz/midnight-commander.git"
+ LIVE_ECLASSES="git-r3 autotools"
+ LIVE_EBUILD=yes
+fi
+
+inherit flag-o-matic ${LIVE_ECLASSES}
+
+MY_P=${P/_/-}
+
+if [[ -z ${LIVE_EBUILD} ]]; then
+ SRC_URI="http://ftp.midnight-commander.org/${MY_P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="GNU Midnight Commander is a text based file manager"
+HOMEPAGE="https://www.midnight-commander.org"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="+edit gpm mclib nls samba sftp +slang spell test unicode X +xdg"
+
+REQUIRED_USE="spell? ( edit )"
+
+RDEPEND=">=dev-libs/glib-2.26.0:2
+ gpm? ( sys-libs/gpm )
+ kernel_linux? ( sys-fs/e2fsprogs )
+ samba? ( net-fs/samba )
+ sftp? ( net-libs/libssh2 )
+ slang? ( >=sys-libs/slang-2 )
+ !slang? ( sys-libs/ncurses:0=[unicode?] )
+ spell? ( app-text/aspell )
+ X? ( x11-libs/libX11
+ x11-libs/libICE
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libSM )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( dev-libs/check )
+ "
+
+pkg_pretend() {
+ if use slang && use unicode ; then
+ ewarn "\"unicode\" USE flag only takes effect when the \"slang\" USE flag is disabled."
+ fi
+}
+
+src_prepare() {
+ default
+
+ [[ -n ${LIVE_EBUILD} ]] && ./autogen.sh
+}
+
+src_configure() {
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket"
+
+ local myeconfargs=(
+ --disable-dependency-tracking
+ --disable-silent-rules
+ --enable-charset
+ --enable-vfs
+ --with-homedir=$(usex xdg 'XDG' '.mc')
+ --with-screen=$(usex slang 'slang' "ncurses$(usex unicode 'w')")
+ $(use_enable kernel_linux vfs-undelfs)
+ $(use_enable mclib)
+ $(use_enable nls)
+ $(use_enable samba vfs-smb)
+ $(use_enable sftp vfs-sftp)
+ $(use_enable spell aspell)
+ $(use_enable test tests)
+ $(use_with gpm gpm-mouse)
+ $(use_with X x)
+ $(use_with edit internal-edit)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS doc/{FAQ,NEWS,README}
+
+ # fix bug #334383
+ if use kernel_linux && [[ ${EUID} == 0 ]] ; then
+ fowners root:tty /usr/libexec/mc/cons.saver
+ fperms g+s /usr/libexec/mc/cons.saver
+ fi
+
+ if ! use xdg ; then
+ sed 's@MC_XDG_OPEN="xdg-open"@MC_XDG_OPEN="/bin/false"@' \
+ -i "${ED%/}"/usr/libexec/mc/ext.d/*.sh || die
+ fi
+}
+
+pkg_postinst() {
+ elog "To enable exiting to latest working directory,"
+ elog "put this into your ~/.bashrc:"
+ elog ". ${EPREFIX}/usr/libexec/mc/mc.sh"
+}
diff --git a/app-misc/mc/metadata.xml b/app-misc/mc/metadata.xml
new file mode 100644
index 000000000000..35fa1001c11e
--- /dev/null
+++ b/app-misc/mc/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>desktop-misc@gentoo.org</email>
+ <name>Gentoo Desktop Miscellaneous Project</name>
+ </maintainer>
+ <use>
+ <flag name="edit">Compile and install the mcedit application</flag>
+ <flag name="mclib">Compile and install the libmc.so shared library</flag>
+ <flag name="sftp">Add support for sftp (uses <pkg>net-libs/libssh2</pkg> for it).</flag>
+ <flag name="slang">Use <pkg>sys-libs/slang</pkg> instead of <pkg>sys-libs/ncurses</pkg>.</flag>
+ <flag name="xdg">Toggles mc's config dir location. Enable for $XDG_CONFIG_HOME/mc, disable for $HOME/.mc</flag>
+ </use>
+</pkgmetadata>