[packages/htmldoc] Up to 1.9.24

arekm arekm at pld-linux.org
Wed Oct 14 21:34:31 CEST 2026


commit 9582aecb4eac87fa7fbe91a5eacd34af155aec3c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Oct 14 21:31:49 2026 +0200

    Up to 1.9.24

 gcc11.patch                          |  11 ---
 htmldoc-1.8.27-fortify-fail.patch    |  21 -----
 htmldoc-1.8.27-scanf-overflows.patch |  38 ---------
 htmldoc-libpng15.patch               | 148 -----------------------------------
 htmldoc-verbose.patch                |  12 +++
 htmldoc.spec                         |  84 +++++++++++++-------
 6 files changed, 69 insertions(+), 245 deletions(-)
---
diff --git a/htmldoc.spec b/htmldoc.spec
index 68aebcb..77f9f77 100644
--- a/htmldoc.spec
+++ b/htmldoc.spec
@@ -5,25 +5,31 @@
 Summary:	HTML processing program
 Summary(pl.UTF-8):	Program przetwarzający HTML
 Name:		htmldoc
-Version:	1.8.27
-Release:	15
-License:	GPL v2 with OpenSSL exception
+Version:	1.9.24
+Release:	1
+License:	GPL v2
 Group:		Applications/Publishing
-Source0:	ftp://ftp.easysw.com/pub/htmldoc/%{version}/%{name}-%{version}-source.tar.bz2
-# Source0-md5:	35589e7b8fe9c54e11be87cd5aec4dcc
-Patch0:		%{name}-libpng15.patch
-Patch1:		htmldoc-1.8.27-fortify-fail.patch
-Patch2:		htmldoc-1.8.27-scanf-overflows.patch
-Patch3:		gcc11.patch
-URL:		http://www.htmldoc.org/
-%{?with_gui:BuildRequires:	xorg-lib-libXpm-devel}
-BuildRequires:	autoconf
-BuildRequires:	automake
+Source0:	https://github.com/michaelrsweet/htmldoc/releases/download/v%{version}/%{name}-%{version}-source.tar.gz
+# Source0-md5:	e7365dabd08343ac93653df348f55af3
+Patch0:		%{name}-verbose.patch
+URL:		https://www.msweet.org/htmldoc/
+# configure.ac: CUPS library v2.2 or higher for HTTP/HTTPS
+BuildRequires:	cups-devel >= 1:2.2
 %{?with_gui:BuildRequires:	fltk-devel}
 BuildRequires:	libjpeg-devel
-BuildRequires:	libpng-devel
-BuildRequires:	openssl-devel >= 0.9.7d
+# configure.ac: pkg-config libpng16
+BuildRequires:	libpng-devel >= 2:1.6
+BuildRequires:	libstdc++-devel
+BuildRequires:	pkgconfig
+BuildRequires:	rpmbuild(macros) >= 1.311
+%{?with_gui:BuildRequires:	xorg-lib-libXpm-devel}
 BuildRequires:	zlib-devel
+Requires(post,postun):	shared-mime-info
+%if %{with gui}
+Requires(post,postun):	desktop-file-utils
+Requires(post,postun):	gtk-update-icon-cache
+Requires:	hicolor-icon-theme
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -36,30 +42,54 @@ PDF ze spisem treści.
 
 %prep
 %setup -q
-%patch -P0 -p0
-%patch -P1 -p1
-%patch -P2 -p1
-%patch -P3 -p1
+%patch -P0 -p1
 
 %build
+# --enable-debug only drops "install -s" and the default "-Os -g" OPTIM
 %configure \
-	%{!?with_gui:--without-gui}
+	--enable-debug \
+	--with-gui%{!?with_gui:=no} \
+	--with-http
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} install \
-	datadir=$RPM_BUILD_ROOT%{_datadir} \
-	mandir=$RPM_BUILD_ROOT%{_mandir} \
-	bindir=$RPM_BUILD_ROOT%{_bindir}
+	BUILDROOT=$RPM_BUILD_ROOT
+
+%if %{without gui}
+%{__rm} $RPM_BUILD_ROOT%{_desktopdir}/htmldoc.desktop \
+	$RPM_BUILD_ROOT%{_iconsdir}/hicolor/*x*/apps/htmldoc.png
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+%update_mime_database
+%if %{with gui}
+%update_desktop_database_post
+%update_icon_cache hicolor
+%endif
+
+%postun
+%update_mime_database
+%if %{with gui}
+%update_desktop_database_postun
+%update_icon_cache hicolor
+%endif
+
 %files
 %defattr(644,root,root,755)
