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
|
2005-05-20 13:43:41 +00:00
|
|
|
PORTVERSION= 2.04
|
2006-03-07 08:28:06 +00:00
|
|
|
PORTREVISION= 3
|
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-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 \
|
2005-10-14 12:10:45 +00:00
|
|
|
ghc:${PORTSDIR}/lang/ghc
|
|
|
|
RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
|
2005-05-20 13:43:41 +00:00
|
|
|
PKGNAMESUFFIX= -ghc6
|
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)
|
2005-05-20 13:43:41 +00:00
|
|
|
CONFIGURE_ARGS+= --docdir=${DOCSDIR} +docs
|
|
|
|
PORTDOCS= *
|
2001-12-21 20:23:40 +00:00
|
|
|
.endif
|
|
|
|
|
2005-05-26 07:29:52 +00:00
|
|
|
MAN1= black-hat.1 hat-cover.1 hat-detect.1 hat-nonterm.1 hat-observe.1 \
|
2005-05-20 13:43:41 +00:00
|
|
|
hat-stack.1 hat-trail.1 hat-trans.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:
|
2005-05-20 13:43:41 +00:00
|
|
|
. for i in Foreign/C NHC System/Directory Text/Html Text/Regex Text/Show
|
|
|
|
@${RMDIR} ${LOCALBASE}/include/hat/${i} # empty!
|
|
|
|
. endfor
|
|
|
|
. if !defined(WITH_NHC98)
|
|
|
|
@${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
|
|
|
|
. endif
|
|
|
|
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/src/hatlib/hat.cabal \
|
2003-04-10 12:38:56 +00:00
|
|
|
${PREFIX}/lib/ix86-FreeBSD
|
2003-06-09 17:53:15 +00:00
|
|
|
@${RM} -rf ${PREFIX}/share/doc/hat/CVS
|
2001-12-21 20:23:40 +00:00
|
|
|
|
2002-11-21 22:03:48 +00:00
|
|
|
.include <bsd.port.post.mk>
|