diff --git a/www/htmldoc/Makefile b/www/htmldoc/Makefile
index cb6db32991c0..50e14a763570 100644
--- a/www/htmldoc/Makefile
+++ b/www/htmldoc/Makefile
@@ -1,8 +1,6 @@
-# $NetBSD: Makefile,v 1.45 2019/07/20 22:46:55 wiz Exp $
+# $NetBSD: Makefile,v 1.46 2019/10/18 11:02:13 micha Exp $
-PKGREVISION= 17
-
-CONFIGURE_ARGS+= --without-gui --without-x
+CONFIGURE_ARGS+= --without-gui
.include "${.CURDIR}/Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/htmldoc/Makefile.common b/www/htmldoc/Makefile.common
index 8c1a63f45995..f788f8dd96d9 100644
--- a/www/htmldoc/Makefile.common
+++ b/www/htmldoc/Makefile.common
@@ -1,22 +1,23 @@
-# $NetBSD: Makefile.common,v 1.14 2016/12/30 12:54:20 wiz Exp $
+# $NetBSD: Makefile.common,v 1.15 2019/10/18 11:02:13 micha Exp $
#
# used by www/htmldoc/Makefile
# used by www/htmldoc-x11/Makefile
# This section contains variables that might be overridden.
-PKGNAME?= ${PKGNAME_BASE}
+PKGNAME?= ${PKGNAME_BASE}-${VERSION}
COMMENT?= Converts HTML to indexed HTML, PDF and/or PostScript
# Normal package Makefile contents follow.
-VERSION= 1.8.27
-DISTNAME= htmldoc-${VERSION}-source
-PKGNAME_BASE= ${DISTNAME:S/-source//}
+VERSION= 1.9.7
+PKGNAME_BASE= htmldoc
CATEGORIES= www
-MASTER_SITES= ftp://ftp.easysw.com/pub/htmldoc/${PKGVERSION_NOREV}/
-EXTRACT_SUFX= .tar.bz2
+DIST_SUBDIR= ${PKGNAME_BASE}
+DISTNAME= v${VERSION}
+MASTER_SITES= ${MASTER_SITE_GITHUB:=michaelrsweet/htmldoc/archive/}
+EXTRACT_USING= bsdtar
MAINTAINER= pkgsrc-users@NetBSD.org
-#HOMEPAGE= http://www.htmldoc.org/
+HOMEPAGE= https://www.msweet.org/htmldoc/
LICENSE= gnu-gpl-v2
PATCHDIR= ${.CURDIR}/../../www/htmldoc/patches
@@ -25,14 +26,10 @@ PLIST_SRC= ${.CURDIR}/../../www/htmldoc/PLIST
.include "${.CURDIR}/../../www/htmldoc/options.mk"
-WRKSRC= ${WRKDIR}/${DISTNAME:S/-source//}
+WRKSRC= ${WRKDIR}/${PKGNAME_BASE}-${PKGVERSION_NOREV}
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++
-INSTALL_MAKE_FLAGS+= bindir=${DESTDIR}${PREFIX}/bin
-INSTALL_MAKE_FLAGS+= datadir=${DESTDIR}${PREFIX}/share
-INSTALL_MAKE_FLAGS+= mandir=${DESTDIR}${PREFIX}/${PKGMANDIR}
-
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
diff --git a/www/htmldoc/distinfo b/www/htmldoc/distinfo
index a0b5e496cdd7..68d68d6df9ae 100644
--- a/www/htmldoc/distinfo
+++ b/www/htmldoc/distinfo
@@ -1,12 +1,7 @@
-$NetBSD: distinfo,v 1.13 2016/12/17 14:20:14 joerg Exp $
+$NetBSD: distinfo,v 1.14 2019/10/18 11:02:13 micha Exp $
-SHA1 (htmldoc-1.8.27-source.tar.bz2) = 472908e0aafed1cedfbacd8ed3168734aebdec4b
-RMD160 (htmldoc-1.8.27-source.tar.bz2) = 9605a5894675439f5fae405fb060972e19f33c7e
-SHA512 (htmldoc-1.8.27-source.tar.bz2) = f0b2b6fec4925e549e74d6721f15b5de00c8c4889b0c67689945c408ed88074acb1330cae155655a1986adc0ca549cea32e242aa1ecac8e6338a1739f7c85438
-Size (htmldoc-1.8.27-source.tar.bz2) = 3960271 bytes
-SHA1 (patch-aa) = 92de5e1e4761ffe2d117004b2a38ec52edb33d7c
-SHA1 (patch-ab) = 22add1402202fed917a79ce67963cb282ca46f87
-SHA1 (patch-ac) = bf9036087e03095d51ee064e1f193c899848adff
-SHA1 (patch-ad) = 94e5f10387ede380b7579392e41234ff832f1295
-SHA1 (patch-ae) = 1d77dd5120605881e83bf31ee07fa9fd73619cd3
-SHA1 (patch-htmldoc_htmlsep.cxx) = be66659cc83047ced67e2c73af9f4052962cdc50
+SHA1 (htmldoc/v1.9.7.tar.gz) = c2c3c6a73dfc2bd779bb186b0497eb8de28b25b7
+RMD160 (htmldoc/v1.9.7.tar.gz) = 18908dcd30e36eb1fcdf208146ca704f391b382a
+SHA512 (htmldoc/v1.9.7.tar.gz) = e9481d32318902b5179f8d2dbaa382bcb0084bf3cc57958f8f05f52be5019ab54da5c265bbb674ca8808198c35d04bf19ad2149c2add18cfb630e66a2b9dc8f2
+Size (htmldoc/v1.9.7.tar.gz) = 4502752 bytes
+SHA1 (patch-htmldoc_http-addrlist.c) = 7c2db39b43cdbb31da0d884fbbba63e2ab258354
diff --git a/www/htmldoc/options.mk b/www/htmldoc/options.mk
index 9384a9393669..efd0467f12c7 100644
--- a/www/htmldoc/options.mk
+++ b/www/htmldoc/options.mk
@@ -1,9 +1,7 @@
-# $NetBSD: options.mk,v 1.4 2016/12/30 12:54:20 wiz Exp $
+# $NetBSD: options.mk,v 1.5 2019/10/18 11:02:13 micha Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.htmldoc
-PKG_SUPPORTED_OPTIONS= # empty
-PKG_OPTIONS_OPTIONAL_GROUPS= ssl
-PKG_OPTIONS_GROUP.ssl= gnutls ssl
+PKG_SUPPORTED_OPTIONS= ssl
PKG_SUGGESTED_OPTIONS= ssl
.include "../../mk/bsd.options.mk"
@@ -11,23 +9,11 @@ PKG_SUGGESTED_OPTIONS= ssl
###
### SSL support
###
-.if !empty(PKG_OPTIONS:Mssl) || !empty(PKG_OPTIONS:Mgnutls)
+.if !empty(PKG_OPTIONS:Mssl)
CONFIGURE_ARGS+= --enable-ssl
-. if !empty(PKG_OPTIONS:Mssl)
-.include "../../security/openssl/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-openssl
-CONFIGURE_ARGS+= --with-openssl-libs=${SSLBASE:Q}/lib
-CONFIGURE_ARGS+= --with-openssl-includes=${SSLBASE:Q}/include
-. else
-CONFIGURE_ARGS+= --disable-openssl
-. endif
-. if !empty(PKG_OPTIONS:Mgnutls)
-.include "../../security/gnutls/buildlink3.mk"
-.include "../../security/gnutls/libgnutls-config.mk"
+. include "../../security/gnutls/buildlink3.mk"
+. include "../../security/gnutls/libgnutls-config.mk"
CONFIGURE_ARGS+= --enable-gnutls
-. else
-CONFIGURE_ARGS+= --disable-gnutls
-. endif
.else
CONFIGURE_ARGS+= --disable-ssl
.endif
diff --git a/www/htmldoc/patches/patch-ab b/www/htmldoc/patches/patch-ab
deleted file mode 100644
index ec4d3dbee6f3..000000000000
--- a/www/htmldoc/patches/patch-ab
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2009/08/27 21:51:37 tez Exp $
-Fix for Secunia Advisory: SA35780
-from http://bugs.gentoo.org/attachment.cgi?id=199846
-
---- htmldoc/htmllib.cxx.orig 2009-08-26 20:34:51.474463400 -0500
-+++ htmldoc/htmllib.cxx
-@@ -2139,7 +2139,7 @@ htmlLoadFontWidths(void)
- * assigned charset...
- */
-
-- if (sscanf(line, "%*s%*s%*s%*s%f%*s%*s%s", &width, glyph) != 2)
-+ if (sscanf(line, "%*s%*s%*s%*s%f%*s%*s%63s", &width, glyph) != 2)
- continue;
-
- for (ch = 0; ch < 256; ch ++)
diff --git a/www/htmldoc/patches/patch-ac b/www/htmldoc/patches/patch-ac
deleted file mode 100644
index e00cb73ae1fe..000000000000
--- a/www/htmldoc/patches/patch-ac
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2009/08/27 21:51:37 tez Exp $
-Fix for Secunia Advisory: SA35780
-from http://bugs.gentoo.org/attachment.cgi?id=199846
-
---- htmldoc/ps-pdf.cxx.orig 2009-08-26 20:35:52.397461300 -0500
-+++ htmldoc/ps-pdf.cxx
-@@ -12512,7 +12512,7 @@ write_type1(FILE *out, /* I - Fil
- * assigned charset...
- */
-
-- if (sscanf(line, "%*s%*s%*s%*s%d%*s%*s%s", &width, glyph) != 2)
-+ if (sscanf(line, "%*s%*s%*s%*s%d%*s%*s%63s", &width, glyph) != 2)
- continue;
-
- for (ch = 0; ch < 256; ch ++)
diff --git a/www/htmldoc/patches/patch-ad b/www/htmldoc/patches/patch-ad
deleted file mode 100644
index c092f68b4427..000000000000
--- a/www/htmldoc/patches/patch-ad
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2009/08/27 21:51:37 tez Exp $
-Fix for Secunia Advisory: SA35780
-from http://bugs.gentoo.org/attachment.cgi?id=199846
-
---- htmldoc/util.cxx.orig 2009-08-26 20:36:33.787563300 -0500
-+++ htmldoc/util.cxx
-@@ -484,7 +484,7 @@ set_page_size(const char *size) /* I - P
- PageWidth = 595;
- PageLength = 792;
- }
-- else if (sscanf(size, "%fx%f%s", &width, &length, units) >= 2)
-+ else if (sscanf(size, "%fx%f%254s", &width, &length, units) >= 2)
- {
- /*
- * Custom size...
diff --git a/www/htmldoc/patches/patch-ae b/www/htmldoc/patches/patch-ae
deleted file mode 100644
index 5acdbb99ccdb..000000000000
--- a/www/htmldoc/patches/patch-ae
+++ /dev/null
@@ -1,118 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2011/01/24 16:33:19 wiz Exp $
-
-Fix build with png-1.5.
-http://www.htmldoc.org/str.php?L243+P0+S-2+C0+I0+E0+M10+Q
-
---- htmldoc/image.cxx.orig 2006-05-31 19:00:02.000000000 +0000
-+++ htmldoc/image.cxx
-@@ -1472,6 +1472,9 @@ image_load_png(image_t *img, /* I - Imag
- png_bytep *rows; /* PNG row pointers */
- uchar *inptr, /* Input pixels */
- *outptr; /* Output pixels */
-+ png_bytep trans_alpha;
-+ int num_trans;
-+ png_color_16p trans_color;
-
-
- /*
-@@ -1499,7 +1502,7 @@ image_load_png(image_t *img, /* I - Imag
-
- rows = NULL;
-
-- if (setjmp(pp->jmpbuf))
-+ if (setjmp(png_jmpbuf(pp)))
- {
- progress_error(HD_ERROR_BAD_FORMAT, "PNG file contains errors!");
-
-@@ -1526,7 +1529,7 @@ image_load_png(image_t *img, /* I - Imag
-
- png_read_info(pp, info);
-
-- if (info->color_type & PNG_COLOR_MASK_PALETTE)
-+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE)
- {
- png_set_expand(pp);
-
-@@ -1535,15 +1538,15 @@ image_load_png(image_t *img, /* I - Imag
- if (Encryption)
- img->use ++;
- }
-- else if (info->bit_depth < 8)
-+ else if (png_get_bit_depth(pp, info) < 8)
- {
- png_set_packing(pp);
- png_set_expand(pp);
- }
-- else if (info->bit_depth == 16)
-+ else if (png_get_bit_depth(pp, info) == 16)
- png_set_strip_16(pp);
-
-- if (info->color_type & PNG_COLOR_MASK_COLOR)
-+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
- {
- depth = 3;
- img->depth = gray ? 1 : 3;
-@@ -1554,10 +1557,11 @@ image_load_png(image_t *img, /* I - Imag
- img->depth = 1;
- }
-
-- img->width = info->width;
-- img->height = info->height;
-+ img->width = png_get_image_width(pp, info);
-+ img->height = png_get_image_height(pp, info);
-
-- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
-+ png_get_tRNS(pp, info, &trans_alpha, &num_trans, &trans_color);
-+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
- {
- if ((PSLevel == 0 && PDFVersion >= 14) || PSLevel == 3)
- image_need_mask(img, 8);
-@@ -1571,14 +1575,14 @@ image_load_png(image_t *img, /* I - Imag
-
- #ifdef DEBUG
- printf("color_type=0x%04x, depth=%d, img->width=%d, img->height=%d, img->depth=%d\n",
-- info->color_type, depth, img->width, img->height, img->depth);
-- if (info->color_type & PNG_COLOR_MASK_COLOR)
-+ png_get_color_type(pp, info), depth, img->width, img->height, img->depth);
-+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
- puts(" COLOR");
- else
- puts(" GRAYSCALE");
-- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
-+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
- puts(" ALPHA");
-- if (info->color_type & PNG_COLOR_MASK_PALETTE)
-+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE)
- puts(" PALETTE");
- #endif // DEBUG
-
-@@ -1594,9 +1598,9 @@ image_load_png(image_t *img, /* I - Imag
- * Allocate pointers...
- */
-
-- rows = (png_bytep *)calloc(info->height, sizeof(png_bytep));
-+ rows = (png_bytep *)calloc(png_get_image_height(pp, info), sizeof(png_bytep));
-
-- for (i = 0; i < (int)info->height; i ++)
-+ for (i = 0; i < (int)png_get_image_height(pp, info); i ++)
- rows[i] = img->pixels + i * img->width * depth;
-
- /*
-@@ -1610,7 +1614,7 @@ image_load_png(image_t *img, /* I - Imag
- * Generate the alpha mask as necessary...
- */
-
-- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
-+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
- {
- #ifdef DEBUG
- for (inptr = img->pixels, i = 0; i < img->height; i ++)
-@@ -1639,7 +1643,7 @@ image_load_png(image_t *img, /* I - Imag
- * Reformat the data as necessary for the reader...
- */
-
-- if (gray && info->color_type & PNG_COLOR_MASK_COLOR)
-+ if (gray && png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
- {
- /*
- * Greyscale output needed...
diff --git a/www/htmldoc/patches/patch-htmldoc_htmlsep.cxx b/www/htmldoc/patches/patch-htmldoc_htmlsep.cxx
deleted file mode 100644
index 4f735237de4e..000000000000
--- a/www/htmldoc/patches/patch-htmldoc_htmlsep.cxx
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-htmldoc_htmlsep.cxx,v 1.1 2016/12/17 14:20:14 joerg Exp $
-
-Don't check the pointer, but the pointed to value.
-
---- htmldoc/htmlsep.cxx.orig 2016-12-17 10:25:12.905636738 +0000
-+++ htmldoc/htmlsep.cxx
-@@ -536,7 +536,7 @@ write_doc(FILE **out, // I - Output
- if (t->markup >= MARKUP_H1 && t->markup < (MARKUP_H1 + TocLevels) &&
- htmlGetVariable(t, (uchar *)"_HD_OMIT_TOC") == NULL)
- {
-- if (heading >= 0)
-+ if (*heading >= 0)
- write_footer(out, *heading);
-
- (*heading) ++;
diff --git a/www/htmldoc/patches/patch-aa b/www/htmldoc/patches/patch-htmldoc_http-addrlist.c
similarity index 59%
rename from www/htmldoc/patches/patch-aa
rename to www/htmldoc/patches/patch-htmldoc_http-addrlist.c
index f8df9a475450..bcdbbad6f4e2 100644
--- a/www/htmldoc/patches/patch-aa
+++ b/www/htmldoc/patches/patch-htmldoc_http-addrlist.c
@@ -1,10 +1,10 @@
-$NetBSD: patch-aa,v 1.7 2009/01/08 11:58:31 obache Exp $
+$NetBSD: patch-htmldoc_http-addrlist.c,v 1.1 2019/10/18 11:02:13 micha Exp $
Portability fix, s6_addr32 is not a standard.
---- htmldoc/http-addrlist.c.orig 2006-06-20 15:23:49.000000000 +0000
+--- htmldoc/http-addrlist.c.orig 2019-10-08 18:56:34.000000000 +0000
+++ htmldoc/http-addrlist.c
-@@ -502,7 +502,7 @@ httpAddrGetList(const char *hostname, /*
+@@ -804,7 +804,7 @@ httpAddrGetList(const char *hostname, /*
# ifdef WIN32
temp->addr.ipv6.sin6_addr.u.Byte[15] = 1;
# else