From 99040023af7713369a00d21a374bc125cff6b77a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Go=C5=82aszewski?= Date: Thu, 9 Jun 2011 15:55:22 +0000 Subject: [PATCH] - rel. 2 - some patches to make it build (some from gentoo) Changed files: ccze-Wmulticharacter.patch -> 1.1 ccze-error.patch -> 1.1 ccze-fbsd.patch -> 1.1 ccze-ldflags.patch -> 1.1 ccze-segfault.patch -> 1.1 ccze-tinfo.patch -> 1.1 ccze.spec -> 1.8 --- ccze-Wmulticharacter.patch | 11 +++++++++++ ccze-error.patch | 10 ++++++++++ ccze-fbsd.patch | 25 +++++++++++++++++++++++++ ccze-ldflags.patch | 11 +++++++++++ ccze-segfault.patch | 30 ++++++++++++++++++++++++++++++ ccze-tinfo.patch | 10 ++++++++++ ccze.spec | 18 +++++++++++++++++- 7 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 ccze-Wmulticharacter.patch create mode 100644 ccze-error.patch create mode 100644 ccze-fbsd.patch create mode 100644 ccze-ldflags.patch create mode 100644 ccze-segfault.patch create mode 100644 ccze-tinfo.patch diff --git a/ccze-Wmulticharacter.patch b/ccze-Wmulticharacter.patch new file mode 100644 index 0000000..961b2c5 --- /dev/null +++ b/ccze-Wmulticharacter.patch @@ -0,0 +1,11 @@ +--- ./src/Makefile.in.org 2011-06-09 17:32:46.600140054 +0200 ++++ ./src/Makefile.in 2011-06-09 17:35:36.351287312 +0200 +@@ -22,7 +22,7 @@ WFLAGS_GCC = -Wshadow -Wpointer-arith -W + -Wbad-function-cast -Wsign-compare -Wchar-subscripts \ + -Wcomment -Wformat -Wformat-nonliteral -Wformat-security \ + -Wimplicit -Wmain -Wmissing-braces -Wparentheses \ +- -Wreturn-type -Wswitch -Wmulticharacter \ ++ -Wreturn-type -Wswitch \ + -Wmissing-noreturn -Wmissing-declarations @WFLAGS_3X@ + WFLAGS_ICC = -Wall -wd193,279,810,869,1418,1419 + WFLAGS_3X = -Wsequence-point -Wdiv-by-zero -W -Wunused \ diff --git a/ccze-error.patch b/ccze-error.patch new file mode 100644 index 0000000..27d6b38 --- /dev/null +++ b/ccze-error.patch @@ -0,0 +1,10 @@ +--- ./configure.ac.org 2003-05-13 20:09:30.000000000 +0200 ++++ ./configure.ac 2011-06-09 17:47:07.763111535 +0200 +@@ -84,7 +84,6 @@ AC_C_VOLATILE + AC_TYPE_SIZE_T + AC_TYPE_SIGNAL + +-AC_CHECK_TYPE(error_t, int) + + dnl ********************** + dnl * Library functions diff --git a/ccze-fbsd.patch b/ccze-fbsd.patch new file mode 100644 index 0000000..d1f684a --- /dev/null +++ b/ccze-fbsd.patch @@ -0,0 +1,25 @@ +--- src/ccze-compat.h.old 2006-10-13 12:50:16 +0200 ++++ src/ccze-compat.h 2006-10-13 12:49:21 +0200 +@@ -29,6 +29,11 @@ + #include + #include + ++# ifndef __error_t_defined ++typedef int error_t; ++# define __error_t_defined 1 ++# endif ++ + #ifndef HAVE_STRNDUP + char *strndup (const char *s, size_t size); + #endif +--- src/ccze-compat.c.old 2006-10-13 12:51:35 +0200 ++++ src/ccze-compat.c 2006-10-13 12:51:44 +0200 +@@ -275,7 +275,7 @@ + char **valuep) + { + int i = getsubopt (optionp, tokens, valuep); +-#if HAVE_SUBOPTARg ++#if HAVE_SUBOPTARG + if (!*valuep && suboptarg) + *valuep = strdup (suboptarg); + #endif diff --git a/ccze-ldflags.patch b/ccze-ldflags.patch new file mode 100644 index 0000000..acef31a --- /dev/null +++ b/ccze-ldflags.patch @@ -0,0 +1,11 @@ +--- ccze-0.2.1/src/Makefile.in.org 2010-01-22 17:06:57.000000000 +0100 ++++ ccze-0.2.1/src/Makefile.in 2010-01-22 18:00:28.000000000 +0100 +@@ -75,7 +75,7 @@ + ${PROGRAM}: ${OBJECTS} ${PLUGIN_SOBJS} + ${CC} -rdynamic ${ALL_CFLAGS} -o $@ $^ ${ALL_LDFLAGS} + ccze-dump ccze-cssdump: %: %.o ccze-compat.o ccze-color.c +- ${CC} ${ALL_CFLAGS} -o $@ $@.o ccze-compat.o ++ ${CC} ${ALL_CFLAGS} ${ALL_LDFLAGS} -o $@ $@.o ccze-compat.o + ccze-builtins.c: Makefile + echo '#include ' >$@ + echo '#include "ccze-private.h"' >>$@ diff --git a/ccze-segfault.patch b/ccze-segfault.patch new file mode 100644 index 0000000..fa30d2f --- /dev/null +++ b/ccze-segfault.patch @@ -0,0 +1,30 @@ +diff -ruN ccze-0.2.1.orig/src/ccze.c ccze-0.2.1/src/ccze.c +--- ccze-0.2.1.orig/src/ccze.c 2003-05-13 20:09:30.000000000 +0200 ++++ ccze-0.2.1/src/ccze.c 2006-12-12 20:36:09.000000000 +0100 +@@ -209,7 +209,7 @@ + } + break; + case 'a': +- plugin = strtok (optarg, "="); ++ plugin = strtok (arg, "="); + value = strtok (NULL, "\n"); + ccze_plugin_argv_set (plugin, value); + break; +@@ -249,7 +249,7 @@ + ccze_config.remfac = 1; + break; + case 'm': +- subopts = optarg; ++ subopts = arg; + while (*subopts != '\0') + { + switch (getsubopt (&subopts, m_subopts, &value)) +@@ -273,7 +273,7 @@ + } + break; + case 'o': +- subopts = optarg; ++ subopts = arg; + while (*subopts != '\0') + { + switch (getsubopt (&subopts, o_subopts, &value)) diff --git a/ccze-tinfo.patch b/ccze-tinfo.patch new file mode 100644 index 0000000..d66d191 --- /dev/null +++ b/ccze-tinfo.patch @@ -0,0 +1,10 @@ +--- ./configure.ac.org 2011-06-09 17:48:59.884939619 +0200 ++++ ./configure.ac 2011-06-09 17:51:52.126202394 +0200 +@@ -100,6 +100,7 @@ AC_CHECK_FUNCS([alphasort argp_parse asp + strndup strstr]) + + AC_CHECK_LIB(ncurses, initscr, [], [AC_ERROR(NCurses library not found)]) ++AC_CHECK_LIB(tinfo, stdscr, [], [AC_ERROR(TInfo library not found)]) + AC_CHECK_FUNC(dlopen, [], [AC_CHECK_LIB(dl, dlopen)]) + AC_CHECK_FUNC(getopt_long, [], [AC_CHECK_LIB(gnugetopt, getopt_long)]) + diff --git a/ccze.spec b/ccze.spec index cd648ed..322c57a 100644 --- a/ccze.spec +++ b/ccze.spec @@ -1,13 +1,21 @@ +# TODO: +# - fix outdated url Summary: A robust log colorizer Summary(pl.UTF-8): Program w C do kolorowania logów Name: ccze Version: 0.2.1 -Release: 1 +Release: 2 Epoch: 1 License: GPL Group: Applications/Text Source0: ftp://bonehunter.rulez.org/pub/ccze/stable/%{name}-%{version}.tar.gz # Source0-md5: 221966bce7c5f011eca38157241a0432 +Patch0: %{name}-ldflags.patch +Patch1: %{name}-segfault.patch +Patch2: %{name}-fbsd.patch +Patch3: %{name}-Wmulticharacter.patch +Patch4: %{name}-error.patch +Patch5: %{name}-tinfo.patch URL: http://bonehunter.rulez.org/CCZE.html BuildRequires: autoconf BuildRequires: automake @@ -15,6 +23,8 @@ BuildRequires: ncurses-devel >= 5.0 BuildRequires: pcre-devel >= 3.1 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +#define filterout_ld -Wl,--as-needed + %description CCZE is a roboust and modular log colorizer, with plugins for apm, exim, fetchmail, httpd, postfix, procmail, squid, syslog, ulogd, @@ -42,6 +52,12 @@ Plik nagłówkowy dla wtyczek CCZE. %prep %setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p0 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 %build %{__aclocal} -- 2.44.0