aboutsummaryrefslogtreecommitdiff
path: root/devel/hs-language-c
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2009-09-02 15:38:45 +0000
committerGabor Pali <pgj@FreeBSD.org>2009-09-02 15:38:45 +0000
commit7d5781e5ab3aa2c4d9f46985acec697caae1c173 (patch)
treefb0e55efa60858746649977ee5813f549bfbad04 /devel/hs-language-c
parent9acc5ac910695e85c7d24401bfecd5d6e6da0d7f (diff)
downloadports-7d5781e5ab3aa2c4d9f46985acec697caae1c173.tar.gz
ports-7d5781e5ab3aa2c4d9f46985acec697caae1c173.zip
Notes
Diffstat (limited to 'devel/hs-language-c')
-rw-r--r--devel/hs-language-c/Makefile60
-rw-r--r--devel/hs-language-c/pkg-plist98
2 files changed, 91 insertions, 67 deletions
diff --git a/devel/hs-language-c/Makefile b/devel/hs-language-c/Makefile
index 22695a9f67f0..1a2f4787db31 100644
--- a/devel/hs-language-c/Makefile
+++ b/devel/hs-language-c/Makefile
@@ -7,6 +7,7 @@
PORTNAME= language-c
PORTVERSION= 0.3.1.1
+PORTREVISION= 1
CATEGORIES= devel haskell
MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
PKGNAMEPREFIX= hs-
@@ -20,38 +21,59 @@ BUILD_DEPENDS= ghc>=6.8:${PORTSDIR}/lang/ghc \
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
+GHC_VERSION= 6.10.4
+LANGUAGEC_VERSION= ${PORTVERSION}
-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
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
-CONFIGURE_ARGS= --ghc --prefix=${PREFIX} --libdir=${PREFIX}/${CABALDIR} --libsubdir='' --datasubdir=''
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+LANGUAGEC_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ LANGUAGEC_VERSION=${LANGUAGEC_VERSION} \
+ LANGUAGEC_LIBDIR_REL=${LANGUAGEC_LIBDIR_REL}
+
+.if defined(NOPORTDOCS)
+PLIST_SUB+= NOPORTDOCS=""
+.else
+PLIST_SUB+= NOPORTDOCS="@comment "
+.endif
.if !defined(NOPORTDOCS)
+
+PORT_HADDOCK!= (cd ${.CURDIR}/../../lang/ghc && ${MAKE} -V PORT_HADDOCK)
+.if !empty(PORT_HADDOCK:M?0)
BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
-PLIST_SUB+= RMLIC="@comment "
-.else
-PLIST_SUB+= RMLIC=""
.endif
+BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour
+
+HSCOLOUR_VERSION= 1.13
+HSCOLOUR_DATADIR= ${PREFIX}/share/hscolour-${HSCOLOUR_VERSION}
+
+PORTDOCS= *
+.endif
+
+.SILENT:
do-configure:
- cd ${WRKSRC} && ${CABALCMD} configure ${CONFIGURE_ARGS}
+ cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \
+ && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX}
do-build:
- cd ${WRKSRC} && ${CABALCMD} build && ${CABALCMD} --gen-script register
+ cd ${WRKSRC} && ${SETUP_CMD} build \
+ && ${SETUP_CMD} register --gen-script
+
.if !defined(NOPORTDOCS)
- cd ${WRKSRC} && ${CABALCMD} haddock
+ cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source \
+ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
.endif
do-install:
- cd ${WRKSRC} && ${CABALCMD} install
- ${INSTALL_SCRIPT} ${WRKSRC}/register.sh ${PREFIX}/${CABALDIR}/${PORTNAME}-register.sh
+ cd ${WRKSRC} && ${SETUP_CMD} install \
+ && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${LANGUAGEC_LIBDIR_REL}/register.sh
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
.include <bsd.port.mk>
diff --git a/devel/hs-language-c/pkg-plist b/devel/hs-language-c/pkg-plist
index 9710c4be8b0a..f6ae49bbf4a8 100644
--- a/devel/hs-language-c/pkg-plist
+++ b/devel/hs-language-c/pkg-plist
@@ -1,49 +1,51 @@
@comment $FreeBSD$
-%%SUBDIR%%/Language/C.hi
-%%SUBDIR%%/Language/C/Analysis/AstAnalysis.hi
-%%SUBDIR%%/Language/C/Analysis/Debug.hi
-%%SUBDIR%%/Language/C/Analysis/DeclAnalysis.hi
-%%SUBDIR%%/Language/C/Analysis/DefTable.hi
-%%SUBDIR%%/Language/C/Analysis/Export.hi
-%%SUBDIR%%/Language/C/Analysis/NameSpaceMap.hi
-%%SUBDIR%%/Language/C/Analysis/SemError.hi
-%%SUBDIR%%/Language/C/Analysis/SemRep.hi
-%%SUBDIR%%/Language/C/Analysis/TravMonad.hi
-%%SUBDIR%%/Language/C/Data/Error.hi
-%%SUBDIR%%/Language/C/Data/Ident.hi
-%%SUBDIR%%/Language/C/Data/InputStream.hi
-%%SUBDIR%%/Language/C/Data/Name.hi
-%%SUBDIR%%/Language/C/Data/Node.hi
-%%SUBDIR%%/Language/C/Data/Position.hi
-%%SUBDIR%%/Language/C/Data/RList.hi
-%%SUBDIR%%/Language/C/Parser/Builtin.hi
-%%SUBDIR%%/Language/C/Parser/Lexer.hi
-%%SUBDIR%%/Language/C/Parser/Parser.hi
-%%SUBDIR%%/Language/C/Parser/ParserMonad.hi
-%%SUBDIR%%/Language/C/Parser/Tokens.hi
-%%SUBDIR%%/Language/C/Syntax/AST.hi
-%%SUBDIR%%/Language/C/Syntax/Constants.hi
-%%SUBDIR%%/Language/C/Syntax/Ops.hi
-%%SUBDIR%%/Language/C/System/GCC.hi
-%%SUBDIR%%/Language/C/System/Preprocess.hi
-%%SUBDIR%%/Language/C/Analysis.hi
-%%SUBDIR%%/Language/C/Data.hi
-%%SUBDIR%%/Language/C/Parser.hi
-%%SUBDIR%%/Language/C/Pretty.hi
-%%SUBDIR%%/Language/C/Syntax.hi
-%%SUBDIR%%/HS%%PORTNAME%%-%%PORTVERSION%%.o
-%%SUBDIR%%/libHS%%PORTNAME%%-%%PORTVERSION%%.a
-%%SUBDIR%%/%%PORTNAME%%-register.sh
-@dirrm %%SUBDIR%%/Language/C/Analysis
-@dirrm %%SUBDIR%%/Language/C/Data
-@dirrm %%SUBDIR%%/Language/C/Parser
-@dirrm %%SUBDIR%%/Language/C/Syntax
-@dirrm %%SUBDIR%%/Language/C/System
-@dirrm %%SUBDIR%%/Language/C
-@dirrmtry %%SUBDIR%%/Language
-%%RMLIC%%%%DOCSDIR%%/LICENSE
-%%RMLIC%%@dirrm %%DOCSDIR%%
-@exec sh %D/%%SUBDIR%%/%%PORTNAME%%-register.sh
-@exec rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
-@unexec ghc-pkg unregister %%PORTNAME%%
-@unexec rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSlanguage-c-%%LANGUAGEC_VERSION%%.o
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/AstAnalysis.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/Debug.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/DeclAnalysis.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/DefTable.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/Export.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/NameSpaceMap.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/SemError.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/SemRep.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/TravMonad.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Error.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Ident.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/InputStream.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Name.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Node.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Position.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/RList.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/Builtin.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/Lexer.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/Parser.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/ParserMonad.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/Tokens.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Pretty.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax/AST.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax/Constants.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax/Ops.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/System/GCC.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/System/Preprocess.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSlanguage-c-%%LANGUAGEC_VERSION%%.a
+%%LANGUAGEC_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/System
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%LANGUAGEC_LIBDIR_REL%%
+@exec /bin/sh %D/%%LANGUAGEC_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister language-c
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old