From f203c3895196ffa8b69517527e8c488cc49ada57 Mon Sep 17 00:00:00 2001 From: pgj Date: Wed, 12 May 2010 16:33:59 +0000 Subject: Introduce a new (and hopefully better) ports infrastructure for Haskell Cabal ports which makes possible the direct translation of Cabal package descriptions to FreeBSD ports. It promises both easier addition and maintenance for Cabal-based ports. --- devel/hs-hslogger/Makefile | 61 ++------------------------------------------- devel/hs-hslogger/pkg-plist | 34 ++++++++++++------------- 2 files changed, 19 insertions(+), 76 deletions(-) (limited to 'devel/hs-hslogger') diff --git a/devel/hs-hslogger/Makefile b/devel/hs-hslogger/Makefile index 2891e64f753b..34fbbfbb5b32 100644 --- a/devel/hs-hslogger/Makefile +++ b/devel/hs-hslogger/Makefile @@ -8,68 +8,11 @@ PORTNAME= hslogger PORTVERSION= 1.0.7 CATEGORIES= devel haskell -MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/ -PKGNAMEPREFIX= hs- MAINTAINER= jacula@gmail.com COMMENT= Versatile logging framework for Haskell -BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc -RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc - -GHC_VERSION= 6.10.4 -HSLOGGER_VERSION= ${PORTVERSION} - -GHC_CMD= ${LOCALBASE}/bin/ghc -SETUP_CMD= ./setup - -DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} -HSLOGGER_LIBDIR_REL= lib/${DISTNAME} - -PLIST_SUB= GHC_VERSION=${GHC_VERSION} \ - HSLOGGER_VERSION=${HSLOGGER_VERSION} \ - HSLOGGER_LIBDIR_REL=${HSLOGGER_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.hs -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}/${HSLOGGER_LIBDIR_REL}/register.sh - -post-install: - ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old +CABAL_SETUP= Setup.hs +.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk" .include diff --git a/devel/hs-hslogger/pkg-plist b/devel/hs-hslogger/pkg-plist index e5fcf9ba8fce..14d30e6445d6 100644 --- a/devel/hs-hslogger/pkg-plist +++ b/devel/hs-hslogger/pkg-plist @@ -1,22 +1,22 @@ @comment $FreeBSD$ -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HShslogger-%%HSLOGGER_VERSION%%.o -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log.hi -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler.hi -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler/Growl.hi -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler/Log4jXML.hi -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler/Simple.hi -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler/Syslog.hi -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Logger.hi -%%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHShslogger-%%HSLOGGER_VERSION%%.a -%%HSLOGGER_LIBDIR_REL%%/register.sh +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HS%%PORTNAME%%-%%PORTVERSION%%.o +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log.hi +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler.hi +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler/Growl.hi +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler/Log4jXML.hi +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler/Simple.hi +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler/Syslog.hi +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Logger.hi +%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHS%%PORTNAME%%-%%PORTVERSION%%.a +%%LIBDIR_REL%%/register.sh %%NOPORTDOCS%%%%DOCSDIR%%/COPYRIGHT %%NOPORTDOCS%%@dirrmtry %%DOCSDIR%% -@dirrm %%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler -@dirrm %%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log -@dirrm %%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System -@dirrm %%HSLOGGER_LIBDIR_REL%%/ghc-%%GHC_VERSION%% -@dirrm %%HSLOGGER_LIBDIR_REL%% -@exec /bin/sh %D/%%HSLOGGER_LIBDIR_REL%%/register.sh +@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log/Handler +@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System/Log +@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/System +@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%% +@dirrm %%LIBDIR_REL%% +@exec /bin/sh %D/%%LIBDIR_REL%%/register.sh @exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old -@unexec %D/bin/ghc-pkg unregister hslogger +@unexec %D/bin/ghc-pkg unregister %%PORTNAME%%-%%PORTVERSION%% @unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old -- cgit