Skip to content

Commit

Permalink
man: Update from 1.13.4 to 1.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Mar 2, 2017
1 parent d19a064 commit 14f22a3
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 64 deletions.
29 changes: 0 additions & 29 deletions packages/man/Makefile.patch

This file was deleted.

11 changes: 6 additions & 5 deletions packages/man/build.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
TERMUX_PKG_HOMEPAGE=http://mdocml.bsd.lv/
TERMUX_PKG_DESCRIPTION="Man page viewer from the mandoc toolset"
TERMUX_PKG_VERSION=1.13.4
TERMUX_PKG_REVISION=3
TERMUX_PKG_VERSION=1.14.1
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/mdocml-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_DEPENDS="less,libandroid-glob,libsqlite"
TERMUX_PKG_SHA256=d1effbaf964dc62988c5e0056d285e486c156b95f53805f2ffef5f050e5040b9
TERMUX_PKG_DEPENDS="less,libandroid-glob"
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_RM_AFTER_INSTALL="share/examples"

termux_step_pre_configure () {
cd $TERMUX_PKG_SRCDIR
LDFLAGS+=" -landroid-glob"
echo "PREFIX=\"$TERMUX_PREFIX\"" > configure.local
echo "CC=\"$CC\"" >> configure.local
echo "MANDIR=\"$TERMUX_PREFIX/share/man\"" >> configure.local
echo "CFLAGS=\"$CFLAGS -DNULL=0 $CPPFLAGS\"" >> configure.local
echo "CFLAGS=\"$CFLAGS -std=c99 -DNULL=0 $CPPFLAGS\"" >> configure.local
echo "LDFLAGS=\"$LDFLAGS\"" >> configure.local
for HAVING in HAVE_FGETLN HAVE_MMAP HAVE_STRLCAT HAVE_STRLCPY; do
for HAVING in HAVE_FGETLN HAVE_MMAP HAVE_STRLCAT HAVE_STRLCPY HAVE_SYS_ENDIAN HAVE_ENDIAN HAVE_NTOHL HAVE_NANOSLEEP HAVE_O_DIRECTORY; do
echo "$HAVING=1" >> configure.local
done
echo "HAVE_MANPATH=0" >> configure.local
Expand Down
41 changes: 32 additions & 9 deletions packages/man/configure.patch
Original file line number Diff line number Diff line change
@@ -1,21 +1,44 @@
diff -u -r ../mdocml-1.13.4/configure ./configure
--- ../mdocml-1.13.4/configure 2016-07-14 07:13:40.000000000 -0400
+++ ./configure 2016-07-16 17:59:13.906589870 -0400
@@ -31,7 +31,7 @@
# Initialize all variables here,
# such that nothing can leak in from the environment.
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 @@

SOURCEDIR=`dirname "$0"`

-MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/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 @@
INSTALL_LIB=
INSTALL_MAN=
INSTALL_DATA=
-LN="ln -f"
+LN="ln -s -f"

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

CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make -f -`
@@ -300,7 +300,7 @@
@@ -270,7 +270,7 @@
elif singletest nanosleep NANOSLEEP; then
:
elif runtest nanosleep NANOSLEEP "-lrt"; then
- LD_NANOSLEEP="-lrt"
+ LD_NANOSLEEP=""
fi
if [ "${HAVE_NANOSLEEP}" -eq 0 ]; then
echo "FATAL: nanosleep: no" 1>&2
@@ -354,7 +354,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_DEFAULT \"${MANPATH_DEFAULT}\""
[ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\""
[ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""
12 changes: 0 additions & 12 deletions packages/man/mandocdb.c.patch

This file was deleted.

17 changes: 8 additions & 9 deletions packages/man/term_ascii.c.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
The man implementation from mandoc does not adjust its output size to the terminal. As this is nice to have on smaller screens such as Termux we patch this in using the following patch adapted from

https://groups.google.com/forum/#!topic/fa.openbsd.tech/AEDMaZmzSU4

diff -u -r ../mdocml-1.13.4/term_ascii.c ./term_ascii.c
--- ../mdocml-1.13.4/term_ascii.c 2016-07-14 07:13:40.000000000 -0400
+++ ./term_ascii.c 2016-09-26 18:06:08.339737451 -0400
@@ -18,6 +18,7 @@
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
@@ -18,8 +18,10 @@
#include "config.h"

#include <sys/types.h>
+#include <sys/ioctl.h>

#include <assert.h>
+#include <fcntl.h>
#if HAVE_WCHAR
@@ -64,12 +65,22 @@
#include <locale.h>
#endif
@@ -64,12 +66,22 @@
char *v;
#endif
struct termp *p;
Expand Down

0 comments on commit 14f22a3

Please sign in to comment.