kbd: ship error.h instead of downloading

No revbump here, the resulting binary should be the same.
This commit is contained in:
Enno Boland 2019-08-03 09:52:10 +02:00
parent 03b1a67edc
commit ddf9daa181
No known key found for this signature in database
GPG key ID: D09964719BDE9971
2 changed files with 21 additions and 1 deletions

20
srcpkgs/kbd/files/error.h Normal file
View file

@ -0,0 +1,20 @@
#ifndef ERROR_H
#define ERROR_H
#include <stdio.h>
#include <stdarg.h>
#include <err.h>
static inline void error(int status, int errnum, const char *fmt, ...)
{
va_list ap;
void (*errfunc[2])(int, const char *, va_list) = { &verr, &verrx };
void (*warnfunc[2])(const char *, va_list) = { &vwarn, &vwarnx };
fflush(stdout);
va_start(ap, fmt);
if (status != 0)
errfunc[errnum==0](status, fmt, ap); /* does not return */
warnfunc[errnum==0](fmt, ap);
va_end(ap);
}
#endif

View file

@ -40,7 +40,7 @@ pre_configure() {
sed -e '/^PKG_CHECK_MODULES.*/d' -i configure.ac
sed -e 's,tests ,,g' -i Makefile.am
$XBPS_FETCH_CMD http://git.alpinelinux.org/cgit/aports/plain/main/kbd/error.h
cp $FILESDIR/error.h .
autoreconf -fi
}
post_install() {