Skip to content
Permalink
Browse files

man: Update from 1.14.1 to 1.14.3

  • Loading branch information...
fornwall committed Aug 18, 2017
1 parent 51552f3 commit 385ee34f85120607b449a59e2a337497398acb5d
Showing with 23 additions and 21 deletions.
  1. +3 −4 packages/man/build.sh
  2. +10 −9 packages/man/configure.patch
  3. +10 −8 packages/man/term_ascii.c.patch
@@ -1,9 +1,8 @@
TERMUX_PKG_HOMEPAGE=http://mdocml.bsd.lv/
TERMUX_PKG_DESCRIPTION="Man page viewer from the mandoc toolset"
TERMUX_PKG_VERSION=1.14.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/mdocml-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=d1effbaf964dc62988c5e0056d285e486c156b95f53805f2ffef5f050e5040b9
TERMUX_PKG_VERSION=1.14.3
TERMUX_PKG_SHA256=0b0c8f67958c1569ead4b690680c337984b879dfd2ad4648d96924332fd99528
TERMUX_PKG_SRCURL=http://mdocml.bsd.lv/snapshots/mandoc-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="less,libandroid-glob"
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_RM_AFTER_INSTALL="share/examples"
@@ -1,21 +1,22 @@
diff -u -r ../mdocml-1.14.1/configure ./configure
--- ../mdocml-1.14.1/configure 2017-02-21 01:25:20.000000000 +0100
+++ ./configure 2017-03-02 15:29:43.698780501 +0100
@@ -35,11 +35,11 @@
diff -u -r ../mandoc-1.14.3/configure ./configure
--- ../mandoc-1.14.3/configure 2017-08-05 14:40:21.000000000 +0200
+++ ./configure 2017-08-17 16:00:24.385570649 +0200
@@ -35,12 +35,11 @@

SOURCEDIR=`dirname "$0"`

-MANPATH_BASE="/usr/share/man:/usr/X11R6/man"
-MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
+MANPATH_BASE="@TERMUX_PREFIX@/share/man"
+MANPATH_DEFAULT="@TERMUX_PREFIX@/share/man"
OSNAME=
UTF8_LOCALE=

-CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -`
+# CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -`
CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings"
CFLAGS="${CFLAGS} -Wno-unused-parameter"
LDADD=
@@ -118,7 +118,7 @@
@@ -121,7 +120,7 @@
INSTALL_LIB=
INSTALL_MAN=
INSTALL_DATA=
@@ -24,7 +25,7 @@ diff -u -r ../mdocml-1.14.1/configure ./configure

# --- manual settings from configure.local -----------------------------

@@ -270,7 +270,7 @@
@@ -274,7 +273,7 @@
elif singletest nanosleep NANOSLEEP; then
:
elif runtest nanosleep NANOSLEEP "-lrt"; then
@@ -33,12 +34,12 @@ diff -u -r ../mdocml-1.14.1/configure ./configure
fi
if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
echo "FATAL: nanosleep: no" 1>&2
@@ -354,7 +354,7 @@
@@ -359,7 +358,7 @@
[ ${HAVE_GETLINE} -eq 0 ] && echo "#include <stdio.h>"

echo
-echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""
+echo "#define MAN_CONF_FILE \"@TERMUX_PREFIX@/etc/${MANM_MANCONF}\""
echo "#define MANPATH_BASE \"${MANPATH_BASE}\""
echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
[ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
[ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
@@ -1,6 +1,6 @@
diff -u -r ../mdocml-1.14.1/term_ascii.c ./term_ascii.c
--- ../mdocml-1.14.1/term_ascii.c 2017-02-21 00:25:20.000000000 +0000
+++ ./term_ascii.c 2017-03-02 14:04:37.164590198 +0000
diff -u -r ../mandoc-1.14.3/term_ascii.c ./term_ascii.c
--- ../mandoc-1.14.3/term_ascii.c 2017-08-05 14:40:22.000000000 +0200
+++ ./term_ascii.c 2017-08-17 15:58:09.579116114 +0200
@@ -18,8 +18,10 @@
#include "config.h"

@@ -12,26 +12,28 @@ diff -u -r ../mdocml-1.14.1/term_ascii.c ./term_ascii.c
#if HAVE_WCHAR
#include <locale.h>
#endif
@@ -64,12 +66,22 @@
@@ -64,6 +66,8 @@
char *v;
#endif
struct termp *p;
+ struct winsize ws;
+ int tfd;

p = mandoc_calloc(1, sizeof(struct termp));
p = mandoc_calloc(1, sizeof(*p));
p->tcol = p->tcols = mandoc_calloc(1, sizeof(*p->tcol));
@@ -71,6 +75,15 @@

p->line = 1;
p->tabwidth = 5;
p->defrmargin = p->lastrmargin = 78;
+
+ if ((tfd = open("/dev/tty", O_RDWR, 0)) != -1) {
+ if (ioctl(tfd, TIOCGWINSZ, &ws) != -1) {
+ if (ws.ws_col < 80)
+ p->defrmargin = p->lastrmargin = ws.ws_col - 2;
+ }
+ close(tfd);
+ }
+
+
p->fontq = mandoc_reallocarray(NULL,
(p->fontsz = 8), sizeof(enum termfont));
(p->fontsz = 8), sizeof(*p->fontq));
p->fontq[0] = p->fontl = TERMFONT_NONE;

0 comments on commit 385ee34

Please sign in to comment.
You can’t perform that action at this time.