FreeBSD Bugzilla – Attachment 196557 Details for
Bug 223721
textproc/htmldoc: [PATCH] Update to 1.9.3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Patch rebased over 478107
htmldoc-478107.patch (text/plain), 16.93 KB, created by
Xin LI
on 2018-08-26 08:34:23 UTC
(
hide
)
Description:
Patch rebased over 478107
Filename:
MIME Type:
Creator:
Xin LI
Created:
2018-08-26 08:34:23 UTC
Size:
16.93 KB
patch
obsolete
>textproc/htmldoc: > > * Update to 1.9.3 > * Rearranged Options > -- Makes it easier to find them > * Removed jpeg from USES > -- Only needed if HTMLDOCGUI is enabled > -- Added it to OPTION if enabled > * Removed previous configure_args > -- Builds fine, even with gnutls enabled > * Used ${REINPLACE_CMD} if arch is arm64 > -- arm64 does't support png neon support > >Submitted by: Nathan <ndowens@yahoo.com> > >Index: textproc/htmldoc/Makefile >=================================================================== >--- textproc/htmldoc/Makefile (revision 478107) >+++ textproc/htmldoc/Makefile (working copy) >@@ -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= openssl-devel >+BROKEN_mips= Complains of expecting ) before png_ptr > >-LIB_DEPENDS= libpng.so:graphics/png >+LIB_DEPENDS= libpng.so:graphics/png > >-OPTIONS_DEFINE= HTMLDOCGUI >-HTMLDOCGUI_DESC= Build GUI front-end >+USE_GITHUB= yes >+GH_ACCOUNT= michaelrsweet > >-USES= jpeg tar:bzip2 ssl >+HAS_CONFIGURE= yes >+MAKE_ARGS+= mandir="${MANDIRS}" > >-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 >+OPTIONS_DEFINE= HTMLDOCGUI GNUTLS >+OPTIONS_DEFAULT= GNUTLS > >-HTMLDOCGUI_LIB_DEPENDS= libfltk.so:x11-toolkits/fltk >-HTMLDOCGUI_CONFIGURE_ON= --with-gui=yes >-HTMLDOCGUI_CONFIGURE_OFF= --with-gui=no >+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 > >-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 >+.include <bsd.port.pre.mk> > >-post-configure: >- ${REINPLACE_CMD} -e \ >- 's|../png/libpng.a ../zlib/libz.a ../jpeg/libjpeg.a|-ljpeg -lpng -lz|' ${WRKSRC}/Makedefs >+# 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> >Index: textproc/htmldoc/distinfo >=================================================================== >--- textproc/htmldoc/distinfo (revision 478107) >+++ textproc/htmldoc/distinfo (working copy) >@@ -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 >Index: textproc/htmldoc/files/patch-htmldoc__http-private.h >=================================================================== >--- textproc/htmldoc/files/patch-htmldoc__http-private.h (revision 478107) >+++ textproc/htmldoc/files/patch-htmldoc__http-private.h (nonexistent) >@@ -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 */ > >Property changes on: files/patch-htmldoc__http-private.h >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: textproc/htmldoc/files/patch-htmldoc__http.c >=================================================================== >--- textproc/htmldoc/files/patch-htmldoc__http.c (revision 478107) >+++ textproc/htmldoc/files/patch-htmldoc__http.c (nonexistent) >@@ -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)); >- > >Property changes on: files/patch-htmldoc__http.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: textproc/htmldoc/files/patch-htmldoc__ps-pdf.cxx >=================================================================== >--- textproc/htmldoc/files/patch-htmldoc__ps-pdf.cxx (revision 478107) >+++ textproc/htmldoc/files/patch-htmldoc__ps-pdf.cxx (nonexistent) >@@ -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); >- } >- } > >Property changes on: files/patch-htmldoc__ps-pdf.cxx >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: textproc/htmldoc/files/patch-htmldoc_htmlsep.cxx >=================================================================== >--- textproc/htmldoc/files/patch-htmldoc_htmlsep.cxx (revision 478107) >+++ textproc/htmldoc/files/patch-htmldoc_htmlsep.cxx (nonexistent) >@@ -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) ++; > >Property changes on: files/patch-htmldoc_htmlsep.cxx >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: textproc/htmldoc/pkg-descr >=================================================================== >--- textproc/htmldoc/pkg-descr (revision 478107) >+++ textproc/htmldoc/pkg-descr (working copy) >@@ -14,4 +14,4 @@ In my opinion, HTMLDOC is *fast*, compared to the > HTMLDOC is available under the GPL. > Commercial support is available from the author. > >-WWW: http://www.htmldoc.org/ >+WWW: http://michaelrsweet.github.io/htmldoc
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 223721
:
196490
|
196508
|
196513
| 196557