You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
2.3 KiB
102 lines
2.3 KiB
12 years ago
|
# Copyright 1999-2012 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
12 years ago
|
# $Header: /var/cvsroot/gentoo-x86/app-editors/mp/mp-5.2.2.ebuild,v 1.1 2012/04/25 20:12:28 jer Exp $
|
||
13 years ago
|
|
||
12 years ago
|
EAPI=4
|
||
13 years ago
|
inherit eutils toolchain-funcs
|
||
|
|
||
|
DESCRIPTION="Minimum Profit: A text editor for programmers"
|
||
|
HOMEPAGE="http://www.triptico.com/software/mp.html"
|
||
|
SRC_URI="http://www.triptico.com/download/${P}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~ppc-macos ~sparc-solaris ~x86-solaris"
|
||
|
IUSE="gtk iconv kde ncurses nls pcre qt4"
|
||
|
|
||
12 years ago
|
MP_LINGUAS="de es it nl ru sv"
|
||
|
for mp_lingua in ${MP_LINGUAS}; do
|
||
|
IUSE+=" linguas_${mp_lingua}"
|
||
|
done
|
||
|
|
||
13 years ago
|
RDEPEND="
|
||
|
ncurses? ( sys-libs/ncurses )
|
||
12 years ago
|
gtk? (
|
||
|
|| ( x11-libs/gtk+:3 x11-libs/gtk+:2 )
|
||
|
>=x11-libs/pango-1.8.0
|
||
|
dev-libs/atk
|
||
|
dev-libs/glib
|
||
|
media-libs/fontconfig
|
||
|
media-libs/freetype
|
||
|
x11-libs/cairo
|
||
|
)
|
||
13 years ago
|
!gtk? ( sys-libs/ncurses )
|
||
12 years ago
|
app-text/grutatxt
|
||
|
iconv? ( virtual/libiconv )
|
||
13 years ago
|
nls? ( sys-devel/gettext )
|
||
|
pcre? ( dev-libs/libpcre )
|
||
12 years ago
|
"
|
||
|
DEPEND="
|
||
|
${RDEPEND}
|
||
13 years ago
|
app-text/grutatxt
|
||
|
dev-util/pkgconfig
|
||
12 years ago
|
dev-lang/perl
|
||
|
"
|
||
13 years ago
|
|
||
|
src_prepare() {
|
||
12 years ago
|
epatch "${FILESDIR}"/${PN}-5.2.1-prll.patch
|
||
|
local mp_lingua
|
||
|
for mp_lingua in ${MP_LINGUAS}; do
|
||
|
if ! use linguas_${mp_lingua}; then
|
||
|
rm po/${mp_lingua/linguas_/}.[mp]o || die
|
||
|
fi
|
||
|
done
|
||
13 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
local myconf="--prefix=${EPREFIX}/usr --without-win32"
|
||
|
|
||
|
if use gtk; then
|
||
|
! use ncurses && myconf="${myconf} --without-curses"
|
||
|
else
|
||
|
myconf="${myconf} --without-gtk2"
|
||
|
fi
|
||
|
|
||
|
use iconv || myconf="${myconf} --without-iconv"
|
||
|
|
||
|
use kde || myconf="${myconf} --without-kde4"
|
||
|
|
||
|
use nls || myconfig="${myconf} --without-gettext"
|
||
|
|
||
|
myconf="${myconf} $(use_with pcre)"
|
||
|
use pcre || myconf="${myconf} --with-included-regex"
|
||
|
|
||
|
use qt4 || myconf="${myconf} --without-qt4"
|
||
|
|
||
12 years ago
|
tc-export CC
|
||
|
sh config.sh ${myconf} || die "Configure failed"
|
||
|
|
||
13 years ago
|
for i in "${S}" "${S}"/mpsl "${S}"/mpdm;do
|
||
|
echo ${CFLAGS} >> $i/config.cflags
|
||
12 years ago
|
echo ${CFLAGS} >> $i/config.ldflags
|
||
13 years ago
|
echo ${LDFLAGS} >> $i/config.ldflags
|
||
|
done
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
dodir /usr/bin
|
||
|
sh config.sh --prefix="${EPREFIX}/usr"
|
||
12 years ago
|
emake -j1 DESTDIR="${D}" install
|
||
13 years ago
|
# use gtk && dosym mp-5 /usr/bin/gmp
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
if use gtk ; then
|
||
|
einfo
|
||
|
einfo "mp-5 is symlinked to gmp! Use"
|
||
|
einfo "$ DISPLAY=\"\" mp-5"
|
||
|
einfo "to use text mode!"
|
||
|
einfo
|
||
|
fi
|
||
|
}
|