COMMENT =	tool to create previews and fix bounding boxes in EPS files

DISTNAME =	epstool-3.09

CATEGORIES =	print

HOMEPAGE =	http://www.ghostgum.com.au/software/epstool.htm

PERMIT_PACKAGE =	Yes

WANTLIB =	c

MASTER_SITES =	http://www.ghostgum.com.au/download/

FIX_EXTRACT_PERMISSIONS =	Yes
FIX_CLEANUP_PERMISSIONS =	Yes
FIX_CRLF_FILES =		${WRKSRC}/src/unixcom.mak \
				${WRKSRC}/src/ceps.c

RUN_DEPENDS =	print/ghostscript/gnu

USE_GMAKE =	Yes

MAKE_FILE =	makefile

pre-patch:
	chmod +w ${WRKSRC}
	chmod +w ${WRKSRC}/src

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/bin/epstool ${PREFIX}/bin/
	${INSTALL_MAN} ${WRKSRC}/doc/epstool.1 ${PREFIX}/man/man1
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/epstool
.for l in epstool.htm gsview.css
	${INSTALL_DATA} ${WRKSRC}/doc/$l ${PREFIX}/share/doc/epstool/$l
.endfor
	${INSTALL_DATA} ${WRKSRC}/LICENCE ${PREFIX}/share/doc/epstool/LICENCE

.include <bsd.port.mk>
