aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2007-10-26 10:54:35 +0800
committervs <vs@FreeBSD.org>2007-10-26 10:54:35 +0800
commitf6230d304f84a798ab265756db713ad55ee81f24 (patch)
tree11a78bf7367afd10fd06f468079e2d3d7719af0f /x11
parent2eed5ffc497ff3b8b75ea6f618313571077dd558 (diff)
downloadfreebsd-ports-gnome-f6230d304f84a798ab265756db713ad55ee81f24.tar.gz
freebsd-ports-gnome-f6230d304f84a798ab265756db713ad55ee81f24.tar.zst
freebsd-ports-gnome-f6230d304f84a798ab265756db713ad55ee81f24.zip
Add x11/hs-x11-extras-ghc, additional X11 support for programs written using GHC.
Submitted by: Jonas Joachim
Diffstat (limited to 'x11')
-rw-r--r--x11/Makefile1
-rw-r--r--x11/hs-x11-extras-ghc/Makefile53
-rw-r--r--x11/hs-x11-extras-ghc/distinfo3
-rw-r--r--x11/hs-x11-extras-ghc/pkg-descr7
-rw-r--r--x11/hs-x11-extras-ghc/pkg-plist14
5 files changed, 78 insertions, 0 deletions
diff --git a/x11/Makefile b/x11/Makefile
index 10a6d8c2d941..867735981d36 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -127,6 +127,7 @@
SUBDIR += gtkterm2
SUBDIR += gtstarter
SUBDIR += gxset
+ SUBDIR += hs-x11-extras-ghc
SUBDIR += hs-x11-ghc
SUBDIR += iceauth
SUBDIR += ico
diff --git a/x11/hs-x11-extras-ghc/Makefile b/x11/hs-x11-extras-ghc/Makefile
new file mode 100644
index 000000000000..0d5f0182e017
--- /dev/null
+++ b/x11/hs-x11-extras-ghc/Makefile
@@ -0,0 +1,53 @@
+# New ports collection makefile for: hs-x11-ghc
+# Date created: 2007-09-03
+# Whom: Volker Stolz <vs@FreeBSD.org>
+#
+# $FreeBSD$
+
+PORTNAME= x11-extras
+PORTVERSION= 0.4
+CATEGORIES= x11 haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/X11-extras/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+PKGNAMESUFFIX= -ghc
+DISTNAME= X11-extras-${PORTVERSION}
+
+MAINTAINER= jaj@hcl-club.lu
+COMMENT= X11 bindings for Haskell programs
+
+USE_XLIB= yes
+
+# include the version verbatim. This will require a revision bump
+# on updates, but the correct quoting of `ghc --numeric-version` in the various
+# places is a real nightmare.
+GHC_VERSION= 6.6.1
+PLIST_SUB+= GHC_VERSION=${GHC_VERSION} \
+ PORTVERSION=${PORTVERSION} \
+ PORTNAME=${PORTNAME} \
+ SUBDIR=lib/ghc-${GHC_VERSION}/cabal
+
+.include <bsd.port.pre.mk>
+
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \
+ hs-x11-ghc>=1.2.1:${PORTSDIR}/x11/hs-x11-ghc
+LIB_DEPENDS+= gmp.7:${PORTSDIR}/math/libgmp4
+RUN_DEPENDS+= ${BUILD_DEPENDS}
+
+# 'owned' by lang/ghc:
+CABALDIR= ${PREFIX}/lib/ghc-${GHC_VERSION}/cabal
+CABALCMD= ${LOCALBASE}/bin/runghc Setup.lhs
+SUBDIR= ${PORTNAME}${PKGNAMESUFFIX}
+
+do-configure:
+ cd ${WRKSRC} && ${CABALCMD} configure --ghc --prefix=${PREFIX} --libdir=${CABALDIR} \
+ --libsubdir='' --datasubdir=''
+
+do-build:
+ cd ${WRKSRC} && ${CABALCMD} build \
+ && ${CABALCMD} --gen-script register
+
+do-install:
+ cd ${WRKSRC} && ${CABALCMD} install \
+ && ${INSTALL_SCRIPT} ${WRKSRC}/register.sh ${CABALDIR}/${PORTNAME}-register.sh
+
+.include <bsd.port.post.mk>
diff --git a/x11/hs-x11-extras-ghc/distinfo b/x11/hs-x11-extras-ghc/distinfo
new file mode 100644
index 000000000000..3d3ec2804907
--- /dev/null
+++ b/x11/hs-x11-extras-ghc/distinfo
@@ -0,0 +1,3 @@
+MD5 (X11-extras-0.4.tar.gz) = e68ce25e94477b054744001bbef41a34
+SHA256 (X11-extras-0.4.tar.gz) = ea08c3f71e2f14374c56bbb9050df3eec81ff6b44a6d8e396892b5f612c8f2b2
+SIZE (X11-extras-0.4.tar.gz) = 48853
diff --git a/x11/hs-x11-extras-ghc/pkg-descr b/x11/hs-x11-extras-ghc/pkg-descr
new file mode 100644
index 000000000000..731708a44072
--- /dev/null
+++ b/x11/hs-x11-extras-ghc/pkg-descr
@@ -0,0 +1,7 @@
+Missing bindings to the X11 graphics library.
+
+The binding is a direct translation of the C binding; for documentation
+of these calls, refer to The Xlib Programming Manual, available
+online at http://tronche.com/gui/x/xlib/.
+
+WWW: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/X11-extras-0.3
diff --git a/x11/hs-x11-extras-ghc/pkg-plist b/x11/hs-x11-extras-ghc/pkg-plist
new file mode 100644
index 000000000000..72065b409688
--- /dev/null
+++ b/x11/hs-x11-extras-ghc/pkg-plist
@@ -0,0 +1,14 @@
+%%SUBDIR%%/Graphics/X11/Xinerama.hi
+%%SUBDIR%%/Graphics/X11/Xlib/Extras.hi
+%%SUBDIR%%/HSX11-extras-%%PORTVERSION%%.o
+%%SUBDIR%%/include/XlibExtras.h
+%%SUBDIR%%/libHSX11-extras-%%PORTVERSION%%.a
+%%SUBDIR%%/%%PORTNAME%%-register.sh
+@dirrmtry %%SUBDIR%%/include
+@dirrmtry %%SUBDIR%%/Graphics/X11/Xlib
+@dirrmtry %%SUBDIR%%/Graphics/X11
+@dirrmtry %%SUBDIR%%/Graphics
+@exec /bin/sh %D/%%SUBDIR%%/%%PORTNAME%%-register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister X11-extras
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old