aboutsummaryrefslogtreecommitdiff
path: root/textproc/hs-texmath
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2010-01-12 22:22:11 +0000
committerGabor Pali <pgj@FreeBSD.org>2010-01-12 22:22:11 +0000
commit5947f4845e008ac0af283472364f8f6d36829074 (patch)
treebe975f815071dc378519cd745aaaa6ee7828e02f /textproc/hs-texmath
parent4f4f72c671c80874fb812468dad73471d4e6e0bf (diff)
downloadports-5947f4845e008ac0af283472364f8f6d36829074.tar.gz
ports-5947f4845e008ac0af283472364f8f6d36829074.zip
The texmathml Haskell library provides functions to convert LaTeX math
formulas to presentation MathML. It supports basic LaTeX and AMS extensions, but not macros. WWW: http://hackage.haskell.org/package/texmath PR: ports/142580 Submitted by: Jacula Modyun <jacula(at)gmail.com>
Notes
Notes: svn path=/head/; revision=247763
Diffstat (limited to 'textproc/hs-texmath')
-rw-r--r--textproc/hs-texmath/Makefile89
-rw-r--r--textproc/hs-texmath/distinfo3
-rw-r--r--textproc/hs-texmath/pkg-descr5
-rw-r--r--textproc/hs-texmath/pkg-plist19
4 files changed, 116 insertions, 0 deletions
diff --git a/textproc/hs-texmath/Makefile b/textproc/hs-texmath/Makefile
new file mode 100644
index 000000000000..fb4f6fbe1e35
--- /dev/null
+++ b/textproc/hs-texmath/Makefile
@@ -0,0 +1,89 @@
+# New ports collection makefile for: hs-texmath
+# Date created: January 10 2010
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $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 <bsd.port.mk>
diff --git a/textproc/hs-texmath/distinfo b/textproc/hs-texmath/distinfo
new file mode 100644
index 000000000000..68db1a67f78e
--- /dev/null
+++ b/textproc/hs-texmath/distinfo
@@ -0,0 +1,3 @@
+MD5 (texmath-0.1.1.tar.gz) = 5b0c8f495517319d76dce8e71ad7260d
+SHA256 (texmath-0.1.1.tar.gz) = 1fcf4bb9caed27cac39ef59fb31597668575908420ce5702bb340f843d71d96a
+SIZE (texmath-0.1.1.tar.gz) = 19149
diff --git a/textproc/hs-texmath/pkg-descr b/textproc/hs-texmath/pkg-descr
new file mode 100644
index 000000000000..f3c7216dcf78
--- /dev/null
+++ b/textproc/hs-texmath/pkg-descr
@@ -0,0 +1,5 @@
+The texmathml Haskell library provides functions to convert LaTeX math
+formulas to presentation MathML. It supports basic LaTeX and AMS
+extensions, but not macros.
+
+WWW: http://hackage.haskell.org/package/texmath
diff --git a/textproc/hs-texmath/pkg-plist b/textproc/hs-texmath/pkg-plist
new file mode 100644
index 000000000000..3ffbe951dd16
--- /dev/null
+++ b/textproc/hs-texmath/pkg-plist
@@ -0,0 +1,19 @@
+@comment $FreeBSD$
+bin/testTeXMathML
+bin/texmath-cgi
+%%TEXMATH_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HStexmath-%%TEXMATH_VERSION%%.o
+%%TEXMATH_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/TeXMath.hi
+%%TEXMATH_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/TeXMath/MathMLWriter.hi
+%%TEXMATH_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/TeXMath/Parser.hi
+%%TEXMATH_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHStexmath-%%TEXMATH_VERSION%%.a
+%%TEXMATH_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%TEXMATH_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/TeXMath
+@dirrm %%TEXMATH_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text
+@dirrm %%TEXMATH_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%TEXMATH_LIBDIR_REL%%
+@exec /bin/sh %D/%%TEXMATH_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister texmath
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old