Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2008 08:35:26 -0800 (PST)
From:      Jacula Modyun <jacula@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/121081: [NEW PORT]: graphics/hs-HGL-ghc
Message-ID:  <200802251635.m1PGZNrR053631@splork.wirewater.yow>
Resent-Message-ID: <200802251640.m1PGe1Nu065748@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121081
>Category:       ports
>Synopsis:       [NEW PORT]: graphics/hs-HGL-ghc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 25 16:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Jacula Modyun
>Release:        FreeBSD 7.0-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD splork.wirewater.yow 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #0: Sat Jan 19 15:48:03 UTC 2008 root@splork.wirewater.yow:/usr/obj/usr/src/sys/JACULA i386


	
>Description:

Hi,

I think this is the best software to learn the Haskell language; but
this is only my opinion. In any way, actually, it exists, in the ports
tree, the graphics/hs-hgl, but this is an hugs implementation.
This last release support only ghc, then it's better to keep also the old
port for hugs.
I supply a shar archive for the real new port.
There is, also, an eventually patch, that you have to apply, if you want
the documentation. I can't release, in this moment, the port with the
documentation, because this requires the application of the patchset at
the bug report: 

ports/120975: Hyperlinkable documentation for port: lang/ghc
http://www.freebsd.org/cgi/query-pr.cgi?pr=120975


A description:

A simple graphics library, designed to give the programmer access
to most interesting parts of the Win32 Graphics Device Interface
and X11 library without exposing the programmer to the pain and
anguish usually associated with using these interfaces.
The library also includes a module Graphics.SOE providing the
interface used in "The Haskell School of Expression", by Paul
Hudak, cf <http://www.haskell.org/soe/>.

Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>

>How-To-Repeat:
	
>Fix:

	

--- hs-HGL-ghc.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	hs-HGL-ghc
#	hs-HGL-ghc/Makefile
#	hs-HGL-ghc/pkg-descr
#	hs-HGL-ghc/distinfo
#	hs-HGL-ghc/pkg-plist
#
echo c - hs-HGL-ghc
mkdir -p hs-HGL-ghc > /dev/null 2>&1
echo x - hs-HGL-ghc/Makefile
sed 's/^X//' >hs-HGL-ghc/Makefile << 'END-of-hs-HGL-ghc/Makefile'
X# New ports collection makefile for: hs-HGL-ghc
X# Date created:        February 25 2008
X# Whom:                Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
X#
X# $FreeBSD
X#
X
XPORTNAME=	HGL
XPORTVERSION=	3.2.0.0
XCATEGORIES=	graphics haskell
XPKGNAMEPREFIX=	hs-
XPKGNAMESUFFIX=	-ghc
X
XMASTER_SITES=	http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
XMAINTAINER=	jacula@gmail.com
XCOMMENT=	A simple graphics library based on X11 or Win32
X
XBUILD_DEPENDS+=	ghc:${PORTSDIR}/lang/ghc \
X		hs-x11-ghc>=1.2.1:${PORTSDIR}/x11/hs-x11-ghc
X
XGHC_VERSION=	6.8.2
X
XCABAL_CMD=	${LOCALBASE}/bin/runghc Setup.hs
X
XHGL_LIBDIR_REL=	lib/${DISTNAME}
XDOCSDIR=	${PREFIX}/share/doc/${DISTNAME}
X
XPLIST_SUB=	GHC_VERSION=${GHC_VERSION} \
X		HGL_LIBDIR_REL=${HGL_LIBDIR_REL}
X
X.SILENT:
X
Xdo-configure:
X	cd ${WRKSRC} && ${CABAL_CMD} configure --ghc --prefix=${PREFIX}
X
Xdo-build:
X	cd ${WRKSRC} && ${CABAL_CMD} build \
X		     && ${CABAL_CMD} register --gen-script
X
Xdo-install:
X	cd ${WRKSRC} && ${CABAL_CMD} install \
X		     && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${HGL_LIBDIR_REL}/register.sh
X
X.include <bsd.port.mk>
END-of-hs-HGL-ghc/Makefile
echo x - hs-HGL-ghc/pkg-descr
sed 's/^X//' >hs-HGL-ghc/pkg-descr << 'END-of-hs-HGL-ghc/pkg-descr'
XA simple graphics library, designed to give the programmer access
Xto most interesting parts of the Win32 Graphics Device Interface
Xand X11 library without exposing the programmer to the pain and
Xanguish usually associated with using these interfaces.
XThe library also includes a module Graphics.SOE providing the
Xinterface used in "The Haskell School of Expression", by Paul
XHudak, cf <http://www.haskell.org/soe/>.
X
Xauthor: 	Alastair Reid
Xmaintainer:	<libraries@haskell.org>
Xlicense:	BSD3
Xhomepage:	http://www.haskell.org/graphics/index.html
Xpackage-url:	http://hackage.haskell.org/packages/archive/HGL
X
Xexposed-modules:
X      Graphics.HGL.Core,
X      Graphics.HGL.Draw,
X      Graphics.HGL.Units,
X      Graphics.HGL.Key,
X      Graphics.HGL.Run,
X      Graphics.HGL.Draw.Brush,
X      Graphics.HGL.Draw.Font,
X      Graphics.HGL.Draw.Monad,
X      Graphics.HGL.Draw.Pen,
X      Graphics.HGL.Draw.Picture,
X      Graphics.HGL.Draw.Region,
X      Graphics.HGL.Draw.Text,
X      Graphics.HGL.Utils,
X      Graphics.HGL.Window,
X      Graphics.HGL,
X      Graphics.SOE
END-of-hs-HGL-ghc/pkg-descr
echo x - hs-HGL-ghc/distinfo
sed 's/^X//' >hs-HGL-ghc/distinfo << 'END-of-hs-HGL-ghc/distinfo'
XMD5 (HGL-3.2.0.0.tar.gz) = 9d3858e5d76e10cdbaf9f5dabf3287e7
XSHA256 (HGL-3.2.0.0.tar.gz) = fa7cb1981f6e5a89b35e0fc2593c0945175a0d97fc3bc356cc8724fa1c881e86
XSIZE (HGL-3.2.0.0.tar.gz) = 38824
END-of-hs-HGL-ghc/distinfo
echo x - hs-HGL-ghc/pkg-plist
sed 's/^X//' >hs-HGL-ghc/pkg-plist << 'END-of-hs-HGL-ghc/pkg-plist'
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Core.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw/Brush.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw/Font.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw/Monad.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw/Pen.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw/Picture.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw/Region.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw/Text.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Internals/Draw.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Internals/Event.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Internals/Events.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Internals/Flag.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Internals/Types.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Internals/Utilities.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Key.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Run.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Units.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Utils.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Window.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/X11/DC.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/X11/Display.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/X11/Timer.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/X11/Types.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/X11/Window.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/SOE.hi
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSHGL-3.2.0.0.o
X%%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSHGL-3.2.0.0.a
X%%HGL_LIBDIR_REL%%/register.sh
X%%DOCSDIR%%/LICENSE
X@dirrm %%DOCSDIR%%
X@dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/X11
X@dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Internals
X@dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw
X@dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL
X@dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics
X@dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
X@dirrm %%HGL_LIBDIR_REL%%
X@exec /bin/sh %D/%%HGL_LIBDIR_REL%%/register.sh
X@exec rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
X@unexec if [ -x %D/bin/ghc-pkg ]; then %D/bin/ghc-pkg unregister HGL || /usr/bin/true; fi
X@unexec if [ -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old ]; then rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old || /usr/bin/true; fi
END-of-hs-HGL-ghc/pkg-plist
exit
--- hs-HGL-ghc.shar ends here ---

