Improve the port as follows:

1) do not extract, configure, build the bundled (old) PNG and JPEG
	   libraries;
        2) do not compile the bundled md5 and rc4 algorithms (USE_OPENSSL);
        3) do not compile the bundled snprintf.

The resulting executable is over twice smaller on my amd64 system. Bump
PORTREVISION.

Approved by:	maintainer timeout
This commit is contained in:
Mikhail Teterin 2007-04-16 03:29:11 +00:00
parent a0a96fb91a
commit 9606e35d58
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=190061
2 changed files with 115 additions and 83 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= htmldoc PORTNAME= htmldoc
PORTVERSION= 1.8.27 PORTVERSION= 1.8.27
PORTREVISION= 1
CATEGORIES= textproc CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_EASYSW} MASTER_SITES= ${MASTER_SITE_EASYSW}
MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTVERSION} MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTVERSION}
@ -15,9 +16,40 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-source
MAINTAINER= jose@diasfernandes.pt MAINTAINER= jose@diasfernandes.pt
COMMENT= Converts HTML to PDF and/or PostScript COMMENT= Converts HTML to PDF and/or PostScript
LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
png:${PORTSDIR}/graphics/png
OPTIONS= HTMLDOCGUI "Build GUI front-end" no
# .bz2 file is available since Aug 2, but we don't want to
# start mirroring _in addition to_ the .gz variant. When the
# vendor's release is updated again, we should switch to .bz2
#USE_BZIP2= yes
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
# Configure seems broken and ignores these ATM:
CONFIGURE_ARGS+=--enable-localjpeg --enable-localzlib --enable-localpng
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
EXCLUDE= png jpeg zlib htmldoc/md5* htmldoc/rc4* htmldoc/snprintf*
EXTRACT_AFTER_ARGS=| ${TAR} -xf - ${EXCLUDE:S,^,--exclude ,}
MAN1= htmldoc.1 MAN1= htmldoc.1
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
.include <bsd.port.mk> post-configure:
${REINPLACE_CMD} -e \
's|../png/libpng.a ../zlib/libz.a ../jpeg/libjpeg.a|-ljpeg -lpng -lz|' ${WRKSRC}/Makedefs
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_HTMLDOCGUI)
LIB_DEPENDS+= fltk:${PORTSDIR}/x11-toolkits/fltk
CONFIGURE_ARGS+=--enable-gui
.endif
.include <bsd.port.post.mk>

View file

