diff options
author | Gabor Pali <pgj@FreeBSD.org> | 2009-09-02 15:38:45 +0000 |
---|---|---|
committer | Gabor Pali <pgj@FreeBSD.org> | 2009-09-02 15:38:45 +0000 |
commit | 7d5781e5ab3aa2c4d9f46985acec697caae1c173 (patch) | |
tree | fb0e55efa60858746649977ee5813f549bfbad04 /devel/hs-c2hs | |
parent | 9acc5ac910695e85c7d24401bfecd5d6e6da0d7f (diff) | |
download | ports-7d5781e5ab3aa2c4d9f46985acec697caae1c173.tar.gz ports-7d5781e5ab3aa2c4d9f46985acec697caae1c173.zip |
Notes
Diffstat (limited to 'devel/hs-c2hs')
-rw-r--r-- | devel/hs-c2hs/Makefile | 60 | ||||
-rw-r--r-- | devel/hs-c2hs/pkg-plist | 6 |
2 files changed, 47 insertions, 19 deletions
diff --git a/devel/hs-c2hs/Makefile b/devel/hs-c2hs/Makefile index 83cfd273e6b0..64ca31528b98 100644 --- a/devel/hs-c2hs/Makefile +++ b/devel/hs-c2hs/Makefile @@ -7,7 +7,7 @@ PORTNAME= c2hs PORTVERSION= 0.16.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel haskell MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/ PKGNAMEPREFIX= hs- @@ -20,34 +20,56 @@ BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc \ RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc LIB_DEPENDS= gmp.8:${PORTSDIR}/math/libgmp4 -.include <bsd.port.pre.mk> +GHC_VERSION= 6.10.4 +C2HS_VERSION= ${PORTVERSION} -GHC_VERSION= 6.8.3 +GHC_CMD= ${LOCALBASE}/bin/ghc +SETUP_CMD= ./setup -# 'owned' by lang/ghc: -CABALDIR= ${PREFIX}/${SUBDIR} -CABALCMD= ${LOCALBASE}/bin/runghc Setup.hs -SUBDIR= lib/ghc-${GHC_VERSION}/cabal +DATADIR= ${PREFIX}/share/${DISTNAME} +DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} +C2HS_LIBDIR_REL= lib/${DISTNAME} -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} +PLIST_SUB= GHC_VERSION=${GHC_VERSION} \ + C2HS_VERSION=${C2HS_VERSION} \ + C2HS_LIBDIR_REL=${C2HS_LIBDIR_REL} -CONFIGURE_ARGS= --ghc --prefix=${PREFIX} --libdir=${CABALDIR} \ - --datadir=${CABALDIR}/${PORTNAME} \ - --libsubdir='' --datasubdir='' +MAN1= c2hs.1 + +.if defined(NOPORTDOCS) +PLIST_SUB+= NOPORTDOCS="" +.else +PLIST_SUB+= NOPORTDOCS="@comment " +.endif + +.if !defined(NOPORTDOCS) +BUILD_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/html:${PORTSDIR}/textproc/docbook-xsl \ + ${LOCALBASE}/bin/xsltproc:${PORTSDIR}/textproc/libxslt +USE_GMAKE= yes +PORTDOCS= COPYING users_guide +.endif + +.SILENT: do-configure: - cd ${WRKSRC} && ${CABALCMD} configure ${CONFIGURE_ARGS} + cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \ + && ${SETUP_CMD} configure --prefix=${PREFIX} do-build: - cd ${WRKSRC} && ${CABALCMD} build + cd ${WRKSRC} && ${SETUP_CMD} build + +.if !defined(NOPORTDOCS) + @(cd ${WRKSRC}/doc && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} html) +.endif do-install: - cd ${WRKSRC} && ${CABALCMD} install + cd ${WRKSRC} && ${SETUP_CMD} install \ + && ${INSTALL_MAN} ${WRKSRC}/doc/man1/c2hs.1 ${PREFIX}/man/man1 +.if !defined(NOPORTDOCS) + @(cd ${WRKSRC}/doc && ${CP} -R users_guide ${DOCSDIR}) +.endif post-install: - @${STRIP_CMD} ${PREFIX}/bin/c2hs + ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/devel/hs-c2hs/pkg-plist b/devel/hs-c2hs/pkg-plist new file mode 100644 index 000000000000..6b2a303cac68 --- /dev/null +++ b/devel/hs-c2hs/pkg-plist @@ -0,0 +1,6 @@ +@comment $FreeBSD$ +bin/c2hs +%%DATADIR%%/C2HS.hs +%%NOPORTDOCS%%%%DOCSDIR%%/COPYING +%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%% +@dirrm %%DATADIR%% |