Merge remote-tracking branch 'github/pr/322'.
[gentoo.git] / dev-util / ctags / ctags-5.8_p20140919.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 autotools vcs-snapshot
8
9 DESCRIPTION="Exuberant Ctags creates tags files for code browsing in editors"
10 HOMEPAGE="http://ctags.sourceforge.net"
11 # this commit is from the sourceforge branch, which is a git-svn clone of the
12 # original exhuberant-ctags SVN repository
13 SRC_URI="https://github.com/universal-ctags/ctags/archive/9fce9dd0afd3dd261c681825a61d3e9ffcaa7eea.tar.gz -> ${P}.tar.gz
14         ada? ( mirror://sourceforge/gnuada/ctags-ada-mode-4.3.11.tar.bz2 )"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
19 IUSE="ada"
20
21 RDEPEND="app-eselect/eselect-ctags"
22
23 src_prepare() {
24         epatch "${FILESDIR}/${PN}-5.6-ebuilds.patch"
25
26         # Bug #273697
27         epatch "${FILESDIR}/${PN}-5.8-f95-pointers.patch"
28
29         # enabling Ada support
30         if use ada ; then
31                 cp "${WORKDIR}/${PN}-ada-mode-4.3.11/ada.c" "${S}" || die
32                 epatch "${FILESDIR}/${PN}-5.8-ada.patch"
33         fi
34
35         eautoreconf
36 }
37
38 src_configure() {
39         econf \
40                 --with-posix-regex \
41                 --without-readlib \
42                 --disable-etags \
43                 --enable-tmpdir=/tmp
44 }
45
46 src_install() {
47         emake prefix="${D}"/usr mandir="${D}"/usr/share/man install
48
49         # namepace collision with X/Emacs-provided /usr/bin/ctags -- we
50         # rename ctags to exuberant-ctags (Mandrake does this also).
51         mv "${D}"/usr/bin/{ctags,exuberant-ctags} || die
52         mv "${D}"/usr/share/man/man1/{ctags,exuberant-ctags}.1 || die
53
54         dodoc FAQ NEWS README EXTENDING.html
55 }
56
57 pkg_postinst() {
58         eselect ctags update
59         elog "You can set the version to be started by /usr/bin/ctags through"
60         elog "the ctags eselect module. \"man ctags.eselect\" for details."
61 }
62
63 pkg_postrm() {
64         eselect ctags update
65 }