aboutsummaryrefslogtreecommitdiffstats
path: root/devel/hs-utf8-string-ghc/Makefile
blob: 11ac8b19b71da68cb554ec6d7ba8a9b0dab5c266 (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
# New ports collection makefile for:    hs-utf8-string-ghc
# Date created:     2008-10-21
# Whom:         Ashish Shukla <wahjava@gmail.com>
#
# $FreeBSD$
#

PORTNAME=   utf8-string
PORTVERSION=    0.3.4
CATEGORIES= devel haskell
MASTER_SITES=   http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
PKGNAMEPREFIX=  hs-
PKGNAMESUFFIX=  -ghc

MAINTAINER= wahjava@gmail.com
COMMENT=    Support for reading/writing UTF8 strings for Haskell programs

BUILD_DEPENDS=  ghc:${PORTSDIR}/lang/ghc
RUN_DEPENDS=    ghc:${PORTSDIR}/lang/ghc

CABALCMD=   ${LOCALBASE}/bin/runghc Setup.lhs
CABALDIR=   ${PREFIX}/lib/ghc-${GHC_VERSION}/cabal
GHC_VERSION=    6.8.3
SUBDIR=     lib/${PORTNAME}-${PORTVERSION}
PLIST_SUB+= GHC_VERSION=${GHC_VERSION} \
        PORTVERSION=${PORTVERSION} \
        PORTNAME=${PORTNAME} \
        SUBDIR=lib/ghc-${GHC_VERSION}/cabal
DOCSDIR=    ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
PORTDOCS=   LICENSE html

CONFIGURE_ARGS= --ghc --prefix=${PREFIX} --libdir=${CABALDIR} --libsubdir='' --datasubdir=''

.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
.else
PLIST_DIRS+=    %%DOCSDIR%%
PLIST_FILES+=   %%DOCSDIR%%/LICENSE
.endif

do-configure:
    cd ${WRKSRC} && ${CABALCMD} configure ${CONFIGURE_ARGS}

do-build:
    cd ${WRKSRC} && ${CABALCMD} build && ${CABALCMD} --gen-script register
.if !defined(NOPORTDOCS)
    cd ${WRKSRC} && ${CABALCMD} haddock
.endif

do-install:
    cd ${WRKSRC} && ${CABALCMD} install \
      && ${INSTALL_SCRIPT} ${WRKSRC}/register.sh ${CABALDIR}/${PORTNAME}-register.sh

.include <bsd.port.mk>