--- patch-graphics-hs-HGL-ghc begins here ---
diff -uNr hs-HGL-ghc.orig/Makefile hs-HGL-ghc/Makefile
--- hs-HGL-ghc.orig/Makefile	2008-02-25 14:42:04.000000000 +0000
+++ hs-HGL-ghc/Makefile	2008-02-25 14:57:54.000000000 +0000
@@ -28,6 +28,21 @@
 PLIST_SUB=	GHC_VERSION=${GHC_VERSION} \
 		HGL_LIBDIR_REL=${HGL_LIBDIR_REL}
 
+.if defined(NOPORTDOCS)
+PLIST_SUB+=		NOPORTDOCS=""
+.else
+PLIST_SUB+=		NOPORTDOCS="@comment "
+.endif
+
+.if !defined(NOPORTDOCS)
+BUILD_DEPENDS+=	haddock:${PORTSDIR}/devel/hs-haddock \
+		HsColour:${PORTSDIR}/print/hs-hscolour
+
+HSCOLOUR_VERSION= 1.9 
+
+PORTDOCS=	*
+.endif
+
 .SILENT:
 
 do-configure:
@@ -37,6 +52,11 @@
 	cd ${WRKSRC} && ${CABAL_CMD} build \
 		     && ${CABAL_CMD} register --gen-script
 
+.if !defined(NOPORTDOCS)
+	cd ${WRKSRC} && ${CABAL_CMD} haddock --executables --hyperlink-source \
+				    --hscolour-css=${LOCALBASE}/share/hscolour-${HSCOLOUR_VERSION}/hscolour.css
+.endif
+
 do-install:
 	cd ${WRKSRC} && ${CABAL_CMD} install \
 		     && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${HGL_LIBDIR_REL}/register.sh
diff -uNr hs-HGL-ghc.orig/pkg-plist hs-HGL-ghc/pkg-plist
--- hs-HGL-ghc.orig/pkg-plist	2008-02-25 11:20:45.000000000 +0000
+++ hs-HGL-ghc/pkg-plist	2008-02-25 14:51:10.000000000 +0000
@@ -28,8 +28,8 @@
 %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSHGL-3.2.0.0.o
 %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSHGL-3.2.0.0.a
 %%HGL_LIBDIR_REL%%/register.sh
-%%DOCSDIR%%/LICENSE
-@dirrm %%DOCSDIR%%
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/X11
 @dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Internals
 @dirrm %%HGL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Graphics/HGL/Draw
--- patch-graphics-hs-HGL-ghc ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802251635.m1PGZNrR053631>