1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools db-use flag-o-matic
10 HOMEPAGE="https://sites.google.com/a/bostic.com/keithbostic/vi"
11 SRC_URI="http://garage.linux.student.kuleuven.be/~skimo/nvi/devel/${P}.tar.bz2"
15 KEYWORDS="~alpha amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
16 IUSE="perl tcl unicode"
18 CDEPEND=">=sys-libs/db-4.2.52_p5:=
19 >=sys-libs/ncurses-5.6-r2:=
20 perl? ( dev-lang/perl )
21 tcl? ( >=dev-lang/tcl-8.5:0= )"
27 app-eselect/eselect-vi"
29 REQUIRED_USE="tcl? ( !unicode )"
32 "${FILESDIR}"/${P}-strlen-macro-renaming.patch
33 "${FILESDIR}"/${P}-db44.patch
34 "${FILESDIR}"/${P}-db.patch
35 "${FILESDIR}"/${P}-perl-as-needed.patch
36 "${FILESDIR}"/${P}-perl-shortnames.patch
37 "${FILESDIR}"/${P}-ac_config_header.patch
38 "${FILESDIR}"/${P}-use_pkgconfig_for_ncurses.patch
39 "${FILESDIR}"/${P}-printf-types.patch
46 chmod +x findconfig || die
48 mv configure.{in,ac} || die
49 sed -i -e "s@-ldb@-l$(db_libname)@" configure.ac || die
50 sed -i -e "s@^install-\(.*\)-local:@install-\1-hook:@" Makefile.am || die
57 use perl && myconf="${myconf} --enable-perlinterp"
58 use unicode && myconf="${myconf} --enable-widechar"
59 use tcl && myconf="${myconf} --enable-tclinterp"
61 append-cppflags "-D_PATH_MSGCAT=\"\\\"${EPREFIX%/}/usr/share/vi/catalog/\\\"\""
62 append-cppflags -I"$(db_includedir)"
64 pushd dist 2>/dev/null || die
68 popd 2>/dev/null || die
76 emake -C dist DESTDIR="${D}" install
80 einfo "Setting /usr/bin/vi symlink"
81 eselect vi update --if-unset
85 einfo "Updating /usr/bin/vi symlink"
86 eselect vi update --if-unset