aboutsummaryrefslogtreecommitdiffstats
path: root/lang/generic-haskell/Makefile
blob: cf7856f6f558d465a739509b3741f3e24461242a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# New ports collection makefile for:    generic-haskell
# Date created:             05 July 2002
# Whom:                 Oliver Braun <obraun@informatik.unibw-muenchen.de>
#
# $FreeBSD$

PORTNAME=   generic-haskell
PORTVERSION=    1.42
CATEGORIES= lang haskell
MASTER_SITES=   http://www.cs.uu.nl/research/projects/generic-haskell/compiler/coral/
DISTNAME=   gh-${PORTVERSION}-source

MAINTAINER= haskell@FreeBSD.org
COMMENT=    The Generic Haskell compiler

BUILD_DEPENDS=  ghc:${PORTSDIR}/lang/ghc
.if !defined(WITHOUT_HUGS)  # otherwise the gh-hugs-wrapper won't work
BUILD_DEPENDS+= hugs:${PORTSDIR}/lang/hugs
PLIST_SUB+= HUGS=""
.else
PLIST_SUB+= HUGS="@comment "
.endif

RUN_DEPENDS=    ${BUILD_DEPENDS}

.include <bsd.port.pre.mk>

.if exists(${LOCALBASE}/bin/DrIFT)
BROKEN=     "Does not build with devel/hs-drift installed"
.endif

GNU_CONFIGURE=  yes
CONFIGURE_SCRIPT=   ../configure
CONFIGURE_ARGS= --without-upx
USE_GMAKE=  yes
ALL_TARGET=
INSTALL_TARGET= install

GHC_VERSION=    `${LOCALBASE}/bin/ghc --numeric-version`
PLIST_SUB+=     GHC_VERSION="${GHC_VERSION}"

WRKSRC=     ${WRKDIR}/${DISTNAME:S/-source//}/build
GHLIBDIR=   ${PREFIX}/${DISTNAME:S/-source//}
PLIST_SUB+= GH=${DISTNAME:S/-source//}

post-install:
.if defined(WITHOUT_HUGS)
    @${RM} ${PREFIX}/bin/gh-hugs
.endif
    @${SH} ${PKGINSTALL} generic-haskell POST-INSTALL
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${CP} -R ${WRKDIR}/${DISTNAME:S/-source//}/doc/* ${DOCSDIR}
.endif

.include <bsd.port.post.mk>