Browse Source

man: Update from 1.13.4 to 1.14.1

android-5
Fredrik Fornwall 8 years ago
parent
commit
14f22a3a28
  1. 29
      packages/man/Makefile.patch
  2. 11
      packages/man/build.sh
  3. 41
      packages/man/configure.patch
  4. 12
      packages/man/mandocdb.c.patch
  5. 17
      packages/man/term_ascii.c.patch

29
packages/man/Makefile.patch

@ -1,29 +0,0 @@
diff -u -r ../mdocml-1.13.4/Makefile ./Makefile
--- ../mdocml-1.13.4/Makefile 2016-07-14 07:13:40.000000000 -0400
+++ ./Makefile 2016-07-16 17:53:29.423956403 -0400
@@ -359,7 +359,7 @@
mkdir -p $(DESTDIR)$(MANDIR)/man7
$(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR)
$(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM)
- ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
+ ln -s -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_MAN)
$(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR)
$(INSTALL_LIB) man.h mandoc.h mandoc_aux.h mdoc.h roff.h \
$(DESTDIR)$(INCLUDEDIR)
@@ -383,12 +383,12 @@
mkdir -p $(DESTDIR)$(MANDIR)/man3
mkdir -p $(DESTDIR)$(MANDIR)/man5
mkdir -p $(DESTDIR)$(MANDIR)/man8
- ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
- ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
- ln -f $(DESTDIR)$(BINDIR)/mandoc \
+ ln -s -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_APROPOS)
+ ln -s -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/$(BINM_WHATIS)
+ ln -s -f $(DESTDIR)$(BINDIR)/mandoc \
$(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS)
$(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1
- ln -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
+ ln -s -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 \
$(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1
$(INSTALL_MAN) mansearch.3 $(DESTDIR)$(MANDIR)/man3
$(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5

11
packages/man/build.sh

@ -1,9 +1,9 @@
TERMUX_PKG_HOMEPAGE=http://mdocml.bsd.lv/ TERMUX_PKG_HOMEPAGE=http://mdocml.bsd.lv/
TERMUX_PKG_DESCRIPTION="Man page viewer from the mandoc toolset" TERMUX_PKG_DESCRIPTION="Man page viewer from the mandoc toolset"
TERMUX_PKG_VERSION=1.13.4 TERMUX_PKG_VERSION=1.14.1
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/mdocml-${TERMUX_PKG_VERSION}.tar.xz 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_BUILD_IN_SRC=yes
TERMUX_PKG_RM_AFTER_INSTALL="share/examples" TERMUX_PKG_RM_AFTER_INSTALL="share/examples"
@ -11,10 +11,11 @@ termux_step_pre_configure () {
cd $TERMUX_PKG_SRCDIR cd $TERMUX_PKG_SRCDIR
LDFLAGS+=" -landroid-glob" LDFLAGS+=" -landroid-glob"
echo "PREFIX=\"$TERMUX_PREFIX\"" > configure.local echo "PREFIX=\"$TERMUX_PREFIX\"" > configure.local
echo "CC=\"$CC\"" >> configure.local
echo "MANDIR=\"$TERMUX_PREFIX/share/man\"" >> 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 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 echo "$HAVING=1" >> configure.local
done done
echo "HAVE_MANPATH=0" >> configure.local echo "HAVE_MANPATH=0" >> configure.local

41
packages/man/configure.patch

@ -1,16 +1,39 @@
diff -u -r ../mdocml-1.13.4/configure ./configure diff -u -r ../mdocml-1.14.1/configure ./configure
--- ../mdocml-1.13.4/configure 2016-07-14 07:13:40.000000000 -0400 --- ../mdocml-1.14.1/configure 2017-02-21 01:25:20.000000000 +0100
+++ ./configure 2016-07-16 17:59:13.906589870 -0400 +++ ./configure 2017-03-02 15:29:43.698780501 +0100
@@ -31,7 +31,7 @@ @@ -35,11 +35,11 @@
# Initialize all variables here,
# such that nothing can leak in from the environment. SOURCEDIR=`dirname "$0"`
-MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" -MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man"
+MANPATH_DEFAULT="@TERMUX_PREFIX@/share/man" +MANPATH_DEFAULT="@TERMUX_PREFIX@/share/man"
OSNAME= 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 -` @@ -270,7 +270,7 @@
@@ -300,7 +300,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>" [ ${HAVE_GETLINE} -eq 0 ] && echo "#include <stdio.h>"
echo echo
@ -18,4 +41,4 @@ diff -u -r ../mdocml-1.13.4/configure ./configure
+echo "#define MAN_CONF_FILE \"@TERMUX_PREFIX@/etc/${MANM_MANCONF}\"" +echo "#define MAN_CONF_FILE \"@TERMUX_PREFIX@/etc/${MANM_MANCONF}\""
echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\"" echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
[ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\"" [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\""
[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\"" [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\""

12
packages/man/mandocdb.c.patch

@ -1,12 +0,0 @@
diff -u -r ../mdocml-1.13.1/mandocdb.c ./mandocdb.c
--- ../mdocml-1.13.1/mandocdb.c 2014-08-10 19:26:46.000000000 +0200
+++ ./mandocdb.c 2014-08-18 08:22:05.529753054 +0200
@@ -1440,7 +1440,7 @@
if (TYPE_arch == type)
for (cp = value; *cp; cp++)
if (isupper((unsigned char)*cp))
- *cp = _tolower((unsigned char)*cp);
+ *cp = tolower((unsigned char)*cp);
putkeys(mpage, value, strlen(value), type);
}

17
packages/man/term_ascii.c.patch

@ -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 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
https://groups.google.com/forum/#!topic/fa.openbsd.tech/AEDMaZmzSU4 +++ ./term_ascii.c 2017-03-02 14:04:37.164590198 +0000
@@ -18,8 +18,10 @@
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 @@
#include "config.h" #include "config.h"
#include <sys/types.h> #include <sys/types.h>
+#include <sys/ioctl.h> +#include <sys/ioctl.h>
#include <assert.h> #include <assert.h>
+#include <fcntl.h>
#if HAVE_WCHAR #if HAVE_WCHAR
@@ -64,12 +65,22 @@ #include <locale.h>
#endif
@@ -64,12 +66,22 @@
char *v; char *v;
#endif #endif
struct termp *p; struct termp *p;

Loading…
Cancel
Save