added mandoc

This commit is contained in:
Ella-0 2021-06-01 10:36:00 +01:00
parent fbc445b4a9
commit 5ea842eb26
4 changed files with 64 additions and 0 deletions

35
pkgs/mandoc/build.sh Normal file
View file

@ -0,0 +1,35 @@
pkgname=mandoc
pkgver=1.14.5
fetch() {
curl "https://mandoc.bsd.lv/snapshots/mandoc-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz
tar -xf $pkgname-$pkgver.tar.gz
cp ../configure.local .
cp ../term-size.patch .
cp ../man.sh .
cd $pkgname-$pkgver
cp ../configure.local .
patch -p1 < ../term-size.patch
}
build() {
cd $pkgname-$pkgver
./configure \
--prefix=/usr \
--build=x86_64-unknown-linux-musl \
--host=x86_64-unknown-linux-musl
make
}
package() {
install -Dm644 ./man.sh $pkgdir/etc/profile.d/man.sh
cd $pkgname-$pkgver
make install DESTDIR=$pkgdir
}
license() {
cd $pkgname-$pkgver
cat LICENSE
# cat COPYING
}

View file

@ -0,0 +1,10 @@
PREFIX=/usr
MANDIR=/usr/share/man
LIBDIR=/usr/lib
UTF8_LOCALE="en_US.UTF-8"
MANPATH_DEFAULT="/usr/share/man"
MANPATH_BASE="/usr/share/man"
LN="ln -sf"
HAVE_LESS_T=0
LDFLAGS=-Wl,--allow-multiple-definition
BUILD_TARGETS=

8
pkgs/mandoc/man.sh Normal file
View file

@ -0,0 +1,8 @@
export LESS_TERMCAP_md=$'\e[01;34m' \
export LESS_TERMCAP_me=$'\e[0m' \
export LESS_TERMCAP_se=$'\e[0m' \
export LESS_TERMCAP_so=$'\e[01;44;35m' \
export LESS_TERMCAP_ue=$'\e[0m' \
export LESS_TERMCAP_us=$'\e[01;33m' \
export MANPAGER="less -r"

View file

@ -0,0 +1,11 @@
--- a/main.c
+++ b/main.c
@@ -321,7 +321,7 @@
(conf.output.width == 0 || conf.output.indent == 0) &&
ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) != -1 &&
ws.ws_col > 1) {
- if (conf.output.width == 0 && ws.ws_col < 79)
+ if (conf.output.width == 0)
conf.output.width = ws.ws_col - 1;
if (conf.output.indent == 0 && ws.ws_col < 66)
conf.output.indent = 3;