[packages/unifdef] up to 2.10
glen
glen at pld-linux.org
Sun Mar 23 17:30:48 CET 2014
commit ca9df283205853c233b780455e3324e57765bdc3
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Mar 23 18:30:33 2014 +0200
up to 2.10
unifdef-Makefile.am | 7 --
unifdef-codecleanup.diff | 206 -----------------------------------------------
unifdef-configure.ac | 25 ------
unifdef.spec | 28 +++----
4 files changed, 11 insertions(+), 255 deletions(-)
---
diff --git a/unifdef.spec b/unifdef.spec
index b00430d..4023ffa 100644
--- a/unifdef.spec
+++ b/unifdef.spec
@@ -1,18 +1,18 @@
Summary: Unifdef tool for removing ifdef'd lines
Summary(pl.UTF-8): Narzędzie unifdef do usuwania linii oznaczonych ifdef
Name: unifdef
-Version: 1.0
-Release: 0.1
+Version: 2.10
+Release: 1
License: BSD
Group: Development/Languages
-#Source0: http://www.cs.cmu.edu/~ajw/dist/%{name}-%{version}.tar.gz
-Source0: %{name}-%{version}.tar.gz
-# Source0-md5: 825240622f35c7b002f11ece1af4ba22
-Patch0: %{name}-codecleanup.diff
-Source1: %{name}-Makefile.am
-Source2: %{name}-configure.ac
+Source0: http://dotat.at/prog/unifdef/%{name}-%{version}.tar.xz
+# Source0-md5: bb5d895e5ebbba5c5cc0c2771cf97ebe
+URL: http://dotat.at/prog/unifdef/
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: pkgconfig
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -31,23 +31,15 @@ jest wewnątrz komentarza lub cudzysłowów.
%prep
%setup -q
-rm -f Makefile unifdef *.o
-cp %{SOURCE1} Makefile.am
-cp %{SOURCE2} configure.ac
-%patch0
%build
-%{__aclocal}
-%{__autoheader}
-%{__automake}
-%{__autoconf}
-%configure
%{__make} \
CFLAGS="%{rpmcflags}"
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
+ prefix=%{_prefix} \
DESTDIR=$RPM_BUILD_ROOT
%clean
@@ -56,4 +48,6 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/unifdef
+%attr(755,root,root) %{_bindir}/unifdefall
%{_mandir}/man1/unifdef.1*
+%{_mandir}/man1/unifdefall.1*
diff --git a/unifdef-Makefile.am b/unifdef-Makefile.am
deleted file mode 100644
index c84d9ff..0000000
--- a/unifdef-Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-AUTOMAKE_OPTIONS = foreign
-
-bin_PROGRAMS = unifdef
-unifdef_SOURCES = unifdef.c
-
-man_MANS = unifdef.1
-EXTRA_DIST = $(man_MANS) README LICENSE
diff --git a/unifdef-codecleanup.diff b/unifdef-codecleanup.diff
deleted file mode 100644
index b1133db..0000000
--- a/unifdef-codecleanup.diff
+++ /dev/null
@@ -1,206 +0,0 @@
---- unifdef.c
-+++ unifdef.c
-@@ -35,13 +35,13 @@
- */
-
- #ifndef lint
--static char copyright[] =
-+static char __attribute__((used)) copyright[] =
- "@(#) Copyright (c) 1985, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
- #endif /* not lint */
-
- #ifndef lint
--static char sccsid[] = "@(#)unifdef.c 8.1 (Berkeley) 6/6/93";
-+static char __attribute__((used)) sccsid[] = "@(#)unifdef.c 8.1 (Berkeley) 6/6/93";
- #endif /* not lint */
-
- /*
-@@ -59,6 +59,8 @@
-
- #include <stdio.h>
- #include <ctype.h>
-+#include <stdlib.h>
-+#include <string.h>
-
- #define BSS
- FILE *input;
-@@ -93,12 +95,20 @@
- char inquote BSS; /* inside single or double quotes */
-
- int exitstat BSS;
--char *skipcomment ();
--char *skipquote ();
-+char *skipcomment (char *cp);
-+char *skipquote (char *cp, int type);
-
--main (argc, argv)
--int argc;
--char **argv;
-+int findsym (char *str);
-+void prname (void);
-+int error (int err, int line, int depth);
-+int getlin (char *line, int maxline, FILE *inp, int expandtabs);
-+void flushline (Bool keep);
-+void pfile (void);
-+
-+
-+
-+
-+int main (int argc, char *argv[])
- {
- char **curarg;
- register char *cp;
-@@ -190,9 +200,11 @@
- #define LT_ELSE 5 /* #else */
- #define LT_ENDIF 6 /* #endif */
- #define LT_LEOF 7 /* end of file */
--extern Linetype checkline ();
-+Linetype checkline (int *cursym);
-
- typedef int Reject_level;
-+int doif (int thissym, int inif, Reject_level prevreject, int depth);
-+
- Reject_level reject BSS; /* 0 or 1: pass thru; 1 or 2: ignore comments */
- #define REJ_NO 0
- #define REJ_IGNORE 1
-@@ -224,7 +236,7 @@
- #define IN_IF 1
- #define IN_ELSE 2
-
--pfile ()
-+void pfile (void)
- {
- reject = REJ_NO;
- (void) doif (-1, IN_NONE, reject, 0);
-@@ -232,11 +244,10 @@
- }
-
- int
--doif (thissym, inif, prevreject, depth)
--register int thissym; /* index of the symbol who was last ifdef'ed */
--int inif; /* YES or NO we are inside an ifdef */
--Reject_level prevreject;/* previous value of reject */
--int depth; /* depth of ifdef's */
-+doif (int thissym, /* index of the symbol who was last ifdef'ed */
-+ int inif, /* YES or NO we are inside an ifdef */
-+ Reject_level prevreject, /* previous value of reject */
-+ int depth) /* depth of ifdef's */
- {
- register Linetype lineval;
- register Reject_level thisreject;
-@@ -340,8 +351,7 @@
- char tline[MAXLINE] BSS;
-
- Linetype
--checkline (cursym)
--int *cursym; /* if LT_TRUE or LT_FALSE returned, set this to sym index */
-+checkline (int *cursym) /* if LT_TRUE or LT_FALSE returned, set this to sym index */
- {
- register char *cp;
- register char *symp;
-@@ -424,10 +434,9 @@
- * position that is not whitespace.
- */
- char *
--skipcomment (cp)
--register char *cp;
-+skipcomment (char *cp)
- {
-- if (incomment)
-+ if (!incomment)
- goto inside;
- for (;; cp++) {
- while (*cp == ' ' || *cp == '\t')
-@@ -444,7 +453,8 @@
- stqcline = linenum;
- }
- cp += 2;
-- inside:
-+
-+inside:
- for (;;) {
- for (; *cp != '*'; cp++)
- if (*cp == '\0')
-@@ -466,9 +476,7 @@
- * position that is not whitespace.
- */
- char *
--skipquote (cp, type)
--register char *cp;
--register int type;
-+skipquote (char *cp, int type)
- {
- register char qchar;
-
-@@ -487,7 +495,7 @@
- if (*cp == qchar)
- break;
- if ( *cp == '\0'
-- || *cp == '\\' && *++cp == '\0'
-+ || (*cp == '\\' && *++cp == '\0')
- )
- return cp;
- }
-@@ -501,8 +509,7 @@
- * else return -1.
- */
- int
--findsym (str)
--char *str;
-+findsym (char *str)
- {
- register char *cp;
- register char *symp;
-@@ -529,11 +536,7 @@
- * and (if compiled in) treats form-feed as an end-of-line
- */
- int
--getlin (line, maxline, inp, expandtabs)
--register char *line;
--int maxline;
--FILE *inp;
--int expandtabs;
-+getlin (char *line, int maxline, FILE *inp, int expandtabs)
- {
- int tmp;
- register int num;
-@@ -600,32 +603,30 @@
- return num;
- }
-
--flushline (keep)
--Bool keep;
-+void flushline (Bool keep)
- {
- if ((keep && reject != REJ_YES) ^ complement) {
- register char *line = tline;
- register FILE *out = stdout;
- register char chr;
-
-- while (chr = *line++)
-+ while ((chr = *line++))
- putc (chr, out);
- } else if (lnblank)
- putc ('\n', stdout);
- return;
- }
-
--prname ()
-+void prname (void)
- {
- fprintf (stderr, "%s: ", progname);
- return;
- }
-
- int
--error (err, line, depth)
--int err; /* type of error & index into error string array */
--int line; /* line number */
--int depth; /* how many ifdefs we are inside */
-+error (int err, /* type of error & index into error string array */
-+ int line, /* line number */
-+ int depth) /* how many ifdefs we are inside */
- {
- if (err == END_ERR)
- return err;
diff --git a/unifdef-configure.ac b/unifdef-configure.ac
deleted file mode 100644
index 170794e..0000000
--- a/unifdef-configure.ac
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.59)
-AC_INIT(unifdef, 1.0, BUG-REPORT-ADDRESS)
-AC_CONFIG_SRCDIR([unifdef.c])
-AC_CONFIG_HEADER([config.h])
-AM_INIT_AUTOMAKE
-
-# Checks for programs.
-AC_PROG_CC
-AC_PROG_INSTALL
-
-# Checks for libraries.
-
-# Checks for header files.
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STDBOOL
-
-# Checks for library functions.
-AC_FUNC_ERROR_AT_LINE
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/unifdef.git/commitdiff/ca9df283205853c233b780455e3324e57765bdc3
More information about the pld-cvs-commit
mailing list