c4aaf3
Summary: C source code tree search and browse tool
37d6e3
Name: cscope
37d6e3
Version: 15.9
aaf798
Release: 17%{?dist}
37d6e3
Source0: https://downloads.sourceforge.net/project/%{name}/%{name}/v%{version}/%{name}-%{version}.tar.gz
37d6e3
URL: http://cscope.sourceforge.net
37d6e3
License: BSD and GPLv2+
c4aaf3
BuildRequires: pkgconf-pkg-config ncurses-devel gcc flex bison m4
c4aaf3
BuildRequires: autoconf automake make
c4aaf3
Requires: emacs-filesystem coreutils ed
c4aaf3
%if !0%{?rhel} && 0%{?fedora} < 36
37d6e3
Requires: xemacs-filesystem
37d6e3
%endif
37d6e3
c4aaf3
# upstream commits from https://sourceforge.net/p/cscope/cscope/commit_browser
37d6e3
Patch1: cscope-1-modified-from-patch-81-Fix-reading-include-files-in-.patch
37d6e3
Patch2: cscope-2-Cull-extraneous-declaration.patch
37d6e3
Patch3: cscope-3-Avoid-putting-directories-found-during-header-search.patch
37d6e3
Patch4: cscope-4-Avoid-double-free-via-double-fclose-in-changestring.patch
37d6e3
Patch5: cscope-5-contrib-ocs-Fix-bashims-Closes-480591.patch
37d6e3
Patch6: cscope-6-doc-cscope.1-Fix-hyphens.patch
37d6e3
Patch7: cscope-7-fscanner-swallow-function-as-parameters.patch
37d6e3
Patch8: cscope-8-emacs-plugin-fixup-GNU-Emacs-27.1-removes-function-p.patch
aaf798
Patch9: cscope-9-fix-access-beyond-end-of-string.patch
aaf798
Patch10: cscope-a-docs-typo-fixes-in-man-page-and-comments.patch
aaf798
c4aaf3
# distrubution patches which were not upstreamed
aaf798
Patch11: dist-1-coverity-fixes.patch
aaf798
Patch12: dist-2-cscope-indexer-help.patch
aaf798
Patch13: dist-3-add-selftests.patch
aaf798
Patch14: dist-4-fix-printf.patch
37d6e3
37d6e3
%define cscope_share_path %{_datadir}/cscope
c4aaf3
%if !0%{?rhel} && 0%{?fedora} < 36
37d6e3
%define xemacs_lisp_path %{_datadir}/xemacs/site-packages/lisp
c4aaf3
%else
c4aaf3
%define xemacs_lisp_path %nil
c4aaf3
%endif
37d6e3
%define emacs_lisp_path %{_datadir}/emacs/site-lisp
37d6e3
%define vim_plugin_path %{_datadir}/vim/vimfiles/plugin
37d6e3
37d6e3
%description
c4aaf3
cscope is a mature, ncurses based, C source code tree browsing tool.  It
37d6e3
allows users to search large source code bases for variables, functions,
c4aaf3
macros, etc, as well as perform general regex and plain text searches.
c4aaf3
Results are returned in lists, from which the user can select individual
37d6e3
matches for use in file editing.
37d6e3
37d6e3
%prep
c4aaf3
%autosetup -p1
37d6e3
37d6e3
%build
c4aaf3
aclocal
c4aaf3
autoheader
c4aaf3
autoconf
c4aaf3
automake --add-missing
37d6e3
%configure
37d6e3
make
37d6e3
37d6e3
%install
37d6e3
rm -rf $RPM_BUILD_ROOT %{name}-%{version}.files
c4aaf3
make DESTDIR=$RPM_BUILD_ROOT install
37d6e3
mkdir -p $RPM_BUILD_ROOT/var/lib/cs
37d6e3
mkdir -p $RPM_BUILD_ROOT%{cscope_share_path}
37d6e3
cp -a contrib/xcscope/xcscope.el $RPM_BUILD_ROOT%{cscope_share_path}
37d6e3
install -m 755 contrib/xcscope/cscope-indexer $RPM_BUILD_ROOT%{_bindir}
37d6e3
cp -a contrib/cctree.vim $RPM_BUILD_ROOT%{cscope_share_path}
37d6e3
for dir in %{xemacs_lisp_path} %{emacs_lisp_path} ; do
37d6e3
  mkdir -p $RPM_BUILD_ROOT$dir
