/[gentoo-x86]/app-editors/mp/mp-5.2.2.ebuild
Gentoo

Contents of /app-editors/mp/mp-5.2.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu May 3 18:33:02 2012 UTC (2 years, 7 months ago) by jdhore
Branch: MAIN
Changes since 1.1: +2 -2 lines
dev-util/pkgconfig -> virtual/pkgconfig

(Portage version: 2.2.0_alpha101/cvs/Linux i686)

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-editors/mp/mp-5.2.2.ebuild,v 1.1 2012/04/25 20:12:28 jer Exp $
4
5 EAPI=4
6 inherit eutils toolchain-funcs
7
8 DESCRIPTION="Minimum Profit: A text editor for programmers"
9 HOMEPAGE="http://www.triptico.com/software/mp.html"
10 SRC_URI="http://www.triptico.com/download/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~ppc-macos ~sparc-solaris ~x86-solaris"
15 IUSE="gtk iconv kde ncurses nls pcre qt4"
16
17 MP_LINGUAS="de es it nl ru sv"
18 for mp_lingua in ${MP_LINGUAS}; do
19 IUSE+=" linguas_${mp_lingua}"
20 done
21
22 RDEPEND="
23 ncurses? ( sys-libs/ncurses )
24 gtk? (
25 || ( x11-libs/gtk+:3 x11-libs/gtk+:2 )
26 >=x11-libs/pango-1.8.0
27 dev-libs/atk
28 dev-libs/glib
29 media-libs/fontconfig
30 media-libs/freetype
31 x11-libs/cairo
32 )
33 !gtk? ( sys-libs/ncurses )
34 app-text/grutatxt
35 iconv? ( virtual/libiconv )
36 nls? ( sys-devel/gettext )
37 pcre? ( dev-libs/libpcre )
38 "
39 DEPEND="
40 ${RDEPEND}
41 app-text/grutatxt
42 virtual/pkgconfig
43 dev-lang/perl
44 "
45
46 src_prepare() {
47 epatch "${FILESDIR}"/${PN}-5.2.1-prll.patch
48 local mp_lingua
49 for mp_lingua in ${MP_LINGUAS}; do
50 if ! use linguas_${mp_lingua}; then
51 rm po/${mp_lingua/linguas_/}.[mp]o || die
52 fi
53 done
54 }
55
56 src_configure() {
57 local myconf="--prefix=${EPREFIX}/usr --without-win32"
58
59 if use gtk; then
60 ! use ncurses && myconf="${myconf} --without-curses"
61 else
62 myconf="${myconf} --without-gtk2"
63 fi
64
65 use iconv || myconf="${myconf} --without-iconv"
66
67 use kde || myconf="${myconf} --without-kde4"
68
69 use nls || myconfig="${myconf} --without-gettext"
70
71 myconf="${myconf} $(use_with pcre)"
72 use pcre || myconf="${myconf} --with-included-regex"
73
74 use qt4 || myconf="${myconf} --without-qt4"
75
76 tc-export CC
77 sh config.sh ${myconf} || die "Configure failed"
78
79 for i in "${S}" "${S}"/mpsl "${S}"/mpdm;do
80 echo ${CFLAGS} >> $i/config.cflags
81 echo ${CFLAGS} >> $i/config.ldflags
82 echo ${LDFLAGS} >> $i/config.ldflags
83 done
84 }
85
86 src_install() {
87 dodir /usr/bin
88 sh config.sh --prefix="${EPREFIX}/usr"
89 emake -j1 DESTDIR="${D}" install
90 # use gtk && dosym mp-5 /usr/bin/gmp
91 }
92
93 pkg_postinst() {
94 if use gtk ; then
95 einfo
96 einfo "mp-5 is symlinked to gmp! Use"
97 einfo "$ DISPLAY=\"\" mp-5"
98 einfo "to use text mode!"
99 einfo
100 fi
101 }

  ViewVC Help
Powered by ViewVC 1.1.20