-%doc COPYING.txt CHANGES.txt README.txt
-%doc doc/htmldoc.html doc/htmldoc-fig*.png doc/htmldoc.p* doc/help.html
-%attr(755,root,root) %{_bindir}/*
-%{_mandir}/man1/*
+%doc CHANGES.md COPYING README.md
+%attr(755,root,root) %{_bindir}/htmldoc
 %{_datadir}/htmldoc
+# help.html is opened from here by the GUI help browser
+%{_docdir}/htmldoc
+%{_datadir}/mime/packages/htmldoc.xml
+%{_mandir}/man1/htmldoc.1*
+%if %{with gui}
+%{_desktopdir}/htmldoc.desktop
+%{_iconsdir}/hicolor/*x*/apps/htmldoc.png
+%endif
diff --git a/gcc11.patch b/gcc11.patch
deleted file mode 100644
index f7bfa6d..0000000
--- a/gcc11.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- htmldoc-1.8.27/htmldoc/htmlsep.cxx~	2006-05-31 17:27:28.000000000 +0200
-+++ htmldoc-1.8.27/htmldoc/htmlsep.cxx	2021-10-19 00:40:19.312028523 +0200
-@@ -536,7 +536,7 @@
-     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/htmldoc-1.8.27-fortify-fail.patch b/htmldoc-1.8.27-fortify-fail.patch
deleted file mode 100644
index 32ec887..0000000
--- a/htmldoc-1.8.27-fortify-fail.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -ur htmldoc-1.8.27~/htmldoc/ps-pdf.cxx htmldoc-1.8.27/htmldoc/ps-pdf.cxx
---- htmldoc-1.8.27~/htmldoc/ps-pdf.cxx	2009-08-13 19:32:21.846860508 -0400
-+++ htmldoc-1.8.27/htmldoc/ps-pdf.cxx	2009-08-13 19:40:29.185857503 -0400
-@@ -8619,7 +8619,7 @@
-           return (NULL);
-         }
- 	// Safe because buffer is allocated...
--        strcpy((char *)r->data.text.buffer, (char *)data);
-+        memcpy((char *)r->data.text.buffer, (char *)data, strlen((char *)data));
-         get_color(_htmlTextColor, r->data.text.rgb);
-         break;
-     case RENDER_IMAGE :
-@@ -8640,7 +8640,7 @@
-           return (NULL);
-         }
- 	// Safe because buffer is allocated...
--        strcpy((char *)r->data.link, (char *)data);
-+        memcpy((char *)r->data.link, (char *)data, strlen((char *)data));
-         break;
-   }
- 
diff --git a/htmldoc-1.8.27-scanf-overflows.patch b/htmldoc-1.8.27-scanf-overflows.patch
deleted file mode 100644
index f4b6591..0000000
--- a/htmldoc-1.8.27-scanf-overflows.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -ur htmldoc-1.8.27~/htmldoc/htmllib.cxx htmldoc-1.8.27/htmldoc/htmllib.cxx
---- htmldoc-1.8.27~/htmldoc/htmllib.cxx	2009-08-13 19:25:30.066734472 -0400
-+++ htmldoc-1.8.27/htmldoc/htmllib.cxx	2009-08-13 19:25:38.997733603 -0400
-@@ -2154,7 +2154,7 @@
- 	  * 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 ++)
-Only in htmldoc-1.8.27/htmldoc: htmllib.cxx.orig
-diff -ur htmldoc-1.8.27~/htmldoc/ps-pdf.cxx htmldoc-1.8.27/htmldoc/ps-pdf.cxx
---- htmldoc-1.8.27~/htmldoc/ps-pdf.cxx	2009-08-13 19:25:30.076736152 -0400
-+++ htmldoc-1.8.27/htmldoc/ps-pdf.cxx	2009-08-13 19:25:39.010735889 -0400
-@@ -12515,7 +12515,7 @@
- 	  * 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 ++)
-Only in htmldoc-1.8.27/htmldoc: ps-pdf.cxx.orig
-diff -ur htmldoc-1.8.27~/htmldoc/util.cxx htmldoc-1.8.27/htmldoc/util.cxx
---- htmldoc-1.8.27~/htmldoc/util.cxx	2005-04-24 15:20:32.000000000 -0400
-+++ htmldoc-1.8.27/htmldoc/util.cxx	2009-08-13 19:25:39.014737749 -0400
-@@ -484,7 +484,7 @@
-     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/htmldoc-libpng15.patch b/htmldoc-libpng15.patch
deleted file mode 100644
index 94a343e..0000000
--- a/htmldoc-libpng15.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From upstream 1.8 branch svn r1668
-
-The previous libpng-1.5 conversion patch here caused corrupt PNG output
-on 64 bit. e.g. http://answerpot.com/showthread.php?3662601-PNG+Rendering+Problems
-
-The upstream version (below) works well.
-
-Index: htmldoc/image.cxx
-===================================================================
---- htmldoc/image.cxx.orig
-+++ htmldoc/image.cxx
-@@ -3,23 +3,11 @@
-  *
-  *   Image handling routines for HTMLDOC, a HTML document processing program.
-  *
-- *   Copyright 1997-2005 by Easy Software Products.
-+ *   Copyright 2011 by Michael R Sweet.
-+ *   Copyright 1997-2010 by Easy Software Products.  All rights reserved.
-  *
-- *   These coded instructions, statements, and computer programs are the
-- *   property of Easy Software Products and are protected by Federal
-- *   copyright law.  Distribution and use rights are outlined in the file
-- *   "COPYING.txt" which should have been included with this file.  If this
-- *   file is missing or damaged please contact Easy Software Products
-- *   at:
-- *
-- *       Attn: ESP Licensing Information
-- *       Easy Software Products
-- *       44141 Airport View Drive, Suite 204
-- *       Hollywood, Maryland 20636-3142 USA
-- *
-- *       Voice: (301) 373-9600
-- *       EMail: info at easysw.com
-- *         WWW: http://www.easysw.com
-+ *   This program is free software.  Distribution and use rights are outlined in
-+ *   the file "COPYING.txt".
-  *
-  * Contents:
-  *
-@@ -1499,7 +1487,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 +1514,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 +1523,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 +1542,10 @@ 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)
-+  if (png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA)
-   {
-     if ((PSLevel == 0 && PDFVersion >= 14) || PSLevel == 3)
-       image_need_mask(img, 8);
-@@ -1571,14 +1559,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)
-     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 +1582,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 +1598,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)
-   {
- #ifdef DEBUG
-     for (inptr = img->pixels, i = 0; i < img->height; i ++)
-@@ -1639,7 +1627,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...
-@@ -1720,7 +1708,7 @@ image_need_mask(image_t *img,	/* I - Ima
-   {
-     // Alpha mask
-     img->maskwidth = (img->width * scaling + 7) / 8;
--    size           = img->maskwidth * img->height * scaling;
-+    size           = img->maskwidth * img->height * scaling + 1;
-   }
- 
-   img->mask = (uchar *)calloc(size, 1);
diff --git a/htmldoc-verbose.patch b/htmldoc-verbose.patch
new file mode 100644
index 0000000..e7fc8a2
--- /dev/null
+++ b/htmldoc-verbose.patch
@@ -0,0 +1,12 @@
+Upstream .SILENT hides compiler command lines, so build flags cannot be checked in the log.
+
+--- htmldoc-1.9.24/Makedefs.in.orig
++++ htmldoc-1.9.24/Makedefs.in
+@@ -80,7 +80,6 @@
+ # Rules...
+ #
+ 
+-.SILENT:
+ .SUFFIXES:	.a .c .cxx .h .o
+ .c.o:
+ 	echo Compiling $<...
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/htmldoc.git/commitdiff/9582aecb4eac87fa7fbe91a5eacd34af155aec3c



More information about the pld-cvs-commit mailing list