aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-05-13 00:33:59 +0800
committerpgj <pgj@FreeBSD.org>2010-05-13 00:33:59 +0800
commitf203c3895196ffa8b69517527e8c488cc49ada57 (patch)
treed7be6abb9940698d6dc43b1587948a03039a23b5 /x11
parent965f4ecbcd1c9f6296e907af59901feeedfdc42f (diff)
downloadfreebsd-ports-gnome-f203c3895196ffa8b69517527e8c488cc49ada57.tar.gz
freebsd-ports-gnome-f203c3895196ffa8b69517527e8c488cc49ada57.tar.zst
freebsd-ports-gnome-f203c3895196ffa8b69517527e8c488cc49ada57.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.
Diffstat (limited to 'x11')
-rw-r--r--x11/hs-X11-xft/Makefile68
-rw-r--r--x11/hs-X11-xft/pkg-plist22
-rw-r--r--x11/hs-X11/Makefile72
-rw-r--r--x11/hs-X11/pkg-plist80
-rw-r--r--x11/hs-x11-ghc/Makefile72
-rw-r--r--x11/hs-x11-ghc/pkg-plist80
-rw-r--r--x11/hs-x11-xft-ghc/Makefile68
-rw-r--r--x11/hs-x11-xft-ghc/pkg-plist22
-rw-r--r--x11/hs-xmobar/Makefile57
-rw-r--r--x11/hs-xmobar/pkg-plist4
-rw-r--r--x11/xmobar/Makefile57
-rw-r--r--x11/xmobar/pkg-plist4
12 files changed, 142 insertions, 464 deletions
diff --git a/x11/hs-X11-xft/Makefile b/x11/hs-X11-xft/Makefile
index ca5d03221aea..9a63976c7dcf 100644
--- a/x11/hs-X11-xft/Makefile
+++ b/x11/hs-X11-xft/Makefile
@@ -9,76 +9,16 @@ PORTNAME= x11-xft
PORTVERSION= 0.3
PORTREVISION= 4
CATEGORIES= x11 haskell
-MASTER_SITES= http://hackage.haskell.org/packages/archive/X11-xft/${PORTVERSION}/
-PKGNAMEPREFIX= hs-
PKGNAMESUFFIX= -ghc
-DISTNAME= X11-xft-${PORTVERSION}
MAINTAINER= wahjava@gmail.com
COMMENT= Bindings to the Xft, Xrender and Freetype for Haskell programs
-BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- hs-x11-ghc>=1.2.1:${PORTSDIR}/x11/hs-x11-ghc \
- hs-utf8-string-ghc>=0.1:${PORTSDIR}/devel/hs-utf8-string-ghc
-RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- hs-x11-ghc>=1.2.1:${PORTSDIR}/x11/hs-x11-ghc \
- hs-utf8-string-ghc>=0.1:${PORTSDIR}/devel/hs-utf8-string-ghc
-
+USE_HACKAGE= utf8-string>=0.1 X11>=1.2.1
USE_XORG= xft xrender
-GHC_VERSION= 6.10.4
-HSX11XFT_VERSION= ${PORTVERSION}
-
-GHC_CMD= ${LOCALBASE}/bin/ghc
-SETUP_CMD= ./setup
-
-DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
-HSX11XFT_LIBDIR_REL= lib/${DISTNAME}
-
-PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
- HSX11XFT_VERSION=${HSX11XFT_VERSION} \
- HSX11XFT_LIBDIR_REL=${HSX11XFT_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}/${HSX11XFT_LIBDIR_REL}/register.sh
-
-post-install:
- ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+MASTER_SITES= http://hackage.haskell.org/packages/archive/X11-xft/${PORTVERSION}/
+DISTNAME= X11-xft-${PORTVERSION}
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.mk>
diff --git a/x11/hs-X11-xft/pkg-plist b/x11/hs-X11-xft/pkg-plist
index 758847598f73..7bd28895ed43 100644
--- a/x11/hs-X11-xft/pkg-plist
+++ b/x11/hs-X11-xft/pkg-plist
@@ -1,16 +1,16 @@
@comment $FreeBSD$
-%%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xft.hi
-%%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xrender.hi
-%%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSX11-xft-%%HSX11XFT_VERSION%%.o
-%%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSX11-xft-%%HSX11XFT_VERSION%%.a
-%%HSX11XFT_LIBDIR_REL%%/register.sh
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xft.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xrender.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSX11-xft-%%PORTVERSION%%.o
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSX11-xft-%%PORTVERSION%%.a
+%%LIBDIR_REL%%/register.sh
%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
-@dirrm %%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11
-@dirrm %%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
-@dirrm %%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
-@dirrm %%HSX11XFT_LIBDIR_REL%%
-@exec /bin/sh %D/%%HSX11XFT_LIBDIR_REL%%/register.sh
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
+@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 X11-xft
+@unexec %D/bin/ghc-pkg unregister X11-xft-%%PORTVERSION%%
@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
diff --git a/x11/hs-X11/Makefile b/x11/hs-X11/Makefile
index cc749120cfca..56dacff9c3d2 100644
--- a/x11/hs-X11/Makefile
+++ b/x11/hs-X11/Makefile
@@ -8,89 +8,27 @@ PORTNAME= x11
PORTVERSION= 1.5.0.0
PORTREVISION= 1
CATEGORIES= x11 haskell
-MASTER_SITES= http://hackage.haskell.org/packages/archive/X11/${PORTVERSION}/
-PKGNAMEPREFIX= hs-
PKGNAMESUFFIX= -ghc
-DISTNAME= X11-${PORTVERSION}
MAINTAINER= haskell@FreeBSD.org
COMMENT= X11 bindings for Haskell programs
-BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
-LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp
-RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
-
+CABAL_SETUP= Setup.hs
USE_XORG= x11 xext sm
-GHC_VERSION= 6.10.4
-HSX11_VERSION= ${PORTVERSION}
-
-GHC_CMD= ${LOCALBASE}/bin/ghc
-SETUP_CMD= ./setup
-
-DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
-HSX11_LIBDIR_REL= lib/${DISTNAME}
-
-PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
- HSX11_VERSION=${HSX11_VERSION} \
- HSX11_LIBDIR_REL=${HSX11_LIBDIR_REL}
+MASTER_SITES= http://hackage.haskell.org/packages/archive/X11/${PORTVERSION}/
+DISTNAME= X11-${PORTVERSION}
OPTIONS= XINERAMA "Build with Xinerama support" off
.include <bsd.port.pre.mk>
.if defined(WITH_XINERAMA)
-USE_XORG+= xinerama
+USE_XORG+= xinerama
CONFIGURE_ARGS+= --configure-option=--with-xinerama
.else
CONFIGURE_ARGS+= --configure-option=--without-xinerama
.endif
-.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:
-
-post-patch:
- @${REINPLACE_CMD} 's|/usr/local/include|${LOCALBASE}/include|g' \
- ${WRKSRC}/configure
-
-do-configure:
- cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \
- && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} \
- ${CONFIGURE_ARGS}
-
-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}/${HSX11_LIBDIR_REL}/register.sh
-
-post-install:
- ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
-
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.post.mk>
diff --git a/x11/hs-X11/pkg-plist b/x11/hs-X11/pkg-plist
index 912608805b8a..c1867ac3519b 100644
--- a/x11/hs-X11/pkg-plist
+++ b/x11/hs-X11/pkg-plist
@@ -1,45 +1,45 @@
@comment $FreeBSD$
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/AP.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/DEC.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/HP.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/Sun.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/XF86.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/XorgDefault.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Types.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xinerama.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Atom.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Color.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Context.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Cursor.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Display.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Event.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Extras.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Font.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Image.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Misc.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Region.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Screen.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Types.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Window.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSX11-%%HSX11_VERSION%%.o
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsAllKeysyms.h
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsXlib.h
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/XlibExtras.h
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSX11-%%HSX11_VERSION%%.a
-%%HSX11_LIBDIR_REL%%/register.sh
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/AP.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/DEC.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/HP.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/Sun.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/XF86.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/XorgDefault.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Types.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xinerama.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Atom.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Color.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Context.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Cursor.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Display.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Event.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Extras.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Font.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Image.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Misc.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Region.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Screen.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Types.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Window.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSX11-%%PORTVERSION%%.o
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsAllKeysyms.h
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsXlib.h
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/XlibExtras.h
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSX11-%%PORTVERSION%%.a
+%%LIBDIR_REL%%/register.sh
%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
-@dirrm %%HSX11_LIBDIR_REL%%
-@exec /bin/sh %D/%%HSX11_LIBDIR_REL%%/register.sh
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
+@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 X11
+@unexec %D/bin/ghc-pkg unregister X11-%%PORTVERSION%%
@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
diff --git a/x11/hs-x11-ghc/Makefile b/x11/hs-x11-ghc/Makefile
index cc749120cfca..56dacff9c3d2 100644
--- a/x11/hs-x11-ghc/Makefile
+++ b/x11/hs-x11-ghc/Makefile
@@ -8,89 +8,27 @@ PORTNAME= x11
PORTVERSION= 1.5.0.0
PORTREVISION= 1
CATEGORIES= x11 haskell
-MASTER_SITES= http://hackage.haskell.org/packages/archive/X11/${PORTVERSION}/
-PKGNAMEPREFIX= hs-
PKGNAMESUFFIX= -ghc
-DISTNAME= X11-${PORTVERSION}
MAINTAINER= haskell@FreeBSD.org
COMMENT= X11 bindings for Haskell programs
-BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
-LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp
-RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
-
+CABAL_SETUP= Setup.hs
USE_XORG= x11 xext sm
-GHC_VERSION= 6.10.4
-HSX11_VERSION= ${PORTVERSION}
-
-GHC_CMD= ${LOCALBASE}/bin/ghc
-SETUP_CMD= ./setup
-
-DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
-HSX11_LIBDIR_REL= lib/${DISTNAME}
-
-PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
- HSX11_VERSION=${HSX11_VERSION} \
- HSX11_LIBDIR_REL=${HSX11_LIBDIR_REL}
+MASTER_SITES= http://hackage.haskell.org/packages/archive/X11/${PORTVERSION}/
+DISTNAME= X11-${PORTVERSION}
OPTIONS= XINERAMA "Build with Xinerama support" off
.include <bsd.port.pre.mk>
.if defined(WITH_XINERAMA)
-USE_XORG+= xinerama
+USE_XORG+= xinerama
CONFIGURE_ARGS+= --configure-option=--with-xinerama
.else
CONFIGURE_ARGS+= --configure-option=--without-xinerama
.endif
-.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:
-
-post-patch:
- @${REINPLACE_CMD} 's|/usr/local/include|${LOCALBASE}/include|g' \
- ${WRKSRC}/configure
-
-do-configure:
- cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \
- && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} \
- ${CONFIGURE_ARGS}
-
-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}/${HSX11_LIBDIR_REL}/register.sh
-
-post-install:
- ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
-
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.post.mk>
diff --git a/x11/hs-x11-ghc/pkg-plist b/x11/hs-x11-ghc/pkg-plist
index 912608805b8a..c1867ac3519b 100644
--- a/x11/hs-x11-ghc/pkg-plist
+++ b/x11/hs-x11-ghc/pkg-plist
@@ -1,45 +1,45 @@
@comment $FreeBSD$
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/AP.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/DEC.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/HP.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/Sun.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/XF86.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/XorgDefault.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Types.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xinerama.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Atom.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Color.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Context.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Cursor.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Display.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Event.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Extras.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Font.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Image.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Misc.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Region.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Screen.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Types.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Window.hi
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSX11-%%HSX11_VERSION%%.o
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsAllKeysyms.h
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsXlib.h
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/XlibExtras.h
-%%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSX11-%%HSX11_VERSION%%.a
-%%HSX11_LIBDIR_REL%%/register.sh
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/AP.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/DEC.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/HP.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/Sun.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/XF86.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes/XorgDefault.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Types.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xinerama.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Atom.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Color.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Context.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Cursor.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Display.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Event.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Extras.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Font.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Image.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Misc.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Region.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Screen.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Types.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib/Window.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSX11-%%PORTVERSION%%.o
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsAllKeysyms.h
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/HsXlib.h
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include/XlibExtras.h
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSX11-%%PORTVERSION%%.a
+%%LIBDIR_REL%%/register.sh
%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
-@dirrm %%HSX11_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
-@dirrm %%HSX11_LIBDIR_REL%%
-@exec /bin/sh %D/%%HSX11_LIBDIR_REL%%/register.sh
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/include
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xlib
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/ExtraTypes
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
+@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 X11
+@unexec %D/bin/ghc-pkg unregister X11-%%PORTVERSION%%
@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
diff --git a/x11/hs-x11-xft-ghc/Makefile b/x11/hs-x11-xft-ghc/Makefile
index ca5d03221aea..9a63976c7dcf 100644
--- a/x11/hs-x11-xft-ghc/Makefile
+++ b/x11/hs-x11-xft-ghc/Makefile
@@ -9,76 +9,16 @@ PORTNAME= x11-xft
PORTVERSION= 0.3
PORTREVISION= 4
CATEGORIES= x11 haskell
-MASTER_SITES= http://hackage.haskell.org/packages/archive/X11-xft/${PORTVERSION}/
-PKGNAMEPREFIX= hs-
PKGNAMESUFFIX= -ghc
-DISTNAME= X11-xft-${PORTVERSION}
MAINTAINER= wahjava@gmail.com
COMMENT= Bindings to the Xft, Xrender and Freetype for Haskell programs
-BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- hs-x11-ghc>=1.2.1:${PORTSDIR}/x11/hs-x11-ghc \
- hs-utf8-string-ghc>=0.1:${PORTSDIR}/devel/hs-utf8-string-ghc
-RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- hs-x11-ghc>=1.2.1:${PORTSDIR}/x11/hs-x11-ghc \
- hs-utf8-string-ghc>=0.1:${PORTSDIR}/devel/hs-utf8-string-ghc
-
+USE_HACKAGE= utf8-string>=0.1 X11>=1.2.1
USE_XORG= xft xrender
-GHC_VERSION= 6.10.4
-HSX11XFT_VERSION= ${PORTVERSION}
-
-GHC_CMD= ${LOCALBASE}/bin/ghc
-SETUP_CMD= ./setup
-
-DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
-HSX11XFT_LIBDIR_REL= lib/${DISTNAME}
-
-PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
- HSX11XFT_VERSION=${HSX11XFT_VERSION} \
- HSX11XFT_LIBDIR_REL=${HSX11XFT_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}/${HSX11XFT_LIBDIR_REL}/register.sh
-
-post-install:
- ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+MASTER_SITES= http://hackage.haskell.org/packages/archive/X11-xft/${PORTVERSION}/
+DISTNAME= X11-xft-${PORTVERSION}
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.mk>
diff --git a/x11/hs-x11-xft-ghc/pkg-plist b/x11/hs-x11-xft-ghc/pkg-plist
index 758847598f73..7bd28895ed43 100644
--- a/x11/hs-x11-xft-ghc/pkg-plist
+++ b/x11/hs-x11-xft-ghc/pkg-plist
@@ -1,16 +1,16 @@
@comment $FreeBSD$
-%%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xft.hi
-%%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xrender.hi
-%%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSX11-xft-%%HSX11XFT_VERSION%%.o
-%%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSX11-xft-%%HSX11XFT_VERSION%%.a
-%%HSX11XFT_LIBDIR_REL%%/register.sh
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xft.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11/Xrender.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSX11-xft-%%PORTVERSION%%.o
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSX11-xft-%%PORTVERSION%%.a
+%%LIBDIR_REL%%/register.sh
%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
-@dirrm %%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11
-@dirrm %%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
-@dirrm %%HSX11XFT_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
-@dirrm %%HSX11XFT_LIBDIR_REL%%
-@exec /bin/sh %D/%%HSX11XFT_LIBDIR_REL%%/register.sh
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/X11
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
+@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 X11-xft
+@unexec %D/bin/ghc-pkg unregister X11-xft-%%PORTVERSION%%
@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
diff --git a/x11/hs-xmobar/Makefile b/x11/hs-xmobar/Makefile
index 17e1e4f3cd5a..52d355deaf92 100644
--- a/x11/hs-xmobar/Makefile
+++ b/x11/hs-xmobar/Makefile
@@ -8,71 +8,32 @@ PORTNAME= xmobar
PORTVERSION= 0.9.2
PORTREVISION= 1
CATEGORIES= x11 haskell
-MASTER_SITES= http://hackage.haskell.org/packages/archive/xmobar/${PORTVERSION}/ \
- http://carte.kerneled.org/mirror/
+PKGNAMEPREFIX=
MAINTAINER= haskell@FreeBSD.org
COMMENT= A minimalistic text based status bar
-BUILD_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.3.0
USE_XORG= x11
-CABAL= ${LOCALBASE}/bin/runghc Setup.lhs
-GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
-SUBDIR= lib/${PORTNAME}-${PORTVERSION}
-
-DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
-PORTDOCS= *
-
-EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}-${PORTVERSION}
-PORTEXAMPLES= *
+EXECUTABLE= xmobar
+STANDALONE= yes
-PLIST_SUB= GHC_VERSION="${GHC_VERSION}" \
- PORTVERSION=${PORTVERSION} \
- SUBDIR=${SUBDIR}
+PORTEXAMPLES= *
+INSTALL_PORTEXAMPLES= ${INSTALL_DATA} ${WRKSRC}/xmobar.config-sample ${EXAMPLESDIR}
OPTIONS= XFT "Enable Xft support for fonts" Off \
UTF8 "Enable UTF-8 support" Off
.include <bsd.port.pre.mk>
-CONFIGURE_ARGS= --ghc --prefix=${PREFIX}
-
.if defined(WITH_XFT)
CONFIGURE_ARGS+= --flags="with_xft"
-BUILD_DEPENDS+= hs-x11-xft-ghc>=0.2:${PORTSDIR}/x11/hs-x11-xft-ghc
+USE_HACKAGE+= X11-xft>=0.2
.elif defined(WITH_UTF8)
CONFIGURE_ARGS+= --flags="with_utf8"
-BUILD_DEPENDS+= hs-utf8-string-ghc>=0.1:${PORTSDIR}/devel/hs-utf8-string-ghc
-.endif
-
-.if !defined(NOPORTDOCS)
-PLIST_SUB+= RMLIC="@comment "
-.else
-PLIST_SUB+= RMLIC=""
-.endif
-
-do-configure:
- cd ${WRKSRC} && ${CABAL} configure ${CONFIGURE_ARGS}
-
-do-build:
- cd ${WRKSRC} && ${CABAL} build
-
-do-install:
- cd ${WRKSRC} && ${CABAL} install --verbose=3
-.if !defined(NOPORTDOCS)
-.for d in README
- ${INSTALL_MAN} ${WRKSRC}/${d} ${DOCSDIR}
-.endfor
-.endif
-.if !defined(NOPORTEXAMPLES)
- @${MKDIR} ${EXAMPLESDIR}
-.for f in xmobar.config-sample
- ${INSTALL_DATA} ${WRKSRC}/${f} ${EXAMPLESDIR}
-.endfor
+USE_HACKAGE+= utf8-string
.endif
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.post.mk>
diff --git a/x11/hs-xmobar/pkg-plist b/x11/hs-xmobar/pkg-plist
index 8aa558e830a5..f4b7e0083752 100644
--- a/x11/hs-xmobar/pkg-plist
+++ b/x11/hs-xmobar/pkg-plist
@@ -1,4 +1,4 @@
@comment $FreeBSD$
bin/xmobar
-%%RMLIC%%%%DOCSDIR%%/LICENSE
-%%RMLIC%%@dirrm %%DOCSDIR%%
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
diff --git a/x11/xmobar/Makefile b/x11/xmobar/Makefile
index 17e1e4f3cd5a..52d355deaf92 100644
--- a/x11/xmobar/Makefile
+++ b/x11/xmobar/Makefile
@@ -8,71 +8,32 @@ PORTNAME= xmobar
PORTVERSION= 0.9.2
PORTREVISION= 1
CATEGORIES= x11 haskell
-MASTER_SITES= http://hackage.haskell.org/packages/archive/xmobar/${PORTVERSION}/ \
- http://carte.kerneled.org/mirror/
+PKGNAMEPREFIX=
MAINTAINER= haskell@FreeBSD.org
COMMENT= A minimalistic text based status bar
-BUILD_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.3.0
USE_XORG= x11
-CABAL= ${LOCALBASE}/bin/runghc Setup.lhs
-GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
-SUBDIR= lib/${PORTNAME}-${PORTVERSION}
-
-DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
-PORTDOCS= *
-
-EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}-${PORTVERSION}
-PORTEXAMPLES= *
+EXECUTABLE= xmobar
+STANDALONE= yes
-PLIST_SUB= GHC_VERSION="${GHC_VERSION}" \
- PORTVERSION=${PORTVERSION} \
- SUBDIR=${SUBDIR}
+PORTEXAMPLES= *
+INSTALL_PORTEXAMPLES= ${INSTALL_DATA} ${WRKSRC}/xmobar.config-sample ${EXAMPLESDIR}
OPTIONS= XFT "Enable Xft support for fonts" Off \
UTF8 "Enable UTF-8 support" Off
.include <bsd.port.pre.mk>
-CONFIGURE_ARGS= --ghc --prefix=${PREFIX}
-
.if defined(WITH_XFT)
CONFIGURE_ARGS+= --flags="with_xft"
-BUILD_DEPENDS+= hs-x11-xft-ghc>=0.2:${PORTSDIR}/x11/hs-x11-xft-ghc
+USE_HACKAGE+= X11-xft>=0.2
.elif defined(WITH_UTF8)
CONFIGURE_ARGS+= --flags="with_utf8"
-BUILD_DEPENDS+= hs-utf8-string-ghc>=0.1:${PORTSDIR}/devel/hs-utf8-string-ghc
-.endif
-
-.if !defined(NOPORTDOCS)
-PLIST_SUB+= RMLIC="@comment "
-.else
-PLIST_SUB+= RMLIC=""
-.endif
-
-do-configure:
- cd ${WRKSRC} && ${CABAL} configure ${CONFIGURE_ARGS}
-
-do-build:
- cd ${WRKSRC} && ${CABAL} build
-
-do-install:
- cd ${WRKSRC} && ${CABAL} install --verbose=3
-.if !defined(NOPORTDOCS)
-.for d in README
- ${INSTALL_MAN} ${WRKSRC}/${d} ${DOCSDIR}
-.endfor
-.endif
-.if !defined(NOPORTEXAMPLES)
- @${MKDIR} ${EXAMPLESDIR}
-.for f in xmobar.config-sample
- ${INSTALL_DATA} ${WRKSRC}/${f} ${EXAMPLESDIR}
-.endfor
+USE_HACKAGE+= utf8-string
.endif
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.post.mk>
diff --git a/x11/xmobar/pkg-plist b/x11/xmobar/pkg-plist
index 8aa558e830a5..f4b7e0083752 100644
--- a/x11/xmobar/pkg-plist
+++ b/x11/xmobar/pkg-plist
@@ -1,4 +1,4 @@
@comment $FreeBSD$
bin/xmobar
-%%RMLIC%%%%DOCSDIR%%/LICENSE
-%%RMLIC%%@dirrm %%DOCSDIR%%
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%