#   $OpenBSD: Makefile,v 1.6 1999/09/04 23:24:31 angelos Exp $

DISTNAME=	sdr-2.7e
CATEGORIES=	mbone
MASTER_SITES=	http://www-mice.cs.ucl.ac.uk/multimedia/software/sdr/2.7e/

NEED_VERSION=	1.111

MAINTAINER=	angelos@openbsd.org

LIB_DEPENDS=	tcl80.1.5:${PORTSDIR}/lang/tcl80 \
		tk80.1.5:${PORTSDIR}/x11/tk80

USE_X11=	yes
USE_GMAKE=	yes
HAS_CONFIGURE=	yes

# src/libs.tcl is autogenerated from the tcl/tk installed on the
# build system, so we shouldn't use the one in the distribution.
# Makefile.work and configure help to work with the sdr multi-platform
# build structure.
post-extract:
	@${RM} -f ${WRKSRC}/src/libs.tcl
	@${CP} ${FILESDIR}/Makefile.work ${WRKSRC}/Makefile
	@${CP} ${FILESDIR}/configure ${WRKSRC}
	@${CP} ${FILESDIR}/image_directory.xbm ${WRKSRC}/sdr/src/
	@${CHMOD} 755 ${WRKSRC}/configure

post-install:
	${INSTALL_PROGRAM} ${WRKSRC}/sdr/freebsd/sdr ${PREFIX}/bin

.include <bsd.port.mk>
