# New ports collection makefile for:	adesklets
# Date created:		2005-05-25
# Whom:			Roman Bogorodskiy <novel@FreeBSD.org>
#
# $FreeBSD: ports/deskutils/adesklets/Makefile,v 1.7 2005/07/21 07:12:46 novel Exp $
#

PORTNAME=	adesklets
PORTVERSION=	0.4.10
CATEGORIES=	deskutils
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	novel@FreeBSD.org
COMMENT=	An interactive Imlib2  console for the X Window system

LIB_DEPENDS=	Imlib2.3:${PORTSDIR}/graphics/imlib2

GNU_CONFIGURE=	yes
USE_REINPLACE=	yes
USE_PYTHON=	yes
USE_BZIP2=	yes
USE_XLIB=	yes

MAN1=		adesklets.1
INFO=		adesklets \
		adesklets_fr

SUB_FILES=	pkg-message

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
LIB_DEPENDS+=	readline.5:${PORTSDIR}/devel/readline
CONFIGURE_ENV+=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib" \
		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
.endif

.if !defined(NOPORTDOCS)
PORTDOCS=	*.html
.endif

.if ${OSVERSION} >= 700000
post-configure:
	@${REINPLACE_CMD} -e "s|#define _POSIX_C_SOURCE 199309||" ${WRKSRC}/src/config.h
.endif

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
	@${INSTALL_DATA} ${WRKSRC}/doc/html/en/${i} ${DOCSDIR}
.endfor
.endif
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>
