diff options
Diffstat (limited to 'dev-util/cscope')
-rw-r--r-- | dev-util/cscope/Manifest | 1 | ||||
-rw-r--r-- | dev-util/cscope/cscope-15.8a.ebuild | 63 | ||||
-rw-r--r-- | dev-util/cscope/files/50cscope-gentoo.el | 34 | ||||
-rw-r--r-- | dev-util/cscope/files/cscope-15.7a-ocs-sysdir.patch | 23 | ||||
-rw-r--r-- | dev-util/cscope/metadata.xml | 30 |
5 files changed, 151 insertions, 0 deletions
diff --git a/dev-util/cscope/Manifest b/dev-util/cscope/Manifest new file mode 100644 index 000000000000..ab6ae8f7db2f --- /dev/null +++ b/dev-util/cscope/Manifest @@ -0,0 +1 @@ +DIST cscope-15.8a.tar.gz 601232 SHA256 eb736ac40d5abebe8fa46820c7a8eccc8a17966a9a5f70375367b77177874d1e SHA512 bedba69820eca86420f6c975d1f267de67a457b182a3fe49720a2ae5ea48759c5b5b8db06ed5ffd85173ddf4a0f12ca722e87200dea4a2da7d43c8c711b00318 WHIRLPOOL e71554c813dc7d33de2ed20350f454485c9ca5bd69de45ca05f19a9376d03dffb59503b0e6229927985a0f61312d968d64675ea3dd2a988f8582e0d404c46c02 diff --git a/dev-util/cscope/cscope-15.8a.ebuild b/dev-util/cscope/cscope-15.8a.ebuild new file mode 100644 index 000000000000..8db9728cdede --- /dev/null +++ b/dev-util/cscope/cscope-15.8a.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools elisp-common eutils toolchain-funcs + +DESCRIPTION="Interactively examine a C program" +HOMEPAGE="http://cscope.sourceforge.net/" +SRC_URI="mirror://sourceforge/cscope/${P}.tar.gz" + +LICENSE="BSD GPL-2+" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="emacs" + +RDEPEND=">=sys-libs/ncurses-5.2 + emacs? ( virtual/emacs )" +DEPEND="${RDEPEND} + sys-devel/flex + virtual/pkgconfig + virtual/yacc" + +SITEFILE="50${PN}-gentoo.el" + +src_prepare() { + epatch "${FILESDIR}/${PN}-15.7a-ocs-sysdir.patch" #269305 + eautoreconf # prevent maintainer mode later on +} + +src_compile() { + emake CURSES_LIBS="$("$(tc-getPKG_CONFIG)" --libs ncurses)" + if use emacs; then + cd "${S}"/contrib/xcscope || die + elisp-compile *.el + fi +} + +src_install() { + default + + if use emacs; then + cd "${S}"/contrib/xcscope || die + elisp-install ${PN} *.el *.elc + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + dobin cscope-indexer + fi + + cd "${S}"/contrib/webcscope || die + docinto webcscope + dodoc INSTALL TODO cgi-lib.pl cscope hilite.c + docinto webcscope/icons + dodoc icons/*.gif +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-util/cscope/files/50cscope-gentoo.el b/dev-util/cscope/files/50cscope-gentoo.el new file mode 100644 index 000000000000..08fd4b449352 --- /dev/null +++ b/dev-util/cscope/files/50cscope-gentoo.el @@ -0,0 +1,34 @@ +(add-to-list 'load-path "@SITELISP@") + +(autoload 'cscope-minor-mode "xcscope") +(autoload 'cscope-display-buffer "xcscope" + "Display the *cscope* buffer." t) +(autoload 'cscope-display-buffer-toggle "xcscope" + "Toggle cscope-display-cscope-buffer, which corresponds to +\"Auto display *cscope* buffer\"." t) +(autoload 'cscope-next-symbol "xcscope" + "Move to the next symbol in the *cscope* buffer." t) +(autoload 'cscope-next-file "xcscope" + "Move to the next file in the *cscope* buffer." t) +(autoload 'cscope-prev-symbol "xcscope" + "Move to the previous symbol in the *cscope* buffer." t) +(autoload 'cscope-prev-file "xcscope" + "Move to the previous file in the *cscope* buffer." t) +(autoload 'cscope-pop-mark "xcscope" + "Pop back to where cscope was last invoked." t) +(autoload 'cscope-set-initial-directory "xcscope" + "Set the cscope-initial-directory variable." t) +(autoload 'cscope-unset-initial-directory "xcscope" + "Unset the cscope-initial-directory variable." t) +(autoload 'cscope-find-this-symbol "xcscope" + "Locate a symbol in source code." t) +(autoload 'cscope-find-global-definition "xcscope" + "Find a symbol's global definition." t) +(autoload 'cscope-find-global-definition-no-prompting "xcscope" + "Find a symbol's global definition without prompting." t) + +(defun cscope:hook () + (cscope-minor-mode)) +(add-hook 'c-mode-hook 'cscope:hook) +(add-hook 'c++-mode-hook 'cscope:hook) +(add-hook 'dired-mode-hook 'cscope:hook) diff --git a/dev-util/cscope/files/cscope-15.7a-ocs-sysdir.patch b/dev-util/cscope/files/cscope-15.7a-ocs-sysdir.patch new file mode 100644 index 000000000000..6b4c17fe9145 --- /dev/null +++ b/dev-util/cscope/files/cscope-15.7a-ocs-sysdir.patch @@ -0,0 +1,23 @@ +http://bugs.gentoo.org/269305 + +--- cscope-15.7a-orig/contrib/ocs 2004-06-21 20:13:22.000000000 +0200 ++++ cscope-15.7a/contrib/ocs 2009-05-11 22:33:51.000000000 +0200 +@@ -75,17 +75,10 @@ + + #set the default value for SYSDIR + if [ -z "${SYSDIR}" ]; then +- SYSDIR=/usr/local/lib/cs ++ SYSDIR=/var/lib/cs + echo setting default sysdir + fi + +-#check that SYSDIR exists +-if [ ! -d ${SYSDIR} ]; then +- echo -n $SYSDIR does not exist. +- echo Please create the directory and set SYSDIR appropriately +- exit +-fi +- + # Check that cscope is in PATH + type cscope 1>/dev/null 2>&1 + diff --git a/dev-util/cscope/metadata.xml b/dev-util/cscope/metadata.xml new file mode 100644 index 000000000000..434721ed1a1c --- /dev/null +++ b/dev-util/cscope/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>vim</herd> + <herd>emacs</herd> + <longdescription> +Cscope is a developer's tool for browsing source code. Cscope allows +searching code for: + + * cross referenced symbols + * global definitions + * callees and callers + * text strings and regular expression patterns + * files and files including a file + +Other features: + + * curses based (text screen) + * fast searches + * fuzzy parser supports C and is flexible enough to be useful for + C++, Java and other documents + * command line mode for inclusion in scripts or as a backend to GUIs + +Cscope is distributed with xcscope which provides tight integration +with GNU Emacs. +</longdescription> + <upstream> + <remote-id type="sourceforge">cscope</remote-id> + </upstream> +</pkgmetadata> |