summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-text/htmldoc
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-text/htmldoc')
-rw-r--r--app-text/htmldoc/Manifest1
-rw-r--r--app-text/htmldoc/files/htmldoc-1.8.27-crash.patch11
-rw-r--r--app-text/htmldoc/files/htmldoc-fortify-fail.patch21
-rw-r--r--app-text/htmldoc/files/htmldoc-libpng15.patch116
-rw-r--r--app-text/htmldoc/files/htmldoc-sscanf-overflows.patch38
-rw-r--r--app-text/htmldoc/htmldoc-1.8.27-r3.ebuild60
-rw-r--r--app-text/htmldoc/metadata.xml7
7 files changed, 254 insertions, 0 deletions
diff --git a/app-text/htmldoc/Manifest b/app-text/htmldoc/Manifest
new file mode 100644
index 000000000000..3ebde9562085
--- /dev/null
+++ b/app-text/htmldoc/Manifest
@@ -0,0 +1 @@
+DIST htmldoc-1.8.27-source.tar.bz2 3960271 SHA256 89ffd223734268375dc959c200622dc5f167576c5cad9d7ce4bd7567faeb9613 SHA512 f0b2b6fec4925e549e74d6721f15b5de00c8c4889b0c67689945c408ed88074acb1330cae155655a1986adc0ca549cea32e242aa1ecac8e6338a1739f7c85438 WHIRLPOOL 0716ef8e70d11208668685b3b2cc742111940c91264a97531e705351721f3f14260c05479f35f73c2961238e163e0f5407c5bb2769984ccbcb5063736ebd4b39
diff --git a/app-text/htmldoc/files/htmldoc-1.8.27-crash.patch b/app-text/htmldoc/files/htmldoc-1.8.27-crash.patch
new file mode 100644
index 000000000000..b339904ae412
--- /dev/null
+++ b/app-text/htmldoc/files/htmldoc-1.8.27-crash.patch
@@ -0,0 +1,11 @@
+--- htmldoc/ps-pdf.cxx 2006-08-01 18:58:50.000000000 +0200
++++ htmldoc/ps-pdf.cxx 2008-04-26 21:19:49.000000000 +0200
+@@ -3624,7 +3624,7 @@
+ * Get the width of the page number, leave room for three dots...
+ */
+
+- if (heading >= 0)
++ if (heading >= 0 && heading < num_headings)
+ {
+ hpage = heading_pages[heading];
+ numberwidth = get_width((uchar *)pages[hpage].page_text,
diff --git a/app-text/htmldoc/files/htmldoc-fortify-fail.patch b/app-text/htmldoc/files/htmldoc-fortify-fail.patch
new file mode 100644
index 000000000000..32ec8873567f
--- /dev/null
+++ b/app-text/htmldoc/files/htmldoc-fortify-fail.patch
@@ -0,0 +1,21 @@
+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/app-text/htmldoc/files/htmldoc-libpng15.patch b/app-text/htmldoc/files/htmldoc-libpng15.patch
new file mode 100644
index 000000000000..7b834c304d26
--- /dev/null
+++ b/app-text/htmldoc/files/htmldoc-libpng15.patch
@@ -0,0 +1,116 @@
+http://bugs.gentoo.org/385521
+http://www.htmldoc.org/str.php?L243+P0+S-2+C0+I0+E0+M10+Q
+
+--- htmldoc/image.cxx
++++ 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/app-text/htmldoc/files/htmldoc-sscanf-overflows.patch b/app-text/htmldoc/files/htmldoc-sscanf-overflows.patch
new file mode 100644
index 000000000000..3a8d4edd31a2
--- /dev/null
+++ b/app-text/htmldoc/files/htmldoc-sscanf-overflows.patch
@@ -0,0 +1,38 @@
+Fix several insecure calls to sscanf(), bug 278186. Patch by a3li@gentoo.org.
+
+diff -ru a/htmldoc/htmllib.cxx b/htmldoc/htmllib.cxx
+--- a/htmldoc/htmllib.cxx 2006-06-07 19:43:52.000000000 +0200
++++ b/htmldoc/htmllib.cxx 2009-08-01 19:52:46.301099436 +0200
+@@ -2139,7 +2139,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 ++)
+diff -ru a/htmldoc/ps-pdf.cxx b/htmldoc/ps-pdf.cxx
+--- a/htmldoc/ps-pdf.cxx 2006-08-01 18:58:50.000000000 +0200
++++ b/htmldoc/ps-pdf.cxx 2009-08-01 19:53:14.300610480 +0200
+@@ -12512,7 +12512,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 ++)
+diff -ru a/htmldoc/util.cxx b/htmldoc/util.cxx
+--- a/htmldoc/util.cxx 2005-04-24 21:20:32.000000000 +0200
++++ b/htmldoc/util.cxx 2009-08-01 19:52:14.469652088 +0200
+@@ -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/app-text/htmldoc/htmldoc-1.8.27-r3.ebuild b/app-text/htmldoc/htmldoc-1.8.27-r3.ebuild
new file mode 100644
index 000000000000..b863c8b5e42b
--- /dev/null
+++ b/app-text/htmldoc/htmldoc-1.8.27-r3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils
+
+DESCRIPTION="Convert HTML pages into a PDF document"
+SRC_URI="http://www.msweet.org/files/project1/${P}-source.tar.bz2"
+HOMEPAGE="http://www.msweet.org/projects.php?Z1"
+
+IUSE="fltk ssl"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86"
+
+DEPEND=">=media-libs/libpng-1.4
+ virtual/jpeg
+ fltk? ( x11-libs/fltk:1 )
+ ssl? ( >=dev-libs/openssl-0.9.6e )"
+RDEPEND="${DEPEND}"
+
+# this needs to be figured out, since htmldoc looks for all three libs
+# right now there's no virtual/ssl
+#
+# --enable-openssl use OpenSSL for SSL/TLS support, default=yes
+# --enable-gnutls use GNU TLS for SSL/TLS support, default=yes
+# --enable-cdsassl use CDSA for SSL/TLS support, default=yes
+
+src_prepare() {
+ # make sure not to use the libs htmldoc ships with
+ mkdir foo ; mv jpeg foo/ ; mv png foo/ ; mv zlib foo/
+
+ epatch \
+ "${FILESDIR}"/${PN}-sscanf-overflows.patch \
+ "${FILESDIR}"/${PN}-fortify-fail.patch \
+ "${FILESDIR}"/${PN}-libpng15.patch \
+ "${FILESDIR}"/${P}-crash.patch
+
+ sed -i "s:^#define DOCUMENTATION \"\$prefix/share/doc/htmldoc\":#define DOCUMENTATION \"\$prefix/share/doc/${PF}/html\":" \
+ configure || die
+}
+
+src_configure() {
+ local myconf="$(use_enable ssl openssl) $(use_with fltk gui)"
+ econf ${myconf}
+ # Add missing -lfltk_images to LIBS
+ if use fltk; then
+ sed -i 's:-lfltk :-lfltk -lfltk_images :g' Makedefs || die
+ fi
+}
+
+src_install() {
+ einstall bindir="${D}/usr/bin"
+
+ # Minor cleanups
+ mv "${D}/usr/share/doc/htmldoc" "${D}/usr/share/doc/${PF}"
+ dodir /usr/share/doc/${PF}/html
+ mv "${D}"/usr/share/doc/${PF}/*.html "${D}/usr/share/doc/${PF}/html"
+}
diff --git a/app-text/htmldoc/metadata.xml b/app-text/htmldoc/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/app-text/htmldoc/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>