Accepting request 173600 from home:AndreasSchwab:ff

OBS-URL: https://build.opensuse.org/request/show/173600
OBS-URL: https://build.opensuse.org/package/show/devel:tools/ctags?expand=0&rev=20
This commit is contained in:
Dr. Werner Fink 2013-04-28 14:50:03 +00:00 committed by Git OBS Bridge
parent 702291d638
commit 0f11af4a14
7 changed files with 36 additions and 192 deletions

View File

@ -1,16 +0,0 @@
Ctags and etags
===============
Unfortunately there exists several good ctags and etags implementations.
They have different supported languages and different options and
features. The several versions are:
ctags ctags from Darren Hiebert, supports e.g. Eiffel
ctags -e etags from Darren Hiebert, supports e.g. Eiffel
gnuctags ctags from Emacs sources, supports e.g. Lisp
etags etags from Emacs sources, supports e.g. Lisp
The version of Darren Hiebert is also called the Exuberant Ctags.
Your SuSE team

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Apr 27 10:12:43 UTC 2013 - schwab@linux-m68k.org
- Remove etags and gnuctags, provided by etags package now
- Install ctags as ctags-exuberant and provide ctags via
update-alternatives
-------------------------------------------------------------------
Fri Mar 22 08:46:26 UTC 2013 - mmeister@suse.com

View File

@ -17,77 +17,63 @@
Name: ctags
%define ctags_ver 5.8
%define etags_ver 17.38.1.4
# Let the date means last update of either ctags or etags tarball
Version: 2011.8.2
Version: 5.8
Release: 0
Summary: A Program to Generate Tag Files for Use with vi and Other Editors
License: GPL-2.0+
Group: Development/Tools/Navigators
Url: http://ctags.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{ctags_ver}/%{name}-%{ctags_ver}.tar.gz
Source1: etags-%{etags_ver}.tar.gz
Source2: README.SuSE
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
Patch1: ctags-5.7.diff
# No resources to make this patch work with ctags-5.8 (applied to ctags-5.7)
# Anyone is welcome to make it work again.
Source3: ctags-ycp-parser.diff
Source2: ctags-ycp-parser.diff
Patch3: ctags-date-time.patch
Patch4: etags-%{etags_ver}.diff
Patch5: etags-strcpy-overlap.patch
Patch6: go-tags.patch
Patch4: go-tags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: update-alternatives
PreReq: update-alternatives
%description
CTags (from Darren Hiebert) generates tag files from source code in C,
C++, Eiffel, Fortran, and Java to be used with vi and its derivatives,
Emacs, and several other editors.
ETags (from GNU Emacs sources) generates tag files from source code in
Pascal, Cobol, Ada, Perl, LaTeX, Scheme, Emacs Lisp/Common Lisp,
Postscript, Erlang, Python, Prolog, and most assembler-like syntaxes.
%prep
%setup -q -n ctags-%{ctags_ver} -b 1
%setup -q
%patch1
%patch6 -p1
#%#patch2
%patch3 -p1
cd ../etags-%{etags_ver}
%patch4
%patch5 -p1
%patch4 -p1
%build
CC=gcc
CFLAGS="%{optflags} -Wall"
export CFLAGS CC
./configure --prefix=/usr --mandir=%{_mandir} --disable-etags
./configure CFLAGS="%{optflags} -Wall" \
--prefix=/usr --mandir=%{_mandir} --disable-etags
make %{?_smp_mflags}
cd ../etags-%{etags_ver}
CFLAGS="$CFLAGS -DSTDC_HEADERS -DHAVE_UNISTD_H -DHAVE_GETCWD"
$CC $CFLAGS -o etags etags.c
$CC $CFLAGS -DCTAGS -o gnuctags etags.c
%install
make install prefix=%{buildroot}/usr mandir=%{buildroot}%{_mandir}
mkdir -p %{buildroot}%{_docdir}/ctags/Exuberant_Ctags
install -m 644 COPYING EXTENDING.html FAQ README %{buildroot}%{_docdir}/ctags/Exuberant_Ctags
install -m 644 %{SOURCE2} %{buildroot}%{_docdir}/ctags
cd ../etags-%{etags_ver}
install -m 755 etags gnuctags %{buildroot}%{_prefix}/bin
install -m 644 etags.1 %{buildroot}%{_mandir}/man1
ln -sf etags.1.gz %{buildroot}%{_mandir}/man1/gnuctags.1.gz
install -m 644 ETAGS.README %{buildroot}%{_docdir}/ctags
mv %{buildroot}%{_bindir}/ctags{,-exuberant}
mv %{buildroot}%{_mandir}/man1/ctags{,-exuberant}.1
touch %{buildroot}%{_bindir}/ctags %{buildroot}%{_mandir}/man1/ctags.1.gz
%post
test -L %{_bindir}/ctags || rm -f %{_bindir}/ctags
update-alternatives --install %{_bindir}/ctags ctags %{_bindir}/ctags-exuberant 20 \
--slave %{_mandir}/man1/ctags.1.gz ctags.1 %{_mandir}/man1/ctags-exuberant.1.gz
update-alternatives --auto ctags
%preun
if [ $1 -eq 0 ]; then
update-alternatives --remove ctags %{_bindir}/ctags-exuberant
fi
%files
%defattr(-,root,root)
%{_bindir}/ctags
%{_bindir}/gnuctags
%{_bindir}/etags
%{_mandir}/man1/ctags.1.gz
%{_mandir}/man1/gnuctags.1.gz
%{_mandir}/man1/etags.1.gz
%{_docdir}/ctags
%doc COPYING EXTENDING.html FAQ README
%{_bindir}/ctags-exuberant
%{_mandir}/man1/ctags-exuberant.1.gz
%ghost %attr(755,root,root) %{_bindir}/ctags
%ghost %{_mandir}/man1/ctags.1.gz
%changelog

