From c5bb212d524eeaa46704d8a4ad76fc4bff8f84ea Mon Sep 17 00:00:00 2001 From: mi Date: Mon, 16 Apr 2007 03:29:11 +0000 Subject: 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 --- textproc/htmldoc/Makefile | 34 +++++++++- textproc/htmldoc/pkg-plist | 164 ++++++++++++++++++++++----------------------- 2 files changed, 115 insertions(+), 83 deletions(-) (limited to 'textproc/htmldoc') diff --git a/textproc/htmldoc/Makefile b/textproc/htmldoc/Makefile index 28e5946131f7..4ed8bb9100a2 100644 --- a/textproc/htmldoc/Makefile +++ b/textproc/htmldoc/Makefile @@ -7,6 +7,7 @@ PORTNAME= htmldoc PORTVERSION= 1.8.27 +PORTREVISION= 1 CATEGORIES= textproc MASTER_SITES= ${MASTER_SITE_EASYSW} MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTVERSION} @@ -15,9 +16,40 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-source MAINTAINER= jose@diasfernandes.pt 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 +# Configure seems broken and ignores these ATM: +CONFIGURE_ARGS+=--enable-localjpeg --enable-localzlib --enable-localpng 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 +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 + +post-configure: + ${REINPLACE_CMD} -e \ + 's|../png/libpng.a ../zlib/libz.a ../jpeg/libjpeg.a|-ljpeg -lpng -lz|' ${WRKSRC}/Makedefs + +.include -.include +.if !defined(WITHOUT_HTMLDOCGUI) +LIB_DEPENDS+= fltk:${PORTSDIR}/x11-toolkits/fltk +CONFIGURE_ARGS+=--enable-gui +.endif +.include diff --git a/textproc/htmldoc/pkg-plist b/textproc/htmldoc/pkg-plist index 40f5154b7d5f..6b5594389fac 100644 --- a/textproc/htmldoc/pkg-plist +++ b/textproc/htmldoc/pkg-plist @@ -1,83 +1,83 @@ bin/htmldoc -share/doc/htmldoc/help.html -share/doc/htmldoc/htmldoc.pdf -share/htmldoc/fonts/Courier-Bold.afm -share/htmldoc/fonts/Courier-Bold.pfa -share/htmldoc/fonts/Courier-BoldOblique.afm -share/htmldoc/fonts/Courier-BoldOblique.pfa -share/htmldoc/fonts/Courier-Oblique.afm -share/htmldoc/fonts/Courier-Oblique.pfa -share/htmldoc/fonts/Courier.afm -share/htmldoc/fonts/Courier.pfa -share/htmldoc/fonts/Dingbats.afm -share/htmldoc/fonts/Dingbats.pfa -share/htmldoc/fonts/Helvetica-Bold.afm -share/htmldoc/fonts/Helvetica-Bold.pfa -share/htmldoc/fonts/Helvetica-BoldOblique.afm -share/htmldoc/fonts/Helvetica-BoldOblique.pfa -share/htmldoc/fonts/Helvetica-Oblique.afm -share/htmldoc/fonts/Helvetica-Oblique.pfa -share/htmldoc/fonts/Helvetica.afm -share/htmldoc/fonts/Helvetica.pfa -share/htmldoc/fonts/Monospace-Bold.afm -share/htmldoc/fonts/Monospace-Bold.pfa -share/htmldoc/fonts/Monospace-BoldOblique.afm -share/htmldoc/fonts/Monospace-BoldOblique.pfa -share/htmldoc/fonts/Monospace-Oblique.afm -share/htmldoc/fonts/Monospace-Oblique.pfa -share/htmldoc/fonts/Monospace.afm -share/htmldoc/fonts/Monospace.pfa -share/htmldoc/fonts/Sans-Bold.afm -share/htmldoc/fonts/Sans-Bold.pfa -share/htmldoc/fonts/Sans-BoldOblique.afm -share/htmldoc/fonts/Sans-BoldOblique.pfa -share/htmldoc/fonts/Sans-Oblique.afm -share/htmldoc/fonts/Sans-Oblique.pfa -share/htmldoc/fonts/Sans.afm -share/htmldoc/fonts/Sans.pfa -share/htmldoc/fonts/Serif-Bold.afm -share/htmldoc/fonts/Serif-Bold.pfa -share/htmldoc/fonts/Serif-BoldOblique.afm -share/htmldoc/fonts/Serif-BoldOblique.pfa -share/htmldoc/fonts/Serif-Oblique.afm -share/htmldoc/fonts/Serif-Oblique.pfa -share/htmldoc/fonts/Serif-Roman.afm -share/htmldoc/fonts/Serif-Roman.pfa -share/htmldoc/fonts/Symbol.afm -share/htmldoc/fonts/Symbol.pfa -share/htmldoc/fonts/Times-Bold.afm -share/htmldoc/fonts/Times-Bold.pfa -share/htmldoc/fonts/Times-BoldItalic.afm -share/htmldoc/fonts/Times-BoldItalic.pfa -share/htmldoc/fonts/Times-Italic.afm -share/htmldoc/fonts/Times-Italic.pfa -share/htmldoc/fonts/Times-Roman.afm -share/htmldoc/fonts/Times-Roman.pfa -share/htmldoc/data/cp-1250 -share/htmldoc/data/cp-874 -share/htmldoc/data/cp-1258 -share/htmldoc/data/cp-1257 -share/htmldoc/data/cp-1256 -share/htmldoc/data/cp-1255 -share/htmldoc/data/cp-1254 -share/htmldoc/data/cp-1253 -share/htmldoc/data/cp-1252 -share/htmldoc/data/cp-1251 -share/htmldoc/data/iso-8859-1 -share/htmldoc/data/iso-8859-2 -share/htmldoc/data/iso-8859-3 -share/htmldoc/data/iso-8859-4 -share/htmldoc/data/iso-8859-5 -share/htmldoc/data/iso-8859-6 -share/htmldoc/data/iso-8859-7 -share/htmldoc/data/iso-8859-8 -share/htmldoc/data/iso-8859-9 -share/htmldoc/data/iso-8859-14 -share/htmldoc/data/iso-8859-15 -share/htmldoc/data/koi8-r -share/htmldoc/data/prolog.ps -share/htmldoc/data/psglyphs -@dirrm share/htmldoc/data -@dirrm share/htmldoc/fonts -@dirrm share/htmldoc -@dirrm share/doc/htmldoc +%%DOCSDIR%%/help.html +%%DOCSDIR%%/htmldoc.pdf +%%DATADIR%%/fonts/Courier-Bold.afm +%%DATADIR%%/fonts/Courier-Bold.pfa +%%DATADIR%%/fonts/Courier-BoldOblique.afm +%%DATADIR%%/fonts/Courier-BoldOblique.pfa +%%DATADIR%%/fonts/Courier-Oblique.afm +%%DATADIR%%/fonts/Courier-Oblique.pfa +%%DATADIR%%/fonts/Courier.afm +%%DATADIR%%/fonts/Courier.pfa +%%DATADIR%%/fonts/Dingbats.afm +%%DATADIR%%/fonts/Dingbats.pfa +%%DATADIR%%/fonts/Helvetica-Bold.afm +%%DATADIR%%/fonts/Helvetica-Bold.pfa +%%DATADIR%%/fonts/Helvetica-BoldOblique.afm +%%DATADIR%%/fonts/Helvetica-BoldOblique.pfa +%%DATADIR%%/fonts/Helvetica-Oblique.afm +%%DATADIR%%/fonts/Helvetica-Oblique.pfa +%%DATADIR%%/fonts/Helvetica.afm +%%DATADIR%%/fonts/Helvetica.pfa +%%DATADIR%%/fonts/Monospace-Bold.afm +%%DATADIR%%/fonts/Monospace-Bold.pfa +%%DATADIR%%/fonts/Monospace-BoldOblique.afm +%%DATADIR%%/fonts/Monospace-BoldOblique.pfa +%%DATADIR%%/fonts/Monospace-Oblique.afm +%%DATADIR%%/fonts/Monospace-Oblique.pfa +%%DATADIR%%/fonts/Monospace.afm +%%DATADIR%%/fonts/Monospace.pfa +%%DATADIR%%/fonts/Sans-Bold.afm +%%DATADIR%%/fonts/Sans-Bold.pfa +%%DATADIR%%/fonts/Sans-BoldOblique.afm +%%DATADIR%%/fonts/Sans-BoldOblique.pfa +%%DATADIR%%/fonts/Sans-Oblique.afm +%%DATADIR%%/fonts/Sans-Oblique.pfa +%%DATADIR%%/fonts/Sans.afm +%%DATADIR%%/fonts/Sans.pfa +%%DATADIR%%/fonts/Serif-Bold.afm +%%DATADIR%%/fonts/Serif-Bold.pfa +%%DATADIR%%/fonts/Serif-BoldOblique.afm +%%DATADIR%%/fonts/Serif-BoldOblique.pfa +%%DATADIR%%/fonts/Serif-Oblique.afm +%%DATADIR%%/fonts/Serif-Oblique.pfa +%%DATADIR%%/fonts/Serif-Roman.afm +%%DATADIR%%/fonts/Serif-Roman.pfa +%%DATADIR%%/fonts/Symbol.afm +%%DATADIR%%/fonts/Symbol.pfa +%%DATADIR%%/fonts/Times-Bold.afm +%%DATADIR%%/fonts/Times-Bold.pfa +%%DATADIR%%/fonts/Times-BoldItalic.afm +%%DATADIR%%/fonts/Times-BoldItalic.pfa +%%DATADIR%%/fonts/Times-Italic.afm +%%DATADIR%%/fonts/Times-Italic.pfa +%%DATADIR%%/fonts/Times-Roman.afm +%%DATADIR%%/fonts/Times-Roman.pfa +%%DATADIR%%/data/cp-1250 +%%DATADIR%%/data/cp-874 +%%DATADIR%%/data/cp-1258 +%%DATADIR%%/data/cp-1257 +%%DATADIR%%/data/cp-1256 +%%DATADIR%%/data/cp-1255 +%%DATADIR%%/data/cp-1254 +%%DATADIR%%/data/cp-1253 +%%DATADIR%%/data/cp-1252 +%%DATADIR%%/data/cp-1251 +%%DATADIR%%/data/iso-8859-1 +%%DATADIR%%/data/iso-8859-2 +%%DATADIR%%/data/iso-8859-3 +%%DATADIR%%/data/iso-8859-4 +%%DATADIR%%/data/iso-8859-5 +%%DATADIR%%/data/iso-8859-6 +%%DATADIR%%/data/iso-8859-7 +%%DATADIR%%/data/iso-8859-8 +%%DATADIR%%/data/iso-8859-9 +%%DATADIR%%/data/iso-8859-14 +%%DATADIR%%/data/iso-8859-15 +%%DATADIR%%/data/koi8-r +%%DATADIR%%/data/prolog.ps +%%DATADIR%%/data/psglyphs +@dirrm %%DATADIR%%/data +@dirrm %%DATADIR%%/fonts +@dirrm %%DATADIR%% +@dirrm %%DOCSDIR%% -- cgit