@ -1,83 +1,83 @@
bin/htmldoc bin/htmldoc
share/doc/htmldoc/help.html %%DOCSDIR%%/help.html
share/doc/htmldoc/htmldoc.pdf %%DOCSDIR%%/htmldoc.pdf
share/htmldoc/fonts/Courier-Bold.afm %%DATADIR%%/fonts/Courier-Bold.afm
share/htmldoc/fonts/Courier-Bold.pfa %%DATADIR%%/fonts/Courier-Bold.pfa
share/htmldoc/fonts/Courier-BoldOblique.afm %%DATADIR%%/fonts/Courier-BoldOblique.afm
share/htmldoc/fonts/Courier-BoldOblique.pfa %%DATADIR%%/fonts/Courier-BoldOblique.pfa
share/htmldoc/fonts/Courier-Oblique.afm %%DATADIR%%/fonts/Courier-Oblique.afm
share/htmldoc/fonts/Courier-Oblique.pfa %%DATADIR%%/fonts/Courier-Oblique.pfa
share/htmldoc/fonts/Courier.afm %%DATADIR%%/fonts/Courier.afm
share/htmldoc/fonts/Courier.pfa %%DATADIR%%/fonts/Courier.pfa
share/htmldoc/fonts/Dingbats.afm %%DATADIR%%/fonts/Dingbats.afm
share/htmldoc/fonts/Dingbats.pfa %%DATADIR%%/fonts/Dingbats.pfa
share/htmldoc/fonts/Helvetica-Bold.afm %%DATADIR%%/fonts/Helvetica-Bold.afm
share/htmldoc/fonts/Helvetica-Bold.pfa %%DATADIR%%/fonts/Helvetica-Bold.pfa
share/htmldoc/fonts/Helvetica-BoldOblique.afm %%DATADIR%%/fonts/Helvetica-BoldOblique.afm
share/htmldoc/fonts/Helvetica-BoldOblique.pfa %%DATADIR%%/fonts/Helvetica-BoldOblique.pfa
share/htmldoc/fonts/Helvetica-Oblique.afm %%DATADIR%%/fonts/Helvetica-Oblique.afm
share/htmldoc/fonts/Helvetica-Oblique.pfa %%DATADIR%%/fonts/Helvetica-Oblique.pfa
share/htmldoc/fonts/Helvetica.afm %%DATADIR%%/fonts/Helvetica.afm
share/htmldoc/fonts/Helvetica.pfa %%DATADIR%%/fonts/Helvetica.pfa
share/htmldoc/fonts/Monospace-Bold.afm %%DATADIR%%/fonts/Monospace-Bold.afm
share/htmldoc/fonts/Monospace-Bold.pfa %%DATADIR%%/fonts/Monospace-Bold.pfa
share/htmldoc/fonts/Monospace-BoldOblique.afm %%DATADIR%%/fonts/Monospace-BoldOblique.afm
share/htmldoc/fonts/Monospace-BoldOblique.pfa %%DATADIR%%/fonts/Monospace-BoldOblique.pfa
share/htmldoc/fonts/Monospace-Oblique.afm %%DATADIR%%/fonts/Monospace-Oblique.afm
share/htmldoc/fonts/Monospace-Oblique.pfa %%DATADIR%%/fonts/Monospace-Oblique.pfa
share/htmldoc/fonts/Monospace.afm %%DATADIR%%/fonts/Monospace.afm
share/htmldoc/fonts/Monospace.pfa %%DATADIR%%/fonts/Monospace.pfa
share/htmldoc/fonts/Sans-Bold.afm %%DATADIR%%/fonts/Sans-Bold.afm
share/htmldoc/fonts/Sans-Bold.pfa %%DATADIR%%/fonts/Sans-Bold.pfa
share/htmldoc/fonts/Sans-BoldOblique.afm %%DATADIR%%/fonts/Sans-BoldOblique.afm
share/htmldoc/fonts/Sans-BoldOblique.pfa %%DATADIR%%/fonts/Sans-BoldOblique.pfa
share/htmldoc/fonts/Sans-Oblique.afm %%DATADIR%%/fonts/Sans-Oblique.afm
share/htmldoc/fonts/Sans-Oblique.pfa %%DATADIR%%/fonts/Sans-Oblique.pfa
share/htmldoc/fonts/Sans.afm %%DATADIR%%/fonts/Sans.afm
share/htmldoc/fonts/Sans.pfa %%DATADIR%%/fonts/Sans.pfa
share/htmldoc/fonts/Serif-Bold.afm %%DATADIR%%/fonts/Serif-Bold.afm
share/htmldoc/fonts/Serif-Bold.pfa %%DATADIR%%/fonts/Serif-Bold.pfa
share/htmldoc/fonts/Serif-BoldOblique.afm %%DATADIR%%/fonts/Serif-BoldOblique.afm
share/htmldoc/fonts/Serif-BoldOblique.pfa %%DATADIR%%/fonts/Serif-BoldOblique.pfa
share/htmldoc/fonts/Serif-Oblique.afm %%DATADIR%%/fonts/Serif-Oblique.afm
share/htmldoc/fonts/Serif-Oblique.pfa %%DATADIR%%/fonts/Serif-Oblique.pfa
share/htmldoc/fonts/Serif-Roman.afm %%DATADIR%%/fonts/Serif-Roman.afm
share/htmldoc/fonts/Serif-Roman.pfa %%DATADIR%%/fonts/Serif-Roman.pfa
share/htmldoc/fonts/Symbol.afm %%DATADIR%%/fonts/Symbol.afm
share/htmldoc/fonts/Symbol.pfa %%DATADIR%%/fonts/Symbol.pfa
share/htmldoc/fonts/Times-Bold.afm %%DATADIR%%/fonts/Times-Bold.afm
share/htmldoc/fonts/Times-Bold.pfa %%DATADIR%%/fonts/Times-Bold.pfa
share/htmldoc/fonts/Times-BoldItalic.afm %%DATADIR%%/fonts/Times-BoldItalic.afm
share/htmldoc/fonts/Times-BoldItalic.pfa %%DATADIR%%/fonts/Times-BoldItalic.pfa
share/htmldoc/fonts/Times-Italic.afm %%DATADIR%%/fonts/Times-Italic.afm
share/htmldoc/fonts/Times-Italic.pfa %%DATADIR%%/fonts/Times-Italic.pfa
share/htmldoc/fonts/Times-Roman.afm %%DATADIR%%/fonts/Times-Roman.afm
share/htmldoc/fonts/Times-Roman.pfa %%DATADIR%%/fonts/Times-Roman.pfa
share/htmldoc/data/cp-1250 %%DATADIR%%/data/cp-1250
share/htmldoc/data/cp-874 %%DATADIR%%/data/cp-874
share/htmldoc/data/cp-1258 %%DATADIR%%/data/cp-1258
share/htmldoc/data/cp-1257 %%DATADIR%%/data/cp-1257
share/htmldoc/data/cp-1256 %%DATADIR%%/data/cp-1256
share/htmldoc/data/cp-1255 %%DATADIR%%/data/cp-1255
share/htmldoc/data/cp-1254 %%DATADIR%%/data/cp-1254
share/htmldoc/data/cp-1253 %%DATADIR%%/data/cp-1253
share/htmldoc/data/cp-1252 %%DATADIR%%/data/cp-1252
share/htmldoc/data/cp-1251 %%DATADIR%%/data/cp-1251
share/htmldoc/data/iso-8859-1 %%DATADIR%%/data/iso-8859-1
share/htmldoc/data/iso-8859-2 %%DATADIR%%/data/iso-8859-2
share/htmldoc/data/iso-8859-3 %%DATADIR%%/data/iso-8859-3
share/htmldoc/data/iso-8859-4 %%DATADIR%%/data/iso-8859-4
share/htmldoc/data/iso-8859-5 %%DATADIR%%/data/iso-8859-5
share/htmldoc/data/iso-8859-6 %%DATADIR%%/data/iso-8859-6
share/htmldoc/data/iso-8859-7 %%DATADIR%%/data/iso-8859-7
share/htmldoc/data/iso-8859-8 %%DATADIR%%/data/iso-8859-8
share/htmldoc/data/iso-8859-9 %%DATADIR%%/data/iso-8859-9
share/htmldoc/data/iso-8859-14 %%DATADIR%%/data/iso-8859-14
share/htmldoc/data/iso-8859-15 %%DATADIR%%/data/iso-8859-15
share/htmldoc/data/koi8-r %%DATADIR%%/data/koi8-r
share/htmldoc/data/prolog.ps %%DATADIR%%/data/prolog.ps
share/htmldoc/data/psglyphs %%DATADIR%%/data/psglyphs
@dirrm share/htmldoc/data @dirrm %%DATADIR%%/data
@dirrm share/htmldoc/fonts @dirrm %%DATADIR%%/fonts
@dirrm share/htmldoc @dirrm %%DATADIR%%
@dirrm share/doc/htmldoc @dirrm %%DOCSDIR%%