summaryrefslogtreecommitdiff
path: root/dev-util/cscope
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-util/cscope
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-util/cscope')
-rw-r--r--dev-util/cscope/Manifest1
-rw-r--r--dev-util/cscope/cscope-15.9-r1.ebuild70
-rw-r--r--dev-util/cscope/cscope-15.9.ebuild69
-rw-r--r--dev-util/cscope/files/50cscope-gentoo.el34
-rw-r--r--dev-util/cscope/files/cscope-15.7a-ocs-sysdir.patch23
-rw-r--r--dev-util/cscope/files/cscope-15.9-emacs-27.patch28
-rw-r--r--dev-util/cscope/files/cscope-15.9-pkgconfig.patch28
-rw-r--r--dev-util/cscope/metadata.xml37
8 files changed, 290 insertions, 0 deletions
diff --git a/dev-util/cscope/Manifest b/dev-util/cscope/Manifest
new file mode 100644
index 000000000000..2cfad02c76a3
--- /dev/null
+++ b/dev-util/cscope/Manifest
@@ -0,0 +1 @@
+DIST cscope-15.9.tar.gz 613948 BLAKE2B 66c0c85d0db810e8cd5a286925eeb1026fa4a9e9c3a5a9decd1412188fca43f831949c231acca428b5eeb476662b7ce9f81defcda81759c18027655535b855be SHA512 f3b95da5eb5c036cd39215785990c7cce7ce7b8eda4b18e60792e70d01ffb63809ce32ace310a9aefd88e6761c1609039ccfab0e8e49f81730bc1630babbcb80
diff --git a/dev-util/cscope/cscope-15.9-r1.ebuild b/dev-util/cscope/cscope-15.9-r1.ebuild
new file mode 100644
index 000000000000..1b3ed1849502
--- /dev/null
+++ b/dev-util/cscope/cscope-15.9-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools elisp-common toolchain-funcs
+
+DESCRIPTION="Interactively examine a C program"
+HOMEPAGE="https://cscope.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/cscope/${P}.tar.gz"
+
+LICENSE="BSD GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
+IUSE="emacs"
+
+RDEPEND=">=sys-libs/ncurses-5.2:0=
+ emacs? ( >=app-editors/emacs-23.1:* )"
+DEPEND="${RDEPEND}"
+BDEPEND="app-alternatives/lex
+ virtual/pkgconfig
+ app-alternatives/yacc"
+
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-15.7a-ocs-sysdir.patch" #269305
+ eapply "${FILESDIR}/${PN}-15.9-pkgconfig.patch"
+ eapply "${FILESDIR}/${PN}-15.9-emacs-27.patch"
+ eapply_user
+ mv configure.{in,ac} || die
+ eautoreconf # prevent maintainer mode later on
+}
+
+src_configure() {
+ econf --with-ncurses="${EPREFIX}"/usr
+}
+
+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/cscope-15.9.ebuild b/dev-util/cscope/cscope-15.9.ebuild
new file mode 100644
index 000000000000..d4a4e7b86fb3
--- /dev/null
+++ b/dev-util/cscope/cscope-15.9.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools elisp-common toolchain-funcs
+
+DESCRIPTION="Interactively examine a C program"
+HOMEPAGE="http://cscope.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/cscope/${P}.tar.gz"
+
+LICENSE="BSD GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
+IUSE="emacs"
+
+RDEPEND=">=sys-libs/ncurses-5.2:0=
+ emacs? ( >=app-editors/emacs-23.1:* )"
+DEPEND="${RDEPEND}"
+BDEPEND="app-alternatives/lex
+ virtual/pkgconfig
+ app-alternatives/yacc"
+
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-15.7a-ocs-sysdir.patch" #269305
+ eapply "${FILESDIR}/${PN}-15.9-pkgconfig.patch"
+ eapply_user
+ mv configure.{in,ac} || die
+ eautoreconf # prevent maintainer mode later on
+}
+
+src_configure() {
+ econf --with-ncurses="${EPREFIX}"/usr
+}
+
+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/files/cscope-15.9-emacs-27.patch b/dev-util/cscope/files/cscope-15.9-emacs-27.patch
new file mode 100644
index 000000000000..48cd7150176d
--- /dev/null
+++ b/dev-util/cscope/files/cscope-15.9-emacs-27.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/892071
+
+commit eaea31cb93ecddda69a373f83f632e1a450c3c90
+Author: Brock Zheng Techyauld Ltd <yzheng@techyauld.com>
+Date: Tue Aug 25 20:28:11 2020 +0800
+
+ emacs plugin fixup: GNU/Emacs 27.1 removes function process-kill-without-query
+
+--- a/contrib/xcscope/xcscope.el
++++ b/contrib/xcscope/xcscope.el
+@@ -2006,7 +2006,7 @@
+ (set-process-filter cscope-process cscope-filter-func)
+ (set-process-sentinel cscope-process cscope-sentinel-func)
+ (set-marker (process-mark cscope-process) (point))
+- (process-kill-without-query cscope-process)
++ (set-process-query-on-exit-flag cscope-process nil)
+ (if cscope-running-in-xemacs
+ (setq modeline-process ": Searching ..."))
+ (setq buffer-read-only t)
+@@ -2139,7 +2139,7 @@
+ cscope-indexing-script args))
+ (set-process-sentinel cscope-unix-index-process
+ 'cscope-unix-index-files-sentinel)
+- (process-kill-without-query cscope-unix-index-process)
++ (set-process-query-on-exit-flag cscope-unix-index-process nil)
+ )
+ ))
+
diff --git a/dev-util/cscope/files/cscope-15.9-pkgconfig.patch b/dev-util/cscope/files/cscope-15.9-pkgconfig.patch
new file mode 100644
index 000000000000..c031633a6559
--- /dev/null
+++ b/dev-util/cscope/files/cscope-15.9-pkgconfig.patch
@@ -0,0 +1,28 @@
+--- a/configure.in
++++ b/configure.in
+@@ -18,6 +18,7 @@ if test "x$LEX" = "xlex" ; then AC_DEFINE(USING_LEX, 1,
+ [Define this if the scanner is run through lex, not flex])
+ fi
+ AC_PROG_YACC
++PKG_PROG_PKG_CONFIG
+
+ AC_SYS_LARGEFILE
+
+@@ -361,7 +362,7 @@ dnl Check for a GNOME installation
+ AC_DEFUN([AC_CHECK_GNOME],[
+ has_gnome=false
+ AC_CHECK_PROG(gnome1, gnome-config, true)
+- AC_CHECK_PROG(gnome2, pkg-config, true)
++ AC_CHECK_PROG(gnome2, $PKG_CONFIG, true)
+
+ if test x$gnome1 = xtrue; then
+ has_gnome=true
+@@ -371,7 +372,7 @@ AC_DEFUN([AC_CHECK_GNOME],[
+ has_gnome=true
+ fi
+
+- AM_CONDITIONAL(USING_GNOME2, pkg-config --exists gtk+-2.0)
++ AM_CONDITIONAL(USING_GNOME2, $PKG_CONFIG --exists gtk+-2.0)
+ AM_CONDITIONAL(HAS_GNOME, test "$has_gnome" = true)
+ AM_CONDITIONAL(GNOME_LINUX, test "$host_os" = Linux)
+ ])
diff --git a/dev-util/cscope/metadata.xml b/dev-util/cscope/metadata.xml
new file mode 100644
index 000000000000..86e2bea7c71e
--- /dev/null
+++ b/dev-util/cscope/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>vim@gentoo.org</email>
+ <name>Gentoo Vim Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>gnu-emacs@gentoo.org</email>
+ <name>Gentoo GNU Emacs project</name>
+ </maintainer>
+ <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="cpe">cpe:/a:cscope:cscope</remote-id>
+ </upstream>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>