diff options
author | Jakub Moc <jakub@gentoo.org> | 2006-06-09 17:30:51 +0000 |
---|---|---|
committer | Jakub Moc <jakub@gentoo.org> | 2006-06-09 17:30:51 +0000 |
commit | 3cabf9d293a7d969f5f057371ceed2d180aa5c05 (patch) | |
tree | 38ff0d205cb9c3ce49639eb0e5865bba9803c3be /app-misc/mc-mp/mc-mp-4.1.40_pre9.ebuild | |
parent | sys-auth/pam_pgsql - punt redundant src_unpack() (diff) | |
download | sunrise-3cabf9d293a7d969f5f057371ceed2d180aa5c05.tar.gz sunrise-3cabf9d293a7d969f5f057371ceed2d180aa5c05.tar.bz2 sunrise-3cabf9d293a7d969f5f057371ceed2d180aa5c05.zip |
app-misc/mc-mp - New ebuild, based on work of Dmitry S. Kulyabov. Bug 35032. In package.mask, for testing only.
svn path=/; revision=34
Diffstat (limited to 'app-misc/mc-mp/mc-mp-4.1.40_pre9.ebuild')
-rw-r--r-- | app-misc/mc-mp/mc-mp-4.1.40_pre9.ebuild | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/app-misc/mc-mp/mc-mp-4.1.40_pre9.ebuild b/app-misc/mc-mp/mc-mp-4.1.40_pre9.ebuild new file mode 100644 index 000000000..9dd9b4f67 --- /dev/null +++ b/app-misc/mc-mp/mc-mp-4.1.40_pre9.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit flag-o-matic eutils pam + +MY_PN="mc" +MY_P="${MY_PN}-${PV/_/-}" + +DESCRIPTION="GNU Midnight Commander cli-based file manager. 4.1.x branch" +HOMEPAGE="http://mc.linuxinside.com/cgi-bin/dir.cgi" +SRC_URI="http://mc.linuxinside.com/Releases/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT=0 +KEYWORDS="~amd64 ~x86" +IUSE="7zip gpm nls ncurses pam slang" + +PROVIDE="virtual/editor" + +RDEPEND="kernel_linux? ( >=sys-fs/e2fsprogs-1.19 ) + ncurses? ( >=sys-libs/ncurses-5.2-r5 ) + pam? ( >=sys-libs/pam-0.78-r3 net-nds/portmap ) + gpm? ( >=sys-libs/gpm-1.19.3 ) + slang? ( >=sys-libs/slang-1.4.2 ) + x86? ( 7zip? ( >=app-arch/p7zip-4.16 ) ) + amd64? ( 7zip? ( >=app-arch/p7zip-4.16 ) ) + !app-misc/mc" + +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + cd "${S}" + if ( use x86 || use amd64 ) && use 7zip; then + epatch ${FILESDIR}/${PV}/u7z.patch || die "u7z patch failed" + fi + + epatch ${FILESDIR}/${PV}/ebuild-syntax.patch || die "ebuild-syntax patch failed" + epatch ${FILESDIR}/${PV}/mc-menu.patch || die "mc-menu patch-failed" + epatch ${FILESDIR}/${PV}/gcc34.patch || die "mc-menu patch-failed" + + # Prevent lazy bindings in cons.saver binary. (bug #135009) + # Also prevent stripping the binary, portage takes care of this as needed + # - not using bindnow-flags() because cons.saver is only built on GNU/Linux + sed -i -e "s:(CC) -s cons.saver.o:(CC) -Wl,-z,now cons.saver.o:" \ + src/Makefile.in || die "sed failed in Makefile.in" +} + +src_compile() { + filter-flags -malign-double + + local myconf="" + + if ! use slang && ! use ncurses ; then + myconf="${myconf}" + elif + use ncurses && ! use slang ; then + myconf="${myconf} --with-ncurses --without-included-slang" + else + use slang && myconf="${myconf} --with-included-slang --with-terminfo --with-slang" + fi + + myconf="${myconf} `use_with gpm gpm-mouse`" + + use nls \ + && myconf="${myconf} --with-included-gettext" \ + || myconf="${myconf} --disable-nls" + + # X support not ready yet + # myconf="${myconf} `use_with X x`" + + econf \ + --with-vfs \ + --with-ext2undel \ + --with-edit \ + --enable-charset \ + --with-mcfs \ + --with-subshell \ + --with-netrc \ + --with-dusum \ + ${myconf} || die + + emake || die +} + +src_install() { + cat ${FILESDIR}/chdir.gentoo > ${S}/lib/mc.sh + rm -f ${S}/README.{NT,OS2,QNX} + + einstall || die + + # install cons.saver setuid, to actually work + chmod u+s ${D}/usr/lib/mc/bin/cons.saver + + use pam && newpamd ${FILESDIR}/mcserv.pamd mcserv + use pam && newinitd ${FILESDIR}/mcserv.rc mcserv + + exeinto /usr/lib/mc/bin + doexe ${S}/lib/mc.sh + doexe ${S}/lib/mc.csh + + insinto /usr/lib/mc + doins ${FILESDIR}/mc.{gentoo,ini} + + insinto /usr/lib/mc/syntax + doins ${FILESDIR}/ebuild.syntax + + rm -rf ${D}/usr/man ${D}/usr/share/man + doman ${S}/doc/*.{1,8} + dodoc FAQ NEWS README.* +} + +pkg_postinst() { + einfo "Add the following line to your ~/.bashrc to" + einfo "allow mc to chdir to its latest working dir at exit" + einfo + einfo "# Midnight Commander chdir enhancement" + einfo "if [ -f /usr/lib/mc/mc.gentoo ]; then" + einfo ". /usr/lib/mc/mc.gentoo" + einfo "fi" +} |