mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-28 16:32:57 +02:00
fortune-mod: remove error.{h,c} copy.
Revbump to pick up the fix from librecode. Also use vsed where appropriate.
This commit is contained in:
parent
a7fba4f268
commit
61a69d943e
3 changed files with 5 additions and 30 deletions
|
@ -1,19 +0,0 @@
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
void error(int status, int errnum, const char* format, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
fflush(stdout);
|
|
||||||
fprintf(stderr, "%s: ", program_invocation_name);
|
|
||||||
va_start(ap, format);
|
|
||||||
vfprintf(stderr, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
if (errnum)
|
|
||||||
fprintf(stderr, ":%d", errnum);
|
|
||||||
if (status)
|
|
||||||
exit(status);
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
#ifndef _ERROR_H_
|
|
||||||
#define _ERROR_H_
|
|
||||||
void error(int status, int errnum, const char* format, ...);
|
|
||||||
#endif /* _ERROR_H_ */
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'fortune-mod'
|
# Template file for 'fortune-mod'
|
||||||
pkgname=fortune-mod
|
pkgname=fortune-mod
|
||||||
version=1.99.1
|
version=1.99.1
|
||||||
revision=5
|
revision=6
|
||||||
hostmakedepends="recode"
|
hostmakedepends="recode"
|
||||||
makedepends="recode-devel"
|
makedepends="recode-devel"
|
||||||
short_desc="Implementation of the BSDGames 'fortune' program"
|
short_desc="Implementation of the BSDGames 'fortune' program"
|
||||||
|
@ -18,14 +18,12 @@ if [ "$CROSS_BUILD" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
sed -i "s|^CFLAGS=.*|CFLAGS=${CFLAGS} -fsigned-char \$(DEFINES)|" Makefile
|
vsed -i "s|^CFLAGS=.*|CFLAGS=${CFLAGS} -fsigned-char \$(DEFINES)|" Makefile
|
||||||
sed -i "s|^LDFLAGS=.*|LDFLAGS=${LDFLAGS}|" Makefile
|
vsed -i "s|^LDFLAGS=.*|LDFLAGS=${LDFLAGS}|" Makefile
|
||||||
sed -i "s;u_int;uint;" util/strfile.h
|
vsed -i "s;u_int;uint;" util/strfile.h
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
*-musl)
|
*-musl)
|
||||||
cp ${FILESDIR}/error.{c,h} ${wrksrc}/fortune
|
vsed -e "s;-DBSD_REGEX;-DPOSIX_REGEX;" -i Makefile
|
||||||
sed -e "s;-DBSD_REGEX;-DPOSIX_REGEX;" -i Makefile
|
|
||||||
sed -e "s;fortune\.o;fortune.o error.o;" -i fortune/Makefile
|
|
||||||
esac
|
esac
|
||||||
make CC=$CC COOKIEDIR=/usr/share/fortunes $_strfile
|
make CC=$CC COOKIEDIR=/usr/share/fortunes $_strfile
|
||||||
sed -n '/[*][[:space:]]*The Regents/,/SUCH DAMAGE/p' fortune/fortune.c |
|
sed -n '/[*][[:space:]]*The Regents/,/SUCH DAMAGE/p' fortune/fortune.c |
|
||||||
|
|
Loading…
Add table
Reference in a new issue