app-editors/nano: update HOMEPAGE #534462
[gentoo.git] / app-editors / nano / nano-2.4.2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 inherit eutils flag-o-matic
8 if [[ ${PV} == "9999" ]] ; then
9         ESVN_REPO_URI="svn://svn.savannah.gnu.org/nano/trunk/nano"
10         inherit subversion autotools
11 else
12         MY_P=${PN}-${PV/_}
13         SRC_URI="http://www.nano-editor.org/dist/v${PV:0:3}/${MY_P}.tar.gz"
14         KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 fi
16
17 DESCRIPTION="GNU GPL'd Pico clone with more functionality"
18 HOMEPAGE="http://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide"
19
20 LICENSE="GPL-3"
21 SLOT="0"
22 IUSE="debug justify +magic minimal ncurses nls slang +spell static unicode"
23
24 LIB_DEPEND=">=sys-libs/ncurses-5.9-r1:0=[unicode?]
25         sys-libs/ncurses:0=[static-libs(+)]
26         magic? ( sys-apps/file[static-libs(+)] )
27         nls? ( virtual/libintl )
28         !ncurses? ( slang? ( sys-libs/slang[static-libs(+)] ) )"
29 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
30 DEPEND="${RDEPEND}
31         nls? ( sys-devel/gettext )
32         virtual/pkgconfig
33         static? ( ${LIB_DEPEND} )"
34
35 src_prepare() {
36         if [[ ${PV} == "9999" ]] ; then
37                 eautoreconf
38         fi
39         epatch_user
40 }
41
42 src_configure() {
43         use static && append-ldflags -static
44         local myconf=()
45         case ${CHOST} in
46         *-gnu*|*-uclibc*) myconf+=( "--with-wordbounds" ) ;; #467848
47         esac
48         econf \
49                 --bindir="${EPREFIX}"/bin \
50                 --htmldir=/trash \
51                 $(use_enable !minimal color) \
52                 $(use_enable !minimal multibuffer) \
53                 $(use_enable !minimal nanorc) \
54                 --disable-wrapping-as-root \
55                 $(use_enable magic libmagic) \
56                 $(use_enable spell speller) \
57                 $(use_enable justify) \
58                 $(use_enable debug) \
59                 $(use_enable nls) \
60                 $(use_enable unicode utf8) \
61                 $(use_enable minimal tiny) \
62                 $(usex ncurses --without-slang $(use_with slang)) \
63                 "${myconf[@]}"
64 }
65
66 src_install() {
67         default
68         rm -rf "${D}"/trash
69
70         dodoc doc/nanorc.sample
71         dohtml doc/faq.html
72         insinto /etc
73         newins doc/nanorc.sample nanorc
74         if ! use minimal ; then
75                 # Enable colorization by default.
76                 sed -i \
77                         -e '/^# include /s:# *::' \
78                         "${ED}"/etc/nanorc || die
79         fi
80
81         dodir /usr/bin
82         dosym /bin/nano /usr/bin/nano
83 }