aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-01-13 06:22:11 +0800
committerpgj <pgj@FreeBSD.org>2010-01-13 06:22:11 +0800
commit6da4fa6a7e5c5f6d06591599368caff45cf327dd (patch)
tree90693ec237cec71397234ef59068b2307c09fd1d /textproc
parent29d11b787c9bd4fe4861fb89fa1e840c0e675625 (diff)
downloadfreebsd-ports-gnome-6da4fa6a7e5c5f6d06591599368caff45cf327dd.tar.gz
freebsd-ports-gnome-6da4fa6a7e5c5f6d06591599368caff45cf327dd.tar.zst
freebsd-ports-gnome-6da4fa6a7e5c5f6d06591599368caff45cf327dd.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>
Diffstat (limited to 'textproc')
-rw-r--r--textproc/Makefile1
-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
5 files changed, 117 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index a50c00146771..4c59826b4ee1 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -225,6 +225,7 @@
SUBDIR += hs-polyparse-ghc
SUBDIR += hs-stringsearch
SUBDIR += hs-tagsoup
+ SUBDIR += hs-texmath
SUBDIR += hs-xml
SUBDIR += hsb-aspell
SUBDIR += htdig
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