2019-08-13 04:49:28 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2020-01-22 13:32:24 -07:00
|
|
|
patch -p1 < mandoc-no-warn.patch
|
2021-07-12 04:28:48 -06:00
|
|
|
patch -p1 < fix-tbl-segfault.patch
|
2020-01-22 13:32:24 -07:00
|
|
|
|
2021-07-03 15:04:59 -06:00
|
|
|
# Change default pager.
|
|
|
|
sed 's,"more -s","less",g' main.c > _
|
|
|
|
mv -f _ main.c
|
|
|
|
|
|
|
|
# Use CC rather than broken default.
|
|
|
|
sed "s/CC=.*/CC=${CC:-cc}/" configure > _
|
|
|
|
mv -f _ configure
|
|
|
|
chmod +x configure
|
2019-08-13 04:49:28 -06:00
|
|
|
|
|
|
|
cat > configure.local <<EOF
|
|
|
|
PREFIX=/usr
|
|
|
|
MANDIR=/usr/share/man
|
|
|
|
LIBDIR=/usr/lib
|
2020-02-10 14:30:17 -07:00
|
|
|
SBINDIR=/usr/bin
|
2020-02-14 08:08:34 -07:00
|
|
|
CC="${CC:-cc}"
|
2021-07-03 15:04:59 -06:00
|
|
|
CFLAGS="$CFLAGS -fcommon"
|
2019-08-13 04:49:28 -06:00
|
|
|
LN="ln -sf"
|
|
|
|
EOF
|
|
|
|
|
2020-01-22 13:32:24 -07:00
|
|
|
./configure
|
2019-08-29 04:49:04 -06:00
|
|
|
|
2020-01-22 13:32:24 -07:00
|
|
|
make
|
|
|
|
make -j1 DESTDIR="$1" base-install
|