diff options
author | James An | 2014-08-09 20:16:39 -0400 |
---|---|---|
committer | James An | 2014-08-09 20:16:39 -0400 |
commit | 4cb40faa28520b4e2215b4b882ef9763ff133d4f (patch) | |
tree | e6c31187252acf751b868991e75a186a172bf978 | |
download | aur-4cb40faa28520b4e2215b4b882ef9763ff133d4f.tar.gz |
Added htmldoc to fix its PKGBUILD and update its source to the latest version.
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | Changelog | 24 | ||||
-rw-r--r-- | PKGBUILD | 79 | ||||
-rw-r--r-- | cve-2009-3050.patch | 41 | ||||
-rw-r--r-- | fortify-fail.patch | 21 | ||||
-rw-r--r-- | htmldoc.install | 13 | ||||
-rw-r--r-- | libpng15.patch | 122 | ||||
-rw-r--r-- | manpage-fixes.patch | 42 | ||||
-rw-r--r-- | useful-build-info.patch | 25 |
9 files changed, 398 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..373f4f79cde8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = htmldoc + pkgdesc = Produce PDF or Postscript from HTML documents including TOCs and Indices + pkgver = 1.8.27 + pkgrel = 4 + url = http://www.htmldoc.org + install = htmldoc.install + changelog = Changelog + arch = i686 + arch = x86_64 + license = GPL2 + depends = libxpm + depends = fltk + depends = libjpeg + depends = openssl + depends = shared-mime-info + conflicts = htmldoc-svn + source = http://www.msweet.org/files/project1/htmldoc-1.8.27-source.tar.gz + source = cve-2009-3050.patch + source = fortify-fail.patch + source = libpng15.patch + source = manpage-fixes.patch + source = useful-build-info.patch + sha256sums = 64f6d9f40f00f9cc68df6508123e88ed30fef924881fd28dca45358ecd79d320 + sha256sums = a742b1d66d0832ee8aa5ea8e854a31eb2c6e3417d196f8c2ecfac411bfaef6c1 + sha256sums = d8d5a5d9ebf5225a32b4f00d80e89a5576122d8c70c5ef60f36c3717c3770746 + sha256sums = 69a08e3f349b518081109c47b38672f9c8a19a1957b614d7eac8e420fe3bc817 + sha256sums = df92c446af6c4d7aef9b69c70e62a31cd992dc8a04f13734bedb1d83257f0e5a + sha256sums = e3494c1cb21dc7daf8774f60060e4fb67d85d563ff294fcf81656718018021e5 + +pkgname = htmldoc + diff --git a/Changelog b/Changelog new file mode 100644 index 000000000000..c24017717cfb --- /dev/null +++ b/Changelog @@ -0,0 +1,24 @@ +2013-09-17 Mariusz Libera <mariusz.libera@gmail.com> + + 1.8.27-4: + * remove htmldoc.ps - it saves us a LOT of space (~150M) + +2013-08-27 Mariusz Libera <mariusz.libera@gmail.com> + + 1.8.27-3: + * merged htmldoc and htmldoc-patched + * surrounded paths with variables with quotation marks + +2013-06-17 Mariusz Libera <mariusz.libera@gmail.com> + + 1.8.27-2: + * new maintainer + * updated PKGBUILD + * included patches from Debian and one from Fedora + * added documentation + * added mime file + * fixed dependencies + * changed the way icons are installed + * added .install file updateing mime,desktop,icons + * added Changelog + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1d2553a2753c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,79 @@ +# Maintainer: Mariusz Libera <mariusz.libera@gmail.com> +# Contributor: mortdeus <mortdeus@gocos2d.org> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: tobias <tobias@archlinux.org> +# Contributor: Simon Rutishauser <simon.rutishauser@gmx.ch> +pkgname=htmldoc +pkgver=1.8.27 +pkgrel=4 +pkgdesc="Produce PDF or Postscript from HTML documents including TOCs and Indices" +arch=('i686' 'x86_64') +url="http://www.htmldoc.org" +license=('GPL2') +depends=('libxpm' 'fltk' 'libjpeg' 'openssl' 'shared-mime-info') +conflicts=('htmldoc-svn') +changelog=Changelog +install=$pkgname.install +source=("http://www.msweet.org/files/project1/htmldoc-${pkgver}-source.tar.gz" + 'cve-2009-3050.patch' + 'fortify-fail.patch' + 'libpng15.patch' + 'manpage-fixes.patch' + 'useful-build-info.patch') +sha256sums=('64f6d9f40f00f9cc68df6508123e88ed30fef924881fd28dca45358ecd79d320' + 'a742b1d66d0832ee8aa5ea8e854a31eb2c6e3417d196f8c2ecfac411bfaef6c1' + 'd8d5a5d9ebf5225a32b4f00d80e89a5576122d8c70c5ef60f36c3717c3770746' + '69a08e3f349b518081109c47b38672f9c8a19a1957b614d7eac8e420fe3bc817' + 'df92c446af6c4d7aef9b69c70e62a31cd992dc8a04f13734bedb1d83257f0e5a' + 'e3494c1cb21dc7daf8774f60060e4fb67d85d563ff294fcf81656718018021e5') + +prepare() { + cd $srcdir/$pkgname-$pkgver + + # apply patches + for patch in ../*.patch ; do + patch -Np1 -i $patch + done + + # fix desktop file + echo "MimeType=application/vnd.htmldoc-book;" >> desktop/htmldoc.desktop + sed -i 's/X-Red-Hat.*$//' desktop/htmldoc.desktop + sed -i 's/htmldoc.png/htmldoc/' desktop/htmldoc.desktop +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make install \ + prefix="$pkgdir/usr" \ + bindir="$pkgdir/usr/bin" \ + mandir="$pkgdir/usr/share/man" + + # documentation + install -m644 \ + CHANGES.txt \ + README.txt \ + "$pkgdir/usr/share/doc/htmldoc" + + # documentation in .ps is way to heavy - this saves ~150M + rm "$pkgdir/usr/share/doc/htmldoc/htmldoc.ps" + + # desktop file + install -Dm644 desktop/htmldoc.desktop \ + "$pkgdir/usr/share/applications/htmldoc.desktop" + + # icons + for s in 16 24 32 48 64 96 128; do + install -Dm644 desktop/htmldoc-${s}.png \ + "$pkgdir/usr/share/icons/hicolor/${s}x${s}/apps/htmldoc.png" + done + + # mime + install -Dm644 desktop/htmldoc.xml \ + "$pkgdir/usr/share/mime/packages/htmldoc.xml" +} diff --git a/cve-2009-3050.patch b/cve-2009-3050.patch new file mode 100644 index 000000000000..8d0fd173a6f6 --- /dev/null +++ b/cve-2009-3050.patch @@ -0,0 +1,41 @@ +Description: Fix for CVE-2009-3050 + This patch fixes a buffer overflow when setting custom page output size. +Author: Giuseppe Iuculano <iuculano@debian.org> +Bug-Debian: http://bugs.debian.org/537637 +Bug-Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=278186 +Bug: http://www.htmldoc.org/str.php?L214+P0+S0+C0+I0+E0+M1000+Qversion:1.8 +Last-Update: 2011-02-20 + +--- 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... +--- 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 ++) +--- 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 ++) diff --git a/fortify-fail.patch b/fortify-fail.patch new file mode 100644 index 000000000000..32ec8873567f --- /dev/null +++ b/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/htmldoc.install b/htmldoc.install new file mode 100644 index 000000000000..f1b73efac3e7 --- /dev/null +++ b/htmldoc.install @@ -0,0 +1,13 @@ +post_install() { + update-desktop-database -q + update-mime-database /usr/share/mime &> /dev/null + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/libpng15.patch b/libpng15.patch new file mode 100644 index 000000000000..02f1d2330203 --- /dev/null +++ b/libpng15.patch @@ -0,0 +1,122 @@ +Description: libpng 1.5 fixes + This patch fixes incompatibilities with libpng 1.5. +Bug: http://www.htmldoc.org/str.php?L243+Qversion:1.8 +Origin: http://www.htmldoc.org/str.php?F243+P0+S-2+C0+I0+E0+M10+Qversion%3A1.8 +Forwarded: not-needed +Last-Update: 2011-12-04 + +Index: htmldoc-1.8.27/htmldoc/image.cxx +=================================================================== +--- htmldoc-1.8.27.orig/htmldoc/image.cxx 2011-12-04 22:32:01.000000000 -0500 ++++ htmldoc-1.8.27/htmldoc/image.cxx 2011-12-04 22:35:32.000000000 -0500 +@@ -1472,6 +1472,9 @@ + 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 @@ + + 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 @@ + + 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 @@ + 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 @@ + 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 @@ + + #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 @@ + * 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 @@ + * 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 @@ + * 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/manpage-fixes.patch b/manpage-fixes.patch new file mode 100644 index 000000000000..8a47b8470229 --- /dev/null +++ b/manpage-fixes.patch @@ -0,0 +1,42 @@ +Description: Documentation fixes + This patch gives us a complete documentation build, and also fixes + some minor inaccuracies in the docs. +Author: Jeff Licquia <licquia@debian.org> +Last-Update: 2011-02-20 + +--- htmldoc-1.8.27.orig/doc/Makefile ++++ htmldoc-1.8.27/doc/Makefile +@@ -40,7 +40,7 @@ SOURCES = intro.html 1-install.html 2-st + d-compile.html + + DOCUMENTS = htmldoc.html htmldoc.pdf htmldoc.ps +-DOCFILES = help.html htmldoc.pdf ++DOCFILES = help.html htmldoc.pdf htmldoc.html htmldoc.ps + + HTMLDOC = ../htmldoc/htmldoc$(EXEEXT) --datadir .. --strict --verbose + +--- htmldoc-1.8.27.orig/doc/htmldoc.man ++++ htmldoc-1.8.27/doc/htmldoc.man +@@ -80,9 +80,11 @@ Specifies the bottom margin in points (n + (##in), centimeters (##cm), or millimeters (##mm). + + .TP 5 +---charset \fI{8859-1...8859-15}\fR ++--charset \fIcharset-id\fR + .br +-Specifies the ISO character set to use for the output. ++Specifies the ISO character set to use for the output. Supported ++charsets include some Windows code pages (cp-###), ISO 8859 sets ++1-9, 14, and 15 (iso8859-##), and koi8-r. + + .TP 5 + --color +@@ -579,7 +581,7 @@ program. + .SH SEE ALSO + HTMLDOC Software Users Manual + .LP +-http://www.easysw.com/htmldoc/ ++http://www.htmldoc.org/documentation.php + .SH AUTHOR + Michael Sweet, Easy Software Products + .SH TRADEMARKS diff --git a/useful-build-info.patch b/useful-build-info.patch new file mode 100644 index 000000000000..a6e33d1ef9f0 --- /dev/null +++ b/useful-build-info.patch @@ -0,0 +1,25 @@ +Description: Build system patch + This patch makes the build system print useful information in case of + a build failure. +Author: Jeff Licquia <licquia@debian.org> +Forwarded: not-needed +Last-Update: 2011-02-20 + +Index: htmldoc-1.8.27/Makedefs.in +=================================================================== +--- htmldoc-1.8.27.orig/Makedefs.in 2011-02-20 12:18:13.000000000 -0500 ++++ htmldoc-1.8.27/Makedefs.in 2011-02-20 12:18:33.000000000 -0500 +@@ -81,13 +81,10 @@ + # Rules... + # + +-.SILENT: + .SUFFIXES: .a .c .cxx .h .o + .c.o: +- echo Compiling $<... + $(CC) $(CFLAGS) -c $< + .cxx.o: +- echo Compiling $<... + $(CXX) $(CXXFLAGS) -c $< + + # |