--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Exuberant Ctags creates tags files for code browsing in editors"
+HOMEPAGE="http://ctags.sourceforge.net"
+SRC_URI="
+ mirror://sourceforge/${PN}/${P}.tar.gz
+ ada? ( mirror://sourceforge/gnuada/ctags-ada-mode-4.3.11.tar.bz2 )
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="ada"
+
+RDEPEND="app-eselect/eselect-ctags"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.6-ebuilds.patch"
+ # Upstream fix for python variables starting with def
+ "${FILESDIR}/${P}-python-vars-starting-with-def.patch"
+ # Bug #273697
+ "${FILESDIR}/${P}-f95-pointers.patch"
+)
+
+HTML_DOCS=( EXTENDING.html ctags.html )
+
+DOCS=( FAQ NEWS README )
+
+src_prepare() {
+ default
+
+ # enabling Ada support
+ if use ada ; then
+ cp "${WORKDIR}/${PN}-ada-mode-4.3.11/ada.c" "${S}" || die
+ epatch "${FILESDIR}/${P}-ada.patch"
+ fi
+}
+
+src_configure() {
+ econf \
+ --with-posix-regex \
+ --without-readlib \
+ --disable-etags \
+ --enable-tmpdir="${EPREFIX}"/tmp
+}
+
+src_install() {
+ emake prefix="${ED}"/usr mandir="${ED}"/usr/share/man install
+
+ # namepace collision with X/Emacs-provided /usr/bin/ctags -- we
+ # rename ctags to exuberant-ctags (Mandrake does this also).
+ mv "${ED}"/usr/bin/{ctags,exuberant-ctags} || die
+ mv "${ED}"/usr/share/man/man1/{ctags,exuberant-ctags}.1 || die
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ eselect ctags update
+ elog "You can set the version to be started by /usr/bin/ctags through"
+ elog "the ctags eselect module. \"man ctags.eselect\" for details."
+}
+
+pkg_postrm() {
+ eselect ctags update
+}
Add options to control libxml2, jansson, and libyaml automagic deps.
---- ctags-20161028/configure.ac
-+++ ctags-20161028/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -585,30 +585,48 @@
AC_CHECK_FUNCS(fork waitpid execv pipe,[enable_xcmd=yes],[enable_xcmd=no])
AM_CONDITIONAL([ENABLE_XCMD], [test "xyes" = "x$enable_xcmd"])
diff -ur ctags-5.6/sh.c ctags-5.6-ebuild/sh.c
---- ctags-5.6/sh.c 2006-05-30 00:37:13.000000000 -0400
-+++ ctags-5.6-ebuild/sh.c 2006-10-07 17:37:31.000000000 -0400
+--- a/sh.c 2006-05-30 00:37:13.000000000 -0400
++++ b/sh.c 2006-10-07 17:37:31.000000000 -0400
@@ -7,7 +7,8 @@
* GNU General Public License.
*
---- parsers-orig.h 2009-11-16 23:39:49.747328066 +0200
-+++ parsers.h 2009-11-16 23:40:26.541581805 +0200
+--- a/parsers.h 2009-11-16 23:39:49.747328066 +0200
++++ b/parsers.h 2009-11-16 23:40:26.541581805 +0200
@@ -16,6 +16,7 @@
/* Add the name of any new parser definition function here */
---- fortran-orig.c 2009-11-16 23:38:06.154328652 +0200
-+++ fortran.c 2009-11-16 23:38:08.711335501 +0200
+--- a/fortran.c 2009-11-16 23:38:06.154328652 +0200
++++ b/fortran.c 2009-11-16 23:38:08.711335501 +0200
@@ -1319,7 +1319,8 @@
readToken (token);
skipPast (token, TOKEN_OPERATOR);