diff --git a/testing/ccze/001-fix-autoconf.patch b/testing/ccze/001-fix-autoconf.patch new file mode 100644 index 00000000000..ffc24234f04 --- /dev/null +++ b/testing/ccze/001-fix-autoconf.patch @@ -0,0 +1,24 @@ +Fixes configure.ac for use with newer autoconf versions + +diff --git a/configure.ac b/configure.ac +index d488c23..91da296 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -89,7 +89,7 @@ AC_SUBST(PCRE_LIBS) + AC_MSG_RESULT(found) + + AC_MSG_CHECKING(for suboptarg) +-AC_RUN_IFELSE(AC_LANG_PROGRAM( ++AC_RUN_IFELSE([AC_LANG_SOURCE( + [[#include + #include + #include +@@ -101,7 +101,7 @@ extern char *suboptarg; + char *value; + + getsubopt (&subopts, empty_subopts, &value); +- exit (!suboptarg);]]), [have_suboptarg="yes"], ++ exit (!suboptarg);]])], [have_suboptarg="yes"], + [have_suboptarg="no"], [have_suboptarg="no"]) + AC_MSG_RESULT(${have_suboptarg}) + case ${have_suboptarg} in diff --git a/testing/ccze/002-fix-error_t.patch b/testing/ccze/002-fix-error_t.patch new file mode 100644 index 00000000000..1fc308d3552 --- /dev/null +++ b/testing/ccze/002-fix-error_t.patch @@ -0,0 +1,41 @@ +Defines error_t + +diff --git a/src/ccze.h b/src/ccze.h +index 6f73999..c51618d 100644 +--- a/src/ccze.h ++++ b/src/ccze.h +@@ -22,6 +22,8 @@ + #ifndef _CCZE_H + #define _CCZE_H 1 + ++#include "error_t.h" ++ + #ifdef HAVE_SYSTEM_H + # include "system.h" + #endif +diff --git a/src/error_t.h b/src/error_t.h +new file mode 100644 +index 0000000..b6c312b +--- /dev/null ++++ b/src/error_t.h +@@ -0,0 +1,20 @@ ++/* Define error_t. ++ Copyright (C) 1991-2020 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++#ifndef __error_t_defined ++# define __error_t_defined 1 ++ ++typedef int error_t; ++ ++#endif diff --git a/testing/ccze/APKBUILD b/testing/ccze/APKBUILD new file mode 100644 index 00000000000..eb31ba991c1 --- /dev/null +++ b/testing/ccze/APKBUILD @@ -0,0 +1,43 @@ +# Contributor: mcrmonkey +# Maintainer: mcrmonkey +pkgname=ccze +pkgver=0.2.1 +pkgrel=0 +pkgdesc="A fast log colorizer written in C, intended to be a drop-in replacement for colorize (http://colorize.raszi.hu)" +options="!check" # No testsuite +url="https://github.com/madhouse/ccze" +arch="all" +license="GPL-2.0-only" +makedepends="musl-dev pcre-dev ncurses-dev autoconf automake" +subpackages="$pkgname-dev $pkgname-doc" +source="https://github.com/madhouse/ccze/archive/ccze-$pkgver-2.tar.gz + 001-fix-autoconf.patch + 002-fix-error_t.patch" +builddir="$srcdir/ccze-ccze-$pkgver-2" + +prepare() { + default_prepare + update_config_guess + autoreconf -fi +} + +build() { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums="b45ae9b0366fa4b0ca37d0aeba66f2fbbe4f6f4f124bfed9828c2324b78092557c64478e15ca592438062d2897b14d6972fc905f72c1a390f9fc8900cfed4436 ccze-0.2.1-2.tar.gz +e869de966de949d270983531c4a2dd7dfcf08e0d9cd390063c128a6316d1f39b1b118bd7c8ad4b589aee468a08d578a5dfdb2c7eeb158926129aaa72fbc8034a 001-fix-autoconf.patch +2100de615d10ac466fe68f2533436d4c7a37bc599eb43489e208d7c5706a400423adc3d8c46dfe5beb1d5e05e8c6709c6318c133fb8b72c467abaaaba39af544 002-fix-error_t.patch"