diff --git a/devel/Makefile b/devel/Makefile index 335606e029e7..b12760615265 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -579,6 +579,7 @@ SUBDIR += hs-transformers SUBDIR += hs-unamb SUBDIR += hs-uniplate + SUBDIR += hs-unix-compat SUBDIR += hs-utf8-string-ghc SUBDIR += hs-utility-ht SUBDIR += hs-uuagc diff --git a/devel/hs-unix-compat/Makefile b/devel/hs-unix-compat/Makefile new file mode 100644 index 000000000000..47d2d11744d9 --- /dev/null +++ b/devel/hs-unix-compat/Makefile @@ -0,0 +1,75 @@ +# New ports collection makefile for: hs-unix-compat +# Date created: January 10 2010 +# Whom: Giuseppe Pilichi aka Jacula Modyun +# +# $FreeBSD$ +# + +PORTNAME= unix-compat +PORTVERSION= 0.1.2.1 +CATEGORIES= devel haskell +MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/ +PKGNAMEPREFIX= hs- + +MAINTAINER= jacula@gmail.com +COMMENT= Portable POSIX-compatibility layer for Haskell + +BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc +RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc + +GHC_VERSION= 6.10.4 +UNIXCOMPAT_VERSION= ${PORTVERSION} + +GHC_CMD= ${LOCALBASE}/bin/ghc +SETUP_CMD= ./setup + +DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} +UNIXCOMPAT_LIBDIR_REL= lib/${DISTNAME} + +PLIST_SUB= GHC_VERSION=${GHC_VERSION} \ + UNIXCOMPAT_VERSION=${UNIXCOMPAT_VERSION} \ + UNIXCOMPAT_LIBDIR_REL=${UNIXCOMPAT_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 +.endif +BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour + +HSCOLOUR_VERSION= 1.15 +HSCOLOUR_DATADIR= ${PREFIX}/share/hscolour-${HSCOLOUR_VERSION} + +PORTDOCS= * +.endif + +.SILENT: + +do-configure: + cd ${WRKSRC} && ${GHC_CMD} --make Setup.lhs -o setup -package Cabal \ + && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} + +do-build: + cd ${WRKSRC} && ${SETUP_CMD} build \ + && ${SETUP_CMD} register --gen-script + +.if !defined(NOPORTDOCS) + cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source \ + --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css +.endif + +do-install: + cd ${WRKSRC} && ${SETUP_CMD} install \ + && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${UNIXCOMPAT_LIBDIR_REL}/register.sh + +post-install: + ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old + +.include diff --git a/devel/hs-unix-compat/distinfo b/devel/hs-unix-compat/distinfo new file mode 100644 index 000000000000..1a32d0a5507a --- /dev/null +++ b/devel/hs-unix-compat/distinfo @@ -0,0 +1,3 @@ +MD5 (unix-compat-0.1.2.1.tar.gz) = 6ecfc3922fce2e96922af3a636b061f9 +SHA256 (unix-compat-0.1.2.1.tar.gz) = 553326e140f71f09cedeec5f74666171c2ad2b3d9ba4312da97da02cbf8a2e85 +SIZE (unix-compat-0.1.2.1.tar.gz) = 6286 diff --git a/devel/hs-unix-compat/pkg-descr b/devel/hs-unix-compat/pkg-descr new file mode 100644 index 000000000000..cd1bc93749cf --- /dev/null +++ b/devel/hs-unix-compat/pkg-descr @@ -0,0 +1,5 @@ +This Haskell package provides portable implementations of parts of the +unix package. This package re-exports the unix package when available. +When it is not available, portable implementations are used. + +WWW: http://hackage.haskell.org/package/unix-compat diff --git a/devel/hs-unix-compat/pkg-plist b/devel/hs-unix-compat/pkg-plist new file mode 100644 index 000000000000..fb4a437df2be --- /dev/null +++ b/devel/hs-unix-compat/pkg-plist @@ -0,0 +1,20 @@ +@comment $FreeBSD$ +%%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSunix-compat-%%UNIXCOMPAT_VERSION%%.o +%%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/PosixCompat/Extensions.hi +%%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/PosixCompat/Files.hi +%%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/PosixCompat/Types.hi +%%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/PosixCompat/User.hi +%%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsUnixCompat.h +%%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSunix-compat-%%UNIXCOMPAT_VERSION%%.a +%%UNIXCOMPAT_LIBDIR_REL%%/register.sh +%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE +%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%% +@dirrm %%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include +@dirrm %%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/PosixCompat +@dirrm %%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System +@dirrm %%UNIXCOMPAT_LIBDIR_REL%%/ghc-%%GHC_VERSION%% +@dirrm %%UNIXCOMPAT_LIBDIR_REL%% +@exec /bin/sh %D/%%UNIXCOMPAT_LIBDIR_REL%%/register.sh +@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old +@unexec %D/bin/ghc-pkg unregister unix-compat +@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old