1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00
freebsd-ports/textproc/htmldoc/Makefile
Xin LI 6b1e8d6ab7 textproc/htmldoc: Do not use arc4random_stir.
(Note that there is an updated version which will solve this too, but I
am committing this one and will rebase the patch in bug 223721 as it still
needs maintainer approval).

PR:		230831, 230756
Approved by:	portmgr (antoine)
2018-08-26 08:26:41 +00:00

63 lines
1.9 KiB
Makefile

# 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
MAINTAINER= jose@diasfernandes.pt
COMMENT= Converts HTML to PDF and/or PostScript
LICENSE= GPLv2
BROKEN_SSL= openssl-devel
LIB_DEPENDS= libpng.so:graphics/png
OPTIONS_DEFINE= HTMLDOCGUI
HTMLDOCGUI_DESC= Build GUI front-end
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
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/htmldoc
.include <bsd.port.mk>