37d6e3
  ln -s %{cscope_share_path}/xcscope.el $RPM_BUILD_ROOT$dir
37d6e3
  touch $RPM_BUILD_ROOT$dir/xcscope.elc
37d6e3
  echo "%ghost $dir/xcscope.el*" >> %{name}-%{version}.files
37d6e3
done
37d6e3
c4aaf3
%check
c4aaf3
make check
37d6e3
37d6e3
%files -f %{name}-%{version}.files
37d6e3
%{_bindir}/*
37d6e3
%dir %{cscope_share_path}
37d6e3
%{cscope_share_path}/
37d6e3
%{_mandir}/man1/*
37d6e3
%dir /var/lib/cs
37d6e3
%doc AUTHORS COPYING ChangeLog README TODO contrib/cctree.txt
37d6e3
c4aaf3
%if !0%{?rhel} && 0%{?fedora} < 36
37d6e3
%triggerin -- xemacs
37d6e3
ln -sf %{cscope_share_path}/xcscope.el %{xemacs_lisp_path}/xcscope.el
37d6e3
%endif
37d6e3
37d6e3
%triggerin -- emacs, emacs-nox, emacs-lucid
37d6e3
ln -sf %{cscope_share_path}/xcscope.el %{emacs_lisp_path}/xcscope.el
37d6e3
37d6e3
%triggerin -- vim-filesystem
37d6e3
ln -sf %{cscope_share_path}/cctree.vim %{vim_plugin_path}/cctree.vim
37d6e3
c4aaf3
%if !0%{?rhel} && 0%{?fedora} < 36
37d6e3
%triggerun -- xemacs
37d6e3
[ $2 -gt 0 ] && exit 0
37d6e3
rm -f %{xemacs_lisp_path}/xcscope.el
37d6e3
%endif
37d6e3
37d6e3
%triggerun -- emacs, emacs-nox, emacs-lucid
37d6e3
[ $2 -gt 0 ] && exit 0
37d6e3
rm -f %{emacs_lisp_path}/xcscope.el
37d6e3
37d6e3
%triggerun -- vim-filesystem
37d6e3
[ $2 -gt 0 ] && exit 0
37d6e3
rm -f %{vim_plugin_path}/cctree.vim
37d6e3
37d6e3
%changelog
aaf798
* Thu Sep 29 2022 Vladis Dronov <vdronov@redhat.com> - 15.9-17
aaf798
- Update to the upstream git @ 7f2369ac (bz 2129890)
aaf798
aaf798
* Fri Apr 22 2022 Vladis Dronov <vdronov@redhat.com> - 15.9-15
c4aaf3
- Add another small distrubution patch (bz 2072635)
c4aaf3
c4aaf3
* Mon Apr 11 2022 Vladis Dronov <vdronov@redhat.com> - 15.9-14
c4aaf3
- Add distrubution patches which were not upstreamed (bz 2072635)
c4aaf3
- Add self-tests
c4aaf3
- Add OSCI harness
c4aaf3
37d6e3
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 15.9-12
37d6e3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
37d6e3
  Related: rhbz#1991688
37d6e3
37d6e3
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 15.9-11
37d6e3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
37d6e3
37d6e3
* Tue Mar 16 2021 Vladis Dronov <vdronov@redhat.com> - 15.9-10
37d6e3
- Bring in important patches from the upstream (39fb38..eaea31 in a git repo)
37d6e3
- Fix the upstream tarball URL
37d6e3
- Remove outdated patch files
37d6e3
37d6e3
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 15.9-9
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
37d6e3
37d6e3
* Wed Jul 29 2020 Neil Horman <nhorman@redhat.com> - 15.9-8
37d6e3
- Adding missing dependency on ed (bz 1861697)
37d6e3
37d6e3
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 15.9-7
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
37d6e3
37d6e3
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 15.9-6
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
37d6e3
37d6e3
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 15.9-5
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
37d6e3
37d6e3
* Thu Apr 11 2019 Neil Horman <nhorman@redhat.com> - 15.9-4
37d6e3
- Fixing double free (bz 1657210)
37d6e3
37d6e3
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 15.9-3
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
37d6e3
37d6e3
* Mon Dec 10 2018 Neil Horman <nhorman@redhat.com> - 15.9-2
37d6e3
- update Requires to include coreutils (bz 1657775)
37d6e3
37d6e3
* Tue Jul 24 2018 Neil Horman <nhorman@redhat.com> - 15.9-1
37d6e3
- update to latest upstream
37d6e3
37d6e3
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-9
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
37d6e3
37d6e3
* Thu Mar 01 2018 Josh Boyer <jwboyer@fedoraproject.org> - 15.8b-8
37d6e3
- Conditionalize xemacs
37d6e3
37d6e3
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-7
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
37d6e3
37d6e3
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-6
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
37d6e3
37d6e3
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-5
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
37d6e3
37d6e3
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-4
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
37d6e3
37d6e3
* Mon Nov 28 2016 Neil Horman <nhorman@redhat.com> - 15.8b-3
37d6e3
- Changed permissions on cscope-indexer (bz 1399108)
37d6e3
37d6e3
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 15.8b-2
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
37d6e3
37d6e3
* Wed Aug 05 2015 Neil Horman <nhorman@redhat.com> - 15.8b-1
37d6e3
- Update to latest upstream
37d6e3
c4aaf3
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-12
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
37d6e3
37d6e3
* Tue Sep 30 2014 Neil Horman <nhorman@redhat.com> - 15.8-11
37d6e3
- Added triggerin support for emacs-nox (bz 961709)
37d6e3
37d6e3
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-10
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
37d6e3
37d6e3
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-9
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
37d6e3
37d6e3
* Tue Apr 15 2014 Neil Horman <nhorman@redhat.com> - 15.8-8
37d6e3
- Fixed formatting issue with empty function array (bz 1087940)
37d6e3
37d6e3
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-7
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
37d6e3
37d6e3
* Mon Mar 25 2013 Neil Horman <nhorman@redhat.com> - 15.8-6
37d6e3
- Fixed build break
37d6e3
37d6e3
* Mon Mar 25 2013 Neil Horman <nhorman@redhat.com> - 15.8-5
37d6e3
- Updated to run autoreconf for impending aarch64 introduction (bz 925201)
37d6e3
37d6e3
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-4
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
37d6e3
37d6e3
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-3
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
37d6e3
37d6e3
* Tue Jul 10 2012 Neil Horman <nhorman@redhat.com> - 15.8-2
37d6e3
- Fix inverted index sizing
37d6e3
37d6e3
* Mon Jun 18 2012 Neil Horman <nhorman@redhat.com> - 15.8
37d6e3
- Update to latest upstream
37d6e3
37d6e3
* Mon Mar 12 2012 Neil Horman <nhorman@redhat.com> -15.7a-10
37d6e3
- Fixed a segfault in invlib construction ( bz 786523)
37d6e3
37d6e3
* Mon Mar 05 2012 Neil Horman <nhorman@redhat.com> 15.7a-9
37d6e3
- Fixed a segfault in the symbol assignment search (bz 799643)
37d6e3
37d6e3
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.7a-8
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
37d6e3
37d6e3
* Thu Jun 30 2011 Neil Horman <nhorman@redhat.com> - 15.7a-7
37d6e3
- Added LEXERR token to catch bad parsing before we crash (bz717545)
37d6e3
37d6e3
* Fri Jun 24 2011 Neil Horman <nhorman@redhat.com> - 15.7a-6
37d6e3
- Fixed licensing for xcscope.el (bz 715898)
37d6e3
- Fixed xemacs pkg. dependency (bz 719523)
37d6e3
37d6e3
* Wed Jun 01 2011 Neil Horman <nhorman@redhat.com> - 15.7a-5
37d6e3
- Fix scriptles macro expansion (bz 708499)
37d6e3
37d6e3
* Thu May 26 2011 Neil Horman <nhorman@redhat.com> - 15.7a-4
37d6e3
- Added cctree.vim vi plugin
37d6e3
37d6e3
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.7a-3
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
37d6e3
37d6e3
* Thu Sep 30 2010 Neil Horman 
37d6e3
- Ignore SIGPIPE in line mode (bz 638756)
37d6e3
37d6e3
* Mon Mar 1 2010 Neil Horman <nhorman@redhat.com> - 15.7a-1
37d6e3
- Update to latest upstream release (bz 569043)
37d6e3
37d6e3
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.6-5
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
37d6e3
c4aaf3
* Fri Jun 12 2009 Neil Horman <nhorman@redhat.com> - 15.6-4
37d6e3
- Fix some buffer overflows (bz 505605)
37d6e3
37d6e3
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.6-3
37d6e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
37d6e3
37d6e3
* Tue Jul 08 2008 Neil Horman <nhorman@redhat.com> -15.6-2.dist
37d6e3
- Grab upstream patch for -q rebuld (bz 436648)
37d6e3
37d6e3
* Tue Mar 27 2007 Neil Horman <nhorman@redhat.com> -15.6-1.dist
37d6e3
- Rebase to version 15.6
37d6e3
37d6e3
* Mon Mar 05 2007 Neil Horman <nhorman@redhat.com> -15.5-15.4.dist
37d6e3
- Make sigwinch handler only register for curses mode (bz 230862)
37d6e3
37d6e3
* Mon Feb 05 2007 Neil Horman <nhorman@redhat.com> -15.5-15.3.dist
37d6e3
- Fixing dist label in release tag.
37d6e3
37d6e3
* Thu Feb 01 2007 Neil Horman <nhorman@redhat.com> -15.5-15.2.dist
37d6e3
- Fixing changelog to not have macro in release
37d6e3
37d6e3
* Wed Aug 23 2006 Neil Horman <nhorman@redhat.com> -15.5-15.1
37d6e3
- fixed overflows per bz 203651
37d6e3
- start using {dist} tag to make release numbering easier
37d6e3
37d6e3
* Mon Jul 17 2006 Jesse Keating <jkeating@redhat.com> - 15.5-14
37d6e3
- rebuild
37d6e3
37d6e3
* Fri Jun 23 2006 Neil Horman <nhorman@redhat.com>
37d6e3
- Fix putstring overflow (bz 189666)
37d6e3
37d6e3
* Fri Jun 23 2006 Neil Horman <nhorman@redhat.com>
37d6e3
- Fix putstring overflow (bz 189666)
37d6e3
37d6e3
* Fri May 5  2006 Neil Horman <nhorman@redhat.com>
37d6e3
- Adding fix to put SYSDIR in right location (bz190580)
37d6e3
37d6e3
* Fri Apr 21 2006 Neil Horman <nhorman@redhat.com> - 15.5-13.4
37d6e3
- adding inverted index overflow patch
37d6e3
37d6e3
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 15.5-13.2
37d6e3
- bump again for double-long bug on ppc(64)
37d6e3
37d6e3
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 15.5-13.1
37d6e3
- rebuilt for new gcc4.1 snapshot and glibc changes
37d6e3
37d6e3
* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
37d6e3
- rebuild on new gcc
37d6e3
37d6e3
* Tue Nov 30 2004 Neil Horman <nhorman@redhat.com>
37d6e3
- added tempsec patch to fix bz140764/140765
37d6e3
37d6e3
* Mon Nov 29 2004 Neil Horman <nhorman@redhat.com>
37d6e3
- updated cscope resize patch to do less work in
37d6e3
  signal handler and synced version nr. on dist.
37d6e3
37d6e3
* Mon Nov 22 2004 Neil Horman <nhorman@redhat.com>
37d6e3
- added cscope-1.5.-resize patch to allow terminal
37d6e3
  resizing while cscope is running
37d6e3
37d6e3
* Tue Oct 5  2004 Neil Horman <nhorman@redhat.com>
37d6e3
- modified cscope-15.5.-inverted patch to be upstream
37d6e3
  friendly
37d6e3
37d6e3
* Tue Sep 28 2004 Neil Horman <nhorman@redhat.com>
37d6e3
- fixed inverted index bug (bz 133942)
c4aaf3
37d6e3
* Mon Sep 13 2004 Frank Ch. Eigler <fche@redhat.com>
37d6e3
- bumped release number to a plain "1"
37d6e3
37d6e3
* Fri Jul 16 2004 Neil Horman <nhorman@redhat.com>
37d6e3
- Added cscope-indexer helper and xcscope lisp addon
37d6e3
- Added man page for xcscope
37d6e3
- Added triggers to add xcscope.el pkg to (x)emacs
37d6e3
- Thanks to Ville, Michael and Jens for thier help :)
37d6e3
37d6e3
* Fri Jul 2 2004 Neil Horman <nhorman@redhat.com>
37d6e3
- Added upstream ocs fix
37d6e3
- Added feature to find symbol assignments
37d6e3
- Changed default SYSDIR directory to /var/lib/cs
c4aaf3
- Incoproated M. Schwendt's fix for ocs -s
37d6e3
37d6e3
* Fri Jun 18 2004 Neil Horman <nhorman@redhat.com>
37d6e3
- built the package