| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-misc/mc/mc-4.8.4-r2.ebuild,v 1.2 2012/08/04 15:14:09 hasufell Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit eutils flag-o-matic
|
| 8 |
|
| 9 |
MY_P=${P/_/-}
|
| 10 |
|
| 11 |
DESCRIPTION="GNU Midnight Commander is a text based file manager"
|
| 12 |
HOMEPAGE="http://www.midnight-commander.org"
|
| 13 |
SRC_URI="http://www.midnight-commander.org/downloads/${MY_P}.tar.xz"
|
| 14 |
|
| 15 |
LICENSE="GPL-3"
|
| 16 |
SLOT="0"
|
| 17 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
|
| 18 |
IUSE="+edit gpm mclib nls samba sftp +slang spell test X +xdg"
|
| 19 |
|
| 20 |
REQUIRED_USE="spell? ( edit )"
|
| 21 |
|
| 22 |
RDEPEND=">=dev-libs/glib-2.8:2
|
| 23 |
gpm? ( sys-libs/gpm )
|
| 24 |
kernel_linux? ( sys-fs/e2fsprogs )
|
| 25 |
samba? ( net-fs/samba )
|
| 26 |
sftp? ( net-libs/libssh2 )
|
| 27 |
slang? ( >=sys-libs/slang-2 )
|
| 28 |
!slang? ( sys-libs/ncurses )
|
| 29 |
spell? ( app-text/aspell )
|
| 30 |
X? ( x11-libs/libX11
|
| 31 |
x11-libs/libICE
|
| 32 |
x11-libs/libXau
|
| 33 |
x11-libs/libXdmcp
|
| 34 |
x11-libs/libSM )"
|
| 35 |
DEPEND="${RDEPEND}
|
| 36 |
app-arch/xz-utils
|
| 37 |
virtual/pkgconfig
|
| 38 |
nls? ( sys-devel/gettext )
|
| 39 |
test? ( dev-libs/check )
|
| 40 |
"
|
| 41 |
|
| 42 |
LANGS="az be bg ca cs da de el eo es et eu fi
|
| 43 |
fr gl hu ia id it ja ka ko lt lv mn nb nl pl pt_BR
|
| 44 |
pt ro ru sk sl sr sv sv_SE ta tr uk vi wa zh_CN zh_TW"
|
| 45 |
#LANGS+=" de_CH fi_FI it_IT" # suspicious overlap
|
| 46 |
|
| 47 |
for X in ${LANGS} ; do
|
| 48 |
IUSE="${IUSE} linguas_${X}"
|
| 49 |
done
|
| 50 |
|
| 51 |
src_prepare() {
|
| 52 |
strip-linguas ${LANGS}
|
| 53 |
|
| 54 |
epatch "${FILESDIR}"/${P}-Ticket-2851-fixes-of-ext.d-scripts.patch \
|
| 55 |
"${FILESDIR}"/${P}-Ticket-2853-fileposition-in-mcedit.patch \
|
| 56 |
"${FILESDIR}"/${P}-Ticket-2858-htmlview-segfault.patch
|
| 57 |
}
|
| 58 |
|
| 59 |
S=${WORKDIR}/${MY_P}
|
| 60 |
|
| 61 |
src_configure() {
|
| 62 |
local myscreen=ncurses
|
| 63 |
use slang && myscreen=slang
|
| 64 |
[[ ${CHOST} == *-solaris* ]] && append-ldflags "-lnsl -lsocket"
|
| 65 |
|
| 66 |
local homedir=".mc"
|
| 67 |
use xdg && homedir="XDG"
|
| 68 |
|
| 69 |
econf \
|
| 70 |
--disable-silent-rules \
|
| 71 |
--disable-dependency-tracking \
|
| 72 |
$(use_enable nls) \
|
| 73 |
--enable-vfs \
|
| 74 |
$(use_enable kernel_linux vfs-undelfs) \
|
| 75 |
--enable-charset \
|
| 76 |
$(use_with X x) \
|
| 77 |
$(use_enable samba vfs-smb) \
|
| 78 |
$(use_enable sftp vfs-sftp) \
|
| 79 |
$(use_enable spell aspell) \
|
| 80 |
$(use_with gpm gpm-mouse) \
|
| 81 |
--with-screen=${myscreen} \
|
| 82 |
$(use_with edit) \
|
| 83 |
$(use_enable mclib) \
|
| 84 |
$(use_enable test tests) \
|
| 85 |
--with-homedir=${homedir}
|
| 86 |
}
|
| 87 |
|
| 88 |
src_install() {
|
| 89 |
emake DESTDIR="${D}" install
|
| 90 |
dodoc AUTHORS README NEWS
|
| 91 |
|
| 92 |
# fix bug #334383
|
| 93 |
if use kernel_linux && [[ ${EUID} == 0 ]] ; then
|
| 94 |
fowners root:tty /usr/libexec/mc/cons.saver
|
| 95 |
fperms g+s /usr/libexec/mc/cons.saver
|
| 96 |
fi
|
| 97 |
}
|
| 98 |
|
| 99 |
pkg_postinst() {
|
| 100 |
elog "To enable exiting to latest working directory,"
|
| 101 |
elog "put this into your ~/.bashrc:"
|
| 102 |
elog ". ${EPREFIX}/usr/libexec/mc/mc.sh"
|
| 103 |
}
|