app-editors/nano: update HOMEPAGE #534462
[gentoo.git] / app-editors / nano / nano-2.4.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="4"
6
7 inherit eutils
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 unicode"
23
24 RDEPEND=">=sys-libs/ncurses-5.9-r1[unicode?]
25         magic? ( sys-apps/file )
26         nls? ( virtual/libintl )
27         !ncurses? ( slang? ( sys-libs/slang ) )"
28 DEPEND="${RDEPEND}
29         nls? ( sys-devel/gettext )
30         virtual/pkgconfig"
31
32 src_prepare() {
33         if [[ ${PV} == "9999" ]] ; then
34                 eautoreconf
35         fi
36         epatch_user
37 }
38
39 src_configure() {
40         eval export ac_cv_{header_magic_h,lib_magic_magic_open}=$(usex magic)
41         local myconf=()
42         case ${CHOST} in
43         *-gnu*|*-uclibc*) myconf+=( "--with-wordbounds" ) ;; #467848
44         esac
45         econf \
46                 --bindir="${EPREFIX}"/bin \
47                 --htmldir=/trash \
48                 $(use_enable !minimal color) \
49                 $(use_enable !minimal multibuffer) \
50                 $(use_enable !minimal nanorc) \
51                 --disable-wrapping-as-root \
52                 $(use_enable spell speller) \
53                 $(use_enable justify) \
54                 $(use_enable debug) \
55                 $(use_enable nls) \
56                 $(use_enable unicode utf8) \
57                 $(use_enable minimal tiny) \
58                 $(usex ncurses --without-slang $(use_with slang)) \
59                 "${myconf[@]}"
60 }
61
62 src_install() {
63         default
64         rm -rf "${D}"/trash
65
66         dodoc doc/nanorc.sample
67         dohtml doc/faq.html
68         insinto /etc
69         newins doc/nanorc.sample nanorc
70         if ! use minimal ; then
71                 # Enable colorization by default.
72                 sed -i \
73                         -e '/^# include /s:# *::' \
74                         "${ED}"/etc/nanorc || die
75         fi
76
77         dodir /usr/bin
78         dosym /bin/nano /usr/bin/nano
79 }