kbd: clean up.

- remove error.h, no longer necessary
- remove unnecessary sed commands
This commit is contained in:
Érico Rolim 2020-12-16 17:58:01 -03:00 committed by Érico Nogueira Rolim
parent ef12e437c8
commit 8174859d84
2 changed files with 2 additions and 29 deletions

View file

@ -1,20 +0,0 @@
#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

@ -14,10 +14,10 @@ homepage="http://www.kbd-project.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=685056143cb8effd0a1d44b5c391eb50d80dcfd014b1a4d6e2650a28d61cb82a
pre_configure() {
post_patch() {
# Rename keymap files with the same names
# this is needed because when only name of keymap is specified
# oadkeys loads the first keymap it can find, which is bad
# loadkeys loads the first keymap it can find, which is bad
# this should be removed when upstream adopts the change
mv data/keymaps/i386/qwertz/cz{,-qwertz}.map
mv data/keymaps/i386/olpc/es{,-olpc}.map
@ -35,13 +35,6 @@ pre_configure() {
cp azerty/fr-latin9.map azerty/fr.map
cp azerty/fr-latin9.map azerty/fr-latin0.map # legacy alias
cd $wrksrc
sed -e '/^PKG_CHECK_MODULES.*/d' -i configure.ac
sed -e 's,tests ,,g' -i Makefile.am
cp $FILESDIR/error.h .
autoreconf -fi
}
post_install() {
# Remove keymaps for sun, amiga and atari.