Date: Fri, 24 Jul 2009 10:13:26 -0700 (PDT) From: Jacula Modyun <jacula@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/137070: [patch]: update of devel/hs-c2hs to ghc-6.10.4 Message-ID: <200907241713.n6OHDPBd089418@splork.wirewater.yow> Resent-Message-ID: <200907241720.n6OHK5v3055014@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 137070 >Category: ports >Synopsis: [patch]: update of devel/hs-c2hs 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 17:20:05 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-c2hs.diff begins here --- diff -uNr hs-c2hs.orig/Makefile hs-c2hs/Makefile --- hs-c2hs.orig/Makefile 2009-05-13 09:45:50.000000000 +0000 +++ hs-c2hs/Makefile 2009-07-22 06:21:36.000000000 +0000 @@ -7,7 +7,7 @@ PORTNAME= c2hs PORTVERSION= 0.16.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel haskell MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/ PKGNAMEPREFIX= hs- @@ -20,34 +20,56 @@ RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc LIB_DEPENDS= gmp.8:${PORTSDIR}/math/libgmp4 -.include <bsd.port.pre.mk> +GHC_VERSION= 6.10.4 +C2HS_VERSION= ${PORTVERSION} -GHC_VERSION= 6.8.3 +GHC_CMD= ${LOCALBASE}/bin/ghc +SETUP_CMD= ./setup -# 'owned' by lang/ghc: -CABALDIR= ${PREFIX}/${SUBDIR} -CABALCMD= ${LOCALBASE}/bin/runghc Setup.hs -SUBDIR= lib/ghc-${GHC_VERSION}/cabal - -PLIST_FILES= bin/c2hs ${SUBDIR}/${PORTNAME}/C2HS.hs \ - ${SUBDIR}/${PORTNAME}/doc/c2hs-${PORTVERSION}/COPYING -PLIST_DIRS= ${SUBDIR}/${PORTNAME}/doc/c2hs-${PORTVERSION} ${SUBDIR}/${PORTNAME}/doc \ - ${SUBDIR}/${PORTNAME} - -CONFIGURE_ARGS= --ghc --prefix=${PREFIX} --libdir=${CABALDIR} \ - --datadir=${CABALDIR}/${PORTNAME} \ - --libsubdir='' --datasubdir='' +DATADIR= ${PREFIX}/share/${DISTNAME} +DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} +C2HS_LIBDIR_REL= lib/${DISTNAME} + +PLIST_SUB= GHC_VERSION=${GHC_VERSION} \ + C2HS_VERSION=${C2HS_VERSION} \ + C2HS_LIBDIR_REL=${C2HS_LIBDIR_REL} + +MAN1= c2hs.1 + +.if defined(NOPORTDOCS) +PLIST_SUB+= NOPORTDOCS="" +.else +PLIST_SUB+= NOPORTDOCS="@comment " +.endif + +.if !defined(NOPORTDOCS) +BUILD_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/html:${PORTSDIR}/textproc/docbook-xsl \ + ${LOCALBASE}/bin/xsltproc:${PORTSDIR}/textproc/libxslt +USE_GMAKE= yes +PORTDOCS= COPYING users_guide +.endif + +.SILENT: do-configure: - cd ${WRKSRC} && ${CABALCMD} configure ${CONFIGURE_ARGS} + cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \ + && ${SETUP_CMD} configure --prefix=${PREFIX} do-build: - cd ${WRKSRC} && ${CABALCMD} build + cd ${WRKSRC} && ${SETUP_CMD} build + +.if !defined(NOPORTDOCS) + @(cd ${WRKSRC}/doc && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} html) +.endif do-install: - cd ${WRKSRC} && ${CABALCMD} install + cd ${WRKSRC} && ${SETUP_CMD} install \ + && ${INSTALL_MAN} ${WRKSRC}/doc/man1/c2hs.1 ${PREFIX}/man/man1 +.if !defined(NOPORTDOCS) + @(cd ${WRKSRC}/doc && ${CP} -R users_guide ${DOCSDIR}) +.endif post-install: - @${STRIP_CMD} ${PREFIX}/bin/c2hs + ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff -uNr hs-c2hs.orig/pkg-plist hs-c2hs/pkg-plist --- hs-c2hs.orig/pkg-plist 1970-01-01 00:00:00.000000000 +0000 +++ hs-c2hs/pkg-plist 2009-07-15 14:02:06.000000000 +0000 @@ -0,0 +1,5 @@ +bin/c2hs +%%DATADIR%%/C2HS.hs +%%NOPORTDOCS%%%%DOCSDIR%%/COPYING +%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%% +@dirrm %%DATADIR%% --- patch-hs-c2hs.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?200907241713.n6OHDPBd089418>