aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/hs-haxml/Makefile
blob: a96bcdbb3104aa9bd6b9af4d8a14fac146cca17b (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
# New ports collection makefile for:    HaXml
# Date created:             01 June 2002
# Whom:                 Oliver Braun <obraun@informatik.unibw-muenchen.de>
#
# $FreeBSD$

PORTNAME=   haxml
PORTVERSION=    1.13
CATEGORIES= textproc haskell
MASTER_SITES=   http://www.haskell.org/HaXml/ \
        ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/
PKGNAMEPREFIX=  hs-
DISTNAME=   HaXml-${PORTVERSION}

MAINTAINER= haskell@FreeBSD.org
COMMENT=    A collection of utilities for using Haskell and XML together

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

USE_REINPLACE=  yes
HAS_CONFIGURE=  yes
USE_GMAKE=  yes

CONFIGURE_ARGS+=    --prefix=${PREFIX}/bin

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

post-patch:
    @${REINPLACE_CMD} -e 's,/bin/false,/usr/bin/false,' ${WRKSRC}/configure

post-configure:
    @${REINPLACE_CMD} -e '/hugs/d' ${WRKSRC}/obj/compilers
    @${REINPLACE_CMD} -e '/nhc98/d' ${WRKSRC}/obj/compilers

post-install:
    @${INSTALL_DATA} ${WRKSRC}/obj/ghc/HaXml.pkgconf \
        ${PREFIX}/lib/ghc-${GHC_VERSION}/imports/HaXml/
    @${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @(cd ${WRKSRC} && ${RM} -rf docs/HaXml/CVS)
    @(cd ${WRKSRC} && ${CP} -R docs/* ${DOCSDIR})
.endif

.include <bsd.port.mk>