diff --git a/htmldoc-1.8.27-source.tar.bz2 b/htmldoc-1.8.27-source.tar.bz2
deleted file mode 100644
index b8c822c..0000000
--- a/htmldoc-1.8.27-source.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:89ffd223734268375dc959c200622dc5f167576c5cad9d7ce4bd7567faeb9613
-size 3960271
diff --git a/htmldoc-1.8.28-source.tar.bz2 b/htmldoc-1.8.28-source.tar.bz2
new file mode 100644
index 0000000..60f86f4
--- /dev/null
+++ b/htmldoc-1.8.28-source.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2a688bd820ad6f7bdebb274716102dafbf4d5fcfa20a5b8d87a56b030d184732
+size 4026568
diff --git a/htmldoc-cups_rand.patch b/htmldoc-cups_rand.patch
new file mode 100644
index 0000000..6d96145
--- /dev/null
+++ b/htmldoc-cups_rand.patch
@@ -0,0 +1,20 @@
+bug#510: Fix undefined symbols CUPS_SRAND and CUPS_RAND
+https://www.msweet.org/bugs.php?U510
+
+Index: htmldoc-1.8.28/htmldoc/http.c
+===================================================================
+--- htmldoc-1.8.28.orig/htmldoc/http.c
++++ htmldoc-1.8.28/htmldoc/http.c
+@@ -1229,10 +1229,10 @@ httpInitialize(void)
+ * it is the best we can do (on others, this seed isn't even used...)
+ */
+
+- CUPS_SRAND(time(NULL));
++ srand(time(NULL));
+
+ for (i = 0; i < sizeof(data); i ++)
+- data[i] = CUPS_RAND();
++ data[i] = rand();
+
+ RAND_seed(data, sizeof(data));
+ #endif /* HAVE_GNUTLS */
diff --git a/htmldoc-docpath.diff b/htmldoc-docpath.diff
index 674c05e..65300ed 100644
--- a/htmldoc-docpath.diff
+++ b/htmldoc-docpath.diff
@@ -5,7 +5,7 @@ Index: config.h.in
===================================================================
--- config.h.in.orig
+++ config.h.in
-@@ -54,7 +54,7 @@
+@@ -42,7 +42,7 @@
* Locations of files...
*/
@@ -14,36 +14,23 @@ Index: config.h.in
#define HTML_DATA "/usr/share/htmldoc"
-Index: configure.in
-===================================================================
---- configure.in.orig
-+++ configure.in
-@@ -316,7 +316,7 @@ if test "$bindir" = "\${exec_prefix}/bin
- bindir="$exec_prefix/bin"
- fi
-
--AC_DEFINE_UNQUOTED(DOCUMENTATION, "$prefix/share/doc/htmldoc")
-+AC_DEFINE_UNQUOTED(DOCUMENTATION, "$prefix/share/doc/packages/htmldoc/doc")
- AC_DEFINE_UNQUOTED(HTML_DATA, "$prefix/share/htmldoc")
-
- dnl Update compiler options...
Index: doc/Makefile
===================================================================
--- doc/Makefile.orig
+++ doc/Makefile
-@@ -57,11 +57,11 @@ all: $(DOCUMENTS)
+@@ -44,11 +44,11 @@ all: $(DOCUMENTS)
#
install: $(DOCUMENTS)
-- if [ ! -d $(datadir)/doc/htmldoc ]; then\
+- if test ! -d $(datadir)/doc/htmldoc; then\
- $(MKDIR) $(datadir)/doc/htmldoc;\
-+ if [ ! -d $(datadir)/doc/packages/htmldoc ]; then\
++ if test ! -d $(datadir)/doc/packages/htmldoc; then\
+ $(MKDIR) $(datadir)/doc/packages/htmldoc;\
fi
- $(CP) $(DOCFILES) $(datadir)/doc/htmldoc
- $(CHMOD) ugo+r $(datadir)/doc/htmldoc/*
+ $(CP) $(DOCFILES) $(datadir)/doc/packages/htmldoc
+ $(CHMOD) ugo+r $(datadir)/doc/packages/htmldoc/*
- if [ ! -d $(mandir)/man1 ]; then\
+ if test ! -d $(mandir)/man1; then\
$(MKDIR) $(mandir)/man1;\
fi
diff --git a/htmldoc-fortify.diff b/htmldoc-fortify.diff
deleted file mode 100644
index 8a59a23..0000000
--- a/htmldoc-fortify.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./htmldoc/ps-pdf.cxx.orig 2010-02-15 11:13:11.000000000 +0100
-+++ ./htmldoc/ps-pdf.cxx 2010-02-15 11:17:02.000000000 +0100
-@@ -8615,7 +8615,7 @@
- return (NULL);
- }
- // Safe because buffer is allocated...
-- strcpy((char *)r->data.text.buffer, (char *)data);
-+ memcpy((char *)r->data.text.buffer, data, strlen ((char *)data) + 1);
- get_color(_htmlTextColor, r->data.text.rgb);
- break;
- case RENDER_IMAGE :
diff --git a/htmldoc-libpng15.diff b/htmldoc-libpng15.diff
deleted file mode 100644
index 591dbc6..0000000
--- a/htmldoc-libpng15.diff
+++ /dev/null
@@ -1,114 +0,0 @@
-http://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20120206/332669.html
---- htmldoc/image.cxx.orig Wed May 31 13:00:02 2006
-+++ htmldoc/image.cxx Wed Jul 6 15:22:43 2011
-@@ -1472,6 +1472,9 @@ image_load_png(image_t *img, /* I - Image pointer */
- 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 - Image pointer */
-
- 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 - Image pointer */
-
- 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 - Image pointer */
- 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 - Image pointer */
- 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 - Image pointer */
-
- #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 - Image pointer */
- * 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 - Image pointer */
- * 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 - Image pointer */
- * 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/htmldoc-link-x11.patch b/htmldoc-link-x11.patch
deleted file mode 100644
index 9967f2e..0000000
--- a/htmldoc-link-x11.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: htmldoc-1.8.27/configure.in
-===================================================================
---- htmldoc-1.8.27.orig/configure.in
-+++ htmldoc-1.8.27/configure.in
-@@ -294,6 +294,7 @@ if test "x$with_gui" != xno; then
- POST="$FLTKCONFIG --post"
-
- AC_CHECK_LIB(Xpm,XpmCreatePixmapFromData)
-+ AC_CHECK_LIB(X11,XCreateBitmapFromData)
- else
- AC_MSG_WARN(FLTK not available so no GUI will be built.)
- fi
diff --git a/htmldoc.changes b/htmldoc.changes
index 5fed6de..39aa6c0 100644
--- a/htmldoc.changes
+++ b/htmldoc.changes
@@ -1,3 +1,42 @@
+-------------------------------------------------------------------
+Wed Feb 25 19:49:30 UTC 2015 - benoit.monin@gmx.fr
+
+- update to version 1.8.28:
+ * Updated default PDF version to 1.4.
+ * SECURITY: Fixed three buffer overflow issues when reading AFM
+ files and parsing page sizes.
+ * Fixed incompatibility with Fortify's version of strcpy, which
+ does not work properly with variable-length arrays (STR #235)
+ * Fixed compilation against PNG library 1.5 or later (STR #243)
+ * Fixed documentation errors (PR #6593, PR #6595)
+ * Marked Zapf-Dingbats as a standard font (STR #198)
+ * Fixed GPL license text in GUI (STR #222)
+ * Fixed a table formatting problem when a column has multiple
+ colspan values (PR #6709)
+ * Fixed parsing of HTML comments (STR #181)
+ * Fixed potential out-of-bounds read in table-of-contents
+ rendering code (STR #183)
+ * Fixed handling of image URLs with ampersands in them (STR #186)
+ * Fixed top/bottom margins for logo and header/footer images
+ (STR #174)
+ * Fixed image alignment bug (Bug #231)
+ * Fixed X11 build problem (Bug #243)
+- add source url
+- drop the following patches after upstream fix:
+ * htmldoc_CVE-2009-3050_535943.diff
+ * htmldoc-fortify.diff
+ * htmldoc-libpng15.diff
+ * htmldoc-link-x11.patch
+- refresh patch htmldoc-docpath.diff
+- add patch htmldoc-cups_rand.patch to work around a build error
+ (upstream bug #510)
+- remove now unused --with-fltk configure options
+- set datadir for make install
+- do not package doc/ source directory: documentation is already
+ provided by htmldoc.pdf
+- remove COMPILE.txt from doc: useless in a rpm
+- add -q to %setup to avoid spamming the build log
+
-------------------------------------------------------------------
Fri Apr 19 22:57:21 UTC 2013 - dimstar@opensuse.org
diff --git a/htmldoc.spec b/htmldoc.spec
index 115ea87..9a02352 100644
--- a/htmldoc.spec
+++ b/htmldoc.spec
@@ -1,7 +1,7 @@
#
# spec file for package htmldoc
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,18 +26,15 @@ BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: openssl-devel
Url: http://htmldoc.org/
-Version: 1.8.27
+Version: 1.8.28
Release: 0
Summary: HTML Processor that Generates HTML, PostScript, and PDF Files
License: LGPL-2.1+
Group: Productivity/Publishing/HTML/Tools
-Source: %{name}-%{version}-source.tar.bz2
+Source: http://www.msweet.org/files/project1/%{name}-%{version}-source.tar.bz2
Patch: %{name}-docpath.diff
-Patch1: htmldoc_CVE-2009-3050_535943.diff
-Patch2: htmldoc-fortify.diff
-# link to libpng15.patch sent to mike@easysw.com
-Patch3: htmldoc-libpng15.diff
-Patch4: htmldoc-link-x11.patch
+# PATCH-FIX-UPSTREAM htmldoc-cups_rand.patch upstream bug #510
+Patch1: htmldoc-cups_rand.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define DOCDIR %{_datadir}/doc/packages/%{name}
@@ -47,12 +44,9 @@ Portable Document Format (PDF) files that can be viewed online or
printed.
%prep
-%setup
+%setup -q
%patch
%patch1 -p1
-%patch2
-%patch3
-%patch4 -p1
%build
export CFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
@@ -61,28 +55,23 @@ autoconf
--bindir=%{_bindir} \
--prefix=%{_usr} \
--mandir=%{_mandir} \
- --with-fltk-libs=/usr/X11R6/lib \
- --with-fltk-includes=/usr/X11R6/include \
--with-gui
make
%install
[ x"${RPM_BUILD_ROOT}" = x"/" ] && ( echo "your buildroot is /" && exit 0) || rm -rf "${RPM_BUILD_ROOT}"
-mkdir -p \
- ${RPM_BUILD_ROOT}/%{_bindir} \
- ${RPM_BUILD_ROOT}/%{_mandir}
make \
bindir=${RPM_BUILD_ROOT}/%{_bindir} \
prefix=${RPM_BUILD_ROOT}/%{_usr} \
mandir=${RPM_BUILD_ROOT}/%{_mandir} \
-install
-rm -v doc/Makefile
+ datadir=${RPM_BUILD_ROOT}/%{_datadir} \
+install
%files
%defattr(-,root,root)
%{_bindir}/htmldoc
%{_datadir}/htmldoc
%doc %{_mandir}/man1/htmldoc.1.gz
-%doc doc/ cgi-bin/ CHANGES.txt COMPILE.txt COPYING.txt README.txt
+%doc cgi-bin/ CHANGES.txt COPYING.txt README.txt
%changelog
diff --git a/htmldoc_CVE-2009-3050_535943.diff b/htmldoc_CVE-2009-3050_535943.diff
deleted file mode 100644
index a93e72d..0000000
--- a/htmldoc_CVE-2009-3050_535943.diff
+++ /dev/null
@@ -1,41 +0,0 @@
-Fix several insecure calls to sscanf(), bug 278186.
-
-Index: htmldoc-1.8.27/htmldoc/htmllib.cxx
-===================================================================
---- htmldoc-1.8.27.orig/htmldoc/htmllib.cxx
-+++ htmldoc-1.8.27/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 ++)
-Index: htmldoc-1.8.27/htmldoc/ps-pdf.cxx
-===================================================================
---- htmldoc-1.8.27.orig/htmldoc/ps-pdf.cxx
-+++ htmldoc-1.8.27/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 ++)
-Index: htmldoc-1.8.27/htmldoc/util.cxx
-===================================================================
---- htmldoc-1.8.27.orig/htmldoc/util.cxx
-+++ htmldoc-1.8.27/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...