1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00
freebsd-ports/devel/hs-language-c-ghc/Makefile
Gabor Pali 54dcdde2eb Language C is a Haskell library for the analysis and generation of C
code.  It features a complete, well tested parser and pretty printer for
all of C99 and a large set of GNU extensions.

WWW: http://www.sivity.net/projects/language.c/

Approved by:	tabthorpe
2009-03-06 19:46:33 +00:00

58 lines
1.5 KiB
Makefile

# New ports collection makefile for: hs-language-c-ghc
# Date created: March 2, 2009
# Whom: Gabor Pali <pgj@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= language-c
PORTVERSION= 0.3.1.1
CATEGORIES= devel haskell
MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
PKGNAMEPREFIX= hs-
PKGNAMESUFFIX= -ghc
MAINTAINER= haskell@FreeBSD.org
COMMENT= Analysis and generation of C code in Haskell
BUILD_DEPENDS= ghc>=6.8:${PORTSDIR}/lang/ghc \
alex:${PORTSDIR}/devel/hs-alex \
happy:${PORTSDIR}/devel/hs-happy
RUN_DEPENDS= ghc>=6.8:${PORTSDIR}/lang/ghc
GHC_VERSION= 6.8.3
CABALCMD= ${LOCALBASE}/bin/runghc Setup.hs
CABALDIR= lib/ghc-${GHC_VERSION}/cabal
SUBDIR= lib/${PORTNAME}-${PORTVERSION}
PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
PORTNAME=${PORTNAME} \
PORTVERSION=${PORTVERSION} \
SUBDIR=${CABALDIR}
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
PORTDOCS= LICENSE html
CONFIGURE_ARGS= --ghc --prefix=${PREFIX} --libdir=${PREFIX}/${CABALDIR} --libsubdir='' --datasubdir=''
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
PLIST_SUB+= RMLIC="@comment "
.else
PLIST_SUB+= RMLIC=""
.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 ${PREFIX}/${CABALDIR}/${PORTNAME}-register.sh
.include <bsd.port.mk>