aboutsummaryrefslogtreecommitdiff
path: root/devel/hs-c2hs/Makefile
blob: 9d7b7e5a4ab8e063b40d0264a8aa3bd601cb4166 (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
# New ports collection makefile for:   c2hs
# Date created:        23 August 2002
# Whom:                Oliver Braun <obraun@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	c2hs
PORTVERSION=	0.16.0
CATEGORIES=	devel haskell
MASTER_SITES=	http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
PKGNAMEPREFIX=	hs-

MAINTAINER=	haskell@FreeBSD.org
COMMENT=	C->Haskell, an Interface Generator for Haskell

BUILD_DEPENDS=	ghc:${PORTSDIR}/lang/ghc \
		hs-language-c-ghc>=0.3.1.1:${PORTSDIR}/devel/hs-language-c-ghc
RUN_DEPENDS=	ghc:${PORTSDIR}/lang/ghc
LIB_DEPENDS=	gmp.7:${PORTSDIR}/math/libgmp4

.include <bsd.port.pre.mk>

GHC_VERSION=	6.8.3

# 'owned' by lang/ghc:
CABALDIR=	${PREFIX}/${SUBDIR}
CABALCMD=	${LOCALBASE}/bin/runghc Setup.hs
SUBDIR=		lib/ghc-${GHC_VERSION}/cabal

PLIST_FILES=	bin/c2hs ${SUBDIR}/${PORTNAME}/C2HS.hs \
			${SUBDIR}/${PORTNAME}/doc/c2hs-${PORTVERSION}/COPYING
PLIST_DIRS=	${SUBDIR}/${PORTNAME}/doc/c2hs-${PORTVERSION} ${SUBDIR}/${PORTNAME}/doc \
			${SUBDIR}/${PORTNAME}

CONFIGURE_ARGS=	--ghc --prefix=${PREFIX} --libdir=${CABALDIR} \
			--datadir=${CABALDIR}/${PORTNAME} \
			--libsubdir='' --datasubdir=''

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

do-build:
	cd ${WRKSRC} && ${CABALCMD} build

do-install:
	cd ${WRKSRC} && ${CABALCMD} install

post-install:
	@${STRIP_CMD} ${PREFIX}/bin/c2hs

.include <bsd.port.post.mk>