[98150] trunk/dports/textproc/htmldoc
ryandesign at macports.org
ryandesign at macports.org
Wed Sep 26 08:23:29 PDT 2012
Revision: 98150
http://trac.macports.org//changeset/98150
Author: ryandesign at macports.org
Date: 2012-09-26 08:23:29 -0700 (Wed, 26 Sep 2012)
Log Message:
-----------
htmldoc: add patch to fix build with libpng 1.5; add post-build block to detect when build fails (#36341)
Modified Paths:
--------------
trunk/dports/textproc/htmldoc/Portfile
Added Paths:
-----------
trunk/dports/textproc/htmldoc/files/
trunk/dports/textproc/htmldoc/files/patch-libpng-1.5.diff
Modified: trunk/dports/textproc/htmldoc/Portfile
===================================================================
--- trunk/dports/textproc/htmldoc/Portfile 2012-09-26 15:01:12 UTC (rev 98149)
+++ trunk/dports/textproc/htmldoc/Portfile 2012-09-26 15:23:29 UTC (rev 98150)
@@ -4,7 +4,7 @@
name htmldoc
version 1.8.27
-revision 4
+revision 5
categories textproc
license {GPL-2 OpenSSLException}
maintainers nomaintainer
@@ -33,11 +33,23 @@
depends_lib port:jpeg port:libpng port:zlib
+patchfiles patch-libpng-1.5.diff
+
configure.cxxflags -I${prefix}/include
configure.args --without-gui --disable-localjpeg --disable-localpng \
--disable-localzlib --disable-ssl
+post-build {
+ # The build and install don't notice when essential files don't get built,
+ # so we must exit for it when it fails. #36341
+ foreach f {htmldoc/htmldoc} {
+ if {![file exists ${worksrcpath}/${f}]} {
+ return -code error "${f} did not get built"
+ }
+ }
+}
+
destroot.destdir prefix=${destroot}${prefix} exec_prefix=${destroot}${prefix} \
bindir=${destroot}${prefix}/bin mandir=${destroot}${prefix}/share/man
Added: trunk/dports/textproc/htmldoc/files/patch-libpng-1.5.diff
===================================================================
--- trunk/dports/textproc/htmldoc/files/patch-libpng-1.5.diff (rev 0)
+++ trunk/dports/textproc/htmldoc/files/patch-libpng-1.5.diff 2012-09-26 15:23:29 UTC (rev 98150)
@@ -0,0 +1,143 @@
+http://pkgs.fedoraproject.org/cgit/htmldoc.git/plain/htmldoc-1.8.27-libpng15.patch?h=f18
+From upstream 1.8 branch svn r1668
+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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120926/46238f42/attachment-0001.html>
More information about the macports-changes
mailing list