# New ports collection makefile for: hs-texmath # Date created: January 10 2010 # Whom: Giuseppe Pilichi aka Jacula Modyun # # $FreeBSD$ # PORTNAME= texmath PORTVERSION= 0.1.1 CATEGORIES= textproc haskell MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/ PKGNAMEPREFIX= hs- MAINTAINER= jacula@gmail.com COMMENT= Conversion of LaTeX math formulas to MathML for Haskell BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \ hs-xml>=1.2.6:${PORTSDIR}/textproc/hs-xml \ hs-cgi>=3001.1.7.1:${PORTSDIR}/www/hs-cgi \ hs-json>=0.4.3:${PORTSDIR}/converters/hs-json RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \ hs-xml>=1.2.6:${PORTSDIR}/textproc/hs-xml \ hs-cgi>=3001.1.7.1:${PORTSDIR}/www/hs-cgi \ hs-json>=0.4.3:${PORTSDIR}/converters/hs-json GHC_VERSION= 6.10.4 TEXMATH_VERSION= ${PORTVERSION} GHC_CMD= ${LOCALBASE}/bin/ghc SETUP_CMD= ./setup DATADIR= ${PREFIX}/share/${DISTNAME} PORTDATA= * DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} TEXMATH_LIBDIR_REL= lib/${DISTNAME} PLIST_SUB= GHC_VERSION=${GHC_VERSION} \ TEXMATH_VERSION=${TEXMATH_VERSION} \ TEXMATH_LIBDIR_REL=${TEXMATH_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 .endif BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour HSCOLOUR_VERSION= 1.15 HSCOLOUR_DATADIR= ${PREFIX}/share/hscolour-${HSCOLOUR_VERSION} PORTDOCS= * .endif .SILENT: do-configure: cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal .if !defined(NOPORTDATA) cd ${WRKSRC} && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} .else cd ${WRKSRC} && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} \ --datadir='' --datasubdir='' --docdir='${DOCSDIR}' .endif do-build: cd ${WRKSRC} && ${SETUP_CMD} build \ && ${SETUP_CMD} register --gen-script .if !defined(NOPORTDOCS) cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source --executables \ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css .endif do-install: cd ${WRKSRC} && ${SETUP_CMD} install \ && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${TEXMATH_LIBDIR_REL}/register.sh post-install: ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old .include