Subject: [alpine-devel] [PATCH] main/mdocml: update to 1.12.4

From: Peter Bui <[email-masked]>
Date: Wed, 27 Aug 2014 11:49:15 -0500

- Use "base-install" target instead of "install" to avoid complications
  with DBBIN (i.e. apropos, makewhatis).

- Add MANWIDTH environment variable support to man command.

  This allows users to set the width of the generated text.  By default,
  mandoc uses a column width of 78, and completely ignores the size of
  the terminal.  When MANWIDTH is unset, it will default to 78 as mandoc
  would use.  With MANWIDTH=0, the man command will use stty to lookup
  the width of the terminal and set the appropriate value.  When
  MANWIDTH > 0, the width value will be passed to mandoc directly.
---
 main/mdocml/APKBUILD | 16 ++++++++--------
 main/mdocml/man.sh   | 11 ++++++++---
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/main/mdocml/APKBUILD b/main/mdocml/APKBUILD
index 81ee724..e624cbe 100644
--- a/main/mdocml/APKBUILD
+++ b/main/mdocml/APKBUILD
@@ -1,6 +1,6 @@
 # Maintainer:  Natanael Copa <[email-masked]>
 pkgname=mdocml
-pkgver=1.12.3
+pkgver=1.12.4
 pkgrel=0
 pkgdesc="mdoc/man compiler"
 url="http://mdocml.bsd.lv/"
@@ -26,7 +26,7 @@ build() {
 package() {
 	cd "$_builddir"
 	make DESTDIR="$pkgdir" PREFIX=/usr MANDIR=/usr/share/man DBBIN= \
-		EXAMPLEDIR=/usr/share/doc/mdocml/examples install
+		EXAMPLEDIR=/usr/share/doc/mdocml/examples base-install
 }
 
 man() {
@@ -36,9 +36,9 @@ man() {
 	install -Dm 755 man.sh "$subpkgdir"/usr/bin/man || return 1
 }
 
-md5sums="5e805fc6b261b8374ce21d191721bf80  mdocml-1.12.3.tar.gz
-400673bfa64efd1ef446ea4421e25115  man.sh"
-sha256sums="8ae7f7d471d52313707c4d78b25846dc4edca395b36ad20f24dead5399c13ee6  mdocml-1.12.3.tar.gz
-da725bffcbc0d6be37d18470aee2407a068134ba120b436c6c4fc8c9a37e8e5d  man.sh"
-sha512sums="41c7de3c04be9e792651aeb31b74d6fcbb1bfdee1af523ef725b5e10009c31ea89286bcd54c070758d6a80f026b9320cbf44de6159bea2a39ca88703401cdadb  mdocml-1.12.3.tar.gz
-4461f703e83661d6b03ea94fa7dda1cb390579e3f1439450000b230d5a7d0e5c0c158364085ff40bf880fb46881d4e850774dd5471003c1383011bdff6088abe  man.sh"
+md5sums="1ad266467b9c9c6fcce5e237e8f5efd6  mdocml-1.12.4.tar.gz
+cc5c665dc509243963f1b3a60f655b7f  man.sh"
+sha256sums="dcae3de8098026046848dcb853ea72c3eb5378a7c94a55adaf5e7b04058f780a  mdocml-1.12.4.tar.gz
+03039dd8c79cf054200cfe328924078ecc103f87be94ecabf7f7e5ad9e3c48eb  man.sh"
+sha512sums="22acca47e92039465f84652cba77a375eb734b3059440940cf3447cde0e0da3c169b4bf93c7f05a8994743505d853974d53c072f1fd7959879c68b20f43f2253  mdocml-1.12.4.tar.gz
+2d6bcde740d613ab225c2e35e53d6057bdc367ef85c75ccb99df587f51484e87c5fd958298be9d770241014eec4a2bd7be8084f00815fd64a999cb7752bdfb3f  man.sh"
diff --git a/main/mdocml/man.sh b/main/mdocml/man.sh
index 52735af..136cdd2 100644
--- a/main/mdocml/man.sh
+++ b/main/mdocml/man.sh
@@ -37,13 +37,18 @@ fi
 [ "$PAGER" ] || PAGER=less
 tty -s <&1 || PAGER=cat
 
+MANWIDTH=${MANWIDTH:-78}
+if [ $MANWIDTH = 0 ]; then
+    MANWIDTH=$(($(stty size | awk '{print $2}') - 2))
+fi
+
 case "$pagefile" in
 *.bz2)
-	exec bzcat "$pagefile" | mandoc -Tutf8 | "$PAGER" ;;
+	exec bzcat "$pagefile" | mandoc -Tutf8 -Owidth=$MANWIDTH | "$PAGER" ;;
 *.gz)
-	exec zcat "$pagefile" | mandoc -Tutf8 | "$PAGER" ;;
+	exec zcat "$pagefile" | mandoc -Tutf8 -Owidth=$MANWIDTH | "$PAGER" ;;
 *)
-	exec mandoc -Tutf8 "$pagefile" | "$PAGER" ;;
+	exec mandoc -Tutf8 -Owidth=$MANWIDTH "$pagefile" | "$PAGER" ;;
 esac
 
 paths=
-- 
2.1.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---