aboutsummaryrefslogtreecommitdiff
path: root/x11-wm/hs-xmonad
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2010-05-12 16:33:59 +0000
committerGabor Pali <pgj@FreeBSD.org>2010-05-12 16:33:59 +0000
commitec29a59ec3d0472e808e9907b2f18dce2e9fe68c (patch)
treebd2ff04188a74e09a51bfecae86236b3684491e5 /x11-wm/hs-xmonad
parentba00ef6b8cc071eb53bf9287bfbc328da82f7eb8 (diff)
downloadports-ec29a59ec3d0472e808e9907b2f18dce2e9fe68c.tar.gz
ports-ec29a59ec3d0472e808e9907b2f18dce2e9fe68c.zip
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.
Notes
Notes: svn path=/head/; revision=254209
Diffstat (limited to 'x11-wm/hs-xmonad')
-rw-r--r--x11-wm/hs-xmonad/Makefile77
-rw-r--r--x11-wm/hs-xmonad/pkg-plist33
2 files changed, 22 insertions, 88 deletions
diff --git a/x11-wm/hs-xmonad/Makefile b/x11-wm/hs-xmonad/Makefile
index 29cdd11e0116..e53eda10541f 100644
--- a/x11-wm/hs-xmonad/Makefile
+++ b/x11-wm/hs-xmonad/Makefile
@@ -9,85 +9,20 @@ PORTNAME= xmonad
PORTVERSION= 0.9.1
PORTREVISION= 1
CATEGORIES= x11-wm haskell
-MASTER_SITES= http://hackage.haskell.org/packages/archive/xmonad/${PORTVERSION}/
+PKGNAMEPREFIX=
MAINTAINER= haskell@FreeBSD.org
COMMENT= Xmonad is a minimalist and tiling window manager for X
-BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- hs-x11-ghc>=1.4.1:${PORTSDIR}/x11/hs-x11-ghc
-RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- hs-x11-ghc>=1.4.1:${PORTSDIR}/x11/hs-x11-ghc
-LIB_DEPENDS= gmp.10:${PORTSDIR}/math/gmp
-
+USE_HACKAGE= X11>=1.5.0.0
USE_XORG= x11
-GHC_VERSION= 6.10.4
-XMONAD_VERSION= ${PORTVERSION}
-
-GHC_CMD= ${LOCALBASE}/bin/ghc
-SETUP_CMD= ./setup
-
-DATADIR= ${PREFIX}/share/${DISTNAME}
-PORTDATA= *
-
-DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
-XMONAD_LIBDIR_REL= lib/${DISTNAME}
-
-PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
- XMONAD_VERSION=${XMONAD_VERSION} \
- XMONAD_LIBDIR_REL=${XMONAD_LIBDIR_REL}
-
MAN1= xmonad.1
+MAN1SRC= man
-.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
+EXECUTABLE= xmonad
-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
-.if !defined(NOPORTDATA)
- cd ${WRKSRC} && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} \
- --datadir='${PREFIX}/share' --datasubdir='${DISTNAME}'
-.else
- cd ${WRKSRC} && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} \
- --datadir='' --datasubdir='' --docdir='${DOCSDIR}'
-.endif
-
-do-build:
- cd ${WRKSRC} && ${SETUP_CMD} build \
- && ${SETUP_CMD} register --gen-script
-
-.if !defined(NOPORTDOCS)
- cd ${WRKSRC} && ${SETUP_CMD} haddock --executables --hyperlink-source \
- --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
-.endif
-
-do-install:
- cd ${WRKSRC} && ${SETUP_CMD} install \
- && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${XMONAD_LIBDIR_REL}/register.sh \
- && ${INSTALL_MAN} ${WRKSRC}/man/xmonad.1 ${MAN1PREFIX}/man/man1 \
- && ${INSTALL_DATA} ${WRKSRC}/CONFIG ${DOCSDIR}
-
-post-install:
- ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+PORTDATA= *
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.mk>
diff --git a/x11-wm/hs-xmonad/pkg-plist b/x11-wm/hs-xmonad/pkg-plist
index 70c9922513d3..49ddc371d8d1 100644
--- a/x11-wm/hs-xmonad/pkg-plist
+++ b/x11-wm/hs-xmonad/pkg-plist
@@ -1,23 +1,22 @@
@comment $FreeBSD$
bin/xmonad
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSxmonad-%%XMONAD_VERSION%%.o
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad.hi
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Config.hi
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Core.hi
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Layout.hi
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Main.hi
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/ManageHook.hi
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Operations.hi
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/StackSet.hi
-%%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSxmonad-%%XMONAD_VERSION%%.a
-%%XMONAD_LIBDIR_REL%%/register.sh
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HS%%PORTNAME%%-%%PORTVERSION%%.o
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Config.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Core.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Layout.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Main.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/ManageHook.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/Operations.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad/StackSet.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHS%%PORTNAME%%-%%PORTVERSION%%.a
+%%LIBDIR_REL%%/register.sh
%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
-%%NOPORTDOCS%%%%DOCSDIR%%/CONFIG
%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
-@dirrm %%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad
-@dirrm %%XMONAD_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
-@dirrm %%XMONAD_LIBDIR_REL%%
-@exec /bin/sh %D/%%XMONAD_LIBDIR_REL%%/register.sh
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/XMonad
+@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 xmonad
+@unexec %D/bin/ghc-pkg unregister %%PORTNAME%%
@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old