# ex:ts=8
# New ports collection makefile for:	libt1
# Date created:			13, May, 1999
# Whom:				Ying-Chieh Liao <ijliao@csie.nctu.edu.tw>
#
# $MidnightBSD: mports/devel/t1lib/Makefile,v 1.4 2010/06/04 22:57:20 laffer1 Exp $
# $FreeBSD: ports/devel/t1lib/Makefile,v 1.33 2006/08/14 22:55:17 clsung Exp $
#

PORTNAME=	t1lib
PORTVERSION=	5.1.2
PORTREVISION=	1
PORTEPOCH=	1
CATEGORIES=	devel
MASTER_SITES=	${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR=	libs/graphics

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	A Type 1 Rasterizer Library for UNIX/X11
LICENSE=	gpl2

USE_GMAKE=	yes
USE_AUTOTOOLS=	libtool:22
ALL_TARGET=	without_doc
USE_LDCONFIG=	yes

.if !defined(WITHOUT_X11)
USE_XORG=	xaw
CONFIGURE_ARGS+=	--with-x
PLIST_SUB+=	X11=""
.else
CONFIGURE_ARGS+=	--without-x
PLIST_SUB+=	X11="@comment "
.endif

post-patch:
	@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
		's|^LIBTOOL[ ]*=.*|LIBTOOL=${LIBTOOL}|g'
	@${REINPLACE_CMD} -e \
		'/ALLSUBDIRS/s|$$(DOCSUBDIRS)||g' ${WRKSRC}/Makefile.in
	@${REINPLACE_CMD} -e \
		's|_LT_CURRENT=.*$$|_LT_CURRENT=5|g' ${WRKSRC}/configure

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/doc/t1lib_doc.pdf ${DOCSDIR}
.endif

.include <bsd.port.mk>
