2002-07-08 19:35:22 +00:00
|
|
|
# New ports collection makefile for: hat
|
|
|
|
# Date created: 16 June 2002
|
2001-12-21 20:23:40 +00:00
|
|
|
# Whom: Oliver Braun <obraun@informatik.unibw-muenchen.de>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
2002-07-08 19:35:22 +00:00
|
|
|
#
|
2001-12-21 20:23:40 +00:00
|
|
|
|
2002-07-08 19:35:22 +00:00
|
|
|
PORTNAME= hat
|
2003-04-10 12:38:56 +00:00
|
|
|
PORTVERSION= 2.02
|
2004-02-04 05:21:48 +00:00
|
|
|
PORTREVISION= 1
|
2002-11-20 09:10:55 +00:00
|
|
|
CATEGORIES= devel haskell
|
2001-12-21 20:23:40 +00:00
|
|
|
MASTER_SITES= ftp://ftp.cs.york.ac.uk/pub/haskell/${PORTNAME}/
|
2002-09-04 18:39:09 +00:00
|
|
|
PKGNAMEPREFIX= hs-
|
2001-12-21 20:23:40 +00:00
|
|
|
|
2004-03-06 21:29:59 +00:00
|
|
|
MAINTAINER= haskell@FreeBSD.org
|
2003-02-18 10:50:48 +00:00
|
|
|
COMMENT= A source-level tracer for Haskell 98
|
2002-08-21 15:28:54 +00:00
|
|
|
|
2001-12-21 20:23:40 +00:00
|
|
|
USE_GMAKE= yes
|
|
|
|
HAS_CONFIGURE= yes
|
2002-07-08 19:35:22 +00:00
|
|
|
USE_REINPLACE= yes
|
2002-07-15 17:21:56 +00:00
|
|
|
USE_GNOME= glib12
|
2002-11-21 22:03:48 +00:00
|
|
|
|
2004-02-24 11:07:43 +00:00
|
|
|
OPTIONS= NHC98 "Build with nhc98" off
|
2004-02-19 09:56:15 +00:00
|
|
|
|
2002-11-21 22:03:48 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2003-04-10 12:38:56 +00:00
|
|
|
.if defined(WITH_NHC98) && ${OSVERSION} >= 500000
|
|
|
|
BROKEN= "does not build with nhc98 on this platform"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_NHC98)
|
|
|
|
BUILD_DEPENDS= nhc98:${PORTSDIR}/lang/nhc98
|
|
|
|
RUN_DEPENDS= nhc98:${PORTSDIR}/lang/nhc98
|
2004-02-24 11:07:43 +00:00
|
|
|
PKGNAMESUFFIX= -nhc98
|
2003-04-10 12:38:56 +00:00
|
|
|
.else
|
|
|
|
BUILD_DEPENDS= hmake:${PORTSDIR}/devel/hs-hmake \
|
2004-01-16 12:20:43 +00:00
|
|
|
ghc-5.04.3:${PORTSDIR}/lang/ghc5
|
|
|
|
RUN_DEPENDS+= ghc-5.04.3:${PORTSDIR}/lang/ghc5
|
2004-02-24 11:07:43 +00:00
|
|
|
PKGNAMESUFFIX= -ghc5
|
2002-11-21 22:03:48 +00:00
|
|
|
.endif
|
|
|
|
|
2002-07-12 18:06:02 +00:00
|
|
|
ALL_TARGET= hat
|
2003-04-10 12:38:56 +00:00
|
|
|
.if defined(WITH_NHC98)
|
|
|
|
ALL_TARGET+= hat-lib-nhc
|
|
|
|
.else
|
|
|
|
ALL_TARGET+= hat-lib-ghc
|
2002-07-12 18:06:02 +00:00
|
|
|
.endif
|
2003-04-10 12:38:56 +00:00
|
|
|
|
|
|
|
.if defined(WITH_NHC98)
|
2002-07-12 18:06:02 +00:00
|
|
|
PLIST_SUB+= NHC98=""
|
2003-04-10 12:38:56 +00:00
|
|
|
PLIST_SUB+= GHC="@comment "
|
2002-07-12 18:06:02 +00:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= NHC98="@comment "
|
2003-06-09 21:46:09 +00:00
|
|
|
GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
|
2002-07-12 18:06:02 +00:00
|
|
|
PLIST_SUB+= GHC=""
|
2003-04-10 12:38:56 +00:00
|
|
|
PLIST_SUB+= GHC_VERSION="${GHC_VERSION}"
|
2002-05-08 16:57:56 +00:00
|
|
|
.endif
|
|
|
|
|
2002-07-12 18:06:02 +00:00
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX} --libdir=${PREFIX}/lib
|
2003-04-10 12:38:56 +00:00
|
|
|
.if defined(WITH_NHC98)
|
2002-07-12 18:06:02 +00:00
|
|
|
CONFIGURE_ARGS+= --buildwith=nhc98
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --buildwith=ghc
|
|
|
|
.endif
|
2003-04-10 12:38:56 +00:00
|
|
|
|
2001-12-21 20:23:40 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
2003-04-10 12:38:56 +00:00
|
|
|
CONFIGURE_ARGS+= --docdir=${PREFIX}/share/doc/hat +docs
|
2001-12-21 20:23:40 +00:00
|
|
|
.endif
|
|
|
|
|
2002-07-08 19:35:22 +00:00
|
|
|
MAN1= hat-detect.1 hat-observe.1 hat-stack.1 hat-trail.1
|
2001-12-21 20:23:40 +00:00
|
|
|
|
2002-07-08 19:35:22 +00:00
|
|
|
pre-everything::
|
|
|
|
@${ECHO_CMD} ""
|
2003-04-10 12:38:56 +00:00
|
|
|
.if !defined(WITH_NHC98)
|
|
|
|
@${ECHO_CMD} " HAT will be built and installed with ghc."
|
|
|
|
@${ECHO_CMD} " Define WITH_NHC98 to install with nhc98."
|
2002-07-08 19:35:22 +00:00
|
|
|
.else
|
2003-04-10 12:38:56 +00:00
|
|
|
@${ECHO_CMD} " HAT will be built and installed with nhc98."
|
2002-05-27 02:02:18 +00:00
|
|
|
.endif
|
2002-07-08 19:35:22 +00:00
|
|
|
@${ECHO_CMD} ""
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e "s|glib-config|${GLIB_CONFIG}|" \
|
2003-04-10 12:38:56 +00:00
|
|
|
${WRKSRC}/configure ${WRKSRC}/src/hattools/Makefile
|
2004-02-24 11:07:43 +00:00
|
|
|
.if !(defined(WITH_NHC98))
|
|
|
|
.for f in hattrans/Makefile hatlib/Makefile
|
|
|
|
@${REINPLACE_CMD} -e "s/package lang/package lang -package haskell98/" ${WRKSRC}/src/${f}
|
|
|
|
.endfor
|
|
|
|
@${REINPLACE_CMD} -e "s/package lang/package lang -package base -package haskell98/" ${WRKSRC}/src/hattools/Makefile
|
|
|
|
.endif
|
2001-12-21 20:23:40 +00:00
|
|
|
|
2002-07-08 19:35:22 +00:00
|
|
|
post-install:
|
2003-04-10 12:38:56 +00:00
|
|
|
.if !defined(WITH_NHC98)
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/lib/ix86-FreeBSD/hatlib/ghc/hat-package.conf \
|
|
|
|
${PREFIX}/lib/ix86-FreeBSD
|
2003-06-09 17:53:15 +00:00
|
|
|
@${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
|
2003-04-10 12:38:56 +00:00
|
|
|
.endif
|
|
|
|
.if !defined(NOPORTDOCS)
|
2003-06-09 17:53:15 +00:00
|
|
|
@${RM} -rf ${PREFIX}/share/doc/hat/CVS
|
2002-05-08 16:57:56 +00:00
|
|
|
.endif
|
2001-12-21 20:23:40 +00:00
|
|
|
|
2002-11-21 22:03:48 +00:00
|
|
|
.include <bsd.port.post.mk>
|