aboutsummaryrefslogtreecommitdiff
path: root/textproc/htmldoc
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2018-12-09 02:48:31 +0000
committerSteve Wills <swills@FreeBSD.org>2018-12-09 02:48:31 +0000
commitddb6bf5850b84fcc08f693842c72e805feb67c69 (patch)
treef7c432d61bfeb4310c4cecd613f642bc37ba856d /textproc/htmldoc
parent032d16b24703b05e2ae34572bf873cf68f52e400 (diff)
downloadports-ddb6bf5850b84fcc08f693842c72e805feb67c69.tar.gz
ports-ddb6bf5850b84fcc08f693842c72e805feb67c69.zip
textproc/htmldoc: Update to 1.9.3
PR: 223721 Submitted by: Nathan <ndowens@yahoo.com> Submitted by: delphij Reported by: Zsolt Udvari <uzsolt@uzsolt.hu>
Notes
Notes: svn path=/head/; revision=487012
Diffstat (limited to 'textproc/htmldoc')
-rw-r--r--textproc/htmldoc/Makefile77
-rw-r--r--textproc/htmldoc/distinfo5
-rw-r--r--textproc/htmldoc/files/patch-htmldoc__http-private.h25
-rw-r--r--textproc/htmldoc/files/patch-htmldoc__http.c11
-rw-r--r--textproc/htmldoc/files/patch-htmldoc__ps-pdf.cxx285
-rw-r--r--textproc/htmldoc/files/patch-htmldoc_htmlsep.cxx11
-rw-r--r--textproc/htmldoc/pkg-descr2
7 files changed, 36 insertions, 380 deletions
diff --git a/textproc/htmldoc/Makefile b/textproc/htmldoc/Makefile
index 74ae3e8bc442..723fa5c56142 100644
--- a/textproc/htmldoc/Makefile
+++ b/textproc/htmldoc/Makefile
@@ -1,62 +1,49 @@
# Created by: Glenn Trewitt <glenn@trewitt.org>
# $FreeBSD$
-PORTNAME= htmldoc
-PORTVERSION= 1.8.28
-PORTREVISION= 4
-CATEGORIES= textproc
-MASTER_SITES= https://github.com/michaelrsweet/htmldoc/releases/download/release-${PORTVERSION}/
-DISTNAME= ${PORTNAME}-${PORTVERSION}-source
+PORTNAME= htmldoc
+PORTVERSION= 1.9.3
+DISTVERSIONPREFIX= v
+CATEGORIES= textproc
MAINTAINER= jose@diasfernandes.pt
COMMENT= Converts HTML to PDF and/or PostScript
LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN_SSL= openssl111
+BROKEN_mips= Complains of expecting ) before png_ptr
LIB_DEPENDS= libpng.so:graphics/png
-OPTIONS_DEFINE= HTMLDOCGUI
-HTMLDOCGUI_DESC= Build GUI front-end
+USE_GITHUB= yes
+GH_ACCOUNT= michaelrsweet
+
+HAS_CONFIGURE= yes
+MAKE_ARGS= mandir="${MANDIRS}"
-USES= jpeg tar:bzip2 ssl
-
-GNU_CONFIGURE= yes
-# Configure seems broken and ignores these ATM:
-CONFIGURE_ARGS+=--disable-localjpeg --disable-localzlib --disable-localpng
-# Explicitely disable gnutls as it fails to build if detected
-CONFIGURE_ARGS+=--disable-gnutls
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
-EXCLUDE= png jpeg zlib htmldoc/md5* htmldoc/rc4* htmldoc/snprintf*
-EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ,}
-INSTALL_TARGET= install \
- bindir=${STAGEDIR}${PREFIX}/bin \
- datadir=${STAGEDIR}${PREFIX}/share \
- mandir=${STAGEDIR}${MANPREFIX}/man
-CPPFLAGS+= -I${OPENSSLINC}
-LDFLAGS+= -L${LOCALBASE}/lib
-
-HTMLDOCGUI_LIB_DEPENDS= libfltk.so:x11-toolkits/fltk
-HTMLDOCGUI_CONFIGURE_ON= --with-gui=yes
-HTMLDOCGUI_CONFIGURE_OFF= --with-gui=no
-
-post-patch:
- ${REINPLACE_CMD} -e 's,@JPEG@ @ZLIB@ @PNG@ ,,' ${WRKSRC}/Makefile.in
- ${REINPLACE_CMD} -e 's|@LDFLAGS@|-L${LOCALBASE}/lib @LDFLAGS@|' \
- -e 's|@JPEGINC@ @PNGINC@ @ZLIBINC@|-I${LOCALBASE}/include|' \
- ${WRKSRC}/Makedefs.in
- # Remove redundant code:
- ${REINPLACE_CMD} -Ee 's,(md5|snprintf|rc4)\.o,,g' \
- ${WRKSRC}/htmldoc/Makefile
- ${REINPLACE_CMD} -Ee 's,md5-private\.h,,;s,rc4\.h,,' \
- ${WRKSRC}/htmldoc/Dependencies
-
-post-configure:
- ${REINPLACE_CMD} -e \
- 's|../png/libpng.a ../zlib/libz.a ../jpeg/libjpeg.a|-ljpeg -lpng -lz|' ${WRKSRC}/Makedefs
+OPTIONS_DEFINE= HTMLDOCGUI GNUTLS
+OPTIONS_DEFAULT= GNUTLS
+
+HTMLDOCGUI_DESC= Build GUI front-end
+HTMLDOCGUI_CONFIGURE_WITH= gui=yes
+HTMLDOCGUI_LIB_DEPENDS= libfltk.so:x11-toolkits/fltk \
+ libfontconfig.so:x11-fonts/fontconfig
+HTMLDOCGUI_USE= XORG=x11,xrender,xcursor,xfixes \
+ xext,xft,xinerama jpeg
+GNUTLS_CONFIGURE_ENABLE= gnutls
+GNUTLS_USES= pkgconfig
+GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
+
+.include <bsd.port.pre.mk>
+
+# Fix arm64 build
+.if ${ARCH} == "aarch64"
+pre-build:
+ ${REINPLACE_CMD} -e '/PNG_FILTER_OPTIMIZATIONS(pp, bpp);/d' ${WRKSRC}/png/pngrutil.c
+.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/htmldoc
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/textproc/htmldoc/distinfo b/textproc/htmldoc/distinfo
index fb53132c104d..bfb93ec0b446 100644
--- a/textproc/htmldoc/distinfo
+++ b/textproc/htmldoc/distinfo
@@ -1,2 +1,3 @@
-SHA256 (htmldoc-1.8.28-source.tar.bz2) = 2a688bd820ad6f7bdebb274716102dafbf4d5fcfa20a5b8d87a56b030d184732
-SIZE (htmldoc-1.8.28-source.tar.bz2) = 4026568
+TIMESTAMP = 1535061183
+SHA256 (michaelrsweet-htmldoc-v1.9.3_GH0.tar.gz) = 601ad21f6aa7adf57a6fcfeab180dc39d6b99ec2f52f0e559df5bb57f087eb2e
+SIZE (michaelrsweet-htmldoc-v1.9.3_GH0.tar.gz) = 4482204
diff --git a/textproc/htmldoc/files/patch-htmldoc__http-private.h b/textproc/htmldoc/files/patch-htmldoc__http-private.h
deleted file mode 100644
index 56f45d65a166..000000000000
--- a/textproc/htmldoc/files/patch-htmldoc__http-private.h
+++ /dev/null
@@ -1,25 +0,0 @@
---- ./htmldoc/http-private.h.orig 2011-12-30 08:41:10.000000000 +0100
-+++ ./htmldoc/http-private.h 2014-01-28 04:47:41.000000000 +0100
-@@ -83,12 +83,12 @@
- # endif /* __sgi || (__APPLE__ && !_SOCKLEN_T) */
-
- # include "http.h"
--# include "md5-private.h"
-
- # if defined HAVE_LIBSSL
- # include <openssl/err.h>
- # include <openssl/rand.h>
- # include <openssl/ssl.h>
-+# include <openssl/md5.h>
- # elif defined HAVE_GNUTLS
- # include <gnutls/gnutls.h>
- # include <gnutls/x509.h>
-@@ -276,7 +276,7 @@
- char buffer[HTTP_MAX_BUFFER];
- /* Buffer for incoming data */
- int auth_type; /* Authentication in use */
-- _cups_md5_state_t md5_state; /* MD5 state */
-+ MD5_CTX md5_state; /* MD5 state */
- char nonce[HTTP_MAX_VALUE];
- /* Nonce value */
- int nonce_count; /* Nonce count */
diff --git a/textproc/htmldoc/files/patch-htmldoc__http.c b/textproc/htmldoc/files/patch-htmldoc__http.c
deleted file mode 100644
index c9c86063808c..000000000000
--- a/textproc/htmldoc/files/patch-htmldoc__http.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./htmldoc/http.c.orig 2014-01-05 21:41:32.000000000 +0100
-+++ ./htmldoc/http.c 2014-01-28 04:47:07.000000000 +0100
-@@ -1228,6 +1228,8 @@
- * Using the current time is a dubious random seed, but on some systems
- * it is the best we can do (on others, this seed isn't even used...)
- */
-+#define CUPS_RAND() arc4random()
-+#define CUPS_SRAND(v)
-
- CUPS_SRAND(time(NULL));
-
diff --git a/textproc/htmldoc/files/patch-htmldoc__ps-pdf.cxx b/textproc/htmldoc/files/patch-htmldoc__ps-pdf.cxx
deleted file mode 100644
index 07483c9f04ff..000000000000
--- a/textproc/htmldoc/files/patch-htmldoc__ps-pdf.cxx
+++ /dev/null
@@ -1,285 +0,0 @@
---- ./htmldoc/ps-pdf.cxx.orig 2014-01-06 04:42:43.000000000 +0100
-+++ ./htmldoc/ps-pdf.cxx 2014-01-28 04:47:41.000000000 +0100
-@@ -120,13 +120,9 @@
-
- /*#define DEBUG*/
- #include "htmldoc.h"
--#include "md5-private.h"
--#define md5_append _cupsMD5Append
--#define md5_finish _cupsMD5Finish
--#define md5_init _cupsMD5Init
- typedef unsigned char md5_byte_t;
--#define md5_state_t _cups_md5_state_t
--#include "rc4.h"
-+#include <openssl/md5.h>
-+#include <openssl/rc4.h>
- #include <stdarg.h>
- #include <ctype.h>
- #include <time.h>
-@@ -331,8 +327,8 @@
- static uchar comp_buffer[8192];
- static uchar encrypt_key[16];
- static int encrypt_len;
--static rc4_context_t encrypt_state;
--static md5_byte_t file_id[16];
-+static RC4_KEY encrypt_state;
-+static unsigned char file_id[16];
-
-
- /*
-@@ -10545,7 +10541,7 @@
- {
- // Encrypt the colormap...
- encrypt_init();
-- rc4_encrypt(&encrypt_state, cmap[0], cmap[0], ncolors * 3);
-+ RC4(&encrypt_state, ncolors * 3, cmap[0], cmap[0]);
- }
-
- fprintf(out, "/ColorSpace[/Indexed/DeviceRGB %d<", ncolors - 1);
-@@ -11166,9 +11162,9 @@
- int font_desc[TYPE_MAX][STYLE_MAX];
- /* Font descriptor objects */
- char temp[1024]; /* Temporary string */
-- md5_state_t md5; /* MD5 state */
-- md5_byte_t digest[16]; /* MD5 digest value */
-- rc4_context_t rc4; /* RC4 context */
-+ MD5_CTX md5; /* MD5 state */
-+ unsigned char digest[16]; /* MD5 digest value */
-+ RC4_KEY rc4; /* RC4 context */
- uchar owner_pad[32], /* Padded owner password */
- owner_key[32], /* Owner key */
- user_pad[32], /* Padded user password */
-@@ -11568,10 +11564,10 @@
- * Compute the file ID...
- */
-
-- md5_init(&md5);
-- md5_append(&md5, (md5_byte_t *)OutputPath, sizeof(OutputPath));
-- md5_append(&md5, (md5_byte_t *)&doc_time, sizeof(doc_time));
-- md5_finish(&md5, file_id);
-+ MD5_Init(&md5);
-+ MD5_Update(&md5, (unsigned char *)OutputPath, sizeof(OutputPath));
-+ MD5_Update(&md5, (unsigned char *)&doc_time, sizeof(doc_time));
-+ MD5_Final(file_id, &md5);
-
- /*
- * Setup encryption stuff as necessary...
-@@ -11627,18 +11623,18 @@
- * Compute the owner key...
- */
-
-- md5_init(&md5);
-- md5_append(&md5, owner_pad, 32);
-- md5_finish(&md5, digest);
-+ MD5_Init(&md5);
-+ MD5_Update(&md5, owner_pad, 32);
-+ MD5_Final(digest, &md5);
-
- if (encrypt_len > 5)
- {
- // MD5 the result 50 more times...
- for (i = 0; i < 50; i ++)
- {
-- md5_init(&md5);
-- md5_append(&md5, digest, 16);
-- md5_finish(&md5, digest);
-+ MD5_Init(&md5);
-+ MD5_Update(&md5, digest, 16);
-+ MD5_Final(digest, &md5);
- }
-
- // Copy the padded user password...
-@@ -11651,14 +11647,14 @@
- for (j = 0; j < encrypt_len; j ++)
- encrypt_key[j] = digest[j] ^ i;
-
-- rc4_init(&rc4, encrypt_key, encrypt_len);
-- rc4_encrypt(&rc4, owner_key, owner_key, 32);
-+ RC4_set_key(&rc4, encrypt_len, encrypt_key);
-+ RC4(&rc4, 32, owner_key, owner_key);
- }
- }
- else
- {
-- rc4_init(&rc4, digest, encrypt_len);
-- rc4_encrypt(&rc4, user_pad, owner_key, 32);
-+ RC4_set_key(&rc4, encrypt_len, digest);
-+ RC4(&rc4, 32, user_pad, owner_key);
- }
-
- /*
-@@ -11680,27 +11676,27 @@
- * Compute the encryption key...
- */
-
-- md5_init(&md5);
-- md5_append(&md5, user_pad, 32);
-- md5_append(&md5, owner_key, 32);
-+ MD5_Init(&md5);
-+ MD5_Update(&md5, user_pad, 32);
-+ MD5_Update(&md5, owner_key, 32);
-
- perm_bytes[0] = perm_value;
- perm_bytes[1] = perm_value >> 8;
- perm_bytes[2] = perm_value >> 16;
- perm_bytes[3] = perm_value >> 24;
-
-- md5_append(&md5, perm_bytes, 4);
-- md5_append(&md5, file_id, 16);
-- md5_finish(&md5, digest);
-+ MD5_Update(&md5, perm_bytes, 4);
-+ MD5_Update(&md5, file_id, 16);
-+ MD5_Final(digest, &md5);
-
- if (encrypt_len > 5)
- {
- // MD5 the result 50 times..
- for (i = 0; i < 50; i ++)
- {
-- md5_init(&md5);
-- md5_append(&md5, digest, 16);
-- md5_finish(&md5, digest);
-+ MD5_Init(&md5);
-+ MD5_Update(&md5, digest, 16);
-+ MD5_Final(digest, &md5);
- }
- }
-
-@@ -11712,10 +11708,10 @@
-
- if (encrypt_len > 5)
- {
-- md5_init(&md5);
-- md5_append(&md5, pad, 32);
-- md5_append(&md5, file_id, 16);
-- md5_finish(&md5, user_key);
-+ MD5_Init(&md5);
-+ MD5_Update(&md5, pad, 32);
-+ MD5_Update(&md5, file_id, 16);
-+ MD5_Final(user_key, &md5);
-
- memset(user_key + 16, 0, 16);
-
-@@ -11726,14 +11722,14 @@
- for (j = 0; j < encrypt_len; j ++)
- digest[j] = encrypt_key[j] ^ i;
-
-- rc4_init(&rc4, digest, encrypt_len);
-- rc4_encrypt(&rc4, user_key, user_key, 16);
-+ RC4_set_key(&rc4, encrypt_len, digest);
-+ RC4(&rc4, 16, user_key, user_key);
- }
- }
- else
- {
-- rc4_init(&rc4, encrypt_key, encrypt_len);
-- rc4_encrypt(&rc4, pad, user_key, 32);
-+ RC4_set_key(&rc4, encrypt_len, encrypt_key);
-+ RC4(&rc4, 32, pad, user_key);
- }
-
- /*
-@@ -11920,7 +11916,7 @@
- else
- bytes = len;
-
-- rc4_encrypt(&encrypt_state, s, news, bytes);
-+ RC4(&encrypt_state, bytes, s, news);
-
- for (i = 0; i < bytes; i ++)
- fprintf(out, "%02x", news[i]);
-@@ -12585,7 +12581,7 @@
- unicode[0] = 0xfe; // Start with BOM
- unicode[1] = 0xff;
-
-- rc4_encrypt(&encrypt_state, unicode, enicode, 2);
-+ RC4(&encrypt_state, 2, unicode, enicode);
-
- fprintf(out, "%02x%02x", enicode[0], enicode[1]);
-
-@@ -12595,7 +12591,7 @@
- unicode[0] = ch >> 8;
- unicode[1] = ch;
-
-- rc4_encrypt(&encrypt_state, unicode, enicode, 2);
-+ RC4(&encrypt_state, 2, unicode, enicode);
-
- fprintf(out, "%02x%02x", enicode[0], enicode[1]);
- }
-@@ -12627,8 +12623,8 @@
- int i; /* Looping var */
- uchar data[21], /* Key data */
- *dataptr; /* Pointer to key data */
-- md5_state_t md5; /* MD5 state */
-- md5_byte_t digest[16]; /* MD5 digest value */
-+ MD5_CTX md5; /* MD5 state */
-+ unsigned char digest[16]; /* MD5 digest value */
-
-
- /*
-@@ -12648,18 +12644,18 @@
- * Hash it...
- */
-
-- md5_init(&md5);
-- md5_append(&md5, data, encrypt_len + 5);
-- md5_finish(&md5, digest);
-+ MD5_Init(&md5);
-+ MD5_Update(&md5, data, encrypt_len + 5);
-+ MD5_Final(digest, &md5);
-
- /*
- * Initialize the RC4 context using the first N+5 bytes of the digest...
- */
-
- if (encrypt_len > 11)
-- rc4_init(&encrypt_state, digest, 16);
-+ RC4_set_key(&encrypt_state, 16, digest);
- else
-- rc4_init(&encrypt_state, digest, encrypt_len + 5);
-+ RC4_set_key(&encrypt_state, encrypt_len + 5, digest);
- }
-
-
-@@ -12727,8 +12723,8 @@
- else
- {
- if (Encryption)
-- rc4_encrypt(&encrypt_state, comp_buffer, comp_buffer,
-- (uchar *)compressor.next_out - (uchar *)comp_buffer);
-+ RC4(&encrypt_state, (uchar *)compressor.next_out - (uchar *)comp_buffer,
-+ comp_buffer, comp_buffer);
-
- fwrite(comp_buffer, (uchar *)compressor.next_out - (uchar *)comp_buffer,
- 1, out);
-@@ -12751,8 +12747,8 @@
- else
- {
- if (Encryption)
-- rc4_encrypt(&encrypt_state, comp_buffer, comp_buffer,
-- (uchar *)compressor.next_out - (uchar *)comp_buffer);
-+ RC4(&encrypt_state, (uchar *)compressor.next_out - (uchar *)comp_buffer,
-+ comp_buffer, comp_buffer);
-
- fwrite(comp_buffer, (uchar *)compressor.next_out - (uchar *)comp_buffer,
- 1, out);
-@@ -12844,8 +12840,8 @@
- else
- {
- if (Encryption)
-- rc4_encrypt(&encrypt_state, comp_buffer, comp_buffer,
-- (uchar *)compressor.next_out - (uchar *)comp_buffer);
-+ RC4(&encrypt_state, (uchar *)compressor.next_out - (uchar *)comp_buffer,
-+ comp_buffer, comp_buffer);
-
- fwrite(comp_buffer,
- (uchar *)compressor.next_out - (uchar *)comp_buffer, 1, out);
-@@ -12878,7 +12874,7 @@
- if ((bytes = length - i) > (int)sizeof(newbuf))
- bytes = sizeof(newbuf);
-
-- rc4_encrypt(&encrypt_state, buf + i, newbuf, bytes);
-+ RC4(&encrypt_state, bytes, buf + i, newbuf);
- fwrite(newbuf, bytes, 1, out);
- }
- }
diff --git a/textproc/htmldoc/files/patch-htmldoc_htmlsep.cxx b/textproc/htmldoc/files/patch-htmldoc_htmlsep.cxx
deleted file mode 100644
index 2b70322610ec..000000000000
--- a/textproc/htmldoc/files/patch-htmldoc_htmlsep.cxx
+++ /dev/null
@@ -1,11 +0,0 @@
---- htmldoc/htmlsep.cxx.orig 2013-08-09 13:43:34 UTC
-+++ htmldoc/htmlsep.cxx
-@@ -524,7 +524,7 @@ write_doc(FILE **out, // I - Output
- 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/textproc/htmldoc/pkg-descr b/textproc/htmldoc/pkg-descr
index 713cd58eb406..d080d01fd1d2 100644
--- a/textproc/htmldoc/pkg-descr
+++ b/textproc/htmldoc/pkg-descr
@@ -14,4 +14,4 @@ In my opinion, HTMLDOC is *fast*, compared to the other solutions I've seen.
HTMLDOC is available under the GPL.
Commercial support is available from the author.
-WWW: http://www.htmldoc.org/
+WWW: http://michaelrsweet.github.io/htmldoc