View File

@ -1,95 +0,0 @@
--- etags.1
+++ etags.1
@@ -9,7 +9,7 @@
..
.SH NAME
-etags, ctags \- generate tag file for Emacs, vi
+etags, gnuctags \- generate tag file for Emacs, vi
.SH SYNOPSIS
.hy 0
.na
@@ -26,7 +26,7 @@ etags, ctags \- generate tag file for Em
[\|\-\-help\|] [\|\-\-version\|]
\fIfile\fP .\|.\|.
-\fBctags\fP [\|\-aCdgIRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
+\fBgnuctags\fP [\|\-aCdgIRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
.if n .br
[\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|]
[\|\-\-parse\-stdin=\fIfile\fP\|]
@@ -45,7 +45,7 @@ etags, ctags \- generate tag file for Em
The \|\fBetags\fP\| program is used to create a tag table file, in a format
understood by
.BR emacs ( 1 )\c
-\&; the \|\fBctags\fP\| program is used to create a similar table in a
+\&; the \|\fBgnuctags\fP\| program is used to create a similar table in a
format understood by
.BR vi ( 1 )\c
\&. Both forms of the program understand
@@ -55,7 +55,7 @@ Python, Prolog, Scheme and
most assembler\-like syntaxes.
Both forms read the files specified on the command line, and write a tag
table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for
-\fBctags\fP) in the current working directory.
+\fBgnuctags\fP) in the current working directory.
Files specified with relative file names will be recorded in the tag
table with file names relative to the directory where the tag table
resides. If the tag table is in /dev or is the standard output,
@@ -70,7 +70,7 @@ parsing of the file names following the
language, overriding guesses based on filename extensions.
.SH OPTIONS
Some options make sense only for the \fBvi\fP style tag files produced
-by ctags;
+by gnuctags;
\fBetags\fP does not recognize them.
The programs accept unambiguous abbreviations for long option names.
.TP
@@ -84,7 +84,7 @@ expression search instructions; the \fB\
the delimiter `\|\fB?\fP\|', to search \fIbackwards\fP through files.
The default is to use the delimiter `\|\fB/\fP\|', to search \fIforwards\fP
through files.
-Only \fBctags\fP accepts this option.
+Only \fBgnuctags\fP accepts this option.
.TP
.B \-\-declarations
In C and derived languages, create tags for function declarations,
@@ -154,7 +154,7 @@ the previous ones. The regexps are of o
where \fItagregexp\fP is used to match the tag. It should not match
useless characters. If the match is such that more characters than
needed are unavoidably matched by \fItagregexp\fP, it may be useful to
-add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP
+add a \fInameregexp\fP, to narrow down the tag scope. \fBgnuctags\fP
ignores regexps without a \fInameregexp\fP. The syntax of regexps is
the same as in emacs. The following character escape sequences are
supported: \\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which
@@ -233,15 +233,15 @@ tag entries for other files in place. C
by deleting the existing entries for the given files and then
rewriting the new entries at the end of the tags file. It is often
faster to simply rebuild the entire tag file than to use this.
-Only \fBctags\fP accepts this option.
+Only \fBgnuctags\fP accepts this option.
.TP
.B \-v, \-\-vgrind
Instead of generating a tag file, write index (in \fBvgrind\fP format)
-to standard output. Only \fBctags\fP accepts this option.
+to standard output. Only \fBgnuctags\fP accepts this option.
.TP
.B \-x, \-\-cxref
Instead of generating a tag file, write a cross reference (in
-\fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option.
+\fBcxref\fP format) to standard output. Only \fBgnuctags\fP accepts this option.
.TP
.B \-h, \-H, \-\-help
Print usage information. Followed by one or more \-\-language=LANG
@@ -255,8 +255,10 @@ emacs \fBetags\fP is shipped with).
`\|\fBemacs\fP\|' entry in \fBinfo\fP; \fIGNU Emacs Manual\fP, Richard
Stallman.
.br
+.BR ctags ( 1 ),
.BR cxref ( 1 ),
.BR emacs ( 1 ),
+.BR gnuctags ( 1 ),
.BR vgrind ( 1 ),
.BR vi ( 1 ).

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0ee3a650bdd26ff5784aa2cfa3aa7c8362bf3729ac9c7fd366ccd54f67557435
size 56409

View File

@ -1,34 +0,0 @@
Index: etags-17.38.1.4/etags.c
===================================================================
--- etags-17.38.1.4.orig/etags.c
+++ etags-17.38.1.4/etags.c
@@ -907,6 +907,13 @@ print_version ()
exit (EXIT_SUCCESS);
}
+static void etags_strcpy(char *to, char *from)
+{
+ while (*from)
+ *to++ = *from++;
+ *to = *from;
+}
+
#ifndef PRINT_UNDOCUMENTED_OPTIONS_HELP
# define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE
#endif
@@ -6695,13 +6702,13 @@ absolute_filename (file, dir)
else if (cp[0] != '/')
cp = slashp;
#endif
- strcpy (cp, slashp + 3);
+ etags_strcpy (cp, slashp + 3);
slashp = cp;
continue;
}
else if (slashp[2] == '/' || slashp[2] == '\0')
{
- strcpy (slashp, slashp + 2);
+ etags_strcpy (slashp, slashp + 2);
continue;
}
}

View File

@ -1 +0,0 @@
get_date_version_string `find_newest_file *.changes`