Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2009 12:09:32 -0700 (PDT)
From:      Jacula Modyun <jacula@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/137099: [patch]: update of textproc/hs-polyparse-ghc from the 1.1 version to the 1.3 version
Message-ID:  <200907241909.n6OJ9W0I016972@splork.wirewater.yow>
Resent-Message-ID: <200907241910.n6OJA67R040547@freefall.freebsd.org>

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

>Number:         137099
>Category:       ports
>Synopsis:       [patch]: update of textproc/hs-polyparse-ghc from the 1.1 version to the 1.3 version
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 24 19:10:06 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Jacula Modyun
>Release:        FreeBSD 7.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD splork.wirewater.yow 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Sat Oct 18 11:22:07 UTC 2008 root@splork.wirewater.yow:/usr/obj/usr/src/sys/JACULA i386


	
>Description:

See the PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/137055

>How-To-Repeat:
	
>Fix:

	

--- patch-hs-polyparse-ghc.diff begins here ---
diff -uNr hs-polyparse-ghc.orig/Makefile hs-polyparse-ghc/Makefile
--- hs-polyparse-ghc.orig/Makefile	2009-01-23 23:53:56.000000000 +0000
+++ hs-polyparse-ghc/Makefile	2009-07-22 06:26:47.000000000 +0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	polyparse
-PORTVERSION=	1.1
+PORTVERSION=	1.3
 CATEGORIES=	textproc haskell
 MASTER_SITES=	http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
 PKGNAMEPREFIX=	hs-
@@ -15,41 +15,62 @@
 MAINTAINER=	haskell@FreeBSD.org
 COMMENT=	Alternative parser combinator libraries for Haskell
 
-BUILD_DEPENDS=	ghc>=6.8:${PORTSDIR}/lang/ghc
-RUN_DEPENDS=	ghc>=6.8:${PORTSDIR}/lang/ghc
+BUILD_DEPENDS=	ghc>=6.10:${PORTSDIR}/lang/ghc
+RUN_DEPENDS=	ghc>=6.10:${PORTSDIR}/lang/ghc
 
-GHC_VERSION=	6.8.3
-CABALCMD=	${LOCALBASE}/bin/runghc Setup.hs
-CABALDIR=	lib/ghc-${GHC_VERSION}/cabal
-
-SUBDIR=		lib/${PORTNAME}-${PORTVERSION}
-PLIST_SUB=	GHC_VERSION=${GHC_VERSION}		\
-		PORTNAME=${PORTNAME}			\
-		PORTVERSION=${PORTVERSION}		\
-		SUBDIR=${CABALDIR}
-DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
-PORTDOCS=	COPYRIGHT html
+GHC_VERSION=	6.10.4
+POLY_VERSION=	${PORTVERSION}
 
-CONFIGURE_ARGS=	--ghc --prefix=${PREFIX} --libdir=${PREFIX}/${CABALDIR} --libsubdir='' --datasubdir=''
+GHC_CMD=	${LOCALBASE}/bin/ghc
+SETUP_CMD=	./setup
+
+DOCSDIR=		${PREFIX}/share/doc/${DISTNAME}
+POLY_LIBDIR_REL=	lib/${DISTNAME}
+
+PLIST_SUB=	GHC_VERSION=${GHC_VERSION} \
+		POLY_LIBDIR_REL=${POLY_LIBDIR_REL} \
+		POLY_VERSION=${POLY_VERSION}
+
+.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
-PLIST_SUB+=	RMLIC="@comment "
-.else
-PLIST_SUB+=	RMLIC=""
 .endif
+BUILD_DEPENDS+=	HsColour:${PORTSDIR}/print/hs-hscolour
+
+HSCOLOUR_VERSION=	1.13
+HSCOLOUR_DATADIR=	${PREFIX}/share/hscolour-${HSCOLOUR_VERSION}
+
+PORTDOCS=	*
+.endif
+
+.SILENT:
 
 do-configure:
-	cd ${WRKSRC} && ${CABALCMD} configure ${CONFIGURE_ARGS}
+	cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \
+		     && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX}
 
 do-build:
-	cd ${WRKSRC} && ${CABALCMD} build && ${CABALCMD} --gen-script register
+	cd ${WRKSRC} && ${SETUP_CMD} build \
+		     && ${SETUP_CMD} register --gen-script
+
 .if !defined(NOPORTDOCS)
-	cd ${WRKSRC} && ${CABALCMD} haddock
+	cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source \
+					     --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
 .endif
 
 do-install:
