aboutsummaryrefslogtreecommitdiffstats
path: root/devel/hs-cpphs
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2009-09-02 23:38:45 +0800
committerpgj <pgj@FreeBSD.org>2009-09-02 23:38:45 +0800
commit287f50302a59b3a75af8cd8263480951b70ad176 (patch)
tree14860ef0ad1ca08c47d77a5ed1d140cbef657d2a /devel/hs-cpphs
parentf095667176485d73e004654a71204b209d48fb1f (diff)
downloadfreebsd-ports-gnome-287f50302a59b3a75af8cd8263480951b70ad176.tar.gz
freebsd-ports-gnome-287f50302a59b3a75af8cd8263480951b70ad176.tar.zst
freebsd-ports-gnome-287f50302a59b3a75af8cd8263480951b70ad176.zip
- Update GHC and Haskell ports to 6.10.4 (for both i386 and amd64), bump
port revision where appropriate - Add devel/hs-ghc-paths - Add devel/hs-QuickCheck - Add devel/hs-readline - Add devel/hs-haskeline - Add devel/hs-mmap - Remove lang/ghc-doc - Mark devel/lhs2TeX broken as it does not compile with GHC 6.10.4 - Set NHC98 as default compiler for devel/hs-hat as it does not compile with GHC 6.10.4 PR: ports/137055, ports/137058, ports/137059, ports/137060, ports/137061, ports/137062, ports/137063, ports/137063, ports/137064, ports/137065, ports/137066, ports/137067, ports/137068, ports/137069, ports/137070, ports/137071, ports/137072, ports/137074, ports/137075, ports/137076, ports/137077, ports/137078, ports/137079, ports/137080, ports/137081, ports/137082, ports/137083, ports/137084, ports/137085, ports/137086, ports/137087, ports/137088, ports/137090, ports/137091, ports/137092, ports/137093, ports/137094, ports/137095, ports/137096, ports/137097, ports/137098, ports/137099, ports/137102, ports/137103, ports/137104, ports/137107, ports/137108, ports/137109, ports/137110, ports/137111 Submitted by: Jacula Modyun (jacula (at) gmail (dot) com), Ashish Shukla (wahjava (at) gmail (dot) com) (amd64 support) Supported by: wxs (review, amd64 testing), tabthorpe (8.x testing) Approved by: tabthorpe (mentor), respective maintainers
Diffstat (limited to 'devel/hs-cpphs')
-rw-r--r--devel/hs-cpphs/Makefile60
-rw-r--r--devel/hs-cpphs/distinfo6
-rw-r--r--devel/hs-cpphs/pkg-plist33
3 files changed, 91 insertions, 8 deletions
diff --git a/devel/hs-cpphs/Makefile b/devel/hs-cpphs/Makefile
index 09d85b1d1b05..7676e04e0d95 100644
--- a/devel/hs-cpphs/Makefile
+++ b/devel/hs-cpphs/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= cpphs
-PORTVERSION= 1.6
-PORTREVISION= 1
+PORTVERSION= 1.7
CATEGORIES= devel haskell
MASTER_SITES= http://www.cs.york.ac.uk/fp/cpphs/
PKGNAMEPREFIX= hs-
@@ -16,17 +15,68 @@ MAINTAINER= haskell@FreeBSD.org
COMMENT= A simplified re-implementation of cpp in Haskell
BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc
LIB_DEPENDS= gmp.8:${PORTSDIR}/math/libgmp4
-PLIST_FILES= bin/cpphs
+GHC_VERSION= 6.10.4
+CPPHS_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+DATADIR= ${PREFIX}/share/${DISTNAME}
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+CPPHS_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ CPPHS_VERSION=${CPPHS_VERSION} \
+ CPPHS_LIBDIR_REL=${CPPHS_LIBDIR_REL}
MAN1= cpphs.1
+.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
+.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} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \
+ && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX}
+
do-build:
- @(cd ${WRKSRC} && ghc -o cpphs --make cpphs)
+ cd ${WRKSRC} && ${SETUP_CMD} build \
+ && ${SETUP_CMD} register --gen-script
+
+.if !defined(NOPORTDOCS)
+ cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source --executables \
+ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
+.endif
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/cpphs ${PREFIX}/bin/cpphs
+ cd ${WRKSRC} && ${SETUP_CMD} install \
+ && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${CPPHS_LIBDIR_REL}/register.sh
@${INSTALL_MAN} ${WRKSRC}/docs/cpphs.1 ${PREFIX}/man/man1
+ @${MKDIR} ${DATADIR} && ${INSTALL_DATA} ${WRKSRC}/docs/index.html ${DATADIR} \
+ && ${INSTALL_DATA} ${WRKSRC}/docs/design ${DATADIR}
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
.include <bsd.port.mk>
diff --git a/devel/hs-cpphs/distinfo b/devel/hs-cpphs/distinfo
index 7229b6f1afd4..38a920099ce4 100644
--- a/devel/hs-cpphs/distinfo
+++ b/devel/hs-cpphs/distinfo
@@ -1,3 +1,3 @@
-MD5 (cpphs-1.6.tar.gz) = 8a7565ff3b2d7bdb594af4c10c594951
-SHA256 (cpphs-1.6.tar.gz) = 2e7c430fde17adbb3905e6d2a3c3845a40349c61a53fcfa40c733e8b43e73295
-SIZE (cpphs-1.6.tar.gz) = 110723
+MD5 (cpphs-1.7.tar.gz) = e76cba8387e7f4747b21fbca4881a78a
+SHA256 (cpphs-1.7.tar.gz) = 5c8c94f7a8f6c8441b908532288339196e02141dac1d7c69ea045fd4ac3a6944
+SIZE (cpphs-1.7.tar.gz) = 113724
diff --git a/devel/hs-cpphs/pkg-plist b/devel/hs-cpphs/pkg-plist
new file mode 100644
index 000000000000..80cbaac78ecf
--- /dev/null
+++ b/devel/hs-cpphs/pkg-plist
@@ -0,0 +1,33 @@
+@comment $FreeBSD$
+bin/cpphs
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HScpphs-%%CPPHS_VERSION%%.o
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/CppIfdef.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/HashDefine.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/MacroPass.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/Options.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/Position.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/ReadFirst.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/RunCpphs.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/SymTab.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs/Tokenise.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Unlit.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/HuttonMeijer.hi
+%%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHScpphs-%%CPPHS_VERSION%%.a
+%%CPPHS_LIBDIR_REL%%/register.sh
+%%DATADIR%%/design
+%%DATADIR%%/index.html
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENCE-LGPL
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators
+@dirrm %%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text
+@dirrm %%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor/Cpphs
+@dirrm %%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/Preprocessor
+@dirrm %%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language
+@dirrm %%CPPHS_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%CPPHS_LIBDIR_REL%%
+@dirrmtry %%DATADIR%%
+@exec /bin/sh %D/%%CPPHS_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister cpphs
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old