diff options
author | Ulrich Müller <ulm@gentoo.org> | 2023-01-27 07:52:26 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2023-01-27 07:52:26 +0100 |
commit | 5921ece59c359b0eeedb990008db786101bb3257 (patch) | |
tree | 5a472155af89ca3075a73136775204ded89c2b3b /dev-util | |
parent | net-firewall/ipset: Stabilize 7.17 arm64, #892177 (diff) | |
download | gentoo-5921ece59c359b0eeedb990008db786101bb3257.tar.gz gentoo-5921ece59c359b0eeedb990008db786101bb3257.tar.bz2 gentoo-5921ece59c359b0eeedb990008db786101bb3257.zip |
dev-util/cscope: Fix xcscope.el with >=emacs-27
Patch from upstream (with whitespace changes removed).
Closes: https://bugs.gentoo.org/892071
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/cscope/cscope-15.9-r1.ebuild | 70 | ||||
-rw-r--r-- | dev-util/cscope/files/cscope-15.9-emacs-27.patch | 28 |
2 files changed, 98 insertions, 0 deletions
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..f0ca12cf9cfc --- /dev/null +++ b/dev-util/cscope/cscope-15.9-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2023 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="mirror://sourceforge/cscope/${P}.tar.gz" + +LICENSE="BSD GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris" +IUSE="emacs" + +RDEPEND=">=sys-libs/ncurses-5.2:0= + emacs? ( >=app-editors/emacs-23.1:* )" +DEPEND="${RDEPEND}" +BDEPEND="sys-devel/flex + 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/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) + ) + )) + |