Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2009 11:58:06 -0700 (PDT)
From:      Jacula Modyun <jacula@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/137096: [patch]: update of devel/hs-language-c-ghc to ghc-6.10.4
Message-ID:  <200907241858.n6OIw6RE013807@splork.wirewater.yow>
Resent-Message-ID: <200907241900.n6OJ0Ct9033175@freefall.freebsd.org>

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

>Number:         137096
>Category:       ports
>Synopsis:       [patch]: update of devel/hs-language-c-ghc to ghc-6.10.4
>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:   Fri Jul 24 19:00:12 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-language-c-ghc.diff begins here ---
diff -uNr hs-language-c-ghc.orig/Makefile hs-language-c-ghc/Makefile
--- hs-language-c-ghc.orig/Makefile	2009-03-06 19:46:33.000000000 +0000
+++ hs-language-c-ghc/Makefile	2009-07-22 06:24:06.000000000 +0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	language-c
 PORTVERSION=	0.3.1.1
+PORTREVISION=	1
 CATEGORIES=	devel haskell
 MASTER_SITES=	http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
 PKGNAMEPREFIX=	hs-
@@ -20,38 +21,59 @@
 		happy:${PORTSDIR}/devel/hs-happy
 RUN_DEPENDS=	ghc>=6.8:${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=	LICENSE html
+GHC_VERSION=		6.10.4
+LANGUAGEC_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}
+LANGUAGEC_LIBDIR_REL=	lib/${DISTNAME}
+
+PLIST_SUB=	GHC_VERSION=${GHC_VERSION} \
+		LANGUAGEC_VERSION=${LANGUAGEC_VERSION} \
+		LANGUAGEC_LIBDIR_REL=${LANGUAGEC_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
-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}/${LANGUAGEC_LIBDIR_REL}/register.sh
+
+post-install:
+	${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
 
 .include <bsd.port.mk>
diff -uNr hs-language-c-ghc.orig/pkg-descr hs-language-c-ghc/pkg-descr
--- hs-language-c-ghc.orig/pkg-descr	2009-03-06 19:46:33.000000000 +0000
+++ hs-language-c-ghc/pkg-descr	2009-07-15 12:57:38.000000000 +0000
@@ -2,4 +2,18 @@
 code.  It features a complete, well tested parser and pretty printer for
 all of C99 and a large set of GNU extensions.
 
-WWW: http://www.sivity.net/projects/language.c/
+Maintainer:	benedikt.huber@gmail.com
+License:	BSD3
+WWW:		http://www.sivity.net/projects/language.c/
+
+exposed-modules: Language.C Language.C.Data
+		 Language.C.Data.Position Language.C.Data.Ident
+		 Language.C.Data.Error Language.C.Data.Name Language.C.Data.Node
+		 Language.C.Data.InputStream Language.C.Syntax Language.C.Syntax.AST
+		 Language.C.Syntax.Constants Language.C.Syntax.Ops Language.C.Parser
+		 Language.C.Pretty Language.C.System.Preprocess
+		 Language.C.System.GCC Language.C.Analysis
+		 Language.C.Analysis.SemError Language.C.Analysis.SemRep
+		 Language.C.Analysis.DefTable Language.C.Analysis.TravMonad
+		 Language.C.Analysis.AstAnalysis Language.C.Analysis.DeclAnalysis
+		 Language.C.Analysis.Debug Language.C.Analysis.Export
diff -uNr hs-language-c-ghc.orig/pkg-plist hs-language-c-ghc/pkg-plist
--- hs-language-c-ghc.orig/pkg-plist	2009-03-06 19:46:33.000000000 +0000
+++ hs-language-c-ghc/pkg-plist	2009-07-20 19:20:29.000000000 +0000
@@ -1,49 +1,50 @@
-@comment $FreeBSD: ports/devel/hs-language-c-ghc/pkg-plist,v 1.1 2009/03/06 19:46:33 pgj Exp $
-%%SUBDIR%%/Language/C.hi
-%%SUBDIR%%/Language/C/Analysis/AstAnalysis.hi
-%%SUBDIR%%/Language/C/Analysis/Debug.hi
-%%SUBDIR%%/Language/C/Analysis/DeclAnalysis.hi
-%%SUBDIR%%/Language/C/Analysis/DefTable.hi
-%%SUBDIR%%/Language/C/Analysis/Export.hi
-%%SUBDIR%%/Language/C/Analysis/NameSpaceMap.hi
-%%SUBDIR%%/Language/C/Analysis/SemError.hi
-%%SUBDIR%%/Language/C/Analysis/SemRep.hi
-%%SUBDIR%%/Language/C/Analysis/TravMonad.hi
-%%SUBDIR%%/Language/C/Data/Error.hi
-%%SUBDIR%%/Language/C/Data/Ident.hi
-%%SUBDIR%%/Language/C/Data/InputStream.hi
-%%SUBDIR%%/Language/C/Data/Name.hi
-%%SUBDIR%%/Language/C/Data/Node.hi
-%%SUBDIR%%/Language/C/Data/Position.hi
-%%SUBDIR%%/Language/C/Data/RList.hi
-%%SUBDIR%%/Language/C/Parser/Builtin.hi
-%%SUBDIR%%/Language/C/Parser/Lexer.hi
-%%SUBDIR%%/Language/C/Parser/Parser.hi
-%%SUBDIR%%/Language/C/Parser/ParserMonad.hi
-%%SUBDIR%%/Language/C/Parser/Tokens.hi
-%%SUBDIR%%/Language/C/Syntax/AST.hi
-%%SUBDIR%%/Language/C/Syntax/Constants.hi
-%%SUBDIR%%/Language/C/Syntax/Ops.hi
-%%SUBDIR%%/Language/C/System/GCC.hi
-%%SUBDIR%%/Language/C/System/Preprocess.hi
-%%SUBDIR%%/Language/C/Analysis.hi
-%%SUBDIR%%/Language/C/Data.hi
-%%SUBDIR%%/Language/C/Parser.hi
-%%SUBDIR%%/Language/C/Pretty.hi
-%%SUBDIR%%/Language/C/Syntax.hi
-%%SUBDIR%%/HS%%PORTNAME%%-%%PORTVERSION%%.o
-%%SUBDIR%%/libHS%%PORTNAME%%-%%PORTVERSION%%.a
-%%SUBDIR%%/%%PORTNAME%%-register.sh
-@dirrm %%SUBDIR%%/Language/C/Analysis
-@dirrm %%SUBDIR%%/Language/C/Data
-@dirrm %%SUBDIR%%/Language/C/Parser
-@dirrm %%SUBDIR%%/Language/C/Syntax
-@dirrm %%SUBDIR%%/Language/C/System
-@dirrm %%SUBDIR%%/Language/C
-@dirrmtry %%SUBDIR%%/Language
-%%RMLIC%%%%DOCSDIR%%/LICENSE
-%%RMLIC%%@dirrm %%DOCSDIR%%
-@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
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSlanguage-c-%%LANGUAGEC_VERSION%%.o
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/AstAnalysis.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/Debug.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/DeclAnalysis.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/DefTable.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/Export.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/NameSpaceMap.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/SemError.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/SemRep.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis/TravMonad.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Error.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Ident.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/InputStream.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Name.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Node.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/Position.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data/RList.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/Builtin.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/Lexer.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/Parser.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/ParserMonad.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser/Tokens.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Pretty.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax/AST.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax/Constants.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax/Ops.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/System/GCC.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/System/Preprocess.hi
+%%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSlanguage-c-%%LANGUAGEC_VERSION%%.a
+%%LANGUAGEC_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/System
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Syntax
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Parser
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Data
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C/Analysis
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language/C
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Language
+@dirrm %%LANGUAGEC_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%LANGUAGEC_LIBDIR_REL%%
+@exec /bin/sh %D/%%LANGUAGEC_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister language-c
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
--- patch-hs-language-c-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?200907241858.n6OIw6RE013807>