-	cd ${WRKSRC} && ${CABALCMD} install
-	${INSTALL_SCRIPT} ${WRKSRC}/register.sh ${PREFIX}/${CABALDIR}/${PORTNAME}-register.sh
+	cd ${WRKSRC} && ${SETUP_CMD} install \
+		     && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${POLY_LIBDIR_REL}/register.sh
+
+post-install:
+	${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
 
 .include <bsd.port.mk>
diff -uNr hs-polyparse-ghc.orig/distinfo hs-polyparse-ghc/distinfo
--- hs-polyparse-ghc.orig/distinfo	2009-01-23 23:53:56.000000000 +0000
+++ hs-polyparse-ghc/distinfo	2009-07-13 12:45:12.000000000 +0000
@@ -1,3 +1,3 @@
-MD5 (polyparse-1.1.tar.gz) = 3d01daae5ca692b24729093dc45aa94c
-SHA256 (polyparse-1.1.tar.gz) = 87eab9c8f2bee72d0c3a00d002e442405da016794e125f6c47c66607e1983957
-SIZE (polyparse-1.1.tar.gz) = 112884
+MD5 (polyparse-1.3.tar.gz) = f8c6f4f12ff2c7d29fed91b3189d785a
+SHA256 (polyparse-1.3.tar.gz) = 6d82f08634f0856c7919c9413199f4d5f91e753a6d796a0b61e46d7cd1ce4a24
+SIZE (polyparse-1.3.tar.gz) = 108981
diff -uNr hs-polyparse-ghc.orig/pkg-descr hs-polyparse-ghc/pkg-descr
--- hs-polyparse-ghc.orig/pkg-descr	2009-01-23 23:53:56.000000000 +0000
+++ hs-polyparse-ghc/pkg-descr	2009-07-13 12:48:23.000000000 +0000
@@ -5,4 +5,17 @@
 proposed replacement for the standard Read class, for better
 deserialisation of Haskell values from Strings.
 
-WWW: http://www.cs.york.ac.uk/fp/polyparse/
+author:		Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>
+maintainer:	author
+license:	LGPL
+WWW:		http://www.cs.york.ac.uk/fp/polyparse/
+
+exposed-modules: Text.ParserCombinators.HuttonMeijer,
+		 Text.ParserCombinators.HuttonMeijerWallace,
+		 Text.ParserCombinators.Poly,
+		 Text.ParserCombinators.Poly.Base,
+		 Text.ParserCombinators.Poly.Plain,
+		 Text.ParserCombinators.Poly.Lazy,
+		 Text.ParserCombinators.Poly.State,
+		 Text.ParserCombinators.Poly.StateLazy,
+		 Text.Parse
diff -uNr hs-polyparse-ghc.orig/pkg-plist hs-polyparse-ghc/pkg-plist
--- hs-polyparse-ghc.orig/pkg-plist	2009-01-23 23:53:56.000000000 +0000
+++ hs-polyparse-ghc/pkg-plist	2009-07-13 13:11:37.000000000 +0000
@@ -1,29 +1,23 @@
-%%SUBDIR%%/Text/Parse.hi
-%%SUBDIR%%/Text/ParserCombinators/HuttonMeijer.hi
-%%SUBDIR%%/Text/ParserCombinators/HuttonMeijerWallace.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly.hi
-%%SUBDIR%%/Text/ParserCombinators/PolyLazy.hi
-%%SUBDIR%%/Text/ParserCombinators/PolyState.hi
-%%SUBDIR%%/Text/ParserCombinators/PolyStateLazy.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/Base.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/Lazy.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/Plain.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/State.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/StateLazy.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/NoLeak/Lazy.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/NoLeak/Plain.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/NoLeak/State.hi
-%%SUBDIR%%/Text/ParserCombinators/Poly/NoLeak/StateLazy.hi
-%%SUBDIR%%/HS%%PORTNAME%%-%%PORTVERSION%%.o
-%%SUBDIR%%/libHS%%PORTNAME%%-%%PORTVERSION%%.a
-%%SUBDIR%%/%%PORTNAME%%-register.sh
-%%RMLIC%%%%DOCSDIR%%/COPYRIGHT
-%%RMLIC%%@dirrm %%DOCSDIR%%
-@dirrmtry %%SUBDIR%%/Text/ParserCombinators/Poly/NoLeak
-@dirrmtry %%SUBDIR%%/Text/ParserCombinators/Poly
-@dirrmtry %%SUBDIR%%/Text/ParserCombinators
-@dirrmtry %%SUBDIR%%/Text
-@exec sh %D/%%SUBDIR%%/%%PORTNAME%%-register.sh
-@exec rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
-@unexec ghc-pkg unregister %%PORTNAME%%
-@unexec rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSpolyparse-%%POLY_VERSION%%.o
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/Parse.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/HuttonMeijer.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/HuttonMeijerWallace.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/Poly.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/Poly/Base.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/Poly/Lazy.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/Poly/Plain.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/Poly/State.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/Poly/StateLazy.hi
+%%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSpolyparse-%%POLY_VERSION%%.a
+%%POLY_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/COPYRIGHT
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators/Poly
+@dirrm %%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/ParserCombinators
+@dirrm %%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text
+@dirrm %%POLY_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%POLY_LIBDIR_REL%%
+@exec /bin/sh %D/%%POLY_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister polyparse
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
--- patch-hs-polyparse-ghc.diff ends here